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.126]) by mx.groups.io with SMTP id smtpd.web10.54052.1683792653716213923 for ; Thu, 11 May 2023 01:10:54 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@os.amperecomputing.com header.s=selector2 header.b=ODzeN+2I; spf=pass (domain: os.amperecomputing.com, ip: 40.107.243.126, mailfrom: minhnguyen1@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gn0U6q66HexwtFVdVZdDUU7okD8J+hZ6Sj4dfjB7Hw+nwYiKoYF+jMUwhou2g6+aIhjha3uIlHLBY9lGHybF3ciyEnXrh7DNtcxKUC63OrLZZM+ELew/Z2GqRgpQ1rxxwUdRF3jX9zfBLHaZrmmlcdD8RPWlf3rcVyGP5TjLZ5aN279w0H3BsdDIIcDyZem+CexHVvtjyitvhtqDeqHZnPfbi77pl0MQ0RbfIbBmVN8dLJyS3KPQ+NVAoLuWvNooz0Kqlp41/GqWJ9wljyKjj4h85a7UYHZp1MFEVH5QZz0NXJG5GTMXQLdM0Ny8Rf+yaz2SPj7Ub04JF8v4azSdaQ== 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=is7W9/6fK126QGO9flYvbZoSpWPAjn7JRDhxHJQSqsg=; b=Aph6eAS5IkzsIOr5gjjAVtfPtT8hEG2xYOxHn2dSQ2N1Go0bk1ONRFsSZECQ84zhBvlWhT/26VDDy9iq23QfUKyrRRQU82qML1kUWbEiz+xWuNa4K5Sh4UBkyRoTZdRsL8aOzwj/Rt4+NxAe8RqnjWHh7Z8mpem8+oEu85+f1VrdItf4WIiQKUaE8VRnPJZ5JcpOQJixj1NbPsv90467KSCHTVQNdlbiY8qINt3OlXWLKK00hqJ3FxUSRoRh1xrEbeiI9sRQ0O8jiNxMb3ENSdCYR+rFAwrsEv5yX1x9GVWpd50VlPFjADwUTXesLrsfjD4HI0aT/CtqzxHAcnd/cw== 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=is7W9/6fK126QGO9flYvbZoSpWPAjn7JRDhxHJQSqsg=; b=ODzeN+2IEUoEs55hLwlp7/1iKke0d/SGhQ4GkSwW6Abqe3Jjt+PWFZpceYBmNup3DqX8FSmuLUilQzpwRSRjN3J9+CVtywiJlIXQqyR8hICvOBL3AsPzaPTJx2aLndurYLru6Bv8+RDKavqKbVf97RZsPI7TeQ79t8fu+GTRC/Q= 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:48 +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:48 +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 4/6] JadePkg: Support ACPI tables for Hot Plug of Ampere Altra Date: Thu, 11 May 2023 15:10:09 +0700 Message-ID: <20230511081011.2692963-5-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: 17a432c6-ceee-464e-2a37-08db51f73a5d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RDtQB5Lxm5xPeY09kD3ubanLx/ATgQvD4NsjBAoRi8yI3JWVVPrh/k61VVcjxb+tfKYdLm8z7sLNgTBMYLcuHGah9rTlF3GgICCI7c3Ju9U1vn4lhZguZxRcqa6jc4A97gLR1RSkJwQ+hfYwt7npEsO1YTW/2qvHguLSUhaArxq9MKGOOCLFoBwhEmpAwm7Q/PPHmOJBgMXAzgYz4+OYdqHo1qGsmP+yJ7/lc7Tqrl4JPyYZTtOraDtCmdeTZwMUQDVmJblWIH67PEEetjQsZgWbKhe6aNWC8SJd0MuNlgYvWm389+CVe3RDOe8feRdQ+AJGYXPqMY60EWv3wbH4b3t6MIEYSiYRORQ/RLr7Lkhmjp7Y+8rJW0q60jYXsP+9Ddd8G/OPEcmaiG6ZvdPMw4GobDrknyIr8PcV0qMtRUjS5bVeHcO3oS6FwfgmGs7ylXHJJPW+gTn6bp0sD5kwYrnqvnhE4prrBW5SSfrrKCDCbyGgmvkfemWCytbiq7ntFd0A515dojHA87GPg9bXalPba7Eyt2tK9Nkwcso2zGBkPDp7AKX13FKwrimCMb13MZZr4pn6UAOFyhPyRBTULzrkQ9LlDqtpkz5Xe+HLtX/CCGbPqogy2evABsCYzGB+ 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?aa6klWTXx2Icw+B+aN8OWsrtbUocpZPJGkT1G6thB4MjsF0bzYFfSBZsLL/G?= =?us-ascii?Q?GZ/RoOeOqeIF8BkFsV+kZyFWHgrZLXSVweXYFx1+q+Nrujt6DnjkMicJvdK/?= =?us-ascii?Q?xkVIfrdAsNd7bf/CMibH6mzfjK4WC+CAgynSSiNM9whPNZgGVOnQhmC5T9pW?= =?us-ascii?Q?U92DsmZn+2ataIImWta5VrDEKuRhHokl8blHLuv9cj5GIS1izBUzO0g2T//p?= =?us-ascii?Q?JyBILOROq+1sZbA2tEPu7Xfju1xvUjY7Nn3IryY24RY7k72j21pxz2zhuir4?= =?us-ascii?Q?IZei7pGbfe2MEaltt5oD0LgxXowlyqlRK4+d8xCvH53qyfE2yC1FvSyAOMjF?= =?us-ascii?Q?yDkR/J7CDJAgePNtlcAztDnGkX9F/KYBgyLGlqkm2J8NSk3DyOcCgazhcw59?= =?us-ascii?Q?k3ZKa9BhPdWg4KEgtMlZIcG9YbG5VoNcsThcGMv0MinepKGYEXoM/RfDnd45?= =?us-ascii?Q?6bArl7ssgyAhuNNKDIamCko+mXyEThekIVxAPa6a2OwIn2S8p4STb8fsjW+M?= =?us-ascii?Q?pKYt0ps0vcKDcfIWVeLzQhd/oGeTb78JEIuyZ3N6OGgjUAVLS2UuGwK47UEt?= =?us-ascii?Q?hCLvu6sb7mFO9zuC+RgQFIcmguTwlCrwQFftqfp61ZcmvnsFNg8H1nPtQlHi?= =?us-ascii?Q?3KudT0lh5+tVuHXjBd9H38Lv24724cqCFD0TM/iEn7ot2zLzO9VqoblU7rqo?= =?us-ascii?Q?+zPhGhLrSLPag6zPj4e/GlXjCueIpoePcJr6W8AKsABlNhSDznj0LpIVqlCN?= =?us-ascii?Q?8MZkxy7fY+1CRR8beJHKh5vM8799WEZhc4b21SBvgvATlFdqrXc0ahuB7Qkp?= =?us-ascii?Q?MJiV6YvhtwM9mpiEHk9m1bb+G5weBzgEVsh7J0AzrZaGcotOk2sTnCjW/LbJ?= =?us-ascii?Q?+8X2ZJ4TdONKwUBMjCU6c5A17sl0QEcLDPUkjLc8Zs4SVUB+n6FO6qyPfHB/?= =?us-ascii?Q?Ob6F6Ssj8xs/4nn3y72DgYipwoqqKJ1hzs9yGiC9VYucM73JNBwonMdZ35LF?= =?us-ascii?Q?lH0cT5JWmFyB3Nvy5cXWN1CKn/DYafwkNXNEjAdRbo8nz6EyCFx7UV9Btt2r?= =?us-ascii?Q?b/YfFbqogLcyy7bl6AQB70XIi/TyZkFJYA+8H5yHk+c37jvg3jm6t1Pqs4fp?= =?us-ascii?Q?Hkwdkk8q18n5sZPD6sTiGQofFtLjXqu+0ct8t9wX+Xoj3Ym87Nij1U1O6kKl?= =?us-ascii?Q?Kwq2e9y2hiDWmMeX4pwXjWp1LZklcldCCReitfqJCwHMSenaIcFeUGqYCKNf?= =?us-ascii?Q?ZjTjKxVnLZ1FyBRmPQ58x8qLIJMiyvmtyn0lKOosVbZ36/B3zVJKcAN4pfa4?= =?us-ascii?Q?IU6KXcXDrRpAfBZqJDJjDgb/YyGIaKEGgj4uN2SOLa/xsoMz7RQJt4eO+1O3?= =?us-ascii?Q?kyPpUyHCNaEqy5EqZ3UMkTNsEiSH+zLGSR2qryixJv4H/gO3dozfa2CYgvQj?= =?us-ascii?Q?+tSMfOoaH5FakCSIGkqNEm7gZLKR8b1dfFExpVNslfnfRsASmxN8VuLSWRHi?= =?us-ascii?Q?GBfYF2qeJ1Th/8noodCUyAvOPppV8Uov6dzaq4KMuZVRN4AeBzFMhLCcvSF4?= =?us-ascii?Q?lxYsuDZGKVHeK7BpWLbJnG1+ySixAOFfkLop954dyr4WhwJtltdho2xgNnhU?= =?us-ascii?Q?8R4EXYQex/2b7TvSK1BTQpB5NREXlYPRx0HaXwHwA0w+?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17a432c6-ceee-464e-2a37-08db51f73a5d 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:48.5577 (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: UKOGbkd9oVnNFlzZRwfs7wXt4l8J/1CDeLdNIqFT+R3UvrynIRUGArbPtz+zcvbVL4RvwJ9pGiS/DPD8OYb/GrlBbwG9o/xvq7h4pQAglaIMB5yWuRjsPWSTQdq/RUS/ 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. Signed-off-by: Minh Nguyen --- 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 =20 - Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved. + Copyright (c) 2020 - 2023, Ampere Computing LLC. All rights reserved. =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -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) { =20 // @@ -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 =3D DOUT & 0x00FF0000 + if (local0 =3D=3D 0x00010000) { + local0 =3D STA4 & 0xFFFFFFFF + if (local0) { + Store(local0, STA4) // clear interrupt + } + 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 + } + local0 =3D B000 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P1, 1) // insertion action + } + local0 =3D B002 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P3, 1) // insertion action + } + local0 =3D B004 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P5, 1) // insertion action + } + local0 =3D B006 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P7, 1) // insertion action + } + local0 =3D B010 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P1, 1) // insertion action + } + local0 =3D B012 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P3, 1) // insertion action + } + local0 =3D B014 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P5, 1) // insertion action + } + local0 =3D B016 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P7, 1) // insertion action + } + local0 =3D B104 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIC.P2P5, 1) // insertion action + } + local0 =3D B106 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIC.P2P7, 1) // insertion action + } + local0 =3D B110 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCID.P2P1, 1) // insertion action + } + local0 =3D B112 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCID.P2P3, 1) // insertion action + } + local0 =3D B120 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P1, 1) // insertion action + } + local0 =3D B122 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P3, 1) // insertion action + } + local0 =3D B124 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P5, 1) // insertion action + } + local0 =3D B126 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P7, 1) // insertion action + } + local0 =3D B130 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P1, 1) // insertion action + } + local0 =3D B132 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P3, 1) // insertion action + } + local0 =3D B134 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P5, 1) // insertion action + } + local0 =3D B136 & 0xFF000000 + if ((local0 =3D=3D 0x01000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P7, 1) // insertion action + } + } + elseif (local0 =3D=3D 0x00000000) { + local0 =3D STA4 & 0xFFFFFFFF + if (local0) { + Store(local0, STA4) // clear interrupt + } + 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 + } + local0 =3D B000 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI4.P2P1, 1) // ejection action + B000 =3D 0x10000400 // inprogress remove + } + local0 =3D B002 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI4.P2P3, 1) // ejection action + B002 =3D 0x10020400 // inprogress remove + } + local0 =3D B004 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI4.P2P5, 1) // ejection action + B004 =3D 0x10040400 // inprogress remove + } + local0 =3D B006 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI4.P2P7, 1) // ejection action + B006 =3D 0x10060400 // inprogress remove + } + local0 =3D B010 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI5.P2P1, 1) // ejection action + B010 =3D 0x10000500 // inprogress remove + } + local0 =3D B012 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI5.P2P3, 1) // ejection action + B012 =3D 0x10020500 // inprogress remove + } + local0 =3D B014 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI5.P2P5, 1) // ejection action + B014 =3D 0x10040500 // inprogress remove + } + local0 =3D B016 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCI5.P2P7, 1) // ejection action + B016 =3D 0x10060500 // inprogress remove + } + local0 =3D B104 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIC.P2P5, 1) // ejection action + B104 =3D 0x10040401 // inprogress remove + } + local0 =3D B106 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIC.P2P7, 1) // ejection action + B106 =3D 0x10060401 // inprogress remove + } + local0 =3D B110 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCID.P2P1, 1) // ejection action + B110 =3D 0x10000501 // inprogress remove + } + local0 =3D B112 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCID.P2P3, 1) // ejection action + B112 =3D 0x10020501 // inprogress remove + } + local0 =3D B120 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIE.P2P1, 1) // ejection action + B120 =3D 0x10000601 // inprogress remove + } + local0 =3D B122 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIE.P2P3, 1) // ejection action + B122 =3D 0x10020601 // inprogress remove + } + local0 =3D B124 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIE.P2P5, 1) // ejection action + B124 =3D 0x10040601 // inprogress remove + } + local0 =3D B126 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIE.P2P7, 1) // ejection action + B126 =3D 0x10060601 // inprogress remove + } + local0 =3D B130 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIF.P2P1, 1) // ejection action + B130 =3D 0x10000701 // inprogress remove + } + local0 =3D B132 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIF.P2P3, 1) // ejection action + B132 =3D 0x10020701 // inprogress remove + } + local0 =3D B134 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIF.P2P5, 1) // ejection action + B134 =3D 0x10040701 // inprogress remove + } + local0 =3D B136 & 0xFF000000 + if (local0 =3D=3D 0x00000000) { + Notify (\_SB.PCIF.P2P7, 1) // ejection action + B136 =3D 0x10060701 // 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 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 + } + local0 =3D B000 & 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 B002 & 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 B004 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P5, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCI4.P2P5, 1) // insertion action + } + local0 =3D B006 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P7, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCI4.P2P7, 1) // insertion action + } + local0 =3D B010 & 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 B012 & 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 B014 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P5, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCI5.P2P5, 1) // insertion action + } + local0 =3D B016 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P7, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCI5.P2P7, 1) // insertion action + } + local0 =3D B104 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIC.P2P5, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIC.P2P5, 1) // insertion action + } + local0 =3D B106 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIC.P2P7, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIC.P2P7, 1) // insertion action + } + local0 =3D B110 & 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 B112 & 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 B120 & 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 B122 & 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 B124 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P5, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIE.P2P5, 1) // insertion action + } + local0 =3D B126 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P7, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIE.P2P7, 1) // insertion action + } + local0 =3D B130 & 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 B132 & 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 B134 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P5, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIF.P2P5, 1) // insertion action + } + local0 =3D B136 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P7, 3) // force remove bridge port a= nd port itself + Notify (\_SB.PCIF.P2P7, 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 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 + } + local0 =3D B000 & 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 B002 & 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 B004 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P5.S0F0, 3) // remove port itself + Notify (\_SB.PCI4.P2P5, 1) // insertion action + } + local0 =3D B006 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI4.P2P7.S0F0, 3) // remove port itself + Notify (\_SB.PCI4.P2P7, 1) // insertion action + } + local0 =3D B010 & 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 B012 & 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 B014 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P5.S0F0, 3) // remove port itself + Notify (\_SB.PCI5.P2P5, 1) // insertion action + } + local0 =3D B016 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCI5.P2P7.S0F0, 3) // remove port itself + Notify (\_SB.PCI5.P2P7, 1) // insertion action + } + local0 =3D B104 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIC.P2P5.S0F0, 3) // remove port itself + Notify (\_SB.PCIC.P2P5, 1) // insertion action + } + local0 =3D B106 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIC.P2P7.S0F0, 3) // remove port itself + Notify (\_SB.PCIC.P2P7, 1) // insertion action + } + local0 =3D B110 & 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 B112 & 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 B120 & 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 B122 & 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 B124 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P5.S0F0, 3) // remove port itself + Notify (\_SB.PCIE.P2P5, 1) // insertion action + } + local0 =3D B126 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIE.P2P7.S0F0, 3) // remove port itself + Notify (\_SB.PCIE.P2P7, 1) // insertion action + } + local0 =3D B130 & 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 B132 & 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 B134 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + Notify (\_SB.PCIF.P2P5.S0F0, 3) // remove port itself + Notify (\_SB.PCIF.P2P5, 1) // insertion action + } + local0 =3D B136 & 0xFF000000 + if ((local0 =3D=3D 0x0E000000) || (local0 =3D=3D 0x0F00000= 0)) { + 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.
+ + 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 40 PCIe hotplug ports. Hence, this table defines 36 entries c= orresponding +// 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/Amper= e/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 =20 - Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved. + Copyright (c) 2020 - 2023, Ampere Computing LLC. All rights reserved. =20 SPDX-License-Identifier: BSD-2-Clause-Patent =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) { // @@ -1016,6 +1026,274 @@ 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 (B000 =3D=3D 0xF0000400) { // SW ejected ? + Store(0x02000400, B000) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000212, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000212 to DBNS1_10 + Return(0xF) + } + elseif (B000 =3D=3D 0x10000400) { // ejected complete ? + Store(0x02000400, B000) // clear action value + Return(0x0) + } + elseif ((B000 =3D=3D 0x01000400) || (B000 =3D=3D 0x0F000400)) { = // inserted ? + if (B02I =3D=3D 0x00) { + Store(0x02000400, B000) // clear action value + } + Return(0xF) + } + elseif ((B000 =3D=3D 0x0E000400) || (B000 =3D=3D 0x0F000400)) { = // inprogress inserted ? + if (B02I =3D=3D 0x00) { + Store(0x02000400, B000) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (B000 =3D=3D 0x02000400) { // really sw ejection call? + Store(0xF0000400, B000) // set SW ejection action + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000212, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0020400) { // SW ejected ? + Store(0x02020400, B002) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000232, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000232 to DBNS1_10 + Return(0xF) + } + elseif (B002 =3D=3D 0x10020400) { // ejected complete ? + Store(0x02020400, B002) // clear action value + Return(0x0) + } + elseif ((B002 =3D=3D 0x01020400) || (B002 =3D=3D 0x0F020400)) { = // inserted ? + if (B03I =3D=3D 0x00) { + Store(0x02020400, B002) // clear action value + } + Return(0xF) + } + elseif ((B002 =3D=3D 0x0E020400) || (B002 =3D=3D 0x0F020400)) { = // inprogress inserted ? + if (B03I =3D=3D 0x00) { + Store(0x02020400, B002) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (B002 =3D=3D 0x02020400) { // really sw ejection call? + Store(0xF0020400, B002) // set SW ejection action + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000232, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0040400) { // SW ejected ? + Store(0x02040400, B004) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000252, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000252 to DBNS1_10 + Return(0xF) + } + elseif (B004 =3D=3D 0x10040400) { // ejected complete ? + Store(0x02040400, B004) // clear action value + Return(0x0) + } + elseif ((B004 =3D=3D 0x01040400) || (B004 =3D=3D 0x0F040400)) { = // inserted? + if (B04I =3D=3D 0x00) { + Store(0x02040400, B004) // clear action value + } + Return(0xF) + } + elseif ((B004 =3D=3D 0x0E040400) || (B004 =3D=3D 0x0F040400)) { = // inprogress inserted? + if (B04I =3D=3D 0x00) { + Store(0x02040400, B004) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (B004 =3D=3D 0x02040400) { // really sw ejection call? + Store(0xF0040400, B004) // set SW ejection action + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000252, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0060400) { // SW ejected ? + Store(0x02060400, B006) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000272, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000272 to DBNS1_10 + Return(0xF) + } + elseif(B006 =3D=3D 0x10060400) { // ejected complete ? + Store(0x02060400, B006) // clear action value + Return(0x0) + } + elseif((B006 =3D=3D 0x01060400) || (B006 =3D=3D 0x0F060400)) { /= / inserted ? + if (B05I =3D=3D 0x00) { + Store(0x02060400, B006) // clear action value + } + Return(0xF) + } + elseif((B006 =3D=3D 0x0E060400) || (B006 =3D=3D 0x0F060400)) { /= / inprogress inserted ? + if (B05I =3D=3D 0x00) { + Store(0x02060400, B006) // clear action value + } + Return(0xF) + } + else { + Return(0xF) + } + } + + Method (_EJ0, 1) { + if (B006 =3D=3D 0x02060400) { // really sw ejection call? + Store(0xF0060400, B006) // set SW ejection value + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000272, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000272 to DBNS1_10 + } + } + + Name(_SUN, 0x00000004) + } + } + Method (_PXM, 0, NotSerialized) { // Patch by code Return(0xFF) @@ -1366,6 +1644,274 @@ 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 (B010 =3D=3D 0xF0000500) { // SW ejected before ? + Store(0x02000500, B010) // Set back action event + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000213, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000213 to DBNS1_10 + Return(0xF) + } + elseif (B010 =3D=3D 0x10000500) { // ejected complete ? + Store(0x02000500, B010) // Set back action event + Return (0x0) + } + elseif ((B010 =3D=3D 0x01000500) || (B010 =3D=3D 0x0F000500)) { = // inserted ? + if (B06I =3D=3D 0x00) { + Store(0x02000500, B010) // Set back action event + } + Return (0xF) + } + elseif ((B010 =3D=3D 0x0E000500) || (B010 =3D=3D 0x0F000500)) { = // inprogress inserted ? + if (B06I =3D=3D 0x00) { + Store(0x02000500, B010) // Set back action event + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B010 =3D=3D 0x02000500) { // really sw ejection call? + Store(0xF0000500, B010) // Set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000213, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0020500) { // SW ejected before ? + Store(0x02020500, B012) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000233, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000233 to DBNS1_10 + Return(0xF) + } + elseif (B012 =3D=3D 0x10020500) { // ejected complete ? + Store(0x02020500, B012) // clear action value + Return (0x0) + } + elseif ((B012 =3D=3D 0x01020500) || (B012 =3D=3D 0x0F020500)) { = // inserted ? + if (B07I =3D=3D 0x00) { + Store(0x02020500, B012) // clear action value + } + Return (0xF) + } + elseif ((B012 =3D=3D 0x0E020500) || (B012 =3D=3D 0x0F020500)) { = // inprogress inserted ? + if (B07I =3D=3D 0x00) { + Store(0x02020500, B012) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B012 =3D=3D 0x02020500) { // really sw ejection call? + Store(0xF0020500, B012) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000233, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0040500) { // SW ejected before ? + Store(0x02040500, B014) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000253, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000253 to DBNS1_10 + Return (0xF) + } + elseif (B014 =3D=3D 0x10040500) { // ejected complete ? + Store(0x02040500, B014) // clear action value + Return (0x0) + } + elseif ((B014 =3D=3D 0x01040500) || (B014 =3D=3D 0x0F040500)){ /= / inserted ? + if (B08I =3D=3D 0x00) { + Store(0x02040500, B014) // clear action value + } + Return (0xF) + } + elseif ((B014 =3D=3D 0x0E040500) || (B014 =3D=3D 0x0F040500)) { = // inprogress inserted ? + if (B08I =3D=3D 0x00) { + Store(0x02040500, B014) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B014 =3D=3D 0x02040500) { // really sw ejection call? + Store(0xF0040500, B014) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000253, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0060500) { // SW ejected before ? + Store(0x02060500, B016) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000273, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000273 to DBNS1_10 + Return(0xF) + } + elseif (B016 =3D=3D 0x10060500) { // ejected complete ? + Store(0x02060500, B016) // clear action value + Return (0x0) + } + elseif ((B016 =3D=3D 0x01060500) || (B016 =3D=3D 0x0F060500)) { = // inserted ? + if (B09I =3D=3D 0x00) { + Store(0x02060500, B016) // clear action value + } + Return (0xF) + } + elseif ((B016 =3D=3D 0x0E060500) || (B016 =3D=3D 0x0F060500)) { = // inprogress inserted ? + if (B09I =3D=3D 0x00) { + Store(0x02060500, B016) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B016 =3D=3D 0x02060500) { // really sw ejection call? + Store(0xF0060500, B016) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000273, OUTV) // + // action: Insert =3D 1 & Remove =3D 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/Amper= e/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 =20 - Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved. + Copyright (c) 2020 - 2023, Ampere Computing LLC. All rights reserved. =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -336,6 +336,274 @@ 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_CH= G_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 (A16I =3D=3D 0x00) { + Store(0x02000201, A120) // clear action value + } + Return (0xF) + } + elseif ((A120 =3D=3D 0x0E000201) || (A120 =3D=3D 0x0F000201)) { = // inprogress inserted ? + if (A16I =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_CH= G_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_CH= G_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 (A17I =3D=3D 0x00) { + Store(0x02010201, A121) // clear action value + } + Return(0xF) + } + elseif ((A121 =3D=3D 0x0E010201) || (A121 =3D=3D 0x0F010201)) { = // inprogress inserted ? + if (A17I =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_CH= G_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_CH= G_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 (A18I =3D=3D 0x00) { + Store(0x02020201, A122) // clear action value + } + Return (0xF) + } + elseif ((A122 =3D=3D 0x0E020201) || (A122 =3D=3D 0x0F020201)) { = // inprogess inserted ? + if (A18I =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_CH= G_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_CH= G_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 (A19I =3D=3D 0x00) { + Store(0x02030201, A123) // clear action value + } + Return (0xF) + } + elseif ((A123 =3D=3D 0x0E030201) || (A123 =3D=3D 0x0F030201)) { = // inprogress inserted ? + if (A19I =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_CH= G_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) @@ -1021,6 +1289,140 @@ Name (_ADR, 0x00000000) } =20 + // + // 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 =3D=3D 0xF0040401) { // SW ejected before ? + Store(0x02040401, B104) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000258, OUTV) // > + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000258 to DBNS1_10 + Return(0xF) + } + elseif (B104 =3D=3D 0x10040401) { // ejected complete ? + Store(0x02040401, B104) // clear action value + Return (0x0) + } + elseif ((B104 =3D=3D 0x01040401) || (B104 =3D=3D 0x0F040401)) { = // inserted ? + if (B23I =3D=3D 0x00) { + Store(0x02040401, B104) // clear action value + } + Return (0xF) + } + elseif ((B104 =3D=3D 0x0E040401) || (B104 =3D=3D 0x0F040401)) { = // inprogress inserted ? + if (B23I =3D=3D 0x00) { + Store(0x02040401, B104) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B104 =3D=3D 0x02040401) { // is sw ejection? + Store(0xF0040401, B104) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000258, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0060401) { // SW ejected before ? + Store(0x02060401, B106) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000278, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000278 to DBNS1_10 + Return(0xF) + } + elseif (B106 =3D=3D 0x10060401) { // ejected complete ? + Store(0x02060401, B106) // clear action value + Return (0x0) + } + elseif ((B106 =3D=3D 0x01060401) || (B106 =3D=3D 0x0F060401)) { = // inserted ? + if (B24I =3D=3D 0x00) { + Store(0x02060401, B106) // clear action value + } + Return (0xF) + } + elseif ((B106 =3D=3D 0x0E060401) || (B106 =3D=3D 0x0F060401)) { = // inprogress inserted ? + if (B24I =3D=3D 0x00) { + Store(0x02060401, B106) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B106 =3D=3D 0x02060401) { // is sw ejection? + Store(0xF0060401, B106) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000278, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000278 to DBNS1_10 + } + } + + Name(_SUN, 0x00000003) + } + } + Method (_PXM, 0, NotSerialized) { // Patch by code Return(0xFF) @@ -1374,6 +1776,140 @@ 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 (B110 =3D=3D 0xF0000501) { // SW ejected before? + Store(0x02000501, B110) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000219, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000219 to DBNS1_10 + Return(0xF) + } + elseif (B110 =3D=3D 0x10000501) { // ejected complete ? + Store(0x02000501, B110) // clear action value + Return (0x0) + } + elseif ((B110 =3D=3D 0x01000501) || (B110 =3D=3D 0x0F000501)) { = // inserted ? + if (B25I =3D=3D 0x00) { + Store(0x02000501, B110) // clear action value + } + Return (0xF) + } + elseif ((B110 =3D=3D 0x0E000501) || (B110 =3D=3D 0x0F000501)) { = // inprogress inserted ? + if (B25I =3D=3D 0x00) { + Store(0x02000501, B110) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B110 =3D=3D 0x02000501) { // is sw ejection? + Store(0xF0000501, B110) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000219, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0020501) { // SW ejected before ? + Store(0x02020501, B112) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000239, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000239 to DBNS1_10 + Return(0xF) + } + elseif (B112 =3D=3D 0x10020501) { // ejected complete ? + Store(0x02020501, B112) // clear action value + Return (0x0) + } + elseif ((B112 =3D=3D 0x01020501) || (B112 =3D=3D 0x0F020501)) { = // inserted ? + if (B26I =3D=3D 0x00) { + Store(0x02020501, B112) // clear action value + } + Return (0xF) + } + elseif ((B112 =3D=3D 0x0E020501) || (B112 =3D=3D 0x0F020501)) { = // inprogress inserted ? + if (B26I =3D=3D 0x00) { + Store(0x02020501, B112) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B112 =3D=3D 0x02020501) { // is sw ejection? + Store(0xF0020501, B112) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x68000239, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x68000239 to DBNS1_10 + } + } + + Name(_SUN, 0x00000002) + } + } + Method (_PXM, 0, NotSerialized) { // Patch by code Return(0xFF) @@ -1727,6 +2263,274 @@ 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 (B120 =3D=3D 0xF0000601) { // SW ejected before ? + Store(0x02000601, B120) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800021A, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800021A to DBNS1_10 + Return(0xF) + } + elseif (B120 =3D=3D 0x10000601) { // ejected complete ? + Store(0x02000601, B120) // clear action value + Return (0x0) + } + elseif ((B120 =3D=3D 0x01000601) || (B120 =3D=3D 0x0F000601)){ /= / inserted ? + if (B28I =3D=3D 0x00) { + Store(0x02000601, B120) // clear action value + } + Return (0xF) + } + elseif ((B120 =3D=3D 0x0E000601) || (B120 =3D=3D 0x0F000601)) { = // inprogress inserted ? + if (B28I =3D=3D 0x00) { + Store(0x02000601, B120) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B120 =3D=3D 0x02000601) { // is sw ejection? + Store(0xF0000601, B120) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800021A, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0020601) { // SW ejected before ? + Store(0x02020601, B122) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800023A, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800023A to DBNS1_10 + Return(0xF) + } + elseif (B122 =3D=3D 0x10020601) { // ejected completed ? + Store(0x02020601, B122) // clear action value + Return (0x0) + } + elseif ((B122 =3D=3D 0x01020601) || (B122 =3D=3D 0x0F020601)){ /= / inserted ? + if (B29I =3D=3D 0x00) { + Store(0x02020601, B122) // clear action value + } + Return (0xF) + } + elseif ((B122 =3D=3D 0x0E020601) || (B122 =3D=3D 0x0F020601)) { = // inprogress inserted ? + if (B29I =3D=3D 0x00) { + Store(0x02020601, B122) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B122 =3D=3D 0x02020601) { // is sw ejection? + Store(0xF0020601, B122) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800023A, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0040601) { // SW ejected before ? + Store(0x02040601, B124) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800025A, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800025A to DBNS1_10 + Return(0xF) + } + elseif (B124 =3D=3D 0x10040601) { // ejected complete ? + Store(0x02040601, B124) // clear action value + Return (0x0) + } + elseif ((B124 =3D=3D 0x01040601) || (B124 =3D=3D 0x0F040601)) { = // inserted ? + if (B30I =3D=3D 0x00) { + Store(0x02040601, B124) // clear action value + } + Return (0xF) + } + elseif ((B124 =3D=3D 0x0E040601) || (B124 =3D=3D 0x0F040601)) { = // inprogress inserted ? + if (B30I =3D=3D 0x00) { + Store(0x02040601, B124) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B124 =3D=3D 0x02040601) { // is sw ejection? + Store(0xF0040601, B124) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800025A, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0060601) { // SW ejected before ? + Store(0x02060601, B126) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800027A, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800027A to DBNS1_10 + Return(0xF) + } + elseif (B126 =3D=3D 0x10060601) { // ejected complete ? + Store(0x02060601, B126) // clear action value + Return (0x0) + } + elseif ((B126 =3D=3D 0x01060601) || (B126 =3D=3D 0x0F060601)) { = // inserted ? + if (B31I =3D=3D 0x00) { + Store(0x02060601, B126) // clear action value + } + Return (0xF) + } + elseif ((B126 =3D=3D 0x0E060601) || (B126 =3D=3D 0x0F060601)) { = // inprogress inserted ? + if (B31I =3D=3D 0x00) { + Store(0x02060601, B126) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B126 =3D=3D 0x02060601) { // is sw ejection? + Store(0xF0060601, B126) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800027A, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800027A to DBNS1_10 + } + } + + Name(_SUN, 0x00000004) + } + } + Method (_PXM, 0, NotSerialized) { // Patch by code Return(0xFF) @@ -2080,6 +2884,274 @@ 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 (B130 =3D=3D 0xF0000701) { // SW ejected before ? + Store(0x02000701, B130) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800021B, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800021B to DBNS1_10 + Return (0xF) + } + elseif (B130 =3D=3D 0x10000701) { // ejected complete ? + Store(0x02000701, B130) // clear action value + Return (0x0) + } + elseif ((B130 =3D=3D 0x01000701) || (B130 =3D=3D 0x0F000701)) { = // inserted ? + if (B32I =3D=3D 0x00) { + Store(0x02000701, B130) // clear action value + } + Return (0xF) + } + elseif ((B130 =3D=3D 0x0E000701) || (B130 =3D=3D 0x0F000701)) { = // inprogress inserted ? + if (B32I =3D=3D 0x00) { + Store(0x02000701, B130) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B130 =3D=3D 0x02000701) { // is sw ejection? + Store(0xF0000701, B130) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800021B, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0020701) { // SW ejected before ? + Store(0x02020701, B132) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800023B, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800023B to DBNS1_10 + Return (0xF) + } + elseif (B132 =3D=3D 0x10020701) { // ejected complete ? + Store(0x02020701, B132) // clear action value + Return (0x0) + } + elseif ((B132 =3D=3D 0x01020701) || (B132 =3D=3D 0x0F020701)) { = // inserted ? + if (B33I =3D=3D 0x00) { + Store(0x02020701, B132) // clear action value + } + Return (0xF) + } + elseif ((B132 =3D=3D 0x0E020701) || (B132 =3D=3D 0x0F020701)) { = // inprogress inserted ? + if (B33I =3D=3D 0x00) { + Store(0x02020701, B132) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B132 =3D=3D 0x02020701) { // is sw ejection? + Store(0xF0020701, B132) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800023B, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0040701) { // SW ejected before ? + Store(0x02040701, B134) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800025B, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800025B to DBNS1_10 + Return (0xF) + } + elseif (B134 =3D=3D 0x10040701) { // ejected completed ? + Store(0x02040701, B134) // clear action value + Return (0x0) + } + elseif ((B134 =3D=3D 0x01040701) || (B134 =3D=3D 0x0F040701)) { = // inserted ? + if (B34I =3D=3D 0x00) { + Store(0x02040701, B134) // clear action value + } + Return (0xF) + } + elseif ((B134 =3D=3D 0x0E040701) || (B134 =3D=3D 0x0F040701)) { = // inprogress inserted ? + if (B34I =3D=3D 0x00) { + Store(0x02040701, B134) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B134 =3D=3D 0x02040701) { // is sw ejection? + Store(0xF0040701, B134) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800025B, OUTV) // + // action: Insert =3D 1 & Remove =3D 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 =3D=3D 0xF0060701) { // SW ejected before ? + Store(0x02060701, B136) // clear action value + Store(0x680000A4, DIN0) // Off RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800027B, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800027B to DBNS1_10 + Return (0xF) + } + elseif (B136 =3D=3D 0x10060701) { // ejected completed ? + Store(0x02060701, B136) // clear action value + Return (0x0) + } + elseif ((B136 =3D=3D 0x01060701) || (B136 =3D=3D 0x0F060701)) { = // inserted ? + if (B35I =3D=3D 0x00) { + Store(0x02060701, B136) // clear action value + } + Return (0xF) + } + elseif ((B136 =3D=3D 0x0E060701) || (B136 =3D=3D 0x0F060701)) { = // inprogress inserted ? + if (B35I =3D=3D 0x00) { + Store(0x02060701, B136) // clear action value + } + Return (0xF) + } + else { + Return (0xF) + } + } + + Method (_EJ0, 1) { + if (B136 =3D=3D 0x02060701) { // is sw ejection? + Store(0xF0060701, B136) // set SW ejection event + Store(0x680000B4, DIN0) // Blink RED LED + // + // Ampere_HP_CMD: LED_CMD =3D 4, HP_CH= G_CMD =3D 3 + Store(0x6800027B, OUTV) // + // action: Insert =3D 1 & Remove =3D 2 + // 0x6800027B to DBNS1_10 + } + } + + Name(_SUN, 0x00000004) + } + } + Method (_PXM, 0, NotSerialized) { // Patch by code Return(0xFF) --=20 2.39.0