xref: /qemu/include/hw/acpi/vmclock.h (revision 0e3327b690b76b7c3966b028110ee053cc16a385)
1 #ifndef ACPI_VMCLOCK_H
2 #define ACPI_VMCLOCK_H
3 
4 #include "hw/acpi/bios-linker-loader.h"
5 #include "hw/qdev-core.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 */
find_vmclock_dev(void)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
35