[edk2-devel] [edk2-platforms][PATCH 4/6] JadePkg: Support ACPI tables for Hot Plug of Ampere Altra
Minh Nguyen via groups.io
minhnguyen1=os.amperecomputing.com at groups.io
Thu May 11 08:10:09 UTC 2023
From: Vu Nguyen <vunguyen at os.amperecomputing.com>
This adds necessary changes of ACPI tables and defines the memory
region between OS and Trusted Firmware-A for supporting Hot Plug
of Ampere Altra.
Signed-off-by: Minh Nguyen <minhnguyen1 at os.amperecomputing.com>
---
Platform/Ampere/JadePkg/AcpiTables/Dsdt.asl | 499 ++++++++-
Platform/Ampere/JadePkg/AcpiTables/MHPP.asi | 127 +++
Platform/Ampere/JadePkg/AcpiTables/PCI-S0.asi | 548 +++++++++-
Platform/Ampere/JadePkg/AcpiTables/PCI-S1.asi | 1074 +++++++++++++++++++-
4 files changed, 2245 insertions(+), 3 deletions(-)
diff --git a/Platform/Ampere/JadePkg/AcpiTables/Dsdt.asl b/Platform/Ampere/JadePkg/AcpiTables/Dsdt.asl
index d7d2df8c3dce..9ee215a26a09 100644
--- a/Platform/Ampere/JadePkg/AcpiTables/Dsdt.asl
+++ b/Platform/Ampere/JadePkg/AcpiTables/Dsdt.asl
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved.<BR>
+ Copyright (c) 2020 - 2023, Ampere Computing LLC. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -11,6 +11,9 @@ DefinitionBlock("Dsdt.aml", "DSDT", 0x02, "Ampere", "Jade", 1) {
// Board Model
Name(\BDMD, "Jade Board")
Name(AERF, 0) // PCIe AER Firmware-First
+
+ Include ("MHPP.asi")
+
Scope(\_SB) {
//
@@ -181,12 +184,506 @@ DefinitionBlock("Dsdt.aml", "DSDT", 0x02, "Ampere", "Jade", 1) {
}
Name(_CRS, ResourceTemplate () {
Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive) { 84 } // GHES
+ Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive) { 44 } // PCIe Hot Plug Doorbell Insertion & Ejection (DBNS4 -> GIC-IRQS44)
})
+
+ // @DBN4 agent base address for HP PCIe insertion/ejection event: 0x1000.0054.4000
+ OperationRegion(DBN4, SystemMemory, 0x100000544010, 20)
+ Field (DBN4, DWordAcc, NoLock, Preserve) {
+ DOUT, 32, // event and PCIe port information at offset 0x10
+ offset (0x10),
+ STA4, 32, // interrupt status at offset 0x20
+ }
+
Method(_EVT, 1, Serialized) {
Switch (ToInteger(Arg0)) {
Case (84) { // GHES interrupt
Notify (HED0, 0x80)
}
+
+ Case (44) { // doorbell notification (Insertion/ejection)
+ local0 = DOUT & 0x00FF0000
+ if (local0 == 0x00010000) {
+ local0 = STA4 & 0xFFFFFFFF
+ if (local0) {
+ Store(local0, STA4) // clear interrupt
+ }
+ local0 = A120 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIA.P2P1, 1) // insertion action
+ }
+ local0 = A121 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIA.P2P2, 1) // insertion action
+ }
+ local0 = A122 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIA.P2P3, 1) // insertion action
+ }
+ local0 = A123 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIA.P2P4, 1) // insertion action
+ }
+ local0 = B000 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI4.P2P1, 1) // insertion action
+ }
+ local0 = B002 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI4.P2P3, 1) // insertion action
+ }
+ local0 = B004 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI4.P2P5, 1) // insertion action
+ }
+ local0 = B006 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI4.P2P7, 1) // insertion action
+ }
+ local0 = B010 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI5.P2P1, 1) // insertion action
+ }
+ local0 = B012 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI5.P2P3, 1) // insertion action
+ }
+ local0 = B014 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI5.P2P5, 1) // insertion action
+ }
+ local0 = B016 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI5.P2P7, 1) // insertion action
+ }
+ local0 = B104 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIC.P2P5, 1) // insertion action
+ }
+ local0 = B106 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIC.P2P7, 1) // insertion action
+ }
+ local0 = B110 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCID.P2P1, 1) // insertion action
+ }
+ local0 = B112 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCID.P2P3, 1) // insertion action
+ }
+ local0 = B120 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIE.P2P1, 1) // insertion action
+ }
+ local0 = B122 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIE.P2P3, 1) // insertion action
+ }
+ local0 = B124 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIE.P2P5, 1) // insertion action
+ }
+ local0 = B126 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIE.P2P7, 1) // insertion action
+ }
+ local0 = B130 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIF.P2P1, 1) // insertion action
+ }
+ local0 = B132 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIF.P2P3, 1) // insertion action
+ }
+ local0 = B134 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIF.P2P5, 1) // insertion action
+ }
+ local0 = B136 & 0xFF000000
+ if ((local0 == 0x01000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIF.P2P7, 1) // insertion action
+ }
+ }
+ elseif (local0 == 0x00000000) {
+ local0 = STA4 & 0xFFFFFFFF
+ if (local0) {
+ Store(local0, STA4) // clear interrupt
+ }
+ local0 = A120 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCIA.P2P1, 1) // ejection action
+ A120 = 0x10000201 // inprogress remove
+ }
+ local0 = A121 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCIA.P2P2, 1) // ejection action
+ A121 = 0x10010201 // inprogress remove
+ }
+ local0 = A122 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCIA.P2P3, 1) // ejection action
+ A122 = 0x10020201 // inprogress remove
+ }
+ local0 = A123 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCIA.P2P4, 1) // ejection action
+ A123 = 0x10030201 // inprogress remove
+ }
+ local0 = B000 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCI4.P2P1, 1) // ejection action
+ B000 = 0x10000400 // inprogress remove
+ }
+ local0 = B002 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCI4.P2P3, 1) // ejection action
+ B002 = 0x10020400 // inprogress remove
+ }
+ local0 = B004 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCI4.P2P5, 1) // ejection action
+ B004 = 0x10040400 // inprogress remove
+ }
+ local0 = B006 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCI4.P2P7, 1) // ejection action
+ B006 = 0x10060400 // inprogress remove
+ }
+ local0 = B010 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCI5.P2P1, 1) // ejection action
+ B010 = 0x10000500 // inprogress remove
+ }
+ local0 = B012 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCI5.P2P3, 1) // ejection action
+ B012 = 0x10020500 // inprogress remove
+ }
+ local0 = B014 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCI5.P2P5, 1) // ejection action
+ B014 = 0x10040500 // inprogress remove
+ }
+ local0 = B016 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCI5.P2P7, 1) // ejection action
+ B016 = 0x10060500 // inprogress remove
+ }
+ local0 = B104 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCIC.P2P5, 1) // ejection action
+ B104 = 0x10040401 // inprogress remove
+ }
+ local0 = B106 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCIC.P2P7, 1) // ejection action
+ B106 = 0x10060401 // inprogress remove
+ }
+ local0 = B110 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCID.P2P1, 1) // ejection action
+ B110 = 0x10000501 // inprogress remove
+ }
+ local0 = B112 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCID.P2P3, 1) // ejection action
+ B112 = 0x10020501 // inprogress remove
+ }
+ local0 = B120 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCIE.P2P1, 1) // ejection action
+ B120 = 0x10000601 // inprogress remove
+ }
+ local0 = B122 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCIE.P2P3, 1) // ejection action
+ B122 = 0x10020601 // inprogress remove
+ }
+ local0 = B124 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCIE.P2P5, 1) // ejection action
+ B124 = 0x10040601 // inprogress remove
+ }
+ local0 = B126 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCIE.P2P7, 1) // ejection action
+ B126 = 0x10060601 // inprogress remove
+ }
+ local0 = B130 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCIF.P2P1, 1) // ejection action
+ B130 = 0x10000701 // inprogress remove
+ }
+ local0 = B132 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCIF.P2P3, 1) // ejection action
+ B132 = 0x10020701 // inprogress remove
+ }
+ local0 = B134 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCIF.P2P5, 1) // ejection action
+ B134 = 0x10040701 // inprogress remove
+ }
+ local0 = B136 & 0xFF000000
+ if (local0 == 0x00000000) {
+ Notify (\_SB.PCIF.P2P7, 1) // ejection action
+ B136 = 0x10060701 // inprogress remove
+ }
+ }
+ elseif (local0 == 0x00020000) { // is either unstable link or too fast insertion?
+ local0 = STA4 & 0xFFFFFFFF
+ if (local0) {
+ Store(local0, STA4) // clear interrupt
+ }
+ local0 = A120 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIA.P2P1, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCIA.P2P1, 1) // insertion action
+ }
+ local0 = A121 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIA.P2P2, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCIA.P2P2, 1) // insertion action
+ }
+ local0 = A122 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIA.P2P3, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCIA.P2P3, 1) // insertion action
+ }
+ local0 = A123 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIA.P2P4, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCIA.P2P4, 1) // insertion action
+ }
+ local0 = B000 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI4.P2P1, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCI4.P2P1, 1) // insertion action
+ }
+ local0 = B002 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI4.P2P3, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCI4.P2P3, 1) // insertion action
+ }
+ local0 = B004 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI4.P2P5, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCI4.P2P5, 1) // insertion action
+ }
+ local0 = B006 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI4.P2P7, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCI4.P2P7, 1) // insertion action
+ }
+ local0 = B010 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI5.P2P1, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCI5.P2P1, 1) // insertion action
+ }
+ local0 = B012 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI5.P2P3, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCI5.P2P3, 1) // insertion action
+ }
+ local0 = B014 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI5.P2P5, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCI5.P2P5, 1) // insertion action
+ }
+ local0 = B016 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI5.P2P7, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCI5.P2P7, 1) // insertion action
+ }
+ local0 = B104 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIC.P2P5, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCIC.P2P5, 1) // insertion action
+ }
+ local0 = B106 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIC.P2P7, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCIC.P2P7, 1) // insertion action
+ }
+ local0 = B110 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCID.P2P1, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCID.P2P1, 1) // insertion action
+ }
+ local0 = B112 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCID.P2P3, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCID.P2P3, 1) // insertion action
+ }
+ local0 = B120 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIE.P2P1, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCIE.P2P1, 1) // insertion action
+ }
+ local0 = B122 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIE.P2P3, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCIE.P2P3, 1) // insertion action
+ }
+ local0 = B124 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIE.P2P5, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCIE.P2P5, 1) // insertion action
+ }
+ local0 = B126 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIE.P2P7, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCIE.P2P7, 1) // insertion action
+ }
+ local0 = B130 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIF.P2P1, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCIF.P2P1, 1) // insertion action
+ }
+ local0 = B132 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIF.P2P3, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCIF.P2P3, 1) // insertion action
+ }
+ local0 = B134 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIF.P2P5, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCIF.P2P5, 1) // insertion action
+ }
+ local0 = B136 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIF.P2P7, 3) // force remove bridge port and port itself
+ Notify (\_SB.PCIF.P2P7, 1) // insertion action
+ }
+ }
+ elseif (local0 == 0x00030000) { // got incomplete remove before?
+ local0 = STA4 & 0xFFFFFFFF
+ if (local0) {
+ Store(local0, STA4) // clear interrupt
+ }
+ local0 = A120 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIA.P2P1.S0F0, 3) // remove port itself
+ Notify (\_SB.PCIA.P2P1, 1) // insertion action
+ }
+ local0 = A121 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIA.P2P2.S0F0, 3) // remove port itself
+ Notify (\_SB.PCIA.P2P2, 1) // insertion action
+ }
+ local0 = A122 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIA.P2P3.S0F0, 3) // remove port itself
+ Notify (\_SB.PCIA.P2P3, 1) // insertion action
+ }
+ local0 = A123 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIA.P2P4.S0F0, 3) // remove port itself
+ Notify (\_SB.PCIA.P2P4, 1) // insertion action
+ }
+ local0 = B000 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI4.P2P1.S0F0, 3) // remove port itself
+ Notify (\_SB.PCI4.P2P1, 1) // insertion action
+ }
+ local0 = B002 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI4.P2P3.S0F0, 3) // remove port itself
+ Notify (\_SB.PCI4.P2P3, 1) // insertion action
+ }
+ local0 = B004 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI4.P2P5.S0F0, 3) // remove port itself
+ Notify (\_SB.PCI4.P2P5, 1) // insertion action
+ }
+ local0 = B006 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI4.P2P7.S0F0, 3) // remove port itself
+ Notify (\_SB.PCI4.P2P7, 1) // insertion action
+ }
+ local0 = B010 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI5.P2P1.S0F0, 3) // remove port itself
+ Notify (\_SB.PCI5.P2P1, 1) // insertion action
+ }
+ local0 = B012 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI5.P2P3.S0F0, 3) // remove port itself
+ Notify (\_SB.PCI5.P2P3, 1) // insertion action
+ }
+ local0 = B014 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI5.P2P5.S0F0, 3) // remove port itself
+ Notify (\_SB.PCI5.P2P5, 1) // insertion action
+ }
+ local0 = B016 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCI5.P2P7.S0F0, 3) // remove port itself
+ Notify (\_SB.PCI5.P2P7, 1) // insertion action
+ }
+ local0 = B104 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIC.P2P5.S0F0, 3) // remove port itself
+ Notify (\_SB.PCIC.P2P5, 1) // insertion action
+ }
+ local0 = B106 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIC.P2P7.S0F0, 3) // remove port itself
+ Notify (\_SB.PCIC.P2P7, 1) // insertion action
+ }
+ local0 = B110 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCID.P2P1.S0F0, 3) // remove port itself
+ Notify (\_SB.PCID.P2P1, 1) // insertion action
+ }
+ local0 = B112 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCID.P2P3.S0F0, 3) // remove port itself
+ Notify (\_SB.PCID.P2P3, 1) // insertion action
+ }
+ local0 = B120 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIE.P2P1.S0F0, 3) // remove port itself
+ Notify (\_SB.PCIE.P2P1, 1) // insertion action
+ }
+ local0 = B122 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIE.P2P3.S0F0, 3) // remove port itself
+ Notify (\_SB.PCIE.P2P3, 1) // insertion action
+ }
+ local0 = B124 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIE.P2P5.S0F0, 3) // remove port itself
+ Notify (\_SB.PCIE.P2P5, 1) // insertion action
+ }
+ local0 = B126 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIE.P2P7.S0F0, 3) // remove port itself
+ Notify (\_SB.PCIE.P2P7, 1) // insertion action
+ }
+ local0 = B130 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIF.P2P1.S0F0, 3) // remove port itself
+ Notify (\_SB.PCIF.P2P1, 1) // insertion action
+ }
+ local0 = B132 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIF.P2P3.S0F0, 3) // remove port itself
+ Notify (\_SB.PCIF.P2P3, 1) // insertion action
+ }
+ local0 = B134 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIF.P2P5.S0F0, 3) // remove port itself
+ Notify (\_SB.PCIF.P2P5, 1) // insertion action
+ }
+ local0 = B136 & 0xFF000000
+ if ((local0 == 0x0E000000) || (local0 == 0x0F000000)) {
+ Notify (\_SB.PCIF.P2P7.S0F0, 3) // remove port itself
+ Notify (\_SB.PCIF.P2P7, 1) // insertion action
+ }
+ }
+ }
}
}
}
diff --git a/Platform/Ampere/JadePkg/AcpiTables/MHPP.asi b/Platform/Ampere/JadePkg/AcpiTables/MHPP.asi
new file mode 100644
index 000000000000..27987b7c7489
--- /dev/null
+++ b/Platform/Ampere/JadePkg/AcpiTables/MHPP.asi
@@ -0,0 +1,127 @@
+/** @file
+
+ Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+// @DRAM base address 0x88970000
+// Regarding updating the status of hotplug PCIe ports, a shared DRAM
+// memory region between Arm Trusted Firmware and UEFI is used to indicate
+// PCIe hotplug event action. An item of MHPP table is used to reflect hotplug
+// event of each PCIe port. There is a maximum of 48 PCIe hotplug ports in Altra
+// Family processor, the definition in this table should be aligned with hotplug
+// port map of a specific platform. For example, in Ampere Mt. Jade platform,
+// there are 40 PCIe hotplug ports. Hence, this table defines 36 entries corresponding
+// to Ampere Mt. Jade PCIe hotplug port map.
+OperationRegion(MHPP, SystemMemory, 0x88970000, 960)
+Field (MHPP, DWordAcc, NoLock, Preserve) {
+ A020, 32, // 0. S0 RCA2.0
+ A00I, 8, // incomplete remove
+ offset (24),
+ A030, 32, // 1. S0 RCA3.0
+ A01I, 8, // incomplete remove
+ offset (48),
+ B000, 32, // 2. S0 RCB0.0
+ B02I, 8, // incomplete remove
+ offset (72),
+ B002, 32, // 3. S0 RCB0.2
+ B03I, 8, // incomplete remove
+ offset (96),
+ B004, 32, // 4. S0 RCB0.4
+ B04I, 8, // incomplete remove
+ offset (120),
+ B006, 32, // 5. S0 RCB0.6
+ B05I, 8, // incomplete remove
+ offset (144),
+ B010, 32, // 6. S0 RCB1.0
+ B06I, 8, // incomplete remove
+ offset (168),
+ B012, 32, // 7. S0 RCB1.2
+ B07I, 8, // incomplete remove
+ offset (192),
+ B014, 32, // 8. S0 RCB1.4
+ B08I, 8, // incomplete remove
+ offset (216),
+ B016, 32, // 9. S0 RCB1.6
+ B09I, 8, // incomplete remove
+ offset (240),
+ B020, 32, // 10. S0 RCB2.0
+ B10I, 8, // incomplete remove
+ offset (264),
+ B022, 32, // 11. S0 RCB2.2
+ B11I, 8, // incomplete remove
+ offset (288),
+ B024, 32, // 12. S0 RCB2.4
+ B12I, 8, // incomplete remove
+ offset (312),
+ B030, 32, // 13. S0 RCB3.0
+ B13I, 8, // incomplete remove
+ offset (336),
+ B034, 32, // 14. S0 RCB3.4
+ B14I, 8, // incomplete remove
+ offset (360),
+ B036, 32, // 15. S0 RCB3.6
+ B15I, 8, // incomplete remove
+ offset (384),
+ A120, 32, // 16. S1 RCA2.0
+ A16I, 8, // incomplete remove
+ offset (408),
+ A121, 32, // 17. S1 RCA2.1
+ A17I, 8, // incomplete remove
+ offset (432),
+ A122, 32, // 18. S1 RCA2.2
+ A18I, 8, // incomplete remove
+ offset (456),
+ A123, 32, // 19. S1 RCA2.3
+ A19I, 8, // incomplete remove
+ offset (480),
+ A130, 32, // 20. S1 RCA3.0
+ A20I, 8, // incomplete remove
+ offset (504),
+ A132, 32, // 21. S1 RCA3.2
+ A21I, 8, // incomplete remove
+ offset (528),
+ B100, 32, // 22. S1 RCB0.0
+ B22I, 8, // incomplete remove
+ offset (552),
+ B104, 32, // 23. S1 RCB0.4
+ B23I, 8, // incomplete remove
+ offset (576),
+ B106, 32, // 24. S1 RCB0.6
+ B24I, 8, // incomplete remove
+ offset (600),
+ B110, 32, // 25. S1 RCB1.0
+ B25I, 8, // incomplete remove
+ offset (624),
+ B112, 32, // 26. S1 RCB1.2
+ B26I, 8, // incomplete remove
+ offset (648),
+ B114, 32, // 27. S1 RCB1.4
+ B27I, 8, // incomplete remove
+ offset (672),
+ B120, 32, // 28. S1 RCB2.0
+ B28I, 8, // incomplete remove
+ offset (696),
+ B122, 32, // 29. S1 RCB2.2
+ B29I, 8, // incomplete remove
+ offset (720),
+ B124, 32, // 30. S1 RCB2.4
+ B30I, 8, // incomplete remove
+ offset (744),
+ B126, 32, // 31. S1 RCB2.6
+ B31I, 8, // incomplete remove
+ offset (768),
+ B130, 32, // 32. S1 RCB3.0
+ B32I, 8, // incomplete remove
+ offset (792),
+ B132, 32, // 33. S1 RCB3.2
+ B33I, 8, // incomplete remove
+ offset (816),
+ B134, 32, // 34. S1 RCB3.4
+ B34I, 8, // incomplete remove
+ offset (840),
+ B136, 32, // 35. S1 RCB3.6
+ B35I, 8 // incomplete remove
+}
diff --git a/Platform/Ampere/JadePkg/AcpiTables/PCI-S0.asi b/Platform/Ampere/JadePkg/AcpiTables/PCI-S0.asi
index f6d788cd99b0..452baf18e720 100644
--- a/Platform/Ampere/JadePkg/AcpiTables/PCI-S0.asi
+++ b/Platform/Ampere/JadePkg/AcpiTables/PCI-S0.asi
@@ -1,11 +1,21 @@
/** @file
- Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved.<BR>
+ Copyright (c) 2020 - 2023, Ampere Computing LLC. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
+ Include("MHPP.asi")
+
+ // @DoorBellNS1 0x1000.0054.1000. Out-Offset: 0x10
+ OperationRegion(DNS1, SystemMemory, 0x100000541010 , 8)
+
+ Field (DNS1, DWordAcc, NoLock, Preserve) {
+ OUTV, 32,
+ DIN0, 32,
+ }
+
// PCI2 RCA2
Device (PCI2) {
//
@@ -1016,6 +1026,274 @@
Name (_ADR, 0x00000000)
}
+ //
+ // Root Port 1
+ //
+ Device (P2P1) {
+ //
+ // Device 1, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00010000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 1 ([01])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B000 == 0xF0000400) { // SW ejected ?
+ Store(0x02000400, B000) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000212, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000212 to DBNS1_10
+ Return(0xF)
+ }
+ elseif (B000 == 0x10000400) { // ejected complete ?
+ Store(0x02000400, B000) // clear action value
+ Return(0x0)
+ }
+ elseif ((B000 == 0x01000400) || (B000 == 0x0F000400)) { // inserted ?
+ if (B02I == 0x00) {
+ Store(0x02000400, B000) // clear action value
+ }
+ Return(0xF)
+ }
+ elseif ((B000 == 0x0E000400) || (B000 == 0x0F000400)) { // inprogress inserted ?
+ if (B02I == 0x00) {
+ Store(0x02000400, B000) // clear action value
+ }
+ Return(0xF)
+ }
+ else {
+ Return(0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B000 == 0x02000400) { // really sw ejection call?
+ Store(0xF0000400, B000) // set SW ejection action
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000212, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000212 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000001)
+ }
+ }
+
+ //
+ // Root Port 3
+ //
+ Device (P2P3) {
+ //
+ // Device 3, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00030000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 2 ([02])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B002 == 0xF0020400) { // SW ejected ?
+ Store(0x02020400, B002) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000232, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000232 to DBNS1_10
+ Return(0xF)
+ }
+ elseif (B002 == 0x10020400) { // ejected complete ?
+ Store(0x02020400, B002) // clear action value
+ Return(0x0)
+ }
+ elseif ((B002 == 0x01020400) || (B002 == 0x0F020400)) { // inserted ?
+ if (B03I == 0x00) {
+ Store(0x02020400, B002) // clear action value
+ }
+ Return(0xF)
+ }
+ elseif ((B002 == 0x0E020400) || (B002 == 0x0F020400)) { // inprogress inserted ?
+ if (B03I == 0x00) {
+ Store(0x02020400, B002) // clear action value
+ }
+ Return(0xF)
+ }
+ else {
+ Return(0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B002 == 0x02020400) { // really sw ejection call?
+ Store(0xF0020400, B002) // set SW ejection action
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000232, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000232 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000002)
+ }
+ }
+
+ //
+ // Root Port 5
+ //
+ Device (P2P5) {
+ //
+ // Device 5, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00050000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 3 [03])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B004 == 0xF0040400) { // SW ejected ?
+ Store(0x02040400, B004) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000252, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000252 to DBNS1_10
+ Return(0xF)
+ }
+ elseif (B004 == 0x10040400) { // ejected complete ?
+ Store(0x02040400, B004) // clear action value
+ Return(0x0)
+ }
+ elseif ((B004 == 0x01040400) || (B004 == 0x0F040400)) { // inserted?
+ if (B04I == 0x00) {
+ Store(0x02040400, B004) // clear action value
+ }
+ Return(0xF)
+ }
+ elseif ((B004 == 0x0E040400) || (B004 == 0x0F040400)) { // inprogress inserted?
+ if (B04I == 0x00) {
+ Store(0x02040400, B004) // clear action value
+ }
+ Return(0xF)
+ }
+ else {
+ Return(0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B004 == 0x02040400) { // really sw ejection call?
+ Store(0xF0040400, B004) // set SW ejection action
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000252, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000252 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000003)
+ }
+ }
+
+ //
+ // Root Port 7
+ //
+ Device (P2P7) {
+ //
+ // Device 7, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00070000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 4 ([04])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B006 == 0xF0060400) { // SW ejected ?
+ Store(0x02060400, B006) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000272, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000272 to DBNS1_10
+ Return(0xF)
+ }
+ elseif(B006 == 0x10060400) { // ejected complete ?
+ Store(0x02060400, B006) // clear action value
+ Return(0x0)
+ }
+ elseif((B006 == 0x01060400) || (B006 == 0x0F060400)) { // inserted ?
+ if (B05I == 0x00) {
+ Store(0x02060400, B006) // clear action value
+ }
+ Return(0xF)
+ }
+ elseif((B006 == 0x0E060400) || (B006 == 0x0F060400)) { // inprogress inserted ?
+ if (B05I == 0x00) {
+ Store(0x02060400, B006) // clear action value
+ }
+ Return(0xF)
+ }
+ else {
+ Return(0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B006 == 0x02060400) { // really sw ejection call?
+ Store(0xF0060400, B006) // set SW ejection value
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000272, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000272 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000004)
+ }
+ }
+
Method (_PXM, 0, NotSerialized) {
// Patch by code
Return(0xFF)
@@ -1366,6 +1644,274 @@
Name (_ADR, 0x00000000)
}
+ //
+ // Root Port 1
+ //
+ Device (P2P1) {
+ //
+ // Device 1, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00010000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 1 ([01])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B010 == 0xF0000500) { // SW ejected before ?
+ Store(0x02000500, B010) // Set back action event
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000213, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000213 to DBNS1_10
+ Return(0xF)
+ }
+ elseif (B010 == 0x10000500) { // ejected complete ?
+ Store(0x02000500, B010) // Set back action event
+ Return (0x0)
+ }
+ elseif ((B010 == 0x01000500) || (B010 == 0x0F000500)) { // inserted ?
+ if (B06I == 0x00) {
+ Store(0x02000500, B010) // Set back action event
+ }
+ Return (0xF)
+ }
+ elseif ((B010 == 0x0E000500) || (B010 == 0x0F000500)) { // inprogress inserted ?
+ if (B06I == 0x00) {
+ Store(0x02000500, B010) // Set back action event
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B010 == 0x02000500) { // really sw ejection call?
+ Store(0xF0000500, B010) // Set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000213, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000213 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000001)
+ }
+ }
+
+ //
+ // Root Port 3
+ //
+ Device (P2P3) {
+ //
+ // Device 3, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00030000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 2 ([02])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B012 == 0xF0020500) { // SW ejected before ?
+ Store(0x02020500, B012) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000233, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000233 to DBNS1_10
+ Return(0xF)
+ }
+ elseif (B012 == 0x10020500) { // ejected complete ?
+ Store(0x02020500, B012) // clear action value
+ Return (0x0)
+ }
+ elseif ((B012 == 0x01020500) || (B012 == 0x0F020500)) { // inserted ?
+ if (B07I == 0x00) {
+ Store(0x02020500, B012) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B012 == 0x0E020500) || (B012 == 0x0F020500)) { // inprogress inserted ?
+ if (B07I == 0x00) {
+ Store(0x02020500, B012) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B012 == 0x02020500) { // really sw ejection call?
+ Store(0xF0020500, B012) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000233, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000233 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000002)
+ }
+ }
+
+ //
+ // Root Port 5
+ //
+ Device (P2P5) {
+ //
+ // Device 5, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00050000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 3 [03])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B014 == 0xF0040500) { // SW ejected before ?
+ Store(0x02040500, B014) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000253, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000253 to DBNS1_10
+ Return (0xF)
+ }
+ elseif (B014 == 0x10040500) { // ejected complete ?
+ Store(0x02040500, B014) // clear action value
+ Return (0x0)
+ }
+ elseif ((B014 == 0x01040500) || (B014 == 0x0F040500)){ // inserted ?
+ if (B08I == 0x00) {
+ Store(0x02040500, B014) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B014 == 0x0E040500) || (B014 == 0x0F040500)) { // inprogress inserted ?
+ if (B08I == 0x00) {
+ Store(0x02040500, B014) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B014 == 0x02040500) { // really sw ejection call?
+ Store(0xF0040500, B014) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000253, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000253 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000003)
+ }
+ }
+
+ //
+ // Root Port 7
+ //
+ Device (P2P7) {
+ //
+ // Device 7, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00070000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 4 ([04])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B016 == 0xF0060500) { // SW ejected before ?
+ Store(0x02060500, B016) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000273, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000273 to DBNS1_10
+ Return(0xF)
+ }
+ elseif (B016 == 0x10060500) { // ejected complete ?
+ Store(0x02060500, B016) // clear action value
+ Return (0x0)
+ }
+ elseif ((B016 == 0x01060500) || (B016 == 0x0F060500)) { // inserted ?
+ if (B09I == 0x00) {
+ Store(0x02060500, B016) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B016 == 0x0E060500) || (B016 == 0x0F060500)) { // inprogress inserted ?
+ if (B09I == 0x00) {
+ Store(0x02060500, B016) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B016 == 0x02060500) { // really sw ejection call?
+ Store(0xF0060500, B016) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000273, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000273 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000004)
+ }
+ }
+
Method (_PXM, 0, NotSerialized) {
// Patch by code
Return(0xFF)
diff --git a/Platform/Ampere/JadePkg/AcpiTables/PCI-S1.asi b/Platform/Ampere/JadePkg/AcpiTables/PCI-S1.asi
index 2757f3124b83..49dec357abfb 100644
--- a/Platform/Ampere/JadePkg/AcpiTables/PCI-S1.asi
+++ b/Platform/Ampere/JadePkg/AcpiTables/PCI-S1.asi
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved.<BR>
+ Copyright (c) 2020 - 2023, Ampere Computing LLC. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -336,6 +336,274 @@
Name (_ADR, 0x00000000)
}
+ //
+ // Root Port 1
+ //
+ Device (P2P1) {
+ //
+ // Device 1, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00010000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 1 ([01])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (A120 == 0xF0000201) { // SW ejected before ?
+ Store(0x02000201, A120) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000216, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000216 to DBNS1_10
+ Return (0xF)
+ }
+ elseif (A120 == 0x10000201) { // ejected completed ?
+ Store(0x02000201, A120) // clear action value
+ Return (0x0)
+ }
+ elseif ((A120 == 0x01000201) || (A120 == 0x0F000201)) { // inserted ?
+ if (A16I == 0x00) {
+ Store(0x02000201, A120) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((A120 == 0x0E000201) || (A120 == 0x0F000201)) { // inprogress inserted ?
+ if (A16I == 0x00) {
+ Store(0x02000201, A120) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (A120 == 0x02000201) { // is sw ejection?
+ Store(0xF0000201, A120) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000216, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000216 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000001)
+ }
+ }
+
+ //
+ // Root Port 2
+ //
+ Device (P2P2) {
+ //
+ // Device 2, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00020000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 2 ([02])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (A121 == 0xF0010201) { // SW ejected before ?
+ Store(0x02010201, A121) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000226, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000226 to DBNS1_10
+ Return(0xF)
+ }
+ elseif (A121 == 0x10010201) { // ejected completed ?
+ Store(0x02010201, A121) // clear action value
+ Return(0x0)
+ }
+ elseif ((A121 == 0x01010201) || (A121 == 0x0F010201)) { // inserted ?
+ if (A17I == 0x00) {
+ Store(0x02010201, A121) // clear action value
+ }
+ Return(0xF)
+ }
+ elseif ((A121 == 0x0E010201) || (A121 == 0x0F010201)) { // inprogress inserted ?
+ if (A17I == 0x00) {
+ Store(0x02010201, A121) // clear action value
+ }
+ Return(0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (A121 == 0x02010201) { // is sw ejection?
+ Store(0xF0010201, A121) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000226, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000226 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000002)
+ }
+ }
+
+ //
+ // Root Port 3
+ //
+ Device (P2P3) {
+ //
+ // Device 3, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00030000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 3 [03])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (A122 == 0xF0020201) { // SW ejected before ?
+ Store(0x02020201, A122) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000236, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000236 to DBNS1_10
+ Return(0xF)
+ }
+ elseif (A122 == 0x10020201) { // ejected complete ?
+ Store(0x02020201, A122) // clear action value
+ Return (0x0)
+ }
+ elseif ((A122 == 0x01020201) || (A122 == 0x0F020201)) { // inserted ?
+ if (A18I == 0x00) {
+ Store(0x02020201, A122) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((A122 == 0x0E020201) || (A122 == 0x0F020201)) { // inprogess inserted ?
+ if (A18I == 0x00) {
+ Store(0x02020201, A122) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (A122 == 0x02020201) { // is sw ejection?
+ Store(0xF0020201, A122) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000236, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000236 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000003)
+ }
+ }
+
+ //
+ // Root Port 4
+ //
+ Device (P2P4) {
+ //
+ // Device 4, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00040000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 4 [04])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (A123 == 0xF0030201) { // SW ejected before ?
+ Store(0x02030201, A123) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000246, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000246 to DBNS1_10
+ Return(0xF)
+ }
+ elseif (A123 == 0x10030201) { // ejected complete ?
+ Store(0x02030201, A123) // clear action value
+ Return (0x0)
+ }
+ elseif ((A123 == 0x01030201) || (A123 == 0x0F030201)) { // inserted ?
+ if (A19I == 0x00) {
+ Store(0x02030201, A123) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((A123 == 0x0E030201) || (A123 == 0x0F030201)) { // inprogress inserted ?
+ if (A19I == 0x00) {
+ Store(0x02030201, A123) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (A123 == 0x02030201) { // is sw ejection?
+ Store(0xF0030201, A123) // set ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000246, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000246 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000004)
+ }
+ }
+
Method (_PXM, 0, NotSerialized) {
// Patch by code
Return(0xFF)
@@ -1021,6 +1289,140 @@
Name (_ADR, 0x00000000)
}
+ //
+ // Root Port 5
+ //
+ Device (P2P5) {
+ //
+ // Device 5, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00050000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 2 [02])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B104 == 0xF0040401) { // SW ejected before ?
+ Store(0x02040401, B104) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000258, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000258 to DBNS1_10
+ Return(0xF)
+ }
+ elseif (B104 == 0x10040401) { // ejected complete ?
+ Store(0x02040401, B104) // clear action value
+ Return (0x0)
+ }
+ elseif ((B104 == 0x01040401) || (B104 == 0x0F040401)) { // inserted ?
+ if (B23I == 0x00) {
+ Store(0x02040401, B104) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B104 == 0x0E040401) || (B104 == 0x0F040401)) { // inprogress inserted ?
+ if (B23I == 0x00) {
+ Store(0x02040401, B104) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B104 == 0x02040401) { // is sw ejection?
+ Store(0xF0040401, B104) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000258, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000258 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000002)
+ }
+ }
+
+ //
+ // Root Port 7
+ //
+ Device (P2P7) {
+ //
+ // Device 7, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00070000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 3 ([03])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B106 == 0xF0060401) { // SW ejected before ?
+ Store(0x02060401, B106) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000278, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000278 to DBNS1_10
+ Return(0xF)
+ }
+ elseif (B106 == 0x10060401) { // ejected complete ?
+ Store(0x02060401, B106) // clear action value
+ Return (0x0)
+ }
+ elseif ((B106 == 0x01060401) || (B106 == 0x0F060401)) { // inserted ?
+ if (B24I == 0x00) {
+ Store(0x02060401, B106) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B106 == 0x0E060401) || (B106 == 0x0F060401)) { // inprogress inserted ?
+ if (B24I == 0x00) {
+ Store(0x02060401, B106) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B106 == 0x02060401) { // is sw ejection?
+ Store(0xF0060401, B106) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000278, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000278 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000003)
+ }
+ }
+
Method (_PXM, 0, NotSerialized) {
// Patch by code
Return(0xFF)
@@ -1374,6 +1776,140 @@
Name (_ADR, 0x00000000)
}
+ //
+ // Root Port 1
+ //
+ Device (P2P1) {
+ //
+ // Device 1, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00010000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 1 ([01])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B110 == 0xF0000501) { // SW ejected before?
+ Store(0x02000501, B110) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000219, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000219 to DBNS1_10
+ Return(0xF)
+ }
+ elseif (B110 == 0x10000501) { // ejected complete ?
+ Store(0x02000501, B110) // clear action value
+ Return (0x0)
+ }
+ elseif ((B110 == 0x01000501) || (B110 == 0x0F000501)) { // inserted ?
+ if (B25I == 0x00) {
+ Store(0x02000501, B110) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B110 == 0x0E000501) || (B110 == 0x0F000501)) { // inprogress inserted ?
+ if (B25I == 0x00) {
+ Store(0x02000501, B110) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B110 == 0x02000501) { // is sw ejection?
+ Store(0xF0000501, B110) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000219, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000219 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000001)
+ }
+ }
+
+ //
+ // Root Port 3
+ //
+ Device (P2P3) {
+ //
+ // Device 3, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00030000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 2 [02])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B112 == 0xF0020501) { // SW ejected before ?
+ Store(0x02020501, B112) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000239, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000239 to DBNS1_10
+ Return(0xF)
+ }
+ elseif (B112 == 0x10020501) { // ejected complete ?
+ Store(0x02020501, B112) // clear action value
+ Return (0x0)
+ }
+ elseif ((B112 == 0x01020501) || (B112 == 0x0F020501)) { // inserted ?
+ if (B26I == 0x00) {
+ Store(0x02020501, B112) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B112 == 0x0E020501) || (B112 == 0x0F020501)) { // inprogress inserted ?
+ if (B26I == 0x00) {
+ Store(0x02020501, B112) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B112 == 0x02020501) { // is sw ejection?
+ Store(0xF0020501, B112) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x68000239, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x68000239 to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000002)
+ }
+ }
+
Method (_PXM, 0, NotSerialized) {
// Patch by code
Return(0xFF)
@@ -1727,6 +2263,274 @@
Name (_ADR, 0x00000000)
}
+ //
+ // Root Port 1
+ //
+ Device (P2P1) {
+ //
+ // Device 1, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00010000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 1 ([01])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B120 == 0xF0000601) { // SW ejected before ?
+ Store(0x02000601, B120) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800021A, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800021A to DBNS1_10
+ Return(0xF)
+ }
+ elseif (B120 == 0x10000601) { // ejected complete ?
+ Store(0x02000601, B120) // clear action value
+ Return (0x0)
+ }
+ elseif ((B120 == 0x01000601) || (B120 == 0x0F000601)){ // inserted ?
+ if (B28I == 0x00) {
+ Store(0x02000601, B120) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B120 == 0x0E000601) || (B120 == 0x0F000601)) { // inprogress inserted ?
+ if (B28I == 0x00) {
+ Store(0x02000601, B120) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B120 == 0x02000601) { // is sw ejection?
+ Store(0xF0000601, B120) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800021A, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800021A to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000001)
+ }
+ }
+
+ //
+ // Root Port 3
+ //
+ Device (P2P3) {
+ //
+ // Device 3, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00030000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 2 [02])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B122 == 0xF0020601) { // SW ejected before ?
+ Store(0x02020601, B122) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800023A, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800023A to DBNS1_10
+ Return(0xF)
+ }
+ elseif (B122 == 0x10020601) { // ejected completed ?
+ Store(0x02020601, B122) // clear action value
+ Return (0x0)
+ }
+ elseif ((B122 == 0x01020601) || (B122 == 0x0F020601)){ // inserted ?
+ if (B29I == 0x00) {
+ Store(0x02020601, B122) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B122 == 0x0E020601) || (B122 == 0x0F020601)) { // inprogress inserted ?
+ if (B29I == 0x00) {
+ Store(0x02020601, B122) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B122 == 0x02020601) { // is sw ejection?
+ Store(0xF0020601, B122) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800023A, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800023A to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000002)
+ }
+ }
+
+ //
+ // Root Port 5
+ //
+ Device (P2P5) {
+ //
+ // Device 5, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00050000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 3 [03])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B124 == 0xF0040601) { // SW ejected before ?
+ Store(0x02040601, B124) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800025A, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800025A to DBNS1_10
+ Return(0xF)
+ }
+ elseif (B124 == 0x10040601) { // ejected complete ?
+ Store(0x02040601, B124) // clear action value
+ Return (0x0)
+ }
+ elseif ((B124 == 0x01040601) || (B124 == 0x0F040601)) { // inserted ?
+ if (B30I == 0x00) {
+ Store(0x02040601, B124) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B124 == 0x0E040601) || (B124 == 0x0F040601)) { // inprogress inserted ?
+ if (B30I == 0x00) {
+ Store(0x02040601, B124) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B124 == 0x02040601) { // is sw ejection?
+ Store(0xF0040601, B124) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800025A, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800025A to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000003)
+ }
+ }
+
+ //
+ // Root Port 7
+ //
+ Device (P2P7) {
+ //
+ // Device 7, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00070000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 4 ([04])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B126 == 0xF0060601) { // SW ejected before ?
+ Store(0x02060601, B126) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800027A, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800027A to DBNS1_10
+ Return(0xF)
+ }
+ elseif (B126 == 0x10060601) { // ejected complete ?
+ Store(0x02060601, B126) // clear action value
+ Return (0x0)
+ }
+ elseif ((B126 == 0x01060601) || (B126 == 0x0F060601)) { // inserted ?
+ if (B31I == 0x00) {
+ Store(0x02060601, B126) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B126 == 0x0E060601) || (B126 == 0x0F060601)) { // inprogress inserted ?
+ if (B31I == 0x00) {
+ Store(0x02060601, B126) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B126 == 0x02060601) { // is sw ejection?
+ Store(0xF0060601, B126) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800027A, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800027A to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000004)
+ }
+ }
+
Method (_PXM, 0, NotSerialized) {
// Patch by code
Return(0xFF)
@@ -2080,6 +2884,274 @@
Name (_ADR, 0x00000000)
}
+ //
+ // Root Port 1
+ //
+ Device (P2P1) {
+ //
+ // Device 1, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00010000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 1 ([01])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B130 == 0xF0000701) { // SW ejected before ?
+ Store(0x02000701, B130) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800021B, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800021B to DBNS1_10
+ Return (0xF)
+ }
+ elseif (B130 == 0x10000701) { // ejected complete ?
+ Store(0x02000701, B130) // clear action value
+ Return (0x0)
+ }
+ elseif ((B130 == 0x01000701) || (B130 == 0x0F000701)) { // inserted ?
+ if (B32I == 0x00) {
+ Store(0x02000701, B130) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B130 == 0x0E000701) || (B130 == 0x0F000701)) { // inprogress inserted ?
+ if (B32I == 0x00) {
+ Store(0x02000701, B130) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B130 == 0x02000701) { // is sw ejection?
+ Store(0xF0000701, B130) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800021B, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800021B to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000001)
+ }
+ }
+
+ //
+ // Root Port 3
+ //
+ Device (P2P3) {
+ //
+ // Device 3, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00030000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 2 [02])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B132 == 0xF0020701) { // SW ejected before ?
+ Store(0x02020701, B132) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800023B, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800023B to DBNS1_10
+ Return (0xF)
+ }
+ elseif (B132 == 0x10020701) { // ejected complete ?
+ Store(0x02020701, B132) // clear action value
+ Return (0x0)
+ }
+ elseif ((B132 == 0x01020701) || (B132 == 0x0F020701)) { // inserted ?
+ if (B33I == 0x00) {
+ Store(0x02020701, B132) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B132 == 0x0E020701) || (B132 == 0x0F020701)) { // inprogress inserted ?
+ if (B33I == 0x00) {
+ Store(0x02020701, B132) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B132 == 0x02020701) { // is sw ejection?
+ Store(0xF0020701, B132) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800023B, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800023B to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000002)
+ }
+ }
+
+ //
+ // Root Port 5
+ //
+ Device (P2P5) {
+ //
+ // Device 5, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00050000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 3 [03])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B134 == 0xF0040701) { // SW ejected before ?
+ Store(0x02040701, B134) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800025B, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800025B to DBNS1_10
+ Return (0xF)
+ }
+ elseif (B134 == 0x10040701) { // ejected completed ?
+ Store(0x02040701, B134) // clear action value
+ Return (0x0)
+ }
+ elseif ((B134 == 0x01040701) || (B134 == 0x0F040701)) { // inserted ?
+ if (B34I == 0x00) {
+ Store(0x02040701, B134) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B134 == 0x0E040701) || (B134 == 0x0F040701)) { // inprogress inserted ?
+ if (B34I == 0x00) {
+ Store(0x02040701, B134) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B134 == 0x02040701) { // is sw ejection?
+ Store(0xF0040701, B134) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800025B, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800025B to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000003)
+ }
+ }
+
+ //
+ // Root Port 7
+ //
+ Device (P2P7) {
+ //
+ // Device 7, Function 0 (Bus 0).
+ //
+
+ Name (_ADR, 0x00070000)
+ Name(_HPP, Package(){0x08,0x40, 0x01, 0x00})
+
+ Device (S0F0) {
+ //
+ // On Bus 4 ([04])
+ // Slot 0 (Device 0), Function 0
+ //
+
+ Name (_ADR, 0x00000000)
+
+ Method (_STA, 0) {
+ if (B136 == 0xF0060701) { // SW ejected before ?
+ Store(0x02060701, B136) // clear action value
+ Store(0x680000A4, DIN0) // Off RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800027B, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800027B to DBNS1_10
+ Return (0xF)
+ }
+ elseif (B136 == 0x10060701) { // ejected completed ?
+ Store(0x02060701, B136) // clear action value
+ Return (0x0)
+ }
+ elseif ((B136 == 0x01060701) || (B136 == 0x0F060701)) { // inserted ?
+ if (B35I == 0x00) {
+ Store(0x02060701, B136) // clear action value
+ }
+ Return (0xF)
+ }
+ elseif ((B136 == 0x0E060701) || (B136 == 0x0F060701)) { // inprogress inserted ?
+ if (B35I == 0x00) {
+ Store(0x02060701, B136) // clear action value
+ }
+ Return (0xF)
+ }
+ else {
+ Return (0xF)
+ }
+ }
+
+ Method (_EJ0, 1) {
+ if (B136 == 0x02060701) { // is sw ejection?
+ Store(0xF0060701, B136) // set SW ejection event
+ Store(0x680000B4, DIN0) // Blink RED LED
+ // <Led:6-7.Led_action:4-5.Ampere_HP_CMD:0-3>
+ // Ampere_HP_CMD: LED_CMD = 4, HP_CHG_CMD = 3
+ Store(0x6800027B, OUTV) // <MsgType(0x6)-Hdlr(0x8).Resv.action.dev.segment>
+ // action: Insert = 1 & Remove = 2
+ // 0x6800027B to DBNS1_10
+ }
+ }
+
+ Name(_SUN, 0x00000004)
+ }
+ }
+
Method (_PXM, 0, NotSerialized) {
// Patch by code
Return(0xFF)
--
2.39.0
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#104718): https://edk2.groups.io/g/devel/message/104718
Mute This Topic: https://groups.io/mt/98831770/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list