vmclock.h 769 B

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