Attention is currently required from: Christian Walter, Johnny Lin, Jonathan Zhang, Lean Sheng Tan, Shuo Liu, Tim Chu.
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/85559?usp=email )
Change subject: soc/intel/xeon_sp: Use _SB.POSC on all platforms ......................................................................
soc/intel/xeon_sp: Use _SB.POSC on all platforms
Reduce ACPI code size by using the existing _SB.POSC instead of duplicating the method in every PCI/CXL host bridge.
TEST: On ocp/tiogapass the OS still gets granted the PCIe capabilites as previously through _OSC. Reduces DSDT size by 1366 bytes.
Change-Id: I2f25ffbde9b83d286c568202fcffb75ffb07286c Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/soc/intel/xeon_sp/14nm/acpi/iiostack.asl M src/soc/intel/xeon_sp/spr/acpi/cxl_resource.asl M src/soc/intel/xeon_sp/spr/acpi/pci_resource.asl M src/soc/intel/xeon_sp/spr/acpi/uncore.asl 4 files changed, 9 insertions(+), 139 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/85559/1
diff --git a/src/soc/intel/xeon_sp/14nm/acpi/iiostack.asl b/src/soc/intel/xeon_sp/14nm/acpi/iiostack.asl index 735197a..f8eb59e 100644 --- a/src/soc/intel/xeon_sp/14nm/acpi/iiostack.asl +++ b/src/soc/intel/xeon_sp/14nm/acpi/iiostack.asl @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <soc/intel/xeon_sp/acpi/iiostack.asl> + #define MAKE_IIO_DEV(id,rt,pxm) \ Device (PC##id) \ { \ @@ -25,50 +27,11 @@ } \ Return (_SB_.PR##rt) \ } \ - Name (SUPP, 0x00) \ - Name (CTRL, 0x00) \ Name (_PXM, pxm) /* _PXM: Device Proximity */ \ Method (_OSC, 4, NotSerialized) \ { \ - CreateDWordField (Arg3, 0x00, CDW1) \ - If ((Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */)) \ - { \ - If (Arg2 < 0x03) \ - { \ - CDW1 |= 0x02 /* Unknown failure */ \ - Return (Arg3) \ - } \ - CreateDWordField (Arg3, 0x04, CDW2) \ - CreateDWordField (Arg3, 0x08, CDW3) \ - SUPP = CDW2 \ - CTRL = CDW3 \ - If ((SUPP & 0x16) != 0x16) \ - { \ - CTRL &= 0x1E \ - } \ - /* Never allow SHPC (no SHPC controller in system) */ \ - CTRL &= 0x1D \ - /* Disable Native PCIe AER handling from OS */ \ - CTRL &= 0x17 \ - If ((Arg1 != 1)) /* unknown revision */ \ - { \ - CDW1 |= 0x08 \ - } \ - If ((CDW3 != CTRL)) /* capabilities bits were masked */ \ - { \ - CDW1 |= 0x10 \ - } \ - CDW3 = CTRL \ - Return (Arg3) \ - } \ - Else \ - { \ - /* indicate unrecognized UUID */ \ - CDW1 |= 0x04 \ - DBG0 = 0xEE \ - Return (Arg3) \ - } \ - } \ + Return (_SB.POSC(Arg0, Arg1, Arg2, Arg3, 0x15, 0 , 0)) \ + } \ }
// Keep in sync with iio_domain_set_acpi_name()! diff --git a/src/soc/intel/xeon_sp/spr/acpi/cxl_resource.asl b/src/soc/intel/xeon_sp/spr/acpi/cxl_resource.asl index 553ca9d..2d98277 100644 --- a/src/soc/intel/xeon_sp/spr/acpi/cxl_resource.asl +++ b/src/soc/intel/xeon_sp/spr/acpi/cxl_resource.asl @@ -36,63 +36,8 @@ { Return (_SB.PRTID) } - Name (SUPP, 0x00) // PCI _OSC Support Field Value - Name (CTRL, 0x00) // PCI _OSC Control Field Value - Name (SUPC, 0x00) // CXL _OSC Support Field Value - Name (CTRC, 0x00) // CXL _OSC Control Field Value - Name (_PXM, 0x00) /* _PXM: Device Proximity */ Method (_OSC, 4, NotSerialized) { - CreateDWordField (Arg3, 0x00, CDW1) - If (Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */ - || Arg0 == ToUUID ("68f2d50b-c469-4d8a-bd3d-941a103fd3fc")) /* CXL 2.0 */ - { - If (Arg2 < 0x03) /* Number of DWORDs in Arg3 must be at least 3 */ - { - CDW1 |= 0x02 /* Unknown failure */ - Return (Arg3) - } - CreateDWordField (Arg3, 0x04, CDW2) - CreateDWordField (Arg3, 0x08, CDW3) - - SUPP = CDW2 - CTRL = CDW3 - If (Arg0 == ToUUID ("68f2d50b-c469-4d8a-bd3d-941a103fd3fc")) /* CXL 2.0 */ - { - CreateDWordField (Arg3, 0x0C, CDW4) - CreateDWordField (Arg3, 0x10, CDW5) - SUPC = CDW4 - CTRC = CDW5 - } - If (SUPP & 0x16 != 0x16) - { - CTRL &= 0x1E - } - /* Never allow SHPC (no SHPC controller in system) */ - CTRL &= 0x1D - /* Disable Native PCIe AER handling from OS */ - CTRL &= 0x17 - If (Arg1 != 1) /* unknown revision */ - { - CDW1 |= 0x08 - } - If (CDW3 != CTRL) /* capabilities bits were masked */ - { - CDW1 |= 0x10 - } - CDW3 = CTRL - If (Arg0 == ToUUID ("68f2d50b-c469-4d8a-bd3d-941a103fd3fc")) /* CXL 2.0 */ - { - CDW5 = CTRC - } - Return (Arg3) - } - Else - { - /* indicate unrecognized UUID */ - CDW1 |= 0x04 - IO80 = 0xEE - Return (Arg3) - } + Return (_SB.POSC(Arg0, Arg1, Arg2, Arg3, 0x15, 1, 1)) } } diff --git a/src/soc/intel/xeon_sp/spr/acpi/pci_resource.asl b/src/soc/intel/xeon_sp/spr/acpi/pci_resource.asl index fdb599e..498f897 100644 --- a/src/soc/intel/xeon_sp/spr/acpi/pci_resource.asl +++ b/src/soc/intel/xeon_sp/spr/acpi/pci_resource.asl @@ -32,50 +32,10 @@ { Return (_SB.PRTID) } - Name (SUPP, 0x00) - Name (CTRL, 0x00) Name (_PXM, SOCKET) /* _PXM: Device Proximity */ + Method (_OSC, 4, NotSerialized) { - CreateDWordField (Arg3, 0x00, CDW1) - If (Arg0 == ToUUID ("33db4d5b-1ff7-401c-9657-7441c03dd766") /* PCI Host Bridge Device */) - { - If (Arg2 < 0x03) /* Number of DWORDs in Arg3 must be at least 3 */ - { - CDW1 |= 0x02 /* Unknown failure */ - Return (Arg3) - } - CreateDWordField (Arg3, 0x04, CDW2) - CreateDWordField (Arg3, 0x08, CDW3) - - SUPP = CDW2 - CTRL = CDW3 - If (SUPP & 0x16 != 0x16) - { - CTRL &= 0x1E - } - /* Never allow SHPC (no SHPC controller in system) */ - CTRL &= 0x1D - /* Disable Native PCIe AER handling from OS */ - CTRL &= 0x17 - - If (Arg1 != 1) /* unknown revision */ - { - CDW1 |= 0x08 - } - If (CDW3 != CTRL) /* capabilities bits were masked */ - { - CDW1 |= 0x10 - } - CDW3 = CTRL - Return (Arg3) - } - Else - { - /* indicate unrecognized UUID */ - CDW1 |= 0x04 - IO80 = 0xEE - Return (Arg3) - } + Return (_SB.POSC(Arg0, Arg1, Arg2, Arg3, 0x15, 0, 0)) } } diff --git a/src/soc/intel/xeon_sp/spr/acpi/uncore.asl b/src/soc/intel/xeon_sp/spr/acpi/uncore.asl index c1b8bdc..dc9662a 100644 --- a/src/soc/intel/xeon_sp/spr/acpi/uncore.asl +++ b/src/soc/intel/xeon_sp/spr/acpi/uncore.asl @@ -10,6 +10,8 @@ { #include "uncore_irq.asl"
+ #include <soc/intel/xeon_sp/acpi/iiostack.asl> + #define SOCKET 0 #include "iiostack.asl" #undef SOCKET