From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.70]) by mx.groups.io with SMTP id smtpd.web09.6597.1628265039022730048 for ; Fri, 06 Aug 2021 08:50:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@vmware.com header.s=selector2 header.b=q9sygPBS; spf=pass (domain: vmware.com, ip: 40.107.236.70, mailfrom: awarkentin@vmware.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kJR4ILv5ptJaqlVQR5WY9gBFENGNI6e5Jmc5V9BjUbjIg5W6s8YOApUUVRqQdqLnCV48f+INojmzxEwJqLiGh79PPC/fG8vk0YltK5D1x0HEL6lSvRALyN+7MncoK6w0fwQNp8VYM5x4WWAE2HLOG1rBT1yjC0yo/+VzYsfwRt6ZWwDXd4jL86RiLkxZbW16vQUarCuy0JS0thF8DMJTlGjUkR/IXlS7Lg379lweRloZDxEUhWY2Ld93ByvFmpGMyqCHkLS2Q7Y69BBabylgzHBFD1y1MOMv79xyp4C8bVjOz4nd5IeZp0oYnjHxPlnOdsP46d6B7nVPmrq7Guu16Q== 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-SenderADCheck; bh=PibnRh2mrI/f5t5G9rs6LuuWNIQh8yNCZDccXYrSrE0=; b=hFiusI1PaeCQKZYWkQkfXBiQgfe1KkuXbFtRyLgCa3/w3Y1EovtZMfLbIA9CRF48l8bz8Xwwn0LeJ8bqAS2RUt/F2mPA3RzcgINChqaYLcUebMPt/3cXG4CPXeySg7/M1rTL8YkddZWWWYJJgdqFjSGi9C9W1IbegXIn7OnLuuLYnqmbRrGNrJiSpJaqLjZektqm9B1PUG2zTgK0fXePkXDn5qqPyw7NFGC+noUvklMt2f1hauXGVJnu6U9jFWR/PWyP0b9xmw2idtW4SgYNB4j5KumdNNfCKZYHYhQezn+HVYECyPqOdM5gNzCZdk3l/thhojtX44pz15Wy4uwvZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PibnRh2mrI/f5t5G9rs6LuuWNIQh8yNCZDccXYrSrE0=; b=q9sygPBSi5Zq/JaTPtg+AHG1RtMRPq9Xn7pP0A54Qd2+UCmTSVcU9JvtodE8E/tyLTDiIgAU2B0613ZUG0HlkJctOzpYvGvuhCQDIU1sD7obR335bU7oLa37k0Orvgw4QXWsiZEWuV0q73wmSDwM9Kc/Ut2qsL1uMmPJdmEhASE= Received: from PH0PR05MB8702.namprd05.prod.outlook.com (2603:10b6:510:b2::21) by PH0PR05MB8123.namprd05.prod.outlook.com (2603:10b6:510:7b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.8; Fri, 6 Aug 2021 15:50:37 +0000 Received: from PH0PR05MB8702.namprd05.prod.outlook.com ([fe80::2566:a48:8045:d0fa]) by PH0PR05MB8702.namprd05.prod.outlook.com ([fe80::2566:a48:8045:d0fa%6]) with mapi id 15.20.4394.015; Fri, 6 Aug 2021 15:50:37 +0000 From: "Andrei Warkentin" To: "devel@edk2.groups.io" , "jeremy.linton@arm.com" CC: "pete@akeo.ie" , "ardb+tianocore@kernel.org" , "Sunny.Wang@arm.com" , "samer.el-haj-mahmoud@arm.com" Subject: Re: [edk2-devel] [PATCH 2/5] Platform/RaspberryPi: break XHCI into its own SSDT Thread-Topic: [edk2-devel] [PATCH 2/5] Platform/RaspberryPi: break XHCI into its own SSDT Thread-Index: AQHXihgAFCldK8O2UkuWPWyhWFWM8KtmoUqa Date: Fri, 6 Aug 2021 15:50:37 +0000 Message-ID: References: <20210805163551.488035-1-jeremy.linton@arm.com>,<20210805163551.488035-3-jeremy.linton@arm.com> In-Reply-To: <20210805163551.488035-3-jeremy.linton@arm.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=vmware.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2997884e-a10c-4247-3b75-08d958f1ef2b x-ms-traffictypediagnostic: PH0PR05MB8123: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: I5C7GuWjOwb/93zsUVZ0QETeirP1rDR054FnRaenqxwHjgxwYgd9VmcUnS8AAl1Bxh2YE/5Dn95X0eSb5HxnjtVzeTwm+Qplm2kcUlTDuPH/5koXBSTJqMxPLxwaw38/rPsvt8BOw5MbAUB/ANcNwpTA/r7k5TzB5hYKUM9FeVz2L84nA4XbAxv8v3L9ixU880nygVc3KQf6IciTePtJas5hPdt3v2fNJFNUhxVnBvjgQ7FPSSkUGZFqOEP3h+ZAHdCduRpsbWdX1yW/3Zc3cWfNKeNqNeABtS7I4AP/QaMbBzodj2NZo09jHS2Z5XNgcppzg7nelohMf+CdY+Nt2i9xBGkYvgGtDlHrBjvKi8MVA3tvb0vfIQn52QHTLWQ2ul0Nme7++PMNMLtUPYRX9HQIXEWoPbnJs5pw1U8inzRKOv9UVqA3XDH8WNym7xlwZeEkozMfukjnF+XXoChVtJMd+zyyqSvnoXgY6pLznZSpcDz7pXwprvQYDJ434UaR+bjYQrQHjnWo0o/vuQM1hkjex1fy8Amv1Uo9rvNHxS9A/qJf3nAZt5k8djV7aX/Ki781AM3iF2pPDtmIhexU9Hst5WV302fD/1Gruf/FZlfa0ACcF8BX2Ld81QuTho1wfejdtnx98MAXdR1S2GRaFr/uECoGy5F3D2KLWh58j9JvokcFP0CbU7/57eUSXSGmN7a451tkQlfD8s8hRqfKWWMytQ5lNcP+RylIe76UBM3QMSAjoxGkoqbkNq+PrPo2zdmYaXCLCV/EXUivAWotYU8kUizRp57Hsxce7JVNlqk= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR05MB8702.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(38070700005)(7696005)(86362001)(186003)(122000001)(166002)(508600001)(76116006)(91956017)(53546011)(6506007)(8936002)(38100700002)(966005)(71200400001)(66556008)(9686003)(66476007)(26005)(45080400002)(8676002)(55016002)(66946007)(64756008)(2906002)(66446008)(83380400001)(4326008)(5660300002)(33656002)(19627405001)(110136005)(54906003)(52536014)(316002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?12DFvJEPoC/tHRS/wj3/A7hHCHNNweuAZu9M9PjlJphUktafUz690MZpowQE?= =?us-ascii?Q?ndnim0+eBhLPoR/1SsRzj1oGRH+L8oZt5hWmaDqiQQrwEuxu+4YNx6oORmdr?= =?us-ascii?Q?uqMJTWyDFjGZhbtzvwzPldnXDnQSqg+1+bP6GxLlTQDmJOzYcyM77hWeVRow?= =?us-ascii?Q?acm2D7daUPtWyEj1ELPvW15a6Sirg/FdsPr7SZaIcsODu5nwCuNRN7zWBSGa?= =?us-ascii?Q?CGKEFRNQFDpKsJyXPdzWavp6W4WEEMbTIY3F0LYVM5wXL4U3k/PzZ2nJa0wB?= =?us-ascii?Q?e5YKiMHzEk+8KD6DE/ONS2qHcBlNj0tKn9HrZFvo+u/mLdwgeQiIygFW0DgJ?= =?us-ascii?Q?dL1JJOYTtp3vTwCuo2g+W35v2kKjjGu3eBO1csLhfj0GwTdrphc3p0ddFi+Q?= =?us-ascii?Q?mTiI6jQndRRklfezYPWWuVa2ubibUZKpzqspWlG5noX/Ew/46skJldYuaYnq?= =?us-ascii?Q?zgYZG/wpvJJ5MtW543yMn6XwMvchrlXNPuqm6qTVpX7Ns7+9mNEPoW4TGXMK?= =?us-ascii?Q?pWb9Au4wYOc6SDfpux99In4nKXCourDyywDm84DX58v/pi95BsZCdSlp1oL/?= =?us-ascii?Q?mOyEBmdm54elot2illU/OijqDHxxaumjD8CJegeQqSM3Wq7rfTyRHEr5izuB?= =?us-ascii?Q?y5ONYo0Xt8n15wjfgBhwGj5i2ZcfO1PiRNanBWX+fUmUHfw0S1I0+o54RcwN?= =?us-ascii?Q?1OXi/RoSzdn37uU+y2w3ZE8RQA5F1lvabl0bFCDxY91ZEhyQqPVRxy8nQCyn?= =?us-ascii?Q?5eFFvj5C2hr0pbO0T9FqMN6HnMh3YN5xQy0sotYsd7ffq93KK6QfNNb416Jh?= =?us-ascii?Q?XW2OLPVrX7B1GUJg0177gzKFDxstcv9yDqCW1tsvpXzNC1pRPyA6IAwYRDvZ?= =?us-ascii?Q?yWwGlAzP8ShPuRvADayZUgZED+erRjNV4pm4V9ZwnXci7OCOOBqJEnWYhvOw?= =?us-ascii?Q?HDogSkxZKhuNG3zfmwoF4RTt7mwXr1Mo8rXG9Xajqq8a+I6KErwmyPm3Vnis?= =?us-ascii?Q?ICkeVSGBegeLWn88C1VtaXbmdsky6wN75Rj3ENjH4nn0eZTZick4QRXnFoH3?= =?us-ascii?Q?nLGdpyoCB43gMNKV/N4Ho/EIv2QJwKNYQmA4m4Dflvo+ydPgWo6LzqDJ48M+?= =?us-ascii?Q?KxQ6awBqWfg74H391zyOnMlHL/U6aIepyOBYCmV6PcAFH0PraMjppTYWBEr3?= =?us-ascii?Q?X7oYZ4mdmot2MYDCV9fp8VOMogNU5R+P2dggkp7H+4t0Ig6Cra031zSWPfCl?= =?us-ascii?Q?ZzUEC/3hvh4mH9Shm5Z6BAIzJAtMt8cL+NT5JrjPpSQ3QDJneUaLpJWG5Wye?= =?us-ascii?Q?sQgiXnYsn59/BDjzWYf1R6h8?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR05MB8702.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2997884e-a10c-4247-3b75-08d958f1ef2b X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Aug 2021 15:50:37.1321 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Je31ftEZFU7RBdG8GpwJfO4csbg25G5XdarigcAyut4OBU8h6apeILT0VkZR95zxbfkuHC6lipLoVDilGCLnFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR05MB8123 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_PH0PR05MB87025A3E41AD0A457E5C99ECB9F39PH0PR05MB8702namp_" --_000_PH0PR05MB87025A3E41AD0A457E5C99ECB9F39PH0PR05MB8702namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Andrei Warkentin -- Andrei Warkentin, Arm Enablement Architect, Cloud Platform Business Unit, VMware ________________________________ From: devel@edk2.groups.io on behalf of Jeremy Linto= n via groups.io Sent: Thursday, August 5, 2021 7:35 PM To: devel@edk2.groups.io Cc: pete@akeo.ie ; ardb+tianocore@kernel.org ; Andrei Warkentin ; Sunny.Wang@arm.com <= Sunny.Wang@arm.com>; samer.el-haj-mahmoud@arm.com ; Jeremy Linton Subject: [edk2-devel] [PATCH 2/5] Platform/RaspberryPi: break XHCI into its= own SSDT Lets prepare to switch between XHCI and PCI by moving the XHCI definition into its own SSDT. That way we can select it based on the menu settings. Signed-off-by: Jeremy Linton --- Platform/RaspberryPi/AcpiTables/AcpiTables.inf | 1 + Platform/RaspberryPi/AcpiTables/Dsdt.asl | 3 -- Platform/RaspberryPi/AcpiTables/Xhci.asl | 35 ++++++++++++++----= ---- Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 8 +++++ 4 files changed, 31 insertions(+), 16 deletions(-) diff --git a/Platform/RaspberryPi/AcpiTables/AcpiTables.inf b/Platform/Rasp= berryPi/AcpiTables/AcpiTables.inf index 1ddc9ca5fe..f3e8d950c1 100644 --- a/Platform/RaspberryPi/AcpiTables/AcpiTables.inf +++ b/Platform/RaspberryPi/AcpiTables/AcpiTables.inf @@ -38,6 +38,7 @@ SpcrPl011.aslc Pptt.aslc SsdtThermal.asl + Xhci.asl [Packages] ArmPkg/ArmPkg.dec diff --git a/Platform/RaspberryPi/AcpiTables/Dsdt.asl b/Platform/RaspberryP= i/AcpiTables/Dsdt.asl index 1ee6379f46..b594d50bdf 100644 --- a/Platform/RaspberryPi/AcpiTables/Dsdt.asl +++ b/Platform/RaspberryPi/AcpiTables/Dsdt.asl @@ -64,9 +64,6 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RPIFDN", "RPI", = 2) Scope (\_SB_) { include ("Pep.asl") -#if (RPI_MODEL =3D=3D 4) - include ("Xhci.asl") -#endif Device (CPU0) { diff --git a/Platform/RaspberryPi/AcpiTables/Xhci.asl b/Platform/RaspberryP= i/AcpiTables/Xhci.asl index bc3fea60f9..9b37277956 100644 --- a/Platform/RaspberryPi/AcpiTables/Xhci.asl +++ b/Platform/RaspberryPi/AcpiTables/Xhci.asl @@ -9,6 +9,8 @@ #include +#include "AcpiTables.h" + /* * The following can be used to remove parenthesis from * defined macros that the compiler complains about. @@ -24,12 +26,17 @@ */ #define XHCI_REG_LENGTH 0x1000 -Device (SCB0) { - Name (_HID, "ACPI0004") - Name (_UID, 0x0) - Name (_CCA, 0x0) +DefinitionBlock (__FILE__, "SSDT", 5, "RPIFDN", "RPI4XHCI", 2) +{ + Scope (\_SB_) + { + + Device (SCB0) { + Name (_HID, "ACPI0004") + Name (_UID, 0x0) + Name (_CCA, 0x0) - Method (_CRS, 0, Serialized) { // _CRS: Current Resource Settings + Method (_CRS, 0, Serialized) { // _CRS: Current Resource Settings /* * Container devices with _DMA must have _CRS, meaning SCB0 * to provide all resources that XHC0 consumes (except @@ -57,15 +64,15 @@ Device (SCB0) { Add (MMBE, XHCI_REG_LENGTH - 1, MMBE) Add (MMLE, XHCI_REG_LENGTH - 1, MMLE) Return (RBUF) - } + } - Name (_DMA, ResourceTemplate() { + Name (_DMA, ResourceTemplate() { /* * XHC0 is limited to DMA to first 3GB. Note this * only applies to PCIe, not GENET or other devices * next to the A72. */ - QWordMemory (ResourceConsumer, + QWordMemory (ResourceProducer, , MinFixed, MaxFixed, @@ -79,10 +86,10 @@ Device (SCB0) { , , ) - }) + }) - Device (XHC0) - { + Device (XHC0) + { Name (_HID, "PNP0D10") // _HID: Hardware ID Name (_UID, 0x0) // _UID: Unique ID Name (_CCA, 0x0) // _CCA: Cache Coherency Attribute @@ -131,5 +138,7 @@ Device (SCB0) { Debug =3D "xHCI enable" Store (0x6, CMND) } - } -} + } // end XHC0 + } //end SCB0 + } //end scope sb +} //end definition block diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c b/Platform/= RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c index 87f6b4e7bb..7c5786303d 100644 --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c @@ -814,6 +814,14 @@ STATIC CONST NAMESPACE_TABLES SdtTables[] =3D { PcdToken(PcdSdIsArasan), SsdtEmmcNameOpReplace }, +#if (RPI_MODEL =3D=3D 4) + { + SIGNATURE_64 ('R', 'P', 'I', '4', 'X', 'H', 'C', 'I'), + 0, + PcdToken(PcdXhciPci), + NULL + }, +#endif { // DSDT SIGNATURE_64 ('R', 'P', 'I', 0, 0, 0, 0, 0), 0, -- 2.13.7 -=3D-=3D-=3D-=3D-=3D-=3D Groups.io Links: You receive all messages sent to this group. View/Reply Online (#78736): https://nam04.safelinks.protection.outlook.com/= ?url=3Dhttps%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F78736&data= =3D04%7C01%7Cawarkentin%40vmware.com%7Ce2326d393d8444b85be208d9582f20eb%7Cb= 39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637637781716980099%7CUnknown%7CTW= FpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3= D%7C1000&sdata=3DUVgVFQ7OyVRL5gkRj6ecRkIZftq32NtV%2FB7AQjuFh%2F0%3D&= ;reserved=3D0 Mute This Topic: https://nam04.safelinks.protection.outlook.com/?url=3Dhttp= s%3A%2F%2Fgroups.io%2Fmt%2F84688698%2F4387333&data=3D04%7C01%7Cawarkent= in%40vmware.com%7Ce2326d393d8444b85be208d9582f20eb%7Cb39138ca3cee4b4aa4d6cd= 83d9dd62f0%7C0%7C0%7C637637781716980099%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4= wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3D= ZAxBSVAzZRI6tPuIINxobNLkwlRplTAv6k1N%2FTWYbgE%3D&reserved=3D0 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://nam04.safelinks.protection.outlook.com/?url=3Dhttps%3A= %2F%2Fedk2.groups.io%2Fg%2Fdevel%2Funsub&data=3D04%7C01%7Cawarkentin%40= vmware.com%7Ce2326d393d8444b85be208d9582f20eb%7Cb39138ca3cee4b4aa4d6cd83d9d= d62f0%7C0%7C0%7C637637781716980099%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw= MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3DTBIRs= SpxkWzcqX8Ngp38KrL2miGjxB6C%2BJDZdkBj3QY%3D&reserved=3D0 [awarkentin@vm= ware.com] -=3D-=3D-=3D-=3D-=3D-=3D --_000_PH0PR05MB87025A3E41AD0A457E5C99ECB9F39PH0PR05MB8702namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Reviewed-by: Andrei Warkentin <awarkentin@vmware.com>

--
Andrei Warkentin,
Arm Enablement Architect,
Cloud Platform Business Unit, VMware

From: devel@edk2.groups.io = <devel@edk2.groups.io> on behalf of Jeremy Linton via groups.io <j= eremy.linton=3Darm.com@groups.io>
Sent: Thursday, August 5, 2021 7:35 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: pete@akeo.ie <pete@akeo.ie>; ardb+tianocore@kernel.org <= ;ardb+tianocore@kernel.org>; Andrei Warkentin <awarkentin@vmware.com&= gt;; Sunny.Wang@arm.com <Sunny.Wang@arm.com>; samer.el-haj-mahmoud@ar= m.com <samer.el-haj-mahmoud@arm.com>; Jeremy Linton <jeremy.linton= @arm.com>
Subject: [edk2-devel] [PATCH 2/5] Platform/RaspberryPi: break XHCI i= nto its own SSDT
 
Lets prepare to switch between XHCI and PCI by mov= ing
the XHCI definition into its own SSDT. That way we can
select it based on the menu settings.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
 Platform/RaspberryPi/AcpiTables/AcpiTables.inf    = ; |  1 +
 Platform/RaspberryPi/AcpiTables/Dsdt.asl     = ;      |  3 --
 Platform/RaspberryPi/AcpiTables/Xhci.asl     = ;      | 35 ++++++++++++++--------
 Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c |  8 +++++  4 files changed, 31 insertions(+), 16 deletions(-)

diff --git a/Platform/RaspberryPi/AcpiTables/AcpiTables.inf b/Platform/Rasp= berryPi/AcpiTables/AcpiTables.inf
index 1ddc9ca5fe..f3e8d950c1 100644
--- a/Platform/RaspberryPi/AcpiTables/AcpiTables.inf
+++ b/Platform/RaspberryPi/AcpiTables/AcpiTables.inf
@@ -38,6 +38,7 @@
   SpcrPl011.aslc
   Pptt.aslc
   SsdtThermal.asl
+  Xhci.asl
 
 [Packages]
   ArmPkg/ArmPkg.dec
diff --git a/Platform/RaspberryPi/AcpiTables/Dsdt.asl b/Platform/RaspberryP= i/AcpiTables/Dsdt.asl
index 1ee6379f46..b594d50bdf 100644
--- a/Platform/RaspberryPi/AcpiTables/Dsdt.asl
+++ b/Platform/RaspberryPi/AcpiTables/Dsdt.asl
@@ -64,9 +64,6 @@ DefinitionBlock ("Dsdt.aml", "DSDT", = 2, "RPIFDN", "RPI", 2)
   Scope (\_SB_)
   {
     include ("Pep.asl")
-#if (RPI_MODEL =3D=3D 4)
-    include ("Xhci.asl")
-#endif
 
     Device (CPU0)
     {
diff --git a/Platform/RaspberryPi/AcpiTables/Xhci.asl b/Platform/RaspberryP= i/AcpiTables/Xhci.asl
index bc3fea60f9..9b37277956 100644
--- a/Platform/RaspberryPi/AcpiTables/Xhci.asl
+++ b/Platform/RaspberryPi/AcpiTables/Xhci.asl
@@ -9,6 +9,8 @@
 
 #include <IndustryStandard/Bcm2711.h>
 
+#include "AcpiTables.h"
+
 /*
  * The following can be used to remove parenthesis from
  * defined macros that the compiler complains about.
@@ -24,12 +26,17 @@
  */
 #define XHCI_REG_LENGTH       &nbs= p;         0x1000
 
-Device (SCB0) {
-    Name (_HID, "ACPI0004")
-    Name (_UID, 0x0)
-    Name (_CCA, 0x0)
+DefinitionBlock (__FILE__, "SSDT", 5, "RPIFDN", "= RPI4XHCI", 2)
+{
+  Scope (\_SB_)
+  {
+
+    Device (SCB0) {
+      Name (_HID, "ACPI0004")
+      Name (_UID, 0x0)
+      Name (_CCA, 0x0)
 
-    Method (_CRS, 0, Serialized) { // _CRS: Current Resourc= e Settings
+      Method (_CRS, 0, Serialized) { // _CRS: Cur= rent Resource Settings
         /*
          * Container devices = with _DMA must have _CRS, meaning SCB0
          * to provide all res= ources that XHC0 consumes (except
@@ -57,15 +64,15 @@ Device (SCB0) {
         Add (MMBE, XHCI_REG_LENGTH= - 1, MMBE)
         Add (MMLE, XHCI_REG_LENGTH= - 1, MMLE)
         Return (RBUF)
-    }
+      }
 
-    Name (_DMA, ResourceTemplate() {
+      Name (_DMA, ResourceTemplate() {
         /*
          * XHC0 is limited to= DMA to first 3GB. Note this
          * only applies to PC= Ie, not GENET or other devices
          * next to the A72.           */
-        QWordMemory (ResourceConsumer,<= br> +        QWordMemory (ResourceProducer,<= br>              ,<= br>              Mi= nFixed,
             Ma= xFixed,
@@ -79,10 +86,10 @@ Device (SCB0) {
             ,<= br>              ,<= br>              )<= br> -    })
+      })
 
-    Device (XHC0)
-    {
+      Device (XHC0)
+      {
         Name (_HID, "PNP0D10&= quot;)      // _HID: Hardware ID
         Name (_UID, 0x0) &nbs= p;          // _UID: Unique ID=
         Name (_CCA, 0x0) &nbs= p;          // _CCA: Cache Coh= erency Attribute
@@ -131,5 +138,7 @@ Device (SCB0) {
             De= bug =3D "xHCI enable"
             St= ore (0x6, CMND)
         }
-    }
-}
+      } // end XHC0
+    } //end SCB0
+  } //end scope sb
+} //end definition block
diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c b/Platform/= RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
index 87f6b4e7bb..7c5786303d 100644
--- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
+++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
@@ -814,6 +814,14 @@ STATIC CONST NAMESPACE_TABLES SdtTables[] =3D {
     PcdToken(PcdSdIsArasan),
     SsdtEmmcNameOpReplace
   },
+#if (RPI_MODEL =3D=3D 4)
+  {
+    SIGNATURE_64 ('R', 'P', 'I', '4', 'X', 'H', 'C', 'I'),<= br> +    0,
+    PcdToken(PcdXhciPci),
+    NULL
+  },
+#endif
   { // DSDT
     SIGNATURE_64 ('R', 'P', 'I', 0, 0, 0, 0, 0),
     0,
--
2.13.7



-=3D-=3D-=3D-=3D-=3D-=3D
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78736): https://nam04.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.gr= oups.io%2Fg%2Fdevel%2Fmessage%2F78736&amp;data=3D04%7C01%7Cawarkentin%4= 0vmware.com%7Ce2326d393d8444b85be208d9582f20eb%7Cb39138ca3cee4b4aa4d6cd83d9= dd62f0%7C0%7C0%7C637637781716980099%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA= wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3D= UVgVFQ7OyVRL5gkRj6ecRkIZftq32NtV%2FB7AQjuFh%2F0%3D&amp;reserved=3D0=
Mute This Topic: https://nam04.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgroups.= io%2Fmt%2F84688698%2F4387333&amp;data=3D04%7C01%7Cawarkentin%40vmware.c= om%7Ce2326d393d8444b85be208d9582f20eb%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C= 0%7C0%7C637637781716980099%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQ= IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3DZAxBSVAzZ= RI6tPuIINxobNLkwlRplTAv6k1N%2FTWYbgE%3D&amp;reserved=3D0
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://nam04.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.gr= oups.io%2Fg%2Fdevel%2Funsub&amp;data=3D04%7C01%7Cawarkentin%40vmware.co= m%7Ce2326d393d8444b85be208d9582f20eb%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0= %7C0%7C637637781716980099%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQI= joiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3DTBIRsSpxkW= zcqX8Ngp38KrL2miGjxB6C%2BJDZdkBj3QY%3D&amp;reserved=3D0 [awarkentin@vmware.com]
-=3D-=3D-=3D-=3D-=3D-=3D


--_000_PH0PR05MB87025A3E41AD0A457E5C99ECB9F39PH0PR05MB8702namp_--