]> git.proxmox.com Git - mirror_qemu.git/blame - include/hw/acpi/vmgenid.h
Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-for-5.2-pull-reques...
[mirror_qemu.git] / include / hw / acpi / vmgenid.h
CommitLineData
d03637bc
BW
1#ifndef ACPI_VMGENID_H
2#define ACPI_VMGENID_H
3
4#include "hw/acpi/bios-linker-loader.h"
a27bd6c7 5#include "hw/qdev-core.h"
d03637bc 6#include "qemu/uuid.h"
db1015e9 7#include "qom/object.h"
d03637bc 8
8d34cfd8 9#define TYPE_VMGENID "vmgenid"
d03637bc
BW
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"
13
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
17 */
18
8063396b 19OBJECT_DECLARE_SIMPLE_TYPE(VmGenIdState, VMGENID)
d03637bc 20
db1015e9 21struct VmGenIdState {
22fb6eb5 22 DeviceState parent_obj;
d03637bc
BW
23 QemuUUID guid; /* The 128-bit GUID seen by the guest */
24 uint8_t vmgenid_addr_le[8]; /* Address of the GUID (little-endian) */
db1015e9 25};
d03637bc 26
f9206302 27/* returns NULL unless there is exactly one device */
d03637bc
BW
28static inline Object *find_vmgenid_dev(void)
29{
8d34cfd8 30 return object_resolve_path_type("", TYPE_VMGENID, NULL);
d03637bc
BW
31}
32
33void vmgenid_build_acpi(VmGenIdState *vms, GArray *table_data, GArray *guid,
34 BIOSLinker *linker);
35void vmgenid_add_fw_cfg(VmGenIdState *vms, FWCfgState *s, GArray *guid);
36
37#endif