From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.92]) by mx.groups.io with SMTP id smtpd.web10.54053.1683792656470925001 for ; Thu, 11 May 2023 01:10:56 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@os.amperecomputing.com header.s=selector2 header.b=JYSwAqQ3; spf=pass (domain: os.amperecomputing.com, ip: 40.107.243.92, mailfrom: minhnguyen1@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nt4HieDWzADcVzzRxW3bx2JJjStFXmiX2pBGDk+pRqVNk0idawa5X0kZiPXgHqriRiFh2an+HR6klIOGvftYBfn72X/24t+8xLaOe6ly3Dt2SRqn4fx4hMQJygJ0pjaWUCLhq3oQyAfJeTiZedDMcCFeQF5Dt/uZbJhvM0/6Rk7/eIkqtVLU4sW2XTzBO46Wje/bDej/T8gIi9d3I1Drkc0c6qgMdPGyUlUL6DGKSuNXq5rFqVyQim9ixhSGaP7/96HbQ/1SMZBBfN8TrVl2s3e7GORwPCjQKiUwh17+v8HMaI78GvTfIxhT2jhOYUHn8jotGYZNJ9Aj5sZy9POeqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=t3+joc7ua8sPz0IAWCIfw2aVPt44UNHobPCDqyyI4ME=; b=k2RPmfpFwgfeJMfHP8kcLKKtU3O4vMN0GyhN8mRggGzGJ/dfxDuSUpnGJ80Mfih4qiXi3pF9Dm/Cuw7/EA/xamgDsHEUlvJXk/csyWTLTUNo603uWbg7p8GBoOXkvt/J9jgsVddigBSt1L9pZ4wTWb1O0kJGUaJFZldZKOM2KQDWah/wV7vysIvkG7l6chQ+Ep9ZZ2ZUxbdkDD0/JHwMR6nSpeLeW3vXrgEYSZnrG+09gMmLa9TUe2M1BAIMlYP5ovJ6OxfUKupYls1jqNEiZm/8GGPjpL4d2uArNLO63L17iESw9txhSFn7l0qsZxB5nUyCG+I1414sCEgI8y620g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t3+joc7ua8sPz0IAWCIfw2aVPt44UNHobPCDqyyI4ME=; b=JYSwAqQ3hwxXrWnihWFLv4G6Q7zu9k8EGwCbNwHPkDK75cKg9wavEPkmSutOnykGXpfKptavQVjNm0wUtg3eBbgWz69C1KVIQx8kG52RT6uJD1IRIBjdekssyqBFruXf+YxOmDS8yF3H4G+RvR5rJc0n/1NMK1MnZeyC/nu0I8c= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH0PR01MB8048.prod.exchangelabs.com (2603:10b6:510:280::7) by CY4PR0101MB3144.prod.exchangelabs.com (2603:10b6:910:49::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.19; Thu, 11 May 2023 08:10:51 +0000 Received: from PH0PR01MB8048.prod.exchangelabs.com ([fe80::bbdb:b58c:140e:c4e1]) by PH0PR01MB8048.prod.exchangelabs.com ([fe80::bbdb:b58c:140e:c4e1%6]) with mapi id 15.20.6387.019; Thu, 11 May 2023 08:10:51 +0000 From: Minh Nguyen To: devel@edk2.groups.io CC: patches@amperecomputing.com, quic_llindhol@quicinc.com, ardb+tianocore@kernel.org, nhi@os.amperecomputing.com, tinhnguyen@os.amperecomputing.com, Vu Nguyen , Minh Nguyen Subject: [edk2-platforms][PATCH 5/6] JadePkg: Support ACPI tables for Hot Plug of Ampere Altra Max Date: Thu, 11 May 2023 15:10:10 +0700 Message-ID: <20230511081011.2692963-6-minhnguyen1@os.amperecomputing.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230511081011.2692963-1-minhnguyen1@os.amperecomputing.com> References: <20230511081011.2692963-1-minhnguyen1@os.amperecomputing.com> X-ClientProxiedBy: SI2P153CA0033.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::21) To PH0PR01MB8048.prod.exchangelabs.com (2603:10b6:510:280::7) Return-Path: minhnguyen1@os.amperecomputing.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB8048:EE_|CY4PR0101MB3144:EE_ X-MS-Office365-Filtering-Correlation-Id: 3da26ec1-2131-4f8e-b1e2-08db51f73c00 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yuAUAZ4ee9ihI4VQS/q+8p1WKS5RLRg8v2ON4QzYh+5a4IoE2twW97t4O644teMJRp5ozWXL4wLl9kom9gSfENcc4R1RB+hlI30PGL7rwuGqEVEUqoedAYKAatHYX/NhpSWuZbaLmI7SorAjKPjBpICn029HdAolMd8otmw9AOdYgZTOlUKUQdhaaOM4H+KIjc48+djYXTAX+PXvSxHBqUoH7ktLK6RWukDguCLibQPcOLTO3mKgk0OAXgjBEZ/f48zIQ65gOc/dRBnGNXcdXt8h8l2ybqSj0peS3QODPW3OKaykuWtpQGw+UupeTCCv2hu9QgdzG0NB7pGaFxH5oh7eLpppevmkKe26lYuuYYNJ0Ob+8F/fvbrrTjQECxlkFdHh6SGhmQG5rLIi6vFQuF+ruEP7idMENM53e3LJCrA2eGDgw1ZIaB9Wv5tS7gWUpMK7PBoST2CMwqz/0zVuqiXN7m1pafYBOLp6vtlvxcqSf785HLDDSpv4vdRt70n+fGS+Y3O44Oi9AIykl7ybWrTJ7YGNbaUay9mJ1+u4HkVc48NS33brL/yS+H//NjDyu45efEMPgMtplkyk9JBKLIO0yhCRh6RzaJ2UHuIYu2o3P0N73/2m340hmmXhPRgF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR01MB8048.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(39860400002)(366004)(346002)(396003)(451199021)(6666004)(478600001)(66556008)(19627235002)(316002)(6486002)(66946007)(54906003)(52116002)(6916009)(66476007)(86362001)(26005)(83380400001)(6512007)(107886003)(6506007)(4326008)(1076003)(8936002)(186003)(2906002)(30864003)(8676002)(41300700001)(5660300002)(38350700002)(38100700002)(2616005)(559001)(579004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?z6Y+vAKBnbvMp2P/TC5srVlKFEVDDDwFkqUgcUblPfR9SylP0WS82IoFxBrL?= =?us-ascii?Q?EXvTrMvis+S9fAw7T6nvLlpxHdnf9cIcpYAiKhkkndgIA8oaVYMjTyb9RC7p?= =?us-ascii?Q?IPjNnGW9mekGp4k06LKVgRcMRFci3DHddvkqIXZ8jvxYmRRXShfXYH9thIcG?= =?us-ascii?Q?wsNd9KAH1rRIAmsAskiSC+l7qpatDZapCmALwggQbFBeBgJBbcVmnFyOrl1F?= =?us-ascii?Q?0wFr0KD8BhIMYSE9usBG3wQs0fXNU0rBmKnpeEAV7zZ7eSpi6TajRK/pIbL5?= =?us-ascii?Q?cZDacwCQr8iCMmlCgsXbcGaVtpdm+KMiGePpA5gWTRuUxCVskdRxzpHanb5j?= =?us-ascii?Q?YR4bQlRte+DgIhJ+NBIvyPm/DyuqpbUrxyuZG4AlabvZ9gnhLoo1i9bYWLPc?= =?us-ascii?Q?s4k70Ehf6B8fKN+YTeN3mf774BdJNIuxZiPgQNGJfdErHM7a+L2zKNA/Yg3f?= =?us-ascii?Q?VdVVfRMKGwEAtE+znNjHJn3oy7x+nUS8ITQb6ESwmppCwAI0TCY8ntKu/fCN?= =?us-ascii?Q?futIUdCs9QnogVmQhT+Fzr5D2/h12cdNXZMle9HUbKhbisDK4fwqkXSCK24s?= =?us-ascii?Q?f/6cpVWDf5SnfKSjTzwko4CRmUDXrsQAHUS4yU0gePPtFIFEXxcYBUSZpFaa?= =?us-ascii?Q?FJ5lh7g3gU17pA9HwviEgvFp15PnWZ0Q/sCoVkwMqsoDmyE3gGscq+ROl1xA?= =?us-ascii?Q?p7rC3sLp9l98hbYRIii+KdlJS2FtIVbDp4pXnmk/tzk3EaflZfthZ0zpyP+5?= =?us-ascii?Q?12MqVGAXI07ZBExiSs5ojwhQ4bw7C4h+XlkJ0FeYw+rGX9lP8kxtz5y/bZ/2?= =?us-ascii?Q?MRzK3q+Er1f07m/J4ofTRq2upDVDMO9AhTRGwFlrL7EQsARHRqhih+VLE1Ix?= =?us-ascii?Q?NZO6duKTvTXVHwc/mti0FI/zPzFUMxXDBA3JBOounDe4Qdwa+qtdyLiytOVv?= =?us-ascii?Q?7S6IwugopfviAQLXemSg9e6uuOvJELXcNQMWUbAJSDDhc4wya9kimEw1E1+A?= =?us-ascii?Q?Xd4XzMrQFUyxPvW86uk7Q/my0T4v6cHHcJt65eS4pUVnvK3Bxn0j1aNOLnId?= =?us-ascii?Q?x+4tRpvDdNo91C+vFg5NRXGmGWba2S/nAi+R10iZM7ugXwDZcnRfYptwoNrO?= =?us-ascii?Q?xIe6+bxyG3Q+NVr4WZj2a2xywJwVwR80JuG4jcTTdZtq1jGrTsLNxaG/QBsY?= =?us-ascii?Q?K6JeuEAl1PPZVgk8f75g4hJj7uC6nDKhH1gxSThoDmLhAS6NxgJWRy6myckv?= =?us-ascii?Q?iYpwvpi7P4gHDl08w8kroOwvm8WTt67Syn3YBGX7BTsgwZvtzgctpvTVwRnS?= =?us-ascii?Q?aXTQHR9rNmJlf070aAhoNfx92jR7LXXEcOofw/Qx12H2QiP1odqjstFSG2/b?= =?us-ascii?Q?HORPWt47EL5cmibqUswU071riv48dB7klwuBd8YCqC1CvvWVWrEeg3+fu1Hr?= =?us-ascii?Q?VKMgP+yV+Zd9jUuWPQ83zPx80LrL6fwCh+BfcY5WL8Zfu1psYqYomYtRD6XK?= =?us-ascii?Q?l9RMUgnx7CH2yhGLEAdBn+4XxxQ52I5s8w5wLEnp8uPiOe32GRTwcxqjj+7t?= =?us-ascii?Q?4BYoI9MiEo+7hegL6o3iDhX3kFAX+dCrqm5NiFN3VtXN6cwTYD8IpY3TxoKo?= =?us-ascii?Q?SGMLehXuq0Ei8A6mRUxDvJSd6DC9IcMr1CNzISCmNYuO?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3da26ec1-2131-4f8e-b1e2-08db51f73c00 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB8048.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2023 08:10:51.1775 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JY0H2OyQ9VlCSGSSAsyLv86XhxVXhYCuli8emwA2jvTlCrB60Ws9k4MLCEvDuZFdnQjaiXKW8ZrOT4SMEWA5HIqkYZN4RFGvKokoT+q/9pEoU5OEyh+S93QzHwoZOmqg X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0101MB3144 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Vu Nguyen 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 Max. Signed-off-by: Minh Nguyen --- Platform/Ampere/JadePkg/Ac02AcpiTables/CommonDevices.asi | 24 + Platform/Ampere/JadePkg/Ac02AcpiTables/Dsdt.asl | 511 ++++++++++ Platform/Ampere/JadePkg/Ac02AcpiTables/MHPP.asi | 92 ++ Platform/Ampere/JadePkg/Ac02AcpiTables/PCI-S0.asi | 545 ++++++++++ Platform/Ampere/JadePkg/Ac02AcpiTables/PCI-S1.asi | 1072 ++++++++++= ++++++++++ 5 files changed, 2244 insertions(+) diff --git a/Platform/Ampere/JadePkg/Ac02AcpiTables/CommonDevices.asi b/Pla= tform/Ampere/JadePkg/Ac02AcpiTables/CommonDevices.asi index 17ecd52a553f..73804cab81b5 100644 --- a/Platform/Ampere/JadePkg/Ac02AcpiTables/CommonDevices.asi +++ b/Platform/Ampere/JadePkg/Ac02AcpiTables/CommonDevices.asi @@ -174,7 +174,16 @@ Device(GED0) { } 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: 0x10= 00.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 + } } =20 // Shutdown button using GED. @@ -511,3 +520,18 @@ Device(NVDR) { } } } + +// +// LED Device +Device(LED) { + Name(_HID, "AMPC0008") + Name(_CCA, ONE) + Name(_STR, Unicode("Altra LED Device")) + + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () { "uuid", Package (4) { 0x5598273c, 0xa49611ea, 0xbb37024= 2, 0xac130002 }}, + } + }) +} diff --git a/Platform/Ampere/JadePkg/Ac02AcpiTables/Dsdt.asl b/Platform/Amp= ere/JadePkg/Ac02AcpiTables/Dsdt.asl index ce12272f961d..f2977d4e58a8 100644 --- a/Platform/Ampere/JadePkg/Ac02AcpiTables/Dsdt.asl +++ b/Platform/Ampere/JadePkg/Ac02AcpiTables/Dsdt.asl @@ -12,8 +12,519 @@ DefinitionBlock("Dsdt.aml", "DSDT", 0x02, "Ampere", "Ja= de", 1) { Name(\BDMD, "Altra Max Jade Board") Name(AERF, 0) // PCIe AER Firmware-First =20 + Include ("MHPP.asi") + Scope(\_SB) { + Include ("CommonDevices.asi") + + Scope(\_SB.GED0) { + Method(_EVT, 1, Serialized) { + Switch (ToInteger(Arg0)) { + Case (84) { // GHES interrupt + Notify (HED0, 0x80) + } + + Case (44) { // doorbell notification (Insertion/ejection) + local0 =3D DOUT & 0x00FF0000 + if (local0 =3D=3D 0x00010000) { + local0 =3D STA4 & 0xFFFFFFFF + if (local0) { + Store(local0, STA4) // clear interrupt + } + local0 =3D A050 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P1, 1) // insertion action + } + local0 =3D A051 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P2, 1) // insertion action + } + local0 =3D A052 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P3, 1) // insertion action + } + local0 =3D A053 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P4, 1) // insertion action + } + local0 =3D A040 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P1, 1) // insertion action + } + local0 =3D A041 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P2, 1) // insertion action + } + local0 =3D A042 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P3, 1) // insertion action + } + local0 =3D A043 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P4, 1) // insertion action + } + local0 =3D A160 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P1, 1) // insertion action + } + local0 =3D A161 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P2, 1) // insertion action + } + local0 =3D A162 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P3, 1) // insertion action + } + local0 =3D A163 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P4, 1) // insertion action + } + + local0 =3D A170 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P1, 1) // insertion action + } + local0 =3D A171 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P2, 1) // insertion action + } + local0 =3D A172 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P3, 1) // insertion action + } + local0 =3D A173 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P4, 1) // insertion action + } + + local0 =3D A150 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCID.P2P1, 1) // insertion action + } + local0 =3D A151 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCID.P2P2, 1) // insertion action + } + local0 =3D A152 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCID.P2P3, 1) // insertion action + } + local0 =3D A153 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCID.P2P4, 1) // insertion action + } + + + local0 =3D A120 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIA.P2P1, 1) // insertion action + } + local0 =3D A121 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIA.P2P2, 1) // insertion action + } + local0 =3D A122 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIA.P2P3, 1) // insertion action + } + local0 =3D A123 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIA.P2P4, 1) // insertion action + } + } + elseif (local0 =3D=3D 0x00000000) { + local0 =3D STA4 & 0xFFFFFFFF + if (local0) { + Store(local0, STA4) // clear interrupt + } + local0 =3D A050 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI5.P2P1, 1) // ejection action + A050 =3D 0x10000500 // inprogress remove + } + local0 =3D A051 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI5.P2P2, 1) // ejection action + A051 =3D 0x10010500 // inprogress remove + } + local0 =3D A052 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI5.P2P3, 1) // ejection action + A052 =3D 0x10020500 // inprogress remove + } + local0 =3D A053 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI5.P2P4, 1) // ejection action + A053 =3D 0x10030500 // inprogress remove + } + local0 =3D A040 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI4.P2P1, 1) // ejection action + A040 =3D 0x10000400 // inprogress remove + } + local0 =3D A041 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI4.P2P2, 1) // ejection action + A041 =3D 0x10010400 // inprogress remove + } + local0 =3D A042 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI4.P2P3, 1) // ejection action + A042 =3D 0x10020400 // inprogress remove + } + local0 =3D A043 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI4.P2P4, 1) // ejection action + A043 =3D 0x10030400 // inprogress remove + } + local0 =3D A160 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIE.P2P1, 1) // ejection action + A160 =3D 0x10000601 // inprogress remove + } + local0 =3D A161 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIE.P2P2, 1) // ejection action + A161 =3D 0x10010601 // inprogress remove + } + local0 =3D A162 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIE.P2P3, 1) // ejection action + A162 =3D 0x10020601 // inprogress remove + } + local0 =3D A163 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIE.P2P4, 1) // ejection action + A163 =3D 0x10030601 // inprogress remove + } + + local0 =3D A170 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIF.P2P1, 1) // ejection action + A170 =3D 0x10000701 // inprogress remove + } + local0 =3D A171 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIF.P2P2, 1) // ejection action + A171 =3D 0x10010701 // inprogress remove + } + local0 =3D A172 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIF.P2P3, 1) // ejection action + A172 =3D 0x10020701 // inprogress remove + } + local0 =3D A173 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIF.P2P4, 1) // ejection action + A173 =3D 0x10030701 // inprogress remove + } + + local0 =3D A150 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCID.P2P1, 1) // ejection action + A150 =3D 0x10000501 // inprogress remove + } + local0 =3D A151 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCID.P2P2, 1) // ejection action + A151 =3D 0x10010501 // inprogress remove + } + local0 =3D A152 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCID.P2P3, 1) // ejection action + A152 =3D 0x10020501 // inprogress remove + } + local0 =3D A153 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCID.P2P4, 1) // ejection action + A153 =3D 0x10030501 // inprogress remove + } + + local0 =3D A120 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIA.P2P1, 1) // ejection action + A120 =3D 0x10000201 // inprogress remove + } + local0 =3D A121 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIA.P2P2, 1) // ejection action + A121 =3D 0x10010201 // inprogress remove + } + local0 =3D A122 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIA.P2P3, 1) // ejection action + A122 =3D 0x10020201 // inprogress remove + } + local0 =3D A123 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIA.P2P4, 1) // ejection action + A123 =3D 0x10030201 // inprogress remove + } + } + elseif (local0 =3D=3D 0x00020000) { // is either unstable li= nk or too fast insertion? + local0 =3D STA4 & 0xFFFFFFFF + if (local0) { + Store(local0, STA4) // clear interrupt + } + local0 =3D A050 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P1, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCI5.P2P1, 1) // insertion action + } + local0 =3D A051 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P2, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCI5.P2P2, 1) // insertion action + } + local0 =3D A052 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P3, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCI5.P2P3, 1) // insertion action + } + local0 =3D A053 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P4, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCI5.P2P4, 1) // insertion action + } + local0 =3D A040 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P1, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCI4.P2P1, 1) // insertion action + } + local0 =3D A041 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P2, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCI4.P2P2, 1) // insertion action + } + local0 =3D A042 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P3, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCI4.P2P3, 1) // insertion action + } + local0 =3D A043 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P4, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCI4.P2P4, 1) // insertion action + } + local0 =3D A160 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P1, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIE.P2P1, 1) // insertion action + } + local0 =3D A161 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P2, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIE.P2P2, 1) // insertion action + } + local0 =3D A162 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P3, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIE.P2P3, 1) // insertion action + } + local0 =3D A163 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P4, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIE.P2P4, 1) // insertion action + } + + local0 =3D A170 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P1, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIF.P2P1, 1) // insertion action + } + local0 =3D A171 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P2, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIF.P2P2, 1) // insertion action + } + local0 =3D A172 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P3, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIF.P2P3, 1) // insertion action + } + local0 =3D A173 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P4, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIF.P2P4, 1) // insertion action + } + + local0 =3D A150 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCID.P2P1, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCID.P2P1, 1) // insertion action + } + local0 =3D A151 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCID.P2P2, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCID.P2P2, 1) // insertion action + } + local0 =3D A152 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCID.P2P3, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCID.P2P3, 1) // insertion action + } + local0 =3D A153 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCID.P2P4, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCID.P2P4, 1) // insertion action + } + + local0 =3D A120 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIA.P2P1, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIA.P2P1, 1) // insertion action + } + local0 =3D A121 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIA.P2P2, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIA.P2P2, 1) // insertion action + } + local0 =3D A122 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIA.P2P3, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIA.P2P3, 1) // insertion action + } + local0 =3D A123 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIA.P2P4, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIA.P2P4, 1) // insertion action + } + } + elseif (local0 =3D=3D 0x00030000) { // got incomplete remove= before? + local0 =3D STA4 & 0xFFFFFFFF + if (local0) { + Store(local0, STA4) // clear interrupt + } + local0 =3D A050 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P1.S0F0, 3) // remove port itself + Notify (\_SB.PCI5.P2P1, 1) // insertion action + } + local0 =3D A051 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P2.S0F0, 3) // remove port itself + Notify (\_SB.PCI5.P2P2, 1) // insertion action + } + local0 =3D A052 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P3.S0F0, 3) // remove port itself + Notify (\_SB.PCI5.P2P3, 1) // insertion action + } + local0 =3D A053 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P4.S0F0, 3) // remove port itself + Notify (\_SB.PCI5.P2P4, 1) // insertion action + } + local0 =3D A040 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P1.S0F0, 3) // remove port itself + Notify (\_SB.PCI4.P2P1, 1) // insertion action + } + local0 =3D A041 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P2.S0F0, 3) // remove port itself + Notify (\_SB.PCI4.P2P2, 1) // insertion action + } + local0 =3D A042 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P3.S0F0, 3) // remove port itself + Notify (\_SB.PCI4.P2P3, 1) // insertion action + } + local0 =3D A043 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P4.S0F0, 3) // remove port itself + Notify (\_SB.PCI4.P2P4, 1) // insertion action + } + local0 =3D A160 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P1.S0F0, 3) // remove port itself + Notify (\_SB.PCIE.P2P1, 1) // insertion action + } + local0 =3D A161 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P2.S0F0, 3) // remove port itself + Notify (\_SB.PCIE.P2P2, 1) // insertion action + } + local0 =3D A162 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P3.S0F0, 3) // remove port itself + Notify (\_SB.PCIE.P2P3, 1) // insertion action + } + local0 =3D A163 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P4.S0F0, 3) // remove port itself + Notify (\_SB.PCIE.P2P4, 1) // insertion action + } + + local0 =3D A170 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P1.S0F0, 3) // remove port itself + Notify (\_SB.PCIF.P2P1, 1) // insertion action + } + local0 =3D A171 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P2.S0F0, 3) // remove port itself + Notify (\_SB.PCIF.P2P2, 1) // insertion action + } + local0 =3D A172 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P3.S0F0, 3) // remove port itself + Notify (\_SB.PCIF.P2P3, 1) // insertion action + } + local0 =3D A173 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P4.S0F0, 3) // remove port itself + Notify (\_SB.PCIF.P2P4, 1) // insertion action + } + + local0 =3D A150 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCID.P2P1.S0F0, 3) // remove port itself + Notify (\_SB.PCID.P2P1, 1) // insertion action + } + local0 =3D A151 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCID.P2P2.S0F0, 3) // remove port itself + Notify (\_SB.PCID.P2P2, 1) // insertion action + } + local0 =3D A152 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCID.P2P3.S0F0, 3) // remove port itself + Notify (\_SB.PCID.P2P3, 1) // insertion action + } + local0 =3D A153 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCID.P2P4.S0F0, 3) // remove port itself + Notify (\_SB.PCID.P2P4, 1) // insertion action + } + + local0 =3D A120 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIA.P2P1.S0F0, 3) // remove port itself + Notify (\_SB.PCIA.P2P1, 1) // insertion action + } + local0 =3D A121 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIA.P2P2.S0F0, 3) // remove port itself + Notify (\_SB.PCIA.P2P2, 1) // insertion action + } + local0 =3D A122 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIA.P2P3.S0F0, 3) // remove port itself + Notify (\_SB.PCIA.P2P3, 1) // insertion action + } + local0 =3D A123 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIA.P2P4.S0F0, 3) // remove port itself + Notify (\_SB.PCIA.P2P4, 1) // insertion action + } + } + } + } + } + } + Include ("PCI-S0.Rca01.asi") Include ("PCI-S0.asi") Include ("PCI-S1.asi") diff --git a/Platform/Ampere/JadePkg/Ac02AcpiTables/MHPP.asi b/Platform/Amp= ere/JadePkg/Ac02AcpiTables/MHPP.asi new file mode 100644 index 000000000000..ae166fd33a92 --- /dev/null +++ b/Platform/Ampere/JadePkg/Ac02AcpiTables/MHPP.asi @@ -0,0 +1,92 @@ +/** @file + + Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
+ + 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 hot= plug +// 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 h= otplug +// port map of a specific platform. For example, in Ampere Mt. Jade platfo= rm, +// there are 36 PCIe hotplug ports. Hence, this table defines 40 entries c= orresponding +// to Ampere Mt. Jade PCIe hotplug port map. +OperationRegion(MHPP, SystemMemory, 0x88970000, 960) +Field (MHPP, DWordAcc, NoLock, Preserve) { + A050, 32, // 0. S0 RCA5.0 + A00I, 8, // incomplete remove + offset (24), + A051, 32, // 1. S0 RCA5.1 + A01I, 8, // incomplete remove + offset (48), + A052, 32, // 2. S0 RCA5.2 + A02I, 8, // incomplete remove + offset (72), + A053, 32, // 3. S0 RCA5.3 + A03I, 8, // incomplete remove + offset (96), + A040, 32, // 4. S0 RCA4.0 + A04I, 8, // incomplete remove + offset (120), + A041, 32, // 5. S0 RCA4.1 + A05I, 8, // incomplete remove + offset (144), + A042, 32, // 6. S0 RCA4.0 + A06I, 8, // incomplete remove + offset (168), + A043, 32, // 7. S0 RCA4.1 + A07I, 8, // incomplete remove + offset (192), + A163, 32, // 8. S1 RCA6.3 + A08I, 8, // incomplete remove + offset (216), + A162, 32, // 9 S1 RCA6.2 + A09I, 8, // incomplete remove + offset (240), + A161, 32, // 10. S1 RCA6.1 + A10I, 8, // incomplete remove + offset (264), + A160, 32, // 11. S1 RCA6.0 + A11I, 8, // incomplete remove + offset (288), + A173, 32, // 12. S1 RCA7.3 + A12I, 8, // incomplete remove + offset (312), + A172, 32, // 13. S1 RCA7.2 + A13I, 8, // incomplete remove + offset (336), + A171, 32, // 14. S1 RCA7.1 + A14I, 8, // incomplete remove + offset (360), + A170, 32, // 15. S1 RCA7.0 + A15I, 8, // incomplete remove + offset (384), + A150, 32, // 16. S1 RCA5.0 + A16I, 8, // incomplete remove + offset (408), + A151, 32, // 17. S1 RCA5.1 + A17I, 8, // incomplete remove + offset (432), + A152, 32, // 18. S1 RCA5.2 + A18I, 8, // incomplete remove + offset (456), + A153, 32, // 19. S1 RCA5.3 + A19I, 8, // incomplete remove + offset (480), + A120, 32, // 20. S1 RCA2.0 + A20I, 8, // incomplete remove + offset (504), + A121, 32, // 21 S1 RCA2.1 + A21I, 8, // incomplete remove + offset (528), + A122, 32, // 22. S1 RCA2.2 + A22I, 8, // incomplete remove + offset (552), + A123, 32, // 23. S1 RCA2.3 + A23I, 8, // incomplete remove + offset (576) + } diff --git a/Platform/Ampere/JadePkg/Ac02AcpiTables/PCI-S0.asi b/Platform/A= mpere/JadePkg/Ac02AcpiTables/PCI-S0.asi index b6cf18fb2218..e57a2a9ffd63 100644 --- a/Platform/Ampere/JadePkg/Ac02AcpiTables/PCI-S0.asi +++ b/Platform/Ampere/JadePkg/Ac02AcpiTables/PCI-S0.asi @@ -6,6 +6,15 @@ =20 **/ =20 +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) { // @@ -997,6 +1006,274 @@ Device (PCI4) { Name (_ADR, 0x00000000) } =20 + // + // 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 (A040 =3D=3D 0xF0000400) { // SW ejected ? + Store(0x02000400, A040) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000212, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000212 to DBNS1_10 + Return(0xF) + } + elseif (A040 =3D=3D 0x10000400) { // ejected complete ? + Store(0x02000400, A040) // clear action value + Return(0x0) + } + elseif ((A040 =3D=3D 0x01000400) || (A040 =3D=3D 0x0F000400)) { //= inserted? + if (A04I =3D=3D 0x00) { + Store(0x02000400, A040) // clear action value + } + Return(0xF) + } + elseif ((A040 =3D=3D 0x0E000400) || (A040 =3D=3D 0x0F000400)) { //= inprogress inserted? + if (A04I =3D=3D 0x00) { + Store(0x02000400, A040) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (A040 =3D=3D 0x02000400) { // really sw ejection call? + Store(0xF0000400, A040) // set SW ejection action + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000212, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000212 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 (A041 =3D=3D 0xF0010400) { // SW ejected ? + Store(0x02010400, A041) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000222, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000222 to DBNS1_10 + Return(0xF) + } + elseif (A041 =3D=3D 0x10010400) { // ejected complete ? + Store(0x02010400, A041) // clear action value + Return(0x0) + } + elseif ((A041 =3D=3D 0x01010400) || (A041 =3D=3D 0x0F010400)) { //= inserted? + if (A04I =3D=3D 0x00) { + Store(0x02010400, A041) // clear action value + } + Return(0xF) + } + elseif ((A041 =3D=3D 0x0E010400) || (A041 =3D=3D 0x0F010400)) { //= inprogress inserted? + if (A04I =3D=3D 0x00) { + Store(0x02010400, A041) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (A041 =3D=3D 0x02010400) { // really sw ejection call? + Store(0xF0010400, A041) // set SW ejection action + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000222, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000222 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 (A042 =3D=3D 0xF0020400) { // SW ejected ? + Store(0x02020400, A042) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000232, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000232 to DBNS1_10 + Return(0xF) + } + elseif (A042 =3D=3D 0x10020400) { // ejected complete ? + Store(0x02020400, A042) // clear action value + Return(0x0) + } + elseif ((A042 =3D=3D 0x01020400) || (A042 =3D=3D 0x0F020400)) { //= inserted? + if (A06I =3D=3D 0x00) { + Store(0x02020400, A042) // clear action value + } + Return(0xF) + } + elseif ((A042 =3D=3D 0x0E020400) || (A042 =3D=3D 0x0F020400)) { //= inprogress inserted? + if (A06I =3D=3D 0x00) { + Store(0x02020400, A042) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (A042 =3D=3D 0x02020400) { // really sw ejection call? + Store(0xF0020400, A042) // set SW ejection action + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000232, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000232 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 (A043 =3D=3D 0xF0030400) { // SW ejected ? + Store(0x02030400, A043) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000242, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000242 to DBNS1_10 + Return(0xF) + } + elseif(A043 =3D=3D 0x10030400) { // ejected complete ? + Store(0x02030400, A043) // clear action value + Return(0x0) + } + elseif((A043 =3D=3D 0x01030400) || (A043 =3D=3D 0x0F030400)) { // = inserted ? + if (A07I =3D=3D 0x00) { + Store(0x02030400, A043) // clear action value + } + Return(0xF) + } + elseif((A043 =3D=3D 0x0E030400) || (A043 =3D=3D 0x0F030400)) { // = inprogress inserted ? + if (A07I =3D=3D 0x00) { + Store(0x02030400, A043) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (A043 =3D=3D 0x02030400) { // really sw ejection call? + Store(0xF0030400, A043) // set SW ejection value + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000242, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000242 to DBNS1_10 + } + } + + Name(_SUN, 0x00000004) + } + } + Method (_PXM, 0, NotSerialized) { // Patch by code Return(0xFF) @@ -1341,6 +1618,274 @@ Device (PCI5) { Name (_ADR, 0x00000000) } =20 + // + // 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 (A050 =3D=3D 0xF0000500) { // SW ejected ? + Store(0x02000500, A050) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000213, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000213 to DBNS1_10 + Return(0xF) + } + elseif (A050 =3D=3D 0x10000500) { // ejected complete ? + Store(0x02000500, A050) // clear action value + Return(0x0) + } + elseif ((A050 =3D=3D 0x01000500) || (A050 =3D=3D 0x0F000500)) { //= inserted? + if (A00I =3D=3D 0x00) { + Store(0x02000500, A050) // clear action value + } + Return(0xF) + } + elseif ((A050 =3D=3D 0x0E000500) || (A050 =3D=3D 0x0F000500)) { //= inprogress inserted? + if (A00I =3D=3D 0x00) { + Store(0x02000500, A050) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (A050 =3D=3D 0x02000500) { // really sw ejection call? + Store(0xF0000500, A050) // set SW ejection action + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000213, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000213 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 (A051 =3D=3D 0xF0010500) { // SW ejected ? + Store(0x02010500, A051) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000223, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000223 to DBNS1_10 + Return(0xF) + } + elseif (A051 =3D=3D 0x10010500) { // ejected complete ? + Store(0x02010500, A051) // clear action value + Return(0x0) + } + elseif ((A051 =3D=3D 0x01010500) || (A051 =3D=3D 0x0F010500)) { //= inserted? + if (A01I =3D=3D 0x00) { + Store(0x02010500, A051) // clear action value + } + Return(0xF) + } + elseif ((A051 =3D=3D 0x0E010500) || (A051 =3D=3D 0x0F010500)) { //= inprogress inserted? + if (A01I =3D=3D 0x00) { + Store(0x02010500, A051) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (A051 =3D=3D 0x02010500) { // really sw ejection call? + Store(0xF0010500, A051) // set SW ejection action + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000223, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000223 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 (A052 =3D=3D 0xF0020500) { // SW ejected ? + Store(0x02020500, A052) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000233, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000233 to DBNS1_10 + Return(0xF) + } + elseif (A052 =3D=3D 0x10020500) { // ejected complete ? + Store(0x02020500, A052) // clear action value + Return(0x0) + } + elseif ((A052 =3D=3D 0x01020500) || (A052 =3D=3D 0x0F020500)) { //= inserted? + if (A02I =3D=3D 0x00) { + Store(0x02020500, A052) // clear action value + } + Return(0xF) + } + elseif ((A052 =3D=3D 0x0E020500) || (A052 =3D=3D 0x0F020500)) { //= inprogress inserted? + if (A02I =3D=3D 0x00) { + Store(0x02020500, A052) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (A052 =3D=3D 0x02020500) { // really sw ejection call? + Store(0xF0020500, A052) // set SW ejection action + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000233, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000233 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 (A053 =3D=3D 0xF0030500) { // SW ejected ? + Store(0x02030500, A053) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000243, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000243 to DBNS1_10 + Return(0xF) + } + elseif(A053 =3D=3D 0x10030500) { // ejected complete ? + Store(0x02030500, A053) // clear action value + Return(0x0) + } + elseif((A053 =3D=3D 0x01030500) || (A053 =3D=3D 0x0F030500)) { // = inserted ? + if (A03I =3D=3D 0x00) { + Store(0x02030500, A053) // clear action value + } + Return(0xF) + } + elseif((A053 =3D=3D 0x0E030500) || (A053 =3D=3D 0x0F030500)) { // = inprogress inserted ? + if (A03I =3D=3D 0x00) { + Store(0x02030500, A053) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (A053 =3D=3D 0x02030500) { // really sw ejection call? + Store(0xF0030500, A053) // set SW ejection value + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000243, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000243 to DBNS1_10 + } + } + + Name(_SUN, 0x00000004) + } + } + Method (_PXM, 0, NotSerialized) { // Patch by code Return(0xFF) diff --git a/Platform/Ampere/JadePkg/Ac02AcpiTables/PCI-S1.asi b/Platform/A= mpere/JadePkg/Ac02AcpiTables/PCI-S1.asi index cb03247895a6..72548fc8030a 100644 --- a/Platform/Ampere/JadePkg/Ac02AcpiTables/PCI-S1.asi +++ b/Platform/Ampere/JadePkg/Ac02AcpiTables/PCI-S1.asi @@ -330,6 +330,274 @@ Device (PCIA) { Name (_ADR, 0x00000000) } =20 + // + // 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 =3D=3D 0xF0000201) { // SW ejected before ? + Store(0x02000201, A120) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000216, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000216 to DBNS1_10 + Return (0xF) + } + elseif (A120 =3D=3D 0x10000201) { // ejected completed ? + Store(0x02000201, A120) // clear action value + Return (0x0) + } + elseif ((A120 =3D=3D 0x01000201) || (A120 =3D=3D 0x0F000201)) { //= inserted ? + if (A20I =3D=3D 0x00) { + Store(0x02000201, A120) // clear action value + } + Return (0xF) + } + elseif ((A120 =3D=3D 0x0E000201) || (A120 =3D=3D 0x0F000201)) { //= inprogress inserted ? + if (A20I =3D=3D 0x00) { + Store(0x02000201, A120) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (A120 =3D=3D 0x02000201) { // is sw ejection? + Store(0xF0000201, A120) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000216, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0010201) { // SW ejected before ? + Store(0x02010201, A121) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000226, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000226 to DBNS1_10 + Return(0xF) + } + elseif (A121 =3D=3D 0x10010201) { // ejected completed ? + Store(0x02010201, A121) // clear action value + Return(0x0) + } + elseif ((A121 =3D=3D 0x01010201) || (A121 =3D=3D 0x0F010201)) { //= inserted ? + if (A21I =3D=3D 0x00) { + Store(0x02010201, A121) // clear action value + } + Return(0xF) + } + elseif ((A121 =3D=3D 0x0E010201) || (A121 =3D=3D 0x0F010201)) { //= inprogress inserted ? + if (A21I =3D=3D 0x00) { + Store(0x02010201, A121) // clear action value + } + Return(0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (A121 =3D=3D 0x02010201) { // is sw ejection? + Store(0xF0010201, A121) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000226, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0020201) { // SW ejected before ? + Store(0x02020201, A122) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000236, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000236 to DBNS1_10 + Return(0xF) + } + elseif (A122 =3D=3D 0x10020201) { // ejected complete ? + Store(0x02020201, A122) // clear action value + Return (0x0) + } + elseif ((A122 =3D=3D 0x01020201) || (A122 =3D=3D 0x0F020201)) { //= inserted ? + if (A22I =3D=3D 0x00) { + Store(0x02020201, A122) // clear action value + } + Return (0xF) + } + elseif ((A122 =3D=3D 0x0E020201) || (A122 =3D=3D 0x0F020201)) { //= inprogess inserted ? + if (A22I =3D=3D 0x00) { + Store(0x02020201, A122) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (A122 =3D=3D 0x02020201) { // is sw ejection? + Store(0xF0020201, A122) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000236, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0030201) { // SW ejected before ? + Store(0x02030201, A123) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000246, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000246 to DBNS1_10 + Return(0xF) + } + elseif (A123 =3D=3D 0x10030201) { // ejected complete ? + Store(0x02030201, A123) // clear action value + Return (0x0) + } + elseif ((A123 =3D=3D 0x01030201) || (A123 =3D=3D 0x0F030201)) { //= inserted ? + if (A23I =3D=3D 0x00) { + Store(0x02030201, A123) // clear action value + } + Return (0xF) + } + elseif ((A123 =3D=3D 0x0E030201) || (A123 =3D=3D 0x0F030201)) { //= inprogress inserted ? + if (A23I =3D=3D 0x00) { + Store(0x02030201, A123) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (A123 =3D=3D 0x02030201) { // is sw ejection? + Store(0xF0030201, A123) // set ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000246, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000246 to DBNS1_10 + } + } + + Name(_SUN, 0x00000004) + } + } + Method (_PXM, 0, NotSerialized) { // Patch by code Return(0xFF) @@ -1350,6 +1618,274 @@ Device (PCID) { Name (_ADR, 0x00000000) } =20 + // + // 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 (A150 =3D=3D 0xF0000501) { // SW ejected ? + Store(0x02000501, A150) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000219, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000219 to DBNS1_10 + Return(0xF) + } + elseif (A150 =3D=3D 0x10000501) { // ejected complete ? + Store(0x02000501, A150) // clear action value + Return(0x0) + } + elseif ((A150 =3D=3D 0x01000501) || (A150 =3D=3D 0x0F000501)) { //= inserted? + if (A16I =3D=3D 0x00) { + Store(0x02000501, A150) // clear action value + } + Return(0xF) + } + elseif ((A150 =3D=3D 0x0E000501) || (A150 =3D=3D 0x0F000501)) { //= inprogress inserted? + if (A16I =3D=3D 0x00) { + Store(0x02000501, A150) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (A150 =3D=3D 0x02000501) { // really sw ejection call? + Store(0xF0000501, A150) // set SW ejection action + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000219, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000219 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 (A151 =3D=3D 0xF0010501) { // SW ejected ? + Store(0x02010501, A151) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000229, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000229 to DBNS1_10 + Return(0xF) + } + elseif (A151 =3D=3D 0x10010501) { // ejected complete ? + Store(0x02010501, A151) // clear action value + Return(0x0) + } + elseif ((A151 =3D=3D 0x01010501) || (A151 =3D=3D 0x0F010501)) { //= inserted? + if (A17I =3D=3D 0x00) { + Store(0x02010501, A151) // clear action value + } + Return(0xF) + } + elseif ((A151 =3D=3D 0x0E010501) || (A151 =3D=3D 0x0F010501)) { //= inprogress inserted? + if (A17I =3D=3D 0x00) { + Store(0x02010501, A151) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (A151 =3D=3D 0x02010501) { // really sw ejection call? + Store(0xF0010501, A151) // set SW ejection action + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000229, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000229 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 (A152 =3D=3D 0xF0020501) { // SW ejected ? + Store(0x02020501, A152) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000239, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000239 to DBNS1_10 + Return(0xF) + } + elseif (A152 =3D=3D 0x10020501) { // ejected complete ? + Store(0x02020501, A152) // clear action value + Return(0x0) + } + elseif ((A152 =3D=3D 0x01020501) || (A152 =3D=3D 0x0F020501)) { //= inserted? + if (A18I =3D=3D 0x00) { + Store(0x02020501, A152) // clear action value + } + Return(0xF) + } + elseif ((A152 =3D=3D 0x0E020501) || (A152 =3D=3D 0x0F020501)) { //= inprogress inserted? + if (A18I =3D=3D 0x00) { + Store(0x02020501, A152) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (A152 =3D=3D 0x02020501) { // really sw ejection call? + Store(0xF0020501, A152) // set SW ejection action + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000239, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000239 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 (A153 =3D=3D 0xF0030501) { // SW ejected ? + Store(0x02030501, A153) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000249, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000249 to DBNS1_10 + Return(0xF) + } + elseif(A153 =3D=3D 0x10030501) { // ejected complete ? + Store(0x02030501, A153) // clear action value + Return(0x0) + } + elseif((A153 =3D=3D 0x01030501) || (A153 =3D=3D 0x0F030501)) { // = inserted ? + if (A19I =3D=3D 0x00) { + Store(0x02030501, A153) // clear action value + } + Return(0xF) + } + elseif((A153 =3D=3D 0x0E030501) || (A153 =3D=3D 0x0F030501)) { // = inprogress inserted ? + if (A19I =3D=3D 0x00) { + Store(0x02030501, A153) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (A153 =3D=3D 0x02030501) { // really sw ejection call? + Store(0xF0030501, A153) // set SW ejection value + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x68000249, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000249 to DBNS1_10 + } + } + + Name(_SUN, 0x00000004) + } + } + Method (_PXM, 0, NotSerialized) { // Patch by code Return(0xFF) @@ -1697,6 +2233,274 @@ Device (PCIE) { Name (_ADR, 0x00000000) } =20 + // + // 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 (A160 =3D=3D 0xF0000601) { // SW ejected before ? + Store(0x02000601, A160) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800021A, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800021A to DBNS1_10 + Return(0xF) + } + elseif (A160 =3D=3D 0x10000601) { // ejected complete ? + Store(0x02000601, A160) // clear action value + Return (0x0) + } + elseif ((A160 =3D=3D 0x01000601) || (A160 =3D=3D 0x0F000601)){ // = inserted ? + if (A11I =3D=3D 0x00) { + Store(0x02000601, A160) // clear action value + } + Return (0xF) + } + elseif ((A160 =3D=3D 0x0E000601) || (A160 =3D=3D 0x0F000601)) { //= inprogress inserted ? + if (A11I =3D=3D 0x00) { + Store(0x02000601, A160) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (A160 =3D=3D 0x02000601) { // is sw ejection? + Store(0xF0000601, A160) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800021A, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800021A 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 (A161 =3D=3D 0xF0010601) { // SW ejected before ? + Store(0x02010601, A161) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800022A, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800022A to DBNS1_10 + Return(0xF) + } + elseif (A161 =3D=3D 0x10010601) { // ejected completed ? + Store(0x02010601, A161) // clear action value + Return (0x0) + } + elseif ((A161 =3D=3D 0x01010601) || (A161 =3D=3D 0x0F010601)){ // = inserted ? + if (A10I =3D=3D 0x00) { + Store(0x02010601, A161) // clear action value + } + Return (0xF) + } + elseif ((A161 =3D=3D 0x0E010601) || (A161 =3D=3D 0x0F010601)) { //= inprogress inserted ? + if (A10I =3D=3D 0x00) { + Store(0x02010601, A161) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (A161 =3D=3D 0x02010601) { // is sw ejection? + Store(0xF0010601, A161) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800022A, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800022A 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 (A162 =3D=3D 0xF0020601) { // SW ejected before ? + Store(0x02020601, A162) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800023A, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800023A to DBNS1_10 + Return(0xF) + } + elseif (A162 =3D=3D 0x10020601) { // ejected complete ? + Store(0x02020601, A162) // clear action value + Return (0x0) + } + elseif ((A162 =3D=3D 0x01020601) || (A162 =3D=3D 0x0F020601)) { //= inserted ? + if (A09I =3D=3D 0x00) { + Store(0x02020601, A162) // clear action value + } + Return (0xF) + } + elseif ((A162 =3D=3D 0x0E020601) || (A162 =3D=3D 0x0F020601)) { //= inprogress inserted ? + if (A09I =3D=3D 0x00) { + Store(0x02020601, A162) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (A162 =3D=3D 0x02020601) { // is sw ejection? + Store(0xF0020601, A162) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800023A, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800023A 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 (A163 =3D=3D 0xF0030601) { // SW ejected before ? + Store(0x02030601, A163) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800024A, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800024A to DBNS1_10 + Return(0xF) + } + elseif (A163 =3D=3D 0x10030601) { // ejected complete ? + Store(0x02030601, A163) // clear action value + Return (0x0) + } + elseif ((A163 =3D=3D 0x01030601) || (A163 =3D=3D 0x0F030601)) { //= inserted ? + if (A08I =3D=3D 0x00) { + Store(0x02030601, A163) // clear action value + } + Return (0xF) + } + elseif ((A163 =3D=3D 0x0E030601) || (A163 =3D=3D 0x0F030601)) { //= inprogress inserted ? + if (A08I =3D=3D 0x00) { + Store(0x02030601, A163) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (A163 =3D=3D 0x02030601) { // is sw ejection? + Store(0xF0030601, A163) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800024A, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800024A to DBNS1_10 + } + } + + Name(_SUN, 0x00000004) + } + } + Method (_PXM, 0, NotSerialized) { // Patch by code Return(0xFF) @@ -2044,6 +2848,274 @@ Device (PCIF) { Name (_ADR, 0x00000000) } =20 + // + // 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 (A170 =3D=3D 0xF0000701) { // SW ejected before ? + Store(0x02000701, A170) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800021B, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800021B to DBNS1_10 + Return(0xF) + } + elseif (A170 =3D=3D 0x10000701) { // ejected complete ? + Store(0x02000701, A170) // clear action value + Return (0x0) + } + elseif ((A170 =3D=3D 0x01000701) || (A170 =3D=3D 0x0F000701)){ // = inserted ? + if (A15I =3D=3D 0x00) { + Store(0x02000701, A170) // clear action value + } + Return (0xF) + } + elseif ((A170 =3D=3D 0x0E000701) || (A170 =3D=3D 0x0F000701)) { //= inprogress inserted ? + if (A15I =3D=3D 0x00) { + Store(0x02000701, A170) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (A170 =3D=3D 0x02000701) { // is sw ejection? + Store(0xF0000701, A170) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800021B, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800021B 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 (A171 =3D=3D 0xF0010701) { // SW ejected before ? + Store(0x02010701, A171) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800022B, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800022B to DBNS1_10 + Return(0xF) + } + elseif (A171 =3D=3D 0x10010701) { // ejected completed ? + Store(0x02010701, A171) // clear action value + Return (0x0) + } + elseif ((A171 =3D=3D 0x01010701) || (A171 =3D=3D 0x0F010701)){ // = inserted ? + if (A14I =3D=3D 0x00) { + Store(0x02010701, A171) // clear action value + } + Return (0xF) + } + elseif ((A171 =3D=3D 0x0E010701) || (A171 =3D=3D 0x0F010701)) { //= inprogress inserted ? + if (A14I =3D=3D 0x00) { + Store(0x02010701, A171) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (A171 =3D=3D 0x02010701) { // is sw ejection? + Store(0xF0010701, A171) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800022B, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800022B 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 (A172 =3D=3D 0xF0020701) { // SW ejected before ? + Store(0x02020701, A172) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800023B, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800023B to DBNS1_10 + Return(0xF) + } + elseif (A172 =3D=3D 0x10020701) { // ejected complete ? + Store(0x02020701, A172) // clear action value + Return (0x0) + } + elseif ((A172 =3D=3D 0x01020701) || (A172 =3D=3D 0x0F020701)) { //= inserted ? + if (A13I =3D=3D 0x00) { + Store(0x02020701, A172) // clear action value + } + Return (0xF) + } + elseif ((A172 =3D=3D 0x0E020701) || (A172 =3D=3D 0x0F020701)) { //= inprogress inserted ? + if (A13I =3D=3D 0x00) { + Store(0x02020701, A172) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (A172 =3D=3D 0x02020701) { // is sw ejection? + Store(0xF0020701, A172) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800023B, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800023B 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 (A173 =3D=3D 0xF0030701) { // SW ejected before ? + Store(0x02030701, A173) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800024B, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800024B to DBNS1_10 + Return(0xF) + } + elseif (A173 =3D=3D 0x10030701) { // ejected complete ? + Store(0x02030701, A173) // clear action value + Return (0x0) + } + elseif ((A173 =3D=3D 0x01030701) || (A173 =3D=3D 0x0F030701)) { //= inserted ? + if (A12I =3D=3D 0x00) { + Store(0x02030701, A173) // clear action value + } + Return (0xF) + } + elseif ((A173 =3D=3D 0x0E030701) || (A173 =3D=3D 0x0F030701)) { //= inprogress inserted ? + if (A12I =3D=3D 0x00) { + Store(0x02030701, A173) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (A173 =3D=3D 0x02030701) { // is sw ejection? + Store(0xF0030701, A173) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CHG_= CMD =3D 3 + Store(0x6800024B, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800024B to DBNS1_10 + } + } + + Name(_SUN, 0x00000004) + } + } + Method (_PXM, 0, NotSerialized) { // Patch by code Return(0xFF) --=20 2.39.0