master
h 34 lines 769 Bytes
Raw
1 #ifndef ACPI_VMCLOCK_H
2 #define ACPI_VMCLOCK_H
3
4 #include "hw/acpi/bios-linker-loader.h"
5 #include "hw/core/qdev.h"
6 #include "qemu/uuid.h"
7 #include "qom/object.h"
8
9 #define TYPE_VMCLOCK "vmclock"
10
11 #define VMCLOCK_ADDR 0xfeffb000
12 #define VMCLOCK_SIZE 0x1000
13
14 OBJECT_DECLARE_SIMPLE_TYPE(VmclockState, VMCLOCK)
15
16 struct vmclock_abi;
17
18 struct VmclockState {
19 DeviceState parent_obj;
20 MemoryRegion clk_page;
21 uint64_t physaddr;
22 struct vmclock_abi *clk;
23 };
24
25 /* returns NULL unless there is exactly one device */
26 static inline Object *find_vmclock_dev(void)
27 {
28 return object_resolve_path_type("", TYPE_VMCLOCK, NULL);
29 }
30
31 void vmclock_build_acpi(VmclockState *vms, GArray *table_data,
32 BIOSLinker *linker, const char *oem_id);
33
34 #endif