From 403f613fa84e0db0652d7fb7fac112e71bfd283d Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Sun, 20 Nov 2011 19:57:12 +0200 Subject: [PATCH] acpi: remove _RMV The macro gen_pci_device is used to add _RMV method to a slot device so it is no longer needed: presence of _EJ0 now indicates that the slot is ejectable. It is also placing two devices with the same _ADR on the same bus, which isn't defined by the ACPI spec. So let's remove it. Signed-off-by: Michael S. Tsirkin --- src/acpi-dsdt.dsl | 15 - src/acpi-dsdt.hex | 92 +--- src/ssdt-pcihp.dsl | 40 -- src/ssdt-pcihp.hex | 1236 +++----------------------------------------- 4 files changed, 80 insertions(+), 1303 deletions(-) diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl index f97d463..aff3f48 100644 --- a/src/acpi-dsdt.dsl +++ b/src/acpi-dsdt.dsl @@ -132,12 +132,6 @@ DefinitionBlock ( B0EJ, 32, } - OperationRegion(RMVC, SystemIO, 0xae0c, 0x04) - Field(RMVC, DWordAcc, NoLock, WriteAsZeros) - { - PCRM, 32, - } - Name (_CRS, ResourceTemplate () { WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, @@ -239,7 +233,6 @@ DefinitionBlock ( Return (0x00) } } - Method(_RMV) { Return (0x00) } } } @@ -251,7 +244,6 @@ DefinitionBlock ( Scope(\_SB.PCI0) { Device (ISA) { Name (_ADR, 0x00010000) - Method(_RMV) { Return (0x00) } /* PIIX PCI to ISA irq remapping */ OperationRegion (P40C, PCI_Config, 0x60, 0x04) @@ -466,13 +458,6 @@ DefinitionBlock ( Scope(\_SB.PCI0) { /* Methods called by bulk generated PCI devices below */ - Method (PRMV, 1, NotSerialized) { - // _RMV method - check if device can be removed - If (And(\_SB.PCI0.PCRM, ShiftLeft(1, Arg0))) { - Return (0x1) - } - Return (0x0) - } /* Methods called by hotplug devices */ Method (PCEJ, 1, NotSerialized) { diff --git a/src/acpi-dsdt.hex b/src/acpi-dsdt.hex index d598657..a775a2f 100644 --- a/src/acpi-dsdt.hex +++ b/src/acpi-dsdt.hex @@ -3,12 +3,12 @@ static unsigned char AmlCode[] = { 0x53, 0x44, 0x54, -0x11, -0x11, +0xcf, +0x10, 0x0, 0x0, 0x1, -0x13, +0x3f, 0x42, 0x58, 0x50, @@ -110,16 +110,16 @@ static unsigned char AmlCode[] = { 0x47, 0x42, 0x10, -0x4d, -0x82, +0x44, +0x81, 0x5f, 0x53, 0x42, 0x5f, 0x5b, 0x82, -0x45, -0x82, +0x4c, +0x80, 0x50, 0x43, 0x49, @@ -2058,31 +2058,6 @@ static unsigned char AmlCode[] = { 0x45, 0x4a, 0x20, -0x5b, -0x80, -0x52, -0x4d, -0x56, -0x43, -0x1, -0xb, -0xc, -0xae, -0xa, -0x4, -0x5b, -0x81, -0xb, -0x52, -0x4d, -0x56, -0x43, -0x43, -0x50, -0x43, -0x52, -0x4d, -0x20, 0x8, 0x5f, 0x43, @@ -2282,7 +2257,7 @@ static unsigned char AmlCode[] = { 0x79, 0x0, 0x10, -0x49, +0x40, 0x6, 0x2e, 0x5f, @@ -2295,7 +2270,7 @@ static unsigned char AmlCode[] = { 0x30, 0x5b, 0x82, -0x4c, +0x43, 0x5, 0x56, 0x47, @@ -2378,17 +2353,8 @@ static unsigned char AmlCode[] = { 0x3, 0xa4, 0x0, -0x14, -0x8, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x0, 0x10, -0x2f, +0x26, 0x2e, 0x5f, 0x53, @@ -2400,7 +2366,7 @@ static unsigned char AmlCode[] = { 0x30, 0x5b, 0x82, -0x23, +0x1a, 0x49, 0x53, 0x41, @@ -2415,15 +2381,6 @@ static unsigned char AmlCode[] = { 0x0, 0x1, 0x0, -0x14, -0x8, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x0, 0x5b, 0x80, 0x50, @@ -3082,8 +3039,8 @@ static unsigned char AmlCode[] = { 0x4a, 0x20, 0x10, -0x4d, -0x6, +0x46, +0x5, 0x2e, 0x5f, 0x53, @@ -3094,29 +3051,6 @@ static unsigned char AmlCode[] = { 0x49, 0x30, 0x14, -0x16, -0x50, -0x52, -0x4d, -0x56, -0x1, -0xa0, -0xd, -0x7b, -0x50, -0x43, -0x52, -0x4d, -0x79, -0x1, -0x68, -0x0, -0x0, -0xa4, -0x1, -0xa4, -0x0, -0x14, 0x11, 0x50, 0x43, diff --git a/src/ssdt-pcihp.dsl b/src/ssdt-pcihp.dsl index cc96ffc..4b435b8 100644 --- a/src/ssdt-pcihp.dsl +++ b/src/ssdt-pcihp.dsl @@ -9,49 +9,9 @@ DefinitionBlock ("ssdt-pcihp.aml", "SSDT", 0x01, "BXPC", "BXSSDTPCIHP", 0x1) /* Objects supplied by DSDT */ External (\_SB.PCI0, DeviceObj) - External (\_SB.PCI0.PRMV, MethodObj) External (\_SB.PCI0.PCEJ, MethodObj) Scope(\_SB.PCI0) { - -#define gen_pci_device(slot) \ - Device(SL##slot) { \ - Name (_ADR, 0x##slot##0000) \ - Method (_RMV) { Return (PRMV(0x##slot)) } \ - Name (_SUN, 0x##slot) \ - } - - /* VGA (slot 1) and ISA bus (slot 2) defined in DSDT */ - gen_pci_device(03) - gen_pci_device(04) - gen_pci_device(05) - gen_pci_device(06) - gen_pci_device(07) - gen_pci_device(08) - gen_pci_device(09) - gen_pci_device(0a) - gen_pci_device(0b) - gen_pci_device(0c) - gen_pci_device(0d) - gen_pci_device(0e) - gen_pci_device(0f) - gen_pci_device(10) - gen_pci_device(11) - gen_pci_device(12) - gen_pci_device(13) - gen_pci_device(14) - gen_pci_device(15) - gen_pci_device(16) - gen_pci_device(17) - gen_pci_device(18) - gen_pci_device(19) - gen_pci_device(1a) - gen_pci_device(1b) - gen_pci_device(1c) - gen_pci_device(1d) - gen_pci_device(1e) - gen_pci_device(1f) - /* Bulk generated PCI hotplug devices */ // Method _EJ0 can be patched by BIOS to EJ0_ // at runtime, if the slot is detected to not support hotplug. diff --git a/src/ssdt-pcihp.hex b/src/ssdt-pcihp.hex index a410a79..b15ad5a 100644 --- a/src/ssdt-pcihp.hex +++ b/src/ssdt-pcihp.hex @@ -1,80 +1,80 @@ static unsigned short aml_adr_dword[] = { -0x48c, -0x4b0, -0x4d6, -0x4fc, -0x522, -0x548, -0x56e, -0x594, -0x5ba, -0x5e0, -0x606, -0x62c, -0x652, -0x678, -0x69e, -0x6c4, -0x6ea, -0x710, -0x736, -0x75c, -0x782, -0x7a8, -0x7ce, -0x7f4, -0x81a, -0x840, -0x866, -0x88c, -0x8b2, -0x8d8, -0x8fe +0x3e, +0x62, +0x88, +0xae, +0xd4, +0xfa, +0x120, +0x146, +0x16c, +0x192, +0x1b8, +0x1de, +0x204, +0x22a, +0x250, +0x276, +0x29c, +0x2c2, +0x2e8, +0x30e, +0x334, +0x35a, +0x380, +0x3a6, +0x3cc, +0x3f2, +0x418, +0x43e, +0x464, +0x48a, +0x4b0 }; static unsigned short aml_ej0_name[] = { -0x492, -0x4b6, -0x4dc, -0x502, -0x528, -0x54e, -0x574, -0x59a, -0x5c0, -0x5e6, -0x60c, -0x632, -0x658, -0x67e, -0x6a4, -0x6ca, -0x6f0, -0x716, -0x73c, -0x762, -0x788, -0x7ae, -0x7d4, -0x7fa, -0x820, -0x846, -0x86c, -0x892, -0x8b8, -0x8de, -0x904 +0x44, +0x68, +0x8e, +0xb4, +0xda, +0x100, +0x126, +0x14c, +0x172, +0x198, +0x1be, +0x1e4, +0x20a, +0x230, +0x256, +0x27c, +0x2a2, +0x2c8, +0x2ee, +0x314, +0x33a, +0x360, +0x386, +0x3ac, +0x3d2, +0x3f8, +0x41e, +0x444, +0x46a, +0x490, +0x4b6 }; static unsigned char ssdp_pcihp_aml[] = { 0x53, 0x53, 0x44, 0x54, -0x92, -0xa, +0x44, +0x6, 0x0, 0x0, 0x1, -0x12, +0x94, 0x42, 0x58, 0x50, @@ -102,8 +102,8 @@ static unsigned char ssdp_pcihp_aml[] = { 0x10, 0x20, 0x10, -0x4d, -0xa6, +0x4f, +0x61, 0x5c, 0x2e, 0x5f, @@ -116,1108 +116,6 @@ static unsigned char ssdp_pcihp_aml[] = { 0x30, 0x5b, 0x82, -0x24, -0x53, -0x4c, -0x30, -0x33, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x3, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x3, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x3, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x30, -0x34, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x4, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x4, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x4, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x30, -0x35, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x5, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x5, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x5, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x30, -0x36, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x6, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x6, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x6, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x30, -0x37, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x7, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x7, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x7, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x30, -0x38, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x8, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x8, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x8, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x30, -0x39, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x9, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x9, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x9, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x30, -0x41, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0xa, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0xa, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0xa, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x30, -0x42, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0xb, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0xb, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0xb, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x30, -0x43, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0xc, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0xc, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0xc, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x30, -0x44, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0xd, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0xd, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0xd, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x30, -0x45, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0xe, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0xe, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0xe, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x30, -0x46, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0xf, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0xf, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0xf, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x30, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x10, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x10, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x10, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x31, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x11, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x11, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x11, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x32, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x12, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x12, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x12, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x33, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x13, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x13, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x13, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x34, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x14, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x14, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x14, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x35, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x15, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x15, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x15, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x36, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x16, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x16, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x16, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x37, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x17, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x17, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x17, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x38, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x18, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x18, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x18, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x39, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x19, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x19, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x19, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x41, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x1a, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x1a, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x1a, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x42, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x1b, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x1b, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x1b, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x43, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x1c, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x1c, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x1c, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x44, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x1d, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x1d, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x1d, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x45, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x1e, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x1e, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x1e, -0x5b, -0x82, -0x24, -0x53, -0x4c, -0x31, -0x46, -0x8, -0x5f, -0x41, -0x44, -0x52, -0xc, -0x0, -0x0, -0x1f, -0x0, -0x14, -0xd, -0x5f, -0x52, -0x4d, -0x56, -0x0, -0xa4, -0x50, -0x52, -0x4d, -0x56, -0xa, -0x1f, -0x8, -0x5f, -0x53, -0x55, -0x4e, -0xa, -0x1f, -0x5b, -0x82, 0x22, 0x53, 0x30, -- 2.25.1