Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/vmm/io/vrtc.h
Show All 28 Lines | |||||
*/ | */ | ||||
#ifndef _VRTC_H_ | #ifndef _VRTC_H_ | ||||
#define _VRTC_H_ | #define _VRTC_H_ | ||||
#include <isa/isareg.h> | #include <isa/isareg.h> | ||||
struct vrtc; | struct vrtc; | ||||
struct vm_snapshot_meta; | |||||
struct vrtc *vrtc_init(struct vm *vm); | struct vrtc *vrtc_init(struct vm *vm); | ||||
void vrtc_cleanup(struct vrtc *vrtc); | void vrtc_cleanup(struct vrtc *vrtc); | ||||
void vrtc_reset(struct vrtc *vrtc); | void vrtc_reset(struct vrtc *vrtc); | ||||
time_t vrtc_get_time(struct vm *vm); | time_t vrtc_get_time(struct vm *vm); | ||||
int vrtc_set_time(struct vm *vm, time_t secs); | int vrtc_set_time(struct vm *vm, time_t secs); | ||||
int vrtc_nvram_write(struct vm *vm, int offset, uint8_t value); | int vrtc_nvram_write(struct vm *vm, int offset, uint8_t value); | ||||
int vrtc_nvram_read(struct vm *vm, int offset, uint8_t *retval); | int vrtc_nvram_read(struct vm *vm, int offset, uint8_t *retval); | ||||
int vrtc_addr_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes, | int vrtc_addr_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes, | ||||
uint32_t *val); | uint32_t *val); | ||||
int vrtc_data_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes, | int vrtc_data_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes, | ||||
uint32_t *val); | uint32_t *val); | ||||
#ifdef BHYVE_SNAPSHOT | |||||
int vrtc_snapshot(struct vrtc *vrtc, struct vm_snapshot_meta *meta); | |||||
#endif | |||||
#endif | #endif |