pci, pc, virtio fixes and cleanups

A bunch of fixes all over the place.
 All of ACPI refactoring has been merged.
 Legacy pci commands have been dropped.
 virtio header cleanup
 initial patches from virtio-1.0 branch
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJU/CoXAAoJECgfDbjSjVRpX7EH/RMmgtsDO4wvqJu++lHvkB/q
 kSaXZYTpJTo0i5JE7n2brwuXA4902tTg9g5TMUpGPh9Pt2QRg7RTgGC1vqZyOBos
 MPw+4BO2v66S6qgX7bOf222z7r64cHTY7pLkQlrfD4usPlu2eusZ64UTW6Ru51fW
 WF9E9aunbl+HnuCGq6Iez3sCLscTBJpU/lEr6oSyHhuq3aa0CjjraEeV0E/QcwJG
 HTUeFymL8NFvlXZblsLI++VOv7Mxpi6yiCQ5XoKpFgGMvidwo41Aso6gB3ySGxOd
 w8O3Nbu77Iw/StDRNCg/5/GapabMKh2bE4UCsYY5OS63ZtD0fl0CCblhzm/ZFPw=
 =LY/j
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

pci, pc, virtio fixes and cleanups

A bunch of fixes all over the place.
All of ACPI refactoring has been merged.
Legacy pci commands have been dropped.
virtio header cleanup
initial patches from virtio-1.0 branch

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

* remotes/mst/tags/for_upstream: (130 commits)
  acpi: drop unused code
  aml-build: comment fix
  acpi-build: fix typo in comment
  acpi: update generated files
  vhost user:support vhost user nic for non msi guests
  aml-build: fix build for glib < 2.22
  acpi: update generated files
  Makefile.target: binary depends on config-devices
  acpi-test-data: update after pci rewrite
  acpi, mem-hotplug: use PC_DIMM_SLOT_PROP in acpi_memory_plug_cb().
  pci-hotplug-old: Has been dead for five major releases, bury
  pci: Give a few helpers internal linkage
  acpi: make build_*() routines static to aml-build.c
  pc: acpi: remove not used anymore ssdt-[misc|pcihp].hex.generated blobs
  pc: acpi-build: drop template patching and create PCI bus tree dynamically
  tests: ACPI: update pc/SSDT.bridge due to new alg of PCI tree creation
  pc: acpi-build: simplify PCI bus tree generation
  tests: add ACPI blobs for qemu with bridge cases
  tests: bios-tables-test: add support for testing bridges
  tests: ACPI test blobs update due to PCI0._CRS changes
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Conflicts:
	hw/pci/pci-hotplug-old.c
This commit is contained in:
Peter Maydell 2015-03-09 09:14:28 +00:00
commit 0048fa6c80
155 changed files with 3585 additions and 5287 deletions

View file

@ -7,10 +7,8 @@ obj-$(CONFIG_XEN) += ../xenpv/ xen/
obj-y += kvmvapic.o
obj-y += acpi-build.o
hw/i386/acpi-build.o: hw/i386/acpi-build.c hw/i386/acpi-dsdt.hex \
hw/i386/ssdt-proc.hex hw/i386/ssdt-pcihp.hex hw/i386/ssdt-misc.hex \
hw/i386/acpi-build.o: hw/i386/acpi-build.c \
hw/i386/acpi-dsdt.hex hw/i386/q35-acpi-dsdt.hex \
hw/i386/q35-acpi-dsdt.hex hw/i386/ssdt-mem.hex \
hw/i386/ssdt-tpm.hex
iasl-option=$(shell if test -z "`$(1) $(2) 2>&1 > /dev/null`" \

File diff suppressed because it is too large Load diff

View file

@ -16,12 +16,12 @@
/****************************************************************
* CPU hotplug
****************************************************************/
#define CPU_HOTPLUG_RESOURCE_DEVICE PRES
Scope(\_SB) {
/* Objects filled in by run-time generated SSDT */
External(NTFY, MethodObj)
External(CPON, PkgObj)
External(PRS, FieldUnitObj)
/* Methods called by run-time generated SSDT Processor objects */
Method(CPMA, 1, NotSerialized) {
@ -54,10 +54,6 @@ Scope(\_SB) {
}
#define CPU_STATUS_LEN ACPI_GPE_PROC_LEN
OperationRegion(PRST, SystemIO, CPU_STATUS_BASE, CPU_STATUS_LEN)
Field(PRST, ByteAcc, NoLock, Preserve) {
PRS, 256
}
Method(PRSC, 0) {
// Local5 = active cpu bitmap
Store(PRS, Local5)
@ -91,15 +87,4 @@ Scope(\_SB) {
Increment(Local0)
}
}
Device(CPU_HOTPLUG_RESOURCE_DEVICE) {
Name(_HID, EisaId("PNP0A06"))
Name(_UID, "CPU hotplug resources")
Name(_CRS, ResourceTemplate() {
IO(Decode16, CPU_STATUS_BASE, CPU_STATUS_BASE, 0, CPU_STATUS_LEN)
})
Name(_STA, 0xB) /* present, functioning, decoding, not shown in UI */
}
}

View file

@ -16,17 +16,6 @@
/* Common legacy ISA style devices. */
Scope(\_SB.PCI0.ISA) {
Device (SMC) {
Name(_HID, EisaId("APP0001"))
/* _STA will be patched to 0x0B if AppleSMC is present */
ACPI_EXTRACT_NAME_BYTE_CONST DSDT_APPLESMC_STA
Name(_STA, 0xF0)
Name(_CRS, ResourceTemplate () {
IO (Decode16, 0x0300, 0x0300, 0x01, 0x20)
IRQNoFlags() { 6 }
})
}
Device(RTC) {
Name(_HID, EisaId("PNP0B00"))
Name(_CRS, ResourceTemplate() {

View file

@ -22,14 +22,16 @@
External(MEMORY_SLOTS_NUMBER, IntObj)
/* Memory hotplug IO registers */
OperationRegion(MEMORY_HOTPLUG_IO_REGION, SystemIO,
ACPI_MEMORY_HOTPLUG_BASE,
ACPI_MEMORY_HOTPLUG_IO_LEN)
Name(_CRS, ResourceTemplate() {
IO(Decode16, ACPI_MEMORY_HOTPLUG_BASE, ACPI_MEMORY_HOTPLUG_BASE,
0, ACPI_MEMORY_HOTPLUG_IO_LEN, IO)
})
External(MEMORY_SLOT_ADDR_LOW, FieldUnitObj) // read only
External(MEMORY_SLOT_ADDR_HIGH, FieldUnitObj) // read only
External(MEMORY_SLOT_SIZE_LOW, FieldUnitObj) // read only
External(MEMORY_SLOT_SIZE_HIGH, FieldUnitObj) // read only
External(MEMORY_SLOT_PROXIMITY, FieldUnitObj) // read only
External(MEMORY_SLOT_ENABLED, FieldUnitObj) // 1 if enabled, read only
External(MEMORY_SLOT_INSERT_EVENT, FieldUnitObj) // (read) 1 if has a insert event. (write) 1 to clear event
External(MEMORY_SLOT_SLECTOR, FieldUnitObj) // DIMM selector, write only
External(MEMORY_SLOT_OST_EVENT, FieldUnitObj) // _OST event code, write only
External(MEMORY_SLOT_OST_STATUS, FieldUnitObj) // _OST status code, write only
Method(_STA, 0) {
If (LEqual(MEMORY_SLOTS_NUMBER, Zero)) {
@ -39,25 +41,7 @@
Return(0xB)
}
Field(MEMORY_HOTPLUG_IO_REGION, DWordAcc, NoLock, Preserve) {
MEMORY_SLOT_ADDR_LOW, 32, // read only
MEMORY_SLOT_ADDR_HIGH, 32, // read only
MEMORY_SLOT_SIZE_LOW, 32, // read only
MEMORY_SLOT_SIZE_HIGH, 32, // read only
MEMORY_SLOT_PROXIMITY, 32, // read only
}
Field(MEMORY_HOTPLUG_IO_REGION, ByteAcc, NoLock, Preserve) {
Offset(20),
MEMORY_SLOT_ENABLED, 1, // 1 if enabled, read only
MEMORY_SLOT_INSERT_EVENT, 1, // (read) 1 if has a insert event. (write) 1 to clear event
}
Mutex (MEMORY_SLOT_LOCK, 0)
Field (MEMORY_HOTPLUG_IO_REGION, DWordAcc, NoLock, Preserve) {
MEMORY_SLOT_SLECTOR, 32, // DIMM selector, write only
MEMORY_SLOT_OST_EVENT, 32, // _OST event code, write only
MEMORY_SLOT_OST_STATUS, 32, // _OST status code, write only
}
Method(MEMORY_SLOT_SCAN_METHOD, 0) {
If (LEqual(MEMORY_SLOTS_NUMBER, Zero)) {

View file

@ -1,92 +0,0 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
/* PCI CRS (current resources) definition. */
Scope(\_SB.PCI0) {
Name(CRES, ResourceTemplate() {
WordBusNumber(ResourceProducer, MinFixed, MaxFixed, PosDecode,
0x0000, // Address Space Granularity
0x0000, // Address Range Minimum
0x00FF, // Address Range Maximum
0x0000, // Address Translation Offset
0x0100, // Address Length
,, )
IO(Decode16,
0x0CF8, // Address Range Minimum
0x0CF8, // Address Range Maximum
0x01, // Address Alignment
0x08, // Address Length
)
BOARD_SPECIFIC_PCI_RESOURSES
DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x00000000, // Address Space Granularity
0x000A0000, // Address Range Minimum
0x000BFFFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x00020000, // Address Length
,, , AddressRangeMemory, TypeStatic)
DWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Address Space Granularity
0xE0000000, // Address Range Minimum
0xFEBFFFFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x1EC00000, // Address Length
,, PW32, AddressRangeMemory, TypeStatic)
})
Name(CR64, ResourceTemplate() {
QWordMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x00000000, // Address Space Granularity
0x8000000000, // Address Range Minimum
0xFFFFFFFFFF, // Address Range Maximum
0x00000000, // Address Translation Offset
0x8000000000, // Address Length
,, PW64, AddressRangeMemory, TypeStatic)
})
Method(_CRS, 0) {
/* Fields provided by dynamically created ssdt */
External(P0S, IntObj)
External(P0E, IntObj)
External(P1V, IntObj)
External(P1S, BuffObj)
External(P1E, BuffObj)
External(P1L, BuffObj)
/* fixup 32bit pci io window */
CreateDWordField(CRES, \_SB.PCI0.PW32._MIN, PS32)
CreateDWordField(CRES, \_SB.PCI0.PW32._MAX, PE32)
CreateDWordField(CRES, \_SB.PCI0.PW32._LEN, PL32)
Store(P0S, PS32)
Store(P0E, PE32)
Store(Add(Subtract(P0E, P0S), 1), PL32)
If (LEqual(P1V, Zero)) {
Return (CRES)
}
/* fixup 64bit pci io window */
CreateQWordField(CR64, \_SB.PCI0.PW64._MIN, PS64)
CreateQWordField(CR64, \_SB.PCI0.PW64._MAX, PE64)
CreateQWordField(CR64, \_SB.PCI0.PW64._LEN, PL64)
Store(P1S, PS64)
Store(P1E, PE64)
Store(P1L, PL64)
/* add window and return result */
ConcatenateResTemplate(CRES, CR64, Local0)
Return (Local0)
}
}

View file

@ -31,50 +31,6 @@ DefinitionBlock (
#include "acpi-dsdt-dbug.dsl"
/****************************************************************
* PCI Bus definition
****************************************************************/
#define BOARD_SPECIFIC_PCI_RESOURSES \
WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
0x0000, \
0x0000, \
0x0CF7, \
0x0000, \
0x0CF8, \
,, , TypeStatic) \
WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
0x0000, \
0x0D00, \
0xADFF, \
0x0000, \
0xA100, \
,, , TypeStatic) \
/* 0xae00-0xae0e hole for PCI hotplug, hw/acpi/piix4.c:PCI_HOTPLUG_ADDR */ \
WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
0x0000, \
0xAE0F, \
0xAEFF, \
0x0000, \
0x00F1, \
,, , TypeStatic) \
/* 0xaf00-0xaf1f hole for CPU hotplug, hw/acpi/piix4.c:PIIX4_PROC_BASE */ \
WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
0x0000, \
0xAF20, \
0xAFDF, \
0x0000, \
0x00C0, \
,, , TypeStatic) \
/* 0xafe0-0xafe3 hole for ACPI.GPE0, hw/acpi/piix4.c:GPE_BASE */ \
WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
0x0000, \
0xAFE4, \
0xFFFF, \
0x0000, \
0x501C, \
,, , TypeStatic)
Scope(\_SB) {
Device(PCI0) {
Name(_HID, EisaId("PNP0A03"))
@ -85,7 +41,6 @@ DefinitionBlock (
}
}
#include "acpi-dsdt-pci-crs.dsl"
#include "acpi-dsdt-hpet.dsl"
@ -130,7 +85,6 @@ DefinitionBlock (
}
}
#define DSDT_APPLESMC_STA piix_dsdt_applesmc_sta
#include "acpi-dsdt-isa.dsl"

View file

@ -3,12 +3,12 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x53,
0x44,
0x54,
0x25,
0xe,
0x9a,
0xb,
0x0,
0x0,
0x1,
0x6c,
0xf8,
0x42,
0x58,
0x50,
@ -145,405 +145,6 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x44,
0x1,
0x10,
0x4e,
0x18,
0x2e,
0x5f,
0x53,
0x42,
0x5f,
0x50,
0x43,
0x49,
0x30,
0x8,
0x43,
0x52,
0x45,
0x53,
0x11,
0x42,
0xa,
0xa,
0x9e,
0x88,
0xd,
0x0,
0x2,
0xc,
0x0,
0x0,
0x0,
0x0,
0x0,
0xff,
0x0,
0x0,
0x0,
0x0,
0x1,
0x47,
0x1,
0xf8,
0xc,
0xf8,
0xc,
0x1,
0x8,
0x88,
0xd,
0x0,
0x1,
0xc,
0x3,
0x0,
0x0,
0x0,
0x0,
0xf7,
0xc,
0x0,
0x0,
0xf8,
0xc,
0x88,
0xd,
0x0,
0x1,
0xc,
0x3,
0x0,
0x0,
0x0,
0xd,
0xff,
0xad,
0x0,
0x0,
0x0,
0xa1,
0x88,
0xd,
0x0,
0x1,
0xc,
0x3,
0x0,
0x0,
0xf,
0xae,
0xff,
0xae,
0x0,
0x0,
0xf1,
0x0,
0x88,
0xd,
0x0,
0x1,
0xc,
0x3,
0x0,
0x0,
0x20,
0xaf,
0xdf,
0xaf,
0x0,
0x0,
0xc0,
0x0,
0x88,
0xd,
0x0,
0x1,
0xc,
0x3,
0x0,
0x0,
0xe4,
0xaf,
0xff,
0xff,
0x0,
0x0,
0x1c,
0x50,
0x87,
0x17,
0x0,
0x0,
0xc,
0x3,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0xa,
0x0,
0xff,
0xff,
0xb,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x2,
0x0,
0x87,
0x17,
0x0,
0x0,
0xc,
0x1,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0xe0,
0xff,
0xff,
0xbf,
0xfe,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0xc0,
0x1e,
0x79,
0x0,
0x8,
0x43,
0x52,
0x36,
0x34,
0x11,
0x33,
0xa,
0x30,
0x8a,
0x2b,
0x0,
0x0,
0xc,
0x3,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x80,
0x0,
0x0,
0x0,
0xff,
0xff,
0xff,
0xff,
0xff,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x80,
0x0,
0x0,
0x0,
0x79,
0x0,
0x14,
0x41,
0xa,
0x5f,
0x43,
0x52,
0x53,
0x0,
0x8a,
0x43,
0x52,
0x45,
0x53,
0xa,
0x8c,
0x50,
0x53,
0x33,
0x32,
0x8a,
0x43,
0x52,
0x45,
0x53,
0xa,
0x90,
0x50,
0x45,
0x33,
0x32,
0x8a,
0x43,
0x52,
0x45,
0x53,
0xa,
0x98,
0x50,
0x4c,
0x33,
0x32,
0x70,
0x50,
0x30,
0x53,
0x5f,
0x50,
0x53,
0x33,
0x32,
0x70,
0x50,
0x30,
0x45,
0x5f,
0x50,
0x45,
0x33,
0x32,
0x70,
0x72,
0x74,
0x50,
0x30,
0x45,
0x5f,
0x50,
0x30,
0x53,
0x5f,
0x0,
0x1,
0x0,
0x50,
0x4c,
0x33,
0x32,
0xa0,
0xc,
0x93,
0x50,
0x31,
0x56,
0x5f,
0x0,
0xa4,
0x43,
0x52,
0x45,
0x53,
0x8f,
0x43,
0x52,
0x36,
0x34,
0xa,
0xe,
0x50,
0x53,
0x36,
0x34,
0x8f,
0x43,
0x52,
0x36,
0x34,
0xa,
0x16,
0x50,
0x45,
0x36,
0x34,
0x8f,
0x43,
0x52,
0x36,
0x34,
0xa,
0x26,
0x50,
0x4c,
0x36,
0x34,
0x70,
0x50,
0x31,
0x53,
0x5f,
0x50,
0x53,
0x36,
0x34,
0x70,
0x50,
0x31,
0x45,
0x5f,
0x50,
0x45,
0x36,
0x34,
0x70,
0x50,
0x31,
0x4c,
0x5f,
0x50,
0x4c,
0x36,
0x34,
0x84,
0x43,
0x52,
0x45,
0x53,
0x43,
0x52,
0x36,
0x34,
0x60,
0xa4,
0x60,
0x10,
0x4d,
0x8,
0x5f,
@ -811,8 +412,8 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x4e,
0x1,
0x10,
0x4a,
0x1e,
0x4c,
0x1b,
0x2f,
0x3,
0x5f,
@ -829,52 +430,6 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x5f,
0x5b,
0x82,
0x2c,
0x53,
0x4d,
0x43,
0x5f,
0x8,
0x5f,
0x48,
0x49,
0x44,
0xc,
0x6,
0x10,
0x0,
0x1,
0x8,
0x5f,
0x53,
0x54,
0x41,
0xa,
0xf0,
0x8,
0x5f,
0x43,
0x52,
0x53,
0x11,
0x10,
0xa,
0xd,
0x47,
0x1,
0x0,
0x3,
0x0,
0x3,
0x1,
0x20,
0x22,
0x40,
0x0,
0x79,
0x0,
0x5b,
0x82,
0x2d,
0x52,
0x54,
@ -2318,8 +1873,8 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x53,
0x1,
0x10,
0x4f,
0x12,
0x4d,
0xc,
0x5f,
0x53,
0x42,
@ -2416,32 +1971,6 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x22,
0xa,
0xc8,
0x5b,
0x80,
0x50,
0x52,
0x53,
0x54,
0x1,
0xb,
0x0,
0xaf,
0xa,
0x20,
0x5b,
0x81,
0xc,
0x50,
0x52,
0x53,
0x54,
0x1,
0x50,
0x52,
0x53,
0x5f,
0x40,
0x10,
0x14,
0x4a,
0x6,
@ -2549,81 +2078,9 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x3,
0x75,
0x60,
0x5b,
0x82,
0x46,
0x4,
0x50,
0x52,
0x45,
0x53,
0x8,
0x5f,
0x48,
0x49,
0x44,
0xc,
0x41,
0xd0,
0xa,
0x6,
0x8,
0x5f,
0x55,
0x49,
0x44,
0xd,
0x43,
0x50,
0x55,
0x20,
0x68,
0x6f,
0x74,
0x70,
0x6c,
0x75,
0x67,
0x20,
0x72,
0x65,
0x73,
0x6f,
0x75,
0x72,
0x63,
0x65,
0x73,
0x0,
0x8,
0x5f,
0x43,
0x52,
0x53,
0x11,
0xd,
0xa,
0xa,
0x47,
0x1,
0x0,
0xaf,
0x0,
0xaf,
0x0,
0x20,
0x79,
0x0,
0x8,
0x5f,
0x53,
0x54,
0x41,
0xa,
0xb,
0x10,
0x40,
0x31,
0x44,
0x2a,
0x2e,
0x5f,
0x53,
@ -2635,8 +2092,8 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x30,
0x5b,
0x82,
0x43,
0x30,
0x47,
0x29,
0x4d,
0x48,
0x50,
@ -2686,37 +2143,6 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x65,
0x73,
0x0,
0x5b,
0x80,
0x48,
0x50,
0x4d,
0x52,
0x1,
0xb,
0x0,
0xa,
0xa,
0x18,
0x8,
0x5f,
0x43,
0x52,
0x53,
0x11,
0xd,
0xa,
0xa,
0x47,
0x1,
0x0,
0xa,
0x0,
0xa,
0x0,
0x18,
0x79,
0x0,
0x14,
0x13,
0x5f,
@ -2738,89 +2164,12 @@ static unsigned char AcpiDsdtAmlCode[] = {
0xa,
0xb,
0x5b,
0x81,
0x1f,
0x48,
0x50,
0x4d,
0x52,
0x3,
0x4d,
0x52,
0x42,
0x4c,
0x20,
0x4d,
0x52,
0x42,
0x48,
0x20,
0x4d,
0x52,
0x4c,
0x4c,
0x20,
0x4d,
0x52,
0x4c,
0x48,
0x20,
0x4d,
0x50,
0x58,
0x5f,
0x20,
0x5b,
0x81,
0x13,
0x48,
0x50,
0x4d,
0x52,
0x1,
0x0,
0x40,
0xa,
0x4d,
0x45,
0x53,
0x5f,
0x1,
0x4d,
0x49,
0x4e,
0x53,
0x1,
0x5b,
0x1,
0x4d,
0x4c,
0x43,
0x4b,
0x0,
0x5b,
0x81,
0x15,
0x48,
0x50,
0x4d,
0x52,
0x3,
0x4d,
0x53,
0x45,
0x4c,
0x20,
0x4d,
0x4f,
0x45,
0x56,
0x20,
0x4d,
0x4f,
0x53,
0x43,
0x20,
0x14,
0x4a,
0x4,
@ -3621,6 +2970,3 @@ static unsigned char AcpiDsdtAmlCode[] = {
0x46,
0x0
};
static unsigned short piix_dsdt_applesmc_sta[] = {
0x353
};

View file

@ -1738,7 +1738,7 @@ static void reset_assigned_device(DeviceState *dev)
assigned_dev_pci_write_config(pci_dev, PCI_COMMAND, 0, 1);
}
static int assigned_initfn(struct PCIDevice *pci_dev)
static void assigned_realize(struct PCIDevice *pci_dev, Error **errp)
{
AssignedDevice *dev = DO_UPCAST(AssignedDevice, dev, pci_dev);
uint8_t e_intx;
@ -1821,7 +1821,7 @@ static int assigned_initfn(struct PCIDevice *pci_dev)
assigned_dev_load_option_rom(dev);
return 0;
return;
assigned_out:
deassign_device(dev);
@ -1831,9 +1831,7 @@ out:
exit_with_error:
assert(local_err);
qerror_report_err(local_err);
error_free(local_err);
return -1;
error_propagate(errp, local_err);
}
static void assigned_exitfn(struct PCIDevice *pci_dev)
@ -1869,7 +1867,7 @@ static void assign_class_init(ObjectClass *klass, void *data)
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
DeviceClass *dc = DEVICE_CLASS(klass);
k->init = assigned_initfn;
k->realize = assigned_realize;
k->exit = assigned_exitfn;
k->config_read = assigned_dev_pci_read_config;
k->config_write = assigned_dev_pci_write_config;

View file

@ -1241,6 +1241,13 @@ FWCfgState *pc_memory_init(MachineState *machine,
exit(EXIT_FAILURE);
}
if (QEMU_ALIGN_UP(machine->maxram_size,
TARGET_PAGE_SIZE) != machine->maxram_size) {
error_report("maximum memory size must by aligned to multiple of "
"%d bytes", TARGET_PAGE_SIZE);
exit(EXIT_FAILURE);
}
pcms->hotplug_memory_base =
ROUND_UP(0x100000000ULL + above_4g_mem_size, 1ULL << 30);
@ -1666,6 +1673,20 @@ static void pc_machine_device_plug_cb(HotplugHandler *hotplug_dev,
}
}
static void pc_machine_device_unplug_request_cb(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
error_setg(errp, "acpi: device unplug request for not supported device"
" type: %s", object_get_typename(OBJECT(dev)));
}
static void pc_machine_device_unplug_cb(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
error_setg(errp, "acpi: device unplug for not supported device"
" type: %s", object_get_typename(OBJECT(dev)));
}
static HotplugHandler *pc_get_hotpug_handler(MachineState *machine,
DeviceState *dev)
{
@ -1795,6 +1816,8 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
pcmc->get_hotplug_handler = mc->get_hotplug_handler;
mc->get_hotplug_handler = pc_get_hotpug_handler;
hc->plug = pc_machine_device_plug_cb;
hc->unplug_request = pc_machine_device_unplug_request_cb;
hc->unplug = pc_machine_device_unplug_cb;
}
static const TypeInfo pc_machine_info = {

View file

@ -60,6 +60,7 @@ static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
static bool has_acpi_build = true;
static bool rsdp_in_ram = true;
static int legacy_acpi_table_size;
static bool smbios_defaults = true;
static bool smbios_legacy_mode;
@ -168,6 +169,7 @@ static void pc_init1(MachineState *machine,
guest_info->isapc_ram_fw = !pci_enabled;
guest_info->has_reserved_memory = has_reserved_memory;
guest_info->rsdp_in_ram = rsdp_in_ram;
if (smbios_defaults) {
MachineClass *mc = MACHINE_GET_CLASS(machine);
@ -310,6 +312,7 @@ static void pc_init_pci(MachineState *machine)
static void pc_compat_2_2(MachineState *machine)
{
rsdp_in_ram = false;
x86_cpu_compat_set_features("kvm64", FEAT_1_EDX, 0, CPUID_VME);
x86_cpu_compat_set_features("kvm32", FEAT_1_EDX, 0, CPUID_VME);
x86_cpu_compat_set_features("Conroe", FEAT_1_EDX, 0, CPUID_VME);

View file

@ -50,6 +50,7 @@
#define MAX_SATA_PORTS 6
static bool has_acpi_build = true;
static bool rsdp_in_ram = true;
static bool smbios_defaults = true;
static bool smbios_legacy_mode;
static bool smbios_uuid_encoded = true;
@ -154,6 +155,7 @@ static void pc_q35_init(MachineState *machine)
guest_info->isapc_ram_fw = false;
guest_info->has_acpi_build = has_acpi_build;
guest_info->has_reserved_memory = has_reserved_memory;
guest_info->rsdp_in_ram = rsdp_in_ram;
/* Migration was not supported in 2.0 for Q35, so do not bother
* with this hack (see hw/i386/acpi-build.c).
@ -289,6 +291,7 @@ static void pc_q35_init(MachineState *machine)
static void pc_compat_2_2(MachineState *machine)
{
rsdp_in_ram = false;
x86_cpu_compat_set_features("kvm64", FEAT_1_EDX, 0, CPUID_VME);
x86_cpu_compat_set_features("kvm32", FEAT_1_EDX, 0, CPUID_VME);
x86_cpu_compat_set_features("Conroe", FEAT_1_EDX, 0, CPUID_VME);

View file

@ -48,23 +48,6 @@ DefinitionBlock (
/****************************************************************
* PCI Bus definition
****************************************************************/
#define BOARD_SPECIFIC_PCI_RESOURSES \
WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
0x0000, \
0x0000, \
0x0CD7, \
0x0000, \
0x0CD8, \
,, , TypeStatic) \
/* 0xcd8-0xcf7 hole for CPU hotplug, hw/acpi/ich9.c:ICH9_PROC_BASE */ \
WordIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, \
0x0000, \
0x0D00, \
0xFFFF, \
0x0000, \
0xF300, \
,, , TypeStatic)
Scope(\_SB) {
Device(PCI0) {
Name(_HID, EisaId("PNP0A08"))
@ -131,7 +114,6 @@ DefinitionBlock (
}
}
#include "acpi-dsdt-pci-crs.dsl"
#include "acpi-dsdt-hpet.dsl"
@ -168,7 +150,6 @@ DefinitionBlock (
}
}
#define DSDT_APPLESMC_STA q35_dsdt_applesmc_sta
#include "acpi-dsdt-isa.dsl"

View file

@ -3,12 +3,12 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
0x53,
0x44,
0x54,
0x13,
0x20,
0xb8,
0x1d,
0x0,
0x0,
0x1,
0x0,
0x35,
0x42,
0x58,
0x50,
@ -360,357 +360,6 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
0xa4,
0x6b,
0x10,
0x4e,
0x15,
0x2e,
0x5f,
0x53,
0x42,
0x5f,
0x50,
0x43,
0x49,
0x30,
0x8,
0x43,
0x52,
0x45,
0x53,
0x11,
0x42,
0x7,
0xa,
0x6e,
0x88,
0xd,
0x0,
0x2,
0xc,
0x0,
0x0,
0x0,
0x0,
0x0,
0xff,
0x0,
0x0,
0x0,
0x0,
0x1,
0x47,
0x1,
0xf8,
0xc,
0xf8,
0xc,
0x1,
0x8,
0x88,
0xd,
0x0,
0x1,
0xc,
0x3,
0x0,
0x0,
0x0,
0x0,
0xd7,
0xc,
0x0,
0x0,
0xd8,
0xc,
0x88,
0xd,
0x0,
0x1,
0xc,
0x3,
0x0,
0x0,
0x0,
0xd,
0xff,
0xff,
0x0,
0x0,
0x0,
0xf3,
0x87,
0x17,
0x0,
0x0,
0xc,
0x3,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0xa,
0x0,
0xff,
0xff,
0xb,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x2,
0x0,
0x87,
0x17,
0x0,
0x0,
0xc,
0x1,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0xe0,
0xff,
0xff,
0xbf,
0xfe,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0xc0,
0x1e,
0x79,
0x0,
0x8,
0x43,
0x52,
0x36,
0x34,
0x11,
0x33,
0xa,
0x30,
0x8a,
0x2b,
0x0,
0x0,
0xc,
0x3,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x80,
0x0,
0x0,
0x0,
0xff,
0xff,
0xff,
0xff,
0xff,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x80,
0x0,
0x0,
0x0,
0x79,
0x0,
0x14,
0x41,
0xa,
0x5f,
0x43,
0x52,
0x53,
0x0,
0x8a,
0x43,
0x52,
0x45,
0x53,
0xa,
0x5c,
0x50,
0x53,
0x33,
0x32,
0x8a,
0x43,
0x52,
0x45,
0x53,
0xa,
0x60,
0x50,
0x45,
0x33,
0x32,
0x8a,
0x43,
0x52,
0x45,
0x53,
0xa,
0x68,
0x50,
0x4c,
0x33,
0x32,
0x70,
0x50,
0x30,
0x53,
0x5f,
0x50,
0x53,
0x33,
0x32,
0x70,
0x50,
0x30,
0x45,
0x5f,
0x50,
0x45,
0x33,
0x32,
0x70,
0x72,
0x74,
0x50,
0x30,
0x45,
0x5f,
0x50,
0x30,
0x53,
0x5f,
0x0,
0x1,
0x0,
0x50,
0x4c,
0x33,
0x32,
0xa0,
0xc,
0x93,
0x50,
0x31,
0x56,
0x5f,
0x0,
0xa4,
0x43,
0x52,
0x45,
0x53,
0x8f,
0x43,
0x52,
0x36,
0x34,
0xa,
0xe,
0x50,
0x53,
0x36,
0x34,
0x8f,
0x43,
0x52,
0x36,
0x34,
0xa,
0x16,
0x50,
0x45,
0x36,
0x34,
0x8f,
0x43,
0x52,
0x36,
0x34,
0xa,
0x26,
0x50,
0x4c,
0x36,
0x34,
0x70,
0x50,
0x31,
0x53,
0x5f,
0x50,
0x53,
0x36,
0x34,
0x70,
0x50,
0x31,
0x45,
0x5f,
0x50,
0x45,
0x36,
0x34,
0x70,
0x50,
0x31,
0x4c,
0x5f,
0x50,
0x4c,
0x36,
0x34,
0x84,
0x43,
0x52,
0x45,
0x53,
0x43,
0x52,
0x36,
0x34,
0x60,
0xa4,
0x60,
0x10,
0x4d,
0x8,
0x5f,
@ -978,8 +627,8 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
0x4e,
0x1,
0x10,
0x4a,
0x1e,
0x4c,
0x1b,
0x2f,
0x3,
0x5f,
@ -996,52 +645,6 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
0x5f,
0x5b,
0x82,
0x2c,
0x53,
0x4d,
0x43,
0x5f,
0x8,
0x5f,
0x48,
0x49,
0x44,
0xc,
0x6,
0x10,
0x0,
0x1,
0x8,
0x5f,
0x53,
0x54,
0x41,
0xa,
0xf0,
0x8,
0x5f,
0x43,
0x52,
0x53,
0x11,
0x10,
0xa,
0xd,
0x47,
0x1,
0x0,
0x3,
0x0,
0x3,
0x1,
0x20,
0x22,
0x40,
0x0,
0x79,
0x0,
0x5b,
0x82,
0x2d,
0x52,
0x54,
@ -6959,8 +6562,8 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
0x53,
0x1,
0x10,
0x4f,
0x12,
0x4d,
0xc,
0x5f,
0x53,
0x42,
@ -7057,32 +6660,6 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
0x22,
0xa,
0xc8,
0x5b,
0x80,
0x50,
0x52,
0x53,
0x54,
0x1,
0xb,
0xd8,
0xc,
0xa,
0x20,
0x5b,
0x81,
0xc,
0x50,
0x52,
0x53,
0x54,
0x1,
0x50,
0x52,
0x53,
0x5f,
0x40,
0x10,
0x14,
0x4a,
0x6,
@ -7190,81 +6767,9 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
0x3,
0x75,
0x60,
0x5b,
0x82,
0x46,
0x4,
0x50,
0x52,
0x45,
0x53,
0x8,
0x5f,
0x48,
0x49,
0x44,
0xc,
0x41,
0xd0,
0xa,
0x6,
0x8,
0x5f,
0x55,
0x49,
0x44,
0xd,
0x43,
0x50,
0x55,
0x20,
0x68,
0x6f,
0x74,
0x70,
0x6c,
0x75,
0x67,
0x20,
0x72,
0x65,
0x73,
0x6f,
0x75,
0x72,
0x63,
0x65,
0x73,
0x0,
0x8,
0x5f,
0x43,
0x52,
0x53,
0x11,
0xd,
0xa,
0xa,
0x47,
0x1,
0xd8,
0xc,
0xd8,
0xc,
0x0,
0x20,
0x79,
0x0,
0x8,
0x5f,
0x53,
0x54,
0x41,
0xa,
0xb,
0x10,
0x40,
0x31,
0x44,
0x2a,
0x2e,
0x5f,
0x53,
@ -7276,8 +6781,8 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
0x30,
0x5b,
0x82,
0x43,
0x30,
0x47,
0x29,
0x4d,
0x48,
0x50,
@ -7327,37 +6832,6 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
0x65,
0x73,
0x0,
0x5b,
0x80,
0x48,
0x50,
0x4d,
0x52,
0x1,
0xb,
0x0,
0xa,
0xa,
0x18,
0x8,
0x5f,
0x43,
0x52,
0x53,
0x11,
0xd,
0xa,
0xa,
0x47,
0x1,
0x0,
0xa,
0x0,
0xa,
0x0,
0x18,
0x79,
0x0,
0x14,
0x13,
0x5f,
@ -7379,89 +6853,12 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
0xa,
0xb,
0x5b,
0x81,
0x1f,
0x48,
0x50,
0x4d,
0x52,
0x3,
0x4d,
0x52,
0x42,
0x4c,
0x20,
0x4d,
0x52,
0x42,
0x48,
0x20,
0x4d,
0x52,
0x4c,
0x4c,
0x20,
0x4d,
0x52,
0x4c,
0x48,
0x20,
0x4d,
0x50,
0x58,
0x5f,
0x20,
0x5b,
0x81,
0x13,
0x48,
0x50,
0x4d,
0x52,
0x1,
0x0,
0x40,
0xa,
0x4d,
0x45,
0x53,
0x5f,
0x1,
0x4d,
0x49,
0x4e,
0x53,
0x1,
0x5b,
0x1,
0x4d,
0x4c,
0x43,
0x4b,
0x0,
0x5b,
0x81,
0x15,
0x48,
0x50,
0x4d,
0x52,
0x3,
0x4d,
0x53,
0x45,
0x4c,
0x20,
0x4d,
0x4f,
0x45,
0x56,
0x20,
0x4d,
0x4f,
0x53,
0x43,
0x20,
0x14,
0x4a,
0x4,
@ -8211,6 +7608,3 @@ static unsigned char Q35AcpiDsdtAmlCode[] = {
0x46,
0x0
};
static unsigned short q35_dsdt_applesmc_sta[] = {
0x3fa
};

View file

@ -1,77 +0,0 @@
/*
* Memory hotplug ACPI DSDT static objects definitions
*
* Copyright ProfitBricks GmbH 2012
* Copyright (C) 2013-2014 Red Hat Inc
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
/* This file is the basis for the ssdt_mem[] variable in src/acpi.c.
* It defines the contents of the memory device object. At
* runtime, a dynamically generated SSDT will contain one copy of this
* AML snippet for every possible memory device in the system. The
* objects will be placed in the \_SB_ namespace.
*
* In addition to the aml code generated from this file, the
* src/acpi.c file creates a MTFY method with an entry for each memdevice:
* Method(MTFY, 2) {
* If (LEqual(Arg0, 0x00)) { Notify(MP00, Arg1) }
* If (LEqual(Arg0, 0x01)) { Notify(MP01, Arg1) }
* ...
* }
*/
#include "hw/acpi/pc-hotplug.h"
ACPI_EXTRACT_ALL_CODE ssdm_mem_aml
DefinitionBlock ("ssdt-mem.aml", "SSDT", 0x02, "BXPC", "CSSDT", 0x1)
{
External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_CRS_METHOD, MethodObj)
External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_STATUS_METHOD, MethodObj)
External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_OST_METHOD, MethodObj)
External(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_PROXIMITY_METHOD, MethodObj)
Scope(\_SB) {
/* v------------------ DO NOT EDIT ------------------v */
ACPI_EXTRACT_DEVICE_START ssdt_mem_start
ACPI_EXTRACT_DEVICE_END ssdt_mem_end
ACPI_EXTRACT_DEVICE_STRING ssdt_mem_name
Device(MPAA) {
ACPI_EXTRACT_NAME_STRING ssdt_mem_id
Name(_UID, "0xAA")
/* ^------------------ DO NOT EDIT ------------------^
* Don't change the above without also updating the C code.
*/
Name(_HID, EISAID("PNP0C80"))
Method(_CRS, 0) {
Return(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_CRS_METHOD(_UID))
}
Method(_STA, 0) {
Return(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_STATUS_METHOD(_UID))
}
Method(_PXM, 0) {
Return(\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_PROXIMITY_METHOD(_UID))
}
Method(_OST, 3) {
\_SB.PCI0.MEMORY_HOTPLUG_DEVICE.MEMORY_SLOT_OST_METHOD(_UID, Arg0, Arg1, Arg2)
}
}
}
}

View file

@ -1,213 +0,0 @@
static unsigned char ssdt_mem_id[] = {
0x35
};
static unsigned char ssdm_mem_aml[] = {
0x53,
0x53,
0x44,
0x54,
0xc7,
0x0,
0x0,
0x0,
0x2,
0x66,
0x42,
0x58,
0x50,
0x43,
0x0,
0x0,
0x43,
0x53,
0x53,
0x44,
0x54,
0x0,
0x0,
0x0,
0x1,
0x0,
0x0,
0x0,
0x49,
0x4e,
0x54,
0x4c,
0x28,
0x8,
0x14,
0x20,
0x10,
0x42,
0xa,
0x5c,
0x5f,
0x53,
0x42,
0x5f,
0x5b,
0x82,
0x49,
0x9,
0x4d,
0x50,
0x41,
0x41,
0x8,
0x5f,
0x55,
0x49,
0x44,
0xd,
0x30,
0x78,
0x41,
0x41,
0x0,
0x8,
0x5f,
0x48,
0x49,
0x44,
0xc,
0x41,
0xd0,
0xc,
0x80,
0x14,
0x1e,
0x5f,
0x43,
0x52,
0x53,
0x0,
0xa4,
0x5c,
0x2f,
0x4,
0x5f,
0x53,
0x42,
0x5f,
0x50,
0x43,
0x49,
0x30,
0x4d,
0x48,
0x50,
0x44,
0x4d,
0x43,
0x52,
0x53,
0x5f,
0x55,
0x49,
0x44,
0x14,
0x1e,
0x5f,
0x53,
0x54,
0x41,
0x0,
0xa4,
0x5c,
0x2f,
0x4,
0x5f,
0x53,
0x42,
0x5f,
0x50,
0x43,
0x49,
0x30,
0x4d,
0x48,
0x50,
0x44,
0x4d,
0x52,
0x53,
0x54,
0x5f,
0x55,
0x49,
0x44,
0x14,
0x1e,
0x5f,
0x50,
0x58,
0x4d,
0x0,
0xa4,
0x5c,
0x2f,
0x4,
0x5f,
0x53,
0x42,
0x5f,
0x50,
0x43,
0x49,
0x30,
0x4d,
0x48,
0x50,
0x44,
0x4d,
0x50,
0x58,
0x4d,
0x5f,
0x55,
0x49,
0x44,
0x14,
0x20,
0x5f,
0x4f,
0x53,
0x54,
0x3,
0x5c,
0x2f,
0x4,
0x5f,
0x53,
0x42,
0x5f,
0x50,
0x43,
0x49,
0x30,
0x4d,
0x48,
0x50,
0x44,
0x4d,
0x4f,
0x53,
0x54,
0x5f,
0x55,
0x49,
0x44,
0x68,
0x69,
0x6a
};
static unsigned char ssdt_mem_start[] = {
0x2c
};
static unsigned char ssdt_mem_end[] = {
0xc7
};
static unsigned char ssdt_mem_name[] = {
0x30
};

View file

@ -1,122 +0,0 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "hw/acpi/pc-hotplug.h"
ACPI_EXTRACT_ALL_CODE ssdp_misc_aml
DefinitionBlock ("ssdt-misc.aml", "SSDT", 0x01, "BXPC", "BXSSDTSUSP", 0x1)
{
/****************************************************************
* PCI memory ranges
****************************************************************/
Scope(\) {
ACPI_EXTRACT_NAME_DWORD_CONST acpi_pci32_start
Name(P0S, 0x12345678)
ACPI_EXTRACT_NAME_DWORD_CONST acpi_pci32_end
Name(P0E, 0x12345678)
ACPI_EXTRACT_NAME_BYTE_CONST acpi_pci64_valid
Name(P1V, 0x12)
ACPI_EXTRACT_NAME_BUFFER8 acpi_pci64_start
Name(P1S, Buffer() { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
ACPI_EXTRACT_NAME_BUFFER8 acpi_pci64_end
Name(P1E, Buffer() { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
ACPI_EXTRACT_NAME_BUFFER8 acpi_pci64_length
Name(P1L, Buffer() { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 })
ACPI_EXTRACT_NAME_DWORD_CONST ssdt_mctrl_nr_slots
Name(MEMORY_SLOTS_NUMBER, 0x12345678)
}
/****************************************************************
* Suspend
****************************************************************/
Scope(\) {
/*
* S3 (suspend-to-ram), S4 (suspend-to-disk) and S5 (power-off) type codes:
* must match piix4 emulation.
*/
ACPI_EXTRACT_NAME_STRING acpi_s3_name
Name(_S3, Package(0x04) {
One, /* PM1a_CNT.SLP_TYP */
One, /* PM1b_CNT.SLP_TYP */
Zero, /* reserved */
Zero /* reserved */
})
ACPI_EXTRACT_NAME_STRING acpi_s4_name
ACPI_EXTRACT_PKG_START acpi_s4_pkg
Name(_S4, Package(0x04) {
0x2, /* PM1a_CNT.SLP_TYP */
0x2, /* PM1b_CNT.SLP_TYP */
Zero, /* reserved */
Zero /* reserved */
})
Name(_S5, Package(0x04) {
Zero, /* PM1a_CNT.SLP_TYP */
Zero, /* PM1b_CNT.SLP_TYP */
Zero, /* reserved */
Zero /* reserved */
})
}
External(\_SB.PCI0, DeviceObj)
External(\_SB.PCI0.ISA, DeviceObj)
Scope(\_SB.PCI0.ISA) {
Device(PEVT) {
Name(_HID, "QEMU0001")
/* PEST will be patched to be Zero if no such device */
ACPI_EXTRACT_NAME_WORD_CONST ssdt_isa_pest
Name(PEST, 0xFFFF)
OperationRegion(PEOR, SystemIO, PEST, 0x01)
Field(PEOR, ByteAcc, NoLock, Preserve) {
PEPT, 8,
}
Method(_STA, 0, NotSerialized) {
Store(PEST, Local0)
If (LEqual(Local0, Zero)) {
Return (0x00)
} Else {
Return (0x0F)
}
}
Method(RDPT, 0, NotSerialized) {
Store(PEPT, Local0)
Return (Local0)
}
Method(WRPT, 1, NotSerialized) {
Store(Arg0, PEPT)
}
Name(_CRS, ResourceTemplate() {
IO(Decode16, 0x00, 0x00, 0x01, 0x01, IO)
})
CreateWordField(_CRS, IO._MIN, IOMN)
CreateWordField(_CRS, IO._MAX, IOMX)
Method(_INI, 0, NotSerialized) {
Store(PEST, IOMN)
Store(PEST, IOMX)
}
}
}
}

View file

@ -1,399 +0,0 @@
static unsigned char acpi_pci64_length[] = {
0x6f
};
static unsigned char acpi_s4_pkg[] = {
0x99
};
static unsigned char ssdt_mctrl_nr_slots[] = {
0x7d
};
static unsigned char acpi_s3_name[] = {
0x86
};
static unsigned char acpi_pci32_start[] = {
0x2f
};
static unsigned char acpi_pci64_valid[] = {
0x43
};
static unsigned char ssdp_misc_aml[] = {
0x53,
0x53,
0x44,
0x54,
0x6c,
0x1,
0x0,
0x0,
0x1,
0x3,
0x42,
0x58,
0x50,
0x43,
0x0,
0x0,
0x42,
0x58,
0x53,
0x53,
0x44,
0x54,
0x53,
0x55,
0x1,
0x0,
0x0,
0x0,
0x49,
0x4e,
0x54,
0x4c,
0x28,
0x8,
0x14,
0x20,
0x10,
0x4c,
0x5,
0x5c,
0x0,
0x8,
0x50,
0x30,
0x53,
0x5f,
0xc,
0x78,
0x56,
0x34,
0x12,
0x8,
0x50,
0x30,
0x45,
0x5f,
0xc,
0x78,
0x56,
0x34,
0x12,
0x8,
0x50,
0x31,
0x56,
0x5f,
0xa,
0x12,
0x8,
0x50,
0x31,
0x53,
0x5f,
0x11,
0xb,
0xa,
0x8,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x8,
0x50,
0x31,
0x45,
0x5f,
0x11,
0xb,
0xa,
0x8,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x8,
0x50,
0x31,
0x4c,
0x5f,
0x11,
0xb,
0xa,
0x8,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x0,
0x8,
0x4d,
0x44,
0x4e,
0x52,
0xc,
0x78,
0x56,
0x34,
0x12,
0x10,
0x29,
0x5c,
0x0,
0x8,
0x5f,
0x53,
0x33,
0x5f,
0x12,
0x6,
0x4,
0x1,
0x1,
0x0,
0x0,
0x8,
0x5f,
0x53,
0x34,
0x5f,
0x12,
0x8,
0x4,
0xa,
0x2,
0xa,
0x2,
0x0,
0x0,
0x8,
0x5f,
0x53,
0x35,
0x5f,
0x12,
0x6,
0x4,
0x0,
0x0,
0x0,
0x0,
0x10,
0x40,
0xc,
0x5c,
0x2f,
0x3,
0x5f,
0x53,
0x42,
0x5f,
0x50,
0x43,
0x49,
0x30,
0x49,
0x53,
0x41,
0x5f,
0x5b,
0x82,
0x4d,
0xa,
0x50,
0x45,
0x56,
0x54,
0x8,
0x5f,
0x48,
0x49,
0x44,
0xd,
0x51,
0x45,
0x4d,
0x55,
0x30,
0x30,
0x30,
0x31,
0x0,
0x8,
0x50,
0x45,
0x53,
0x54,
0xb,
0xff,
0xff,
0x5b,
0x80,
0x50,
0x45,
0x4f,
0x52,
0x1,
0x50,
0x45,
0x53,
0x54,
0x1,
0x5b,
0x81,
0xb,
0x50,
0x45,
0x4f,
0x52,
0x1,
0x50,
0x45,
0x50,
0x54,
0x8,
0x14,
0x18,
0x5f,
0x53,
0x54,
0x41,
0x0,
0x70,
0x50,
0x45,
0x53,
0x54,
0x60,
0xa0,
0x6,
0x93,
0x60,
0x0,
0xa4,
0x0,
0xa1,
0x4,
0xa4,
0xa,
0xf,
0x14,
0xe,
0x52,
0x44,
0x50,
0x54,
0x0,
0x70,
0x50,
0x45,
0x50,
0x54,
0x60,
0xa4,
0x60,
0x14,
0xc,
0x57,
0x52,
0x50,
0x54,
0x1,
0x70,
0x68,
0x50,
0x45,
0x50,
0x54,
0x8,
0x5f,
0x43,
0x52,
0x53,
0x11,
0xd,
0xa,
0xa,
0x47,
0x1,
0x0,
0x0,
0x0,
0x0,
0x1,
0x1,
0x79,
0x0,
0x8b,
0x5f,
0x43,
0x52,
0x53,
0xa,
0x2,
0x49,
0x4f,
0x4d,
0x4e,
0x8b,
0x5f,
0x43,
0x52,
0x53,
0xa,
0x4,
0x49,
0x4f,
0x4d,
0x58,
0x14,
0x18,
0x5f,
0x49,
0x4e,
0x49,
0x0,
0x70,
0x50,
0x45,
0x53,
0x54,
0x49,
0x4f,
0x4d,
0x4e,
0x70,
0x50,
0x45,
0x53,
0x54,
0x49,
0x4f,
0x4d,
0x58
};
static unsigned char ssdt_isa_pest[] = {
0xda
};
static unsigned char acpi_s4_name[] = {
0x92
};
static unsigned char acpi_pci64_start[] = {
0x4d
};
static unsigned char acpi_pci64_end[] = {
0x5e
};
static unsigned char acpi_pci32_end[] = {
0x39
};

View file

@ -1,100 +0,0 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
ACPI_EXTRACT_ALL_CODE ssdp_pcihp_aml
DefinitionBlock ("ssdt-pcihp.aml", "SSDT", 0x01, "BXPC", "BXSSDTPCIHP", 0x1)
{
/****************************************************************
* PCI hotplug
****************************************************************/
/* Objects supplied by DSDT */
External(\_SB.PCI0, DeviceObj)
External(\_SB.PCI0.PCEJ, MethodObj)
External(BSEL, IntObj)
Scope(\_SB.PCI0) {
/* Bulk generated PCI hotplug devices */
ACPI_EXTRACT_DEVICE_START ssdt_pcihp_start
ACPI_EXTRACT_DEVICE_END ssdt_pcihp_end
ACPI_EXTRACT_DEVICE_STRING ssdt_pcihp_name
// Extract the offsets of the device name, address dword and the slot
// name byte - we fill them in for each device.
Device(SAA) {
ACPI_EXTRACT_NAME_BYTE_CONST ssdt_pcihp_id
Name(_SUN, 0xAA)
ACPI_EXTRACT_NAME_DWORD_CONST ssdt_pcihp_adr
Name(_ADR, 0xAA0000)
Method(_EJ0, 1) {
PCEJ(BSEL, _SUN)
}
}
ACPI_EXTRACT_DEVICE_START ssdt_pcinohp_start
ACPI_EXTRACT_DEVICE_END ssdt_pcinohp_end
ACPI_EXTRACT_DEVICE_STRING ssdt_pcinohp_name
// Extract the offsets of the device name, address dword and the slot
// name byte - we fill them in for each device.
Device(SBB) {
ACPI_EXTRACT_NAME_DWORD_CONST ssdt_pcinohp_adr
Name(_ADR, 0xAA0000)
}
ACPI_EXTRACT_DEVICE_START ssdt_pcivga_start
ACPI_EXTRACT_DEVICE_END ssdt_pcivga_end
ACPI_EXTRACT_DEVICE_STRING ssdt_pcivga_name
// Extract the offsets of the device name, address dword and the slot
// name byte - we fill them in for each device.
Device(SCC) {
ACPI_EXTRACT_NAME_DWORD_CONST ssdt_pcivga_adr
Name(_ADR, 0xAA0000)
Method(_S1D, 0, NotSerialized) {
Return (0x00)
}
Method(_S2D, 0, NotSerialized) {
Return (0x00)
}
Method(_S3D, 0, NotSerialized) {
Return (0x00)
}
}
ACPI_EXTRACT_DEVICE_START ssdt_pciqxl_start
ACPI_EXTRACT_DEVICE_END ssdt_pciqxl_end
ACPI_EXTRACT_DEVICE_STRING ssdt_pciqxl_name
// Extract the offsets of the device name, address dword and the slot
// name byte - we fill them in for each device.
Device(SDD) {
ACPI_EXTRACT_NAME_DWORD_CONST ssdt_pciqxl_adr
Name(_ADR, 0xAA0000)
Method(_S1D, 0, NotSerialized) {
Return (0x00)
}
Method(_S2D, 0, NotSerialized) {
Return (0x00)
}
Method(_S3D, 0, NotSerialized) {
Return (0x03) // QXL
}
}
}
}

View file

@ -1,251 +0,0 @@
static unsigned char ssdt_pcihp_name[] = {
0x34
};
static unsigned char ssdt_pcivga_end[] = {
0x99
};
static unsigned char ssdt_pcivga_name[] = {
0x70
};
static unsigned char ssdt_pcihp_adr[] = {
0x45
};
static unsigned char ssdt_pcinohp_end[] = {
0x6d
};
static unsigned char ssdt_pcihp_end[] = {
0x5c
};
static unsigned char ssdt_pciqxl_start[] = {
0x99
};
static unsigned char ssdt_pcinohp_name[] = {
0x5f
};
static unsigned char ssdp_pcihp_aml[] = {
0x53,
0x53,
0x44,
0x54,
0xc6,
0x0,
0x0,
0x0,
0x1,
0x70,
0x42,
0x58,
0x50,
0x43,
0x0,
0x0,
0x42,
0x58,
0x53,
0x53,
0x44,
0x54,
0x50,
0x43,
0x1,
0x0,
0x0,
0x0,
0x49,
0x4e,
0x54,
0x4c,
0x15,
0x11,
0x13,
0x20,
0x10,
0x41,
0xa,
0x5c,
0x2e,
0x5f,
0x53,
0x42,
0x5f,
0x50,
0x43,
0x49,
0x30,
0x5b,
0x82,
0x29,
0x53,
0x41,
0x41,
0x5f,
0x8,
0x5f,
0x53,
0x55,
0x4e,
0xa,
0xaa,
0x8,
0x5f,
0x41,
0x44,
0x52,
0xc,
0x0,
0x0,
0xaa,
0x0,
0x14,
0x12,
0x5f,
0x45,
0x4a,
0x30,
0x1,
0x50,
0x43,
0x45,
0x4a,
0x42,
0x53,
0x45,
0x4c,
0x5f,
0x53,
0x55,
0x4e,
0x5b,
0x82,
0xf,
0x53,
0x42,
0x42,
0x5f,
0x8,
0x5f,
0x41,
0x44,
0x52,
0xc,
0x0,
0x0,
0xaa,
0x0,
0x5b,
0x82,
0x2a,
0x53,
0x43,
0x43,
0x5f,
0x8,
0x5f,
0x41,
0x44,
0x52,
0xc,
0x0,
0x0,
0xaa,
0x0,
0x14,
0x8,
0x5f,
0x53,
0x31,
0x44,
0x0,
0xa4,
0x0,
0x14,
0x8,
0x5f,
0x53,
0x32,
0x44,
0x0,
0xa4,
0x0,
0x14,
0x8,
0x5f,
0x53,
0x33,
0x44,
0x0,
0xa4,
0x0,
0x5b,
0x82,
0x2b,
0x53,
0x44,
0x44,
0x5f,
0x8,
0x5f,
0x41,
0x44,
0x52,
0xc,
0x0,
0x0,
0xaa,
0x0,
0x14,
0x8,
0x5f,
0x53,
0x31,
0x44,
0x0,
0xa4,
0x0,
0x14,
0x8,
0x5f,
0x53,
0x32,
0x44,
0x0,
0xa4,
0x0,
0x14,
0x9,
0x5f,
0x53,
0x33,
0x44,
0x0,
0xa4,
0xa,
0x3
};
static unsigned char ssdt_pciqxl_adr[] = {
0xa6
};
static unsigned char ssdt_pcinohp_adr[] = {
0x69
};
static unsigned char ssdt_pcivga_adr[] = {
0x7a
};
static unsigned char ssdt_pciqxl_name[] = {
0x9c
};
static unsigned char ssdt_pcivga_start[] = {
0x6d
};
static unsigned char ssdt_pciqxl_end[] = {
0xc6
};
static unsigned char ssdt_pcihp_start[] = {
0x31
};
static unsigned char ssdt_pcihp_id[] = {
0x3e
};
static unsigned char ssdt_pcinohp_start[] = {
0x5c
};

View file

@ -1,63 +0,0 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
/* This file is the basis for the ssdt table generated in src/acpi.c.
* It defines the contents of the per-cpu Processor() object. At
* runtime, a dynamically generated SSDT will contain one copy of this
* AML snippet for every possible cpu in the system. The objects will
* be placed in the \_SB_ namespace.
*
* In addition to the aml code generated from this file, the
* src/acpi.c file creates a NTFY method with an entry for each cpu:
* Method(NTFY, 2) {
* If (LEqual(Arg0, 0x00)) { Notify(CP00, Arg1) }
* If (LEqual(Arg0, 0x01)) { Notify(CP01, Arg1) }
* ...
* }
* and a CPON array with the list of active and inactive cpus:
* Name(CPON, Package() { One, One, ..., Zero, Zero, ... })
*/
ACPI_EXTRACT_ALL_CODE ssdp_proc_aml
DefinitionBlock ("ssdt-proc.aml", "SSDT", 0x01, "BXPC", "BXSSDT", 0x1)
{
ACPI_EXTRACT_PROCESSOR_START ssdt_proc_start
ACPI_EXTRACT_PROCESSOR_END ssdt_proc_end
ACPI_EXTRACT_PROCESSOR_STRING ssdt_proc_name
Processor(CPAA, 0xAA, 0x00000000, 0x0) {
ACPI_EXTRACT_NAME_BYTE_CONST ssdt_proc_id
Name(ID, 0xAA)
/*
* The src/acpi.c code requires the above ACP_EXTRACT tags so that it can update
* CPAA and 0xAA with the appropriate CPU id (see
* SD_OFFSET_CPUHEX/CPUID1/CPUID2). Don't change the above without
* also updating the C code.
*/
Name(_HID, "ACPI0007")
External(CPMA, MethodObj)
External(CPST, MethodObj)
External(CPEJ, MethodObj)
Method(_MAT, 0) {
Return (CPMA(ID))
}
Method(_STA, 0) {
Return (CPST(ID))
}
Method(_EJ0, 1, NotSerialized) {
CPEJ(ID, Arg0)
}
}
}

View file

@ -1,134 +0,0 @@
static unsigned char ssdt_proc_name[] = {
0x28
};
static unsigned char ssdp_proc_aml[] = {
0x53,
0x53,
0x44,
0x54,
0x78,
0x0,
0x0,
0x0,
0x1,
0x7d,
0x42,
0x58,
0x50,
0x43,
0x0,
0x0,
0x42,
0x58,
0x53,
0x53,
0x44,
0x54,
0x0,
0x0,
0x1,
0x0,
0x0,
0x0,
0x49,
0x4e,
0x54,
0x4c,
0x15,
0x11,
0x13,
0x20,
0x5b,
0x83,
0x42,
0x5,
0x43,
0x50,
0x41,
0x41,
0xaa,
0x0,
0x0,
0x0,
0x0,
0x0,
0x8,
0x49,
0x44,
0x5f,
0x5f,
0xa,
0xaa,
0x8,
0x5f,
0x48,
0x49,
0x44,
0xd,
0x41,
0x43,
0x50,
0x49,
0x30,
0x30,
0x30,
0x37,
0x0,
0x14,
0xf,
0x5f,
0x4d,
0x41,
0x54,
0x0,
0xa4,
0x43,
0x50,
0x4d,
0x41,
0x49,
0x44,
0x5f,
0x5f,
0x14,
0xf,
0x5f,
0x53,
0x54,
0x41,
0x0,
0xa4,
0x43,
0x50,
0x53,
0x54,
0x49,
0x44,
0x5f,
0x5f,
0x14,
0xf,
0x5f,
0x45,
0x4a,
0x30,
0x1,
0x43,
0x50,
0x45,
0x4a,
0x49,
0x44,
0x5f,
0x5f,
0x68
};
static unsigned char ssdt_proc_id[] = {
0x38
};
static unsigned char ssdt_proc_end[] = {
0x78
};
static unsigned char ssdt_proc_start[] = {
0x24
};

View file

@ -8,7 +8,7 @@ static unsigned char ssdt_tpm_aml[] = {
0x0,
0x0,
0x1,
0xf,
0x1c,
0x42,
0x58,
0x50,
@ -31,9 +31,9 @@ static unsigned char ssdt_tpm_aml[] = {
0x4e,
0x54,
0x4c,
0x15,
0x7,
0x11,
0x13,
0x14,
0x20,
0x10,
0x38,