Merge tag 'pull-request-2022-10-28' of https://gitlab.com/thuth/qemu into staging
[qemu/ar7.git] / include / hw / acpi / vmgenid.h
blobdc8bb3433eb0b7d2da60695edc6e397e8407c037
1 #ifndef ACPI_VMGENID_H
2 #define ACPI_VMGENID_H
4 #include "hw/acpi/bios-linker-loader.h"
5 #include "hw/qdev-core.h"
6 #include "qemu/uuid.h"
7 #include "qom/object.h"
9 #define TYPE_VMGENID "vmgenid"
10 #define VMGENID_GUID "guid"
11 #define VMGENID_GUID_FW_CFG_FILE "etc/vmgenid_guid"
12 #define VMGENID_ADDR_FW_CFG_FILE "etc/vmgenid_addr"
14 #define VMGENID_FW_CFG_SIZE 4096 /* Occupy a page of memory */
15 #define VMGENID_GUID_OFFSET 40 /* allow space for
16 * OVMF SDT Header Probe Supressor
19 OBJECT_DECLARE_SIMPLE_TYPE(VmGenIdState, VMGENID)
21 struct VmGenIdState {
22 DeviceState parent_obj;
23 QemuUUID guid; /* The 128-bit GUID seen by the guest */
24 uint8_t vmgenid_addr_le[8]; /* Address of the GUID (little-endian) */
27 /* returns NULL unless there is exactly one device */
28 static inline Object *find_vmgenid_dev(void)
30 return object_resolve_path_type("", TYPE_VMGENID, NULL);
33 void vmgenid_build_acpi(VmGenIdState *vms, GArray *table_data, GArray *guid,
34 BIOSLinker *linker, const char *oem_id);
35 void vmgenid_add_fw_cfg(VmGenIdState *vms, FWCfgState *s, GArray *guid);
37 #endif