Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/74479 )
Change subject: soc/intel/meteorlake: Don't offer D3Cold when it's disabled ......................................................................
soc/intel/meteorlake: Don't offer D3Cold when it's disabled
Use D3COLD_SUPPORT Kconfig option to adjust the maximum supported sleep state in ACPI.
Signed-off-by: Sean Rhodes sean@starlabs.systems Change-Id: Ifa55a19727e6adb6864158c2c323d08a0c22b996 Reviewed-on: https://review.coreboot.org/c/coreboot/+/74479 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Michael Niewöhner foss@mniewoehner.de --- M src/soc/intel/meteorlake/acpi/tcss.asl M src/soc/intel/meteorlake/acpi/tcss_dma.asl M src/soc/intel/meteorlake/acpi/tcss_pcierp.asl M src/soc/intel/meteorlake/acpi/tcss_xhci.asl 4 files changed, 64 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Michael Niewöhner: Looks good to me, approved
diff --git a/src/soc/intel/meteorlake/acpi/tcss.asl b/src/soc/intel/meteorlake/acpi/tcss.asl index c136048..1d562c9 100644 --- a/src/soc/intel/meteorlake/acpi/tcss.asl +++ b/src/soc/intel/meteorlake/acpi/tcss.asl @@ -657,6 +657,7 @@ } }
+#if CONFIG(D3COLD_SUPPORT) Method (TCON, 0) { /* Reset IOM D3 cold bit if it is in D3 cold now. */ @@ -763,6 +764,7 @@ STAT = 0 } } +#endif // D3COLD_SUPPORT
/* * TCSS xHCI device diff --git a/src/soc/intel/meteorlake/acpi/tcss_dma.asl b/src/soc/intel/meteorlake/acpi/tcss_dma.asl index d00f794..94678fc 100644 --- a/src/soc/intel/meteorlake/acpi/tcss_dma.asl +++ b/src/soc/intel/meteorlake/acpi/tcss_dma.asl @@ -27,25 +27,45 @@
Method (_S0W, 0x0) { +#if CONFIG(D3COLD_SUPPORT) Return (0x4) +#else + Return (0x3) +#endif // D3COLD_SUPPORT }
Method (_PR0) { +#if CONFIG(D3COLD_SUPPORT) If (DUID == 0) { Return (Package() { _SB.PCI0.D3C, _SB.PCI0.TBT0 }) } Else { Return (Package() { _SB.PCI0.D3C, _SB.PCI0.TBT1 }) } +#else + If (DUID == 0) { + Return (Package() { _SB.PCI0.TBT0 }) + } Else { + Return (Package() { _SB.PCI0.TBT1 }) + } +#endif // D3COLD_SUPPORT }
Method (_PR3) { +#if CONFIG(D3COLD_SUPPORT) If (DUID == 0) { Return (Package() { _SB.PCI0.D3C, _SB.PCI0.TBT0 }) } Else { Return (Package() { _SB.PCI0.D3C, _SB.PCI0.TBT1 }) } +#else + If (DUID == 0) { + Return (Package() { _SB.PCI0.TBT0 }) + } Else { + Return (Package() { _SB.PCI0.TBT1 }) + } +#endif // D3COLD_SUPPORT }
/* diff --git a/src/soc/intel/meteorlake/acpi/tcss_pcierp.asl b/src/soc/intel/meteorlake/acpi/tcss_pcierp.asl index 48b8c73..6dbde46 100644 --- a/src/soc/intel/meteorlake/acpi/tcss_pcierp.asl +++ b/src/soc/intel/meteorlake/acpi/tcss_pcierp.asl @@ -247,25 +247,45 @@
Method (_S0W, 0x0, NotSerialized) { +#if CONFIG(D3COLD_SUPPORT) Return (0x4) +#else + Return (0x3) +#endif // D3COLD_SUPPORT }
Method (_PR0) { +#if CONFIG(D3COLD_SUPPORT) If ((TUID == 0) || (TUID == 1)) { Return (Package() { _SB.PCI0.D3C, _SB.PCI0.TBT0 }) } Else { Return (Package() { _SB.PCI0.D3C, _SB.PCI0.TBT1 }) } +#else + If ((TUID == 0) || (TUID == 1)) { + Return (Package() { _SB.PCI0.TBT0 }) + } Else { + Return (Package() { _SB.PCI0.TBT1 }) + } +#endif // D3COLD_SUPPORT }
Method (_PR3) { +#if CONFIG(D3COLD_SUPPORT) If ((TUID == 0) || (TUID == 1)) { Return (Package() { _SB.PCI0.D3C, _SB.PCI0.TBT0 }) } Else { Return (Package() { _SB.PCI0.D3C, _SB.PCI0.TBT1 }) } +#else + If ((TUID == 0) || (TUID == 1)) { + Return (Package() { _SB.PCI0.TBT0 }) + } Else { + Return (Package() { _SB.PCI0.TBT1 }) + } +#endif // D3COLD_SUPPORT }
/* diff --git a/src/soc/intel/meteorlake/acpi/tcss_xhci.asl b/src/soc/intel/meteorlake/acpi/tcss_xhci.asl index 422e6f7..ddc5a66 100644 --- a/src/soc/intel/meteorlake/acpi/tcss_xhci.asl +++ b/src/soc/intel/meteorlake/acpi/tcss_xhci.asl @@ -30,7 +30,11 @@
Method (_S0W, 0x0, NotSerialized) { +#if CONFIG(D3COLD_SUPPORT) Return (0x4) +#else + Return (0x3) +#endif // D3COLD_SUPPORT }
/* @@ -39,6 +43,7 @@ */ Name (SD3C, 0)
+#if CONFIG(D3COLD_SUPPORT) Method (_PR0) { Return (Package () { _SB.PCI0.D3C }) @@ -48,6 +53,7 @@ { Return (Package () { _SB.PCI0.D3C }) } +#endif // D3COLD_SUPPORT
/* * XHCI controller _DSM method