monitor: Fix tracepoint crash on JSON syntax error
[qemu/armbru.git] / include / hw / acpi / vmgenid.h
blob38586ecbdfd07bfad5615c5a49e8cf4137ab6a9d
1 #ifndef ACPI_VMGENID_H
2 #define ACPI_VMGENID_H
4 #include "hw/acpi/bios-linker-loader.h"
5 #include "hw/qdev.h"
6 #include "qemu/uuid.h"
8 #define VMGENID_DEVICE "vmgenid"
9 #define VMGENID_GUID "guid"
10 #define VMGENID_GUID_FW_CFG_FILE "etc/vmgenid_guid"
11 #define VMGENID_ADDR_FW_CFG_FILE "etc/vmgenid_addr"
13 #define VMGENID_FW_CFG_SIZE 4096 /* Occupy a page of memory */
14 #define VMGENID_GUID_OFFSET 40 /* allow space for
15 * OVMF SDT Header Probe Supressor
18 #define VMGENID(obj) OBJECT_CHECK(VmGenIdState, (obj), VMGENID_DEVICE)
20 typedef struct VmGenIdState {
21 DeviceClass parent_obj;
22 QemuUUID guid; /* The 128-bit GUID seen by the guest */
23 uint8_t vmgenid_addr_le[8]; /* Address of the GUID (little-endian) */
24 } VmGenIdState;
26 /* returns NULL unless there is exactly one device */
27 static inline Object *find_vmgenid_dev(void)
29 return object_resolve_path_type("", VMGENID_DEVICE, NULL);
32 void vmgenid_build_acpi(VmGenIdState *vms, GArray *table_data, GArray *guid,
33 BIOSLinker *linker);
34 void vmgenid_add_fw_cfg(VmGenIdState *vms, FWCfgState *s, GArray *guid);
36 #endif