Add DSDT node for AppleSMC
commit15bce1b7c55c69f47e13c9eb2a4b80f41da26581
authorGabriel L. Somlo <gsomlo@gmail.com>
Sun, 22 Dec 2013 15:34:56 +0000 (22 10:34 -0500)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 26 Jan 2014 11:06:48 +0000 (26 13:06 +0200)
treefc8ac6ec8bfd998fee2803cd04b31c46e78bda97
parent3e16d14fd93ca6059134ba6b4f65c1c3e4cd3a18
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 <somlo@cmu.edu>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/acpi-build.c
hw/i386/acpi-dsdt-isa.dsl
hw/i386/acpi-dsdt.dsl
hw/i386/q35-acpi-dsdt.dsl
hw/misc/applesmc.c
include/hw/isa/isa.h