From 15bce1b7c55c69f47e13c9eb2a4b80f41da26581 Mon Sep 17 00:00:00 2001 From: "Gabriel L. Somlo" Date: Sun, 22 Dec 2013 10:34:56 -0500 Subject: Add DSDT node for AppleSMC AppleSMC (-device isa-applesmc) is required to boot OS X guests. OS X expects a SMC node to be present in the ACPI DSDT. This patch adds a SMC node to the DSDT, and dynamically patches the return value of SMC._STA to either 0x0B if the chip is present, or otherwise to 0x00, before booting the guest. Signed-off-by: Gabriel Somlo Signed-off-by: Michael S. Tsirkin --- include/hw/isa/isa.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index fa45a5b094..e0c749f9e9 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -20,6 +20,13 @@ #define TYPE_ISA_BUS "ISA" #define ISA_BUS(obj) OBJECT_CHECK(ISABus, (obj), TYPE_ISA_BUS) +#define TYPE_APPLE_SMC "isa-applesmc" + +static inline bool applesmc_find(void) +{ + return object_resolve_path_type("", TYPE_APPLE_SMC, NULL); +} + typedef struct ISADeviceClass { DeviceClass parent_class; } ISADeviceClass; -- cgit v1.2.3