From nobody Mon Nov 25 04:58:08 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+78736+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+78736+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1628181372; cv=none; d=zohomail.com; s=zohoarc; b=C8aeWIc/6kDtS0Pq5P6UT7gMI5hNS+jF0ETNggwY89uOxToSbixTP5Fn00W/QMWCOXOzKfSzmFEh4E/5C+rBiBu4X5konXdkoJdIJ/9AVLvbAH6F7E+usA2iV8BwHF57FtIySI02u1jdv44NYxPJCBYy3v8puFwGtLEt4UO7oJo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628181372; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=PSdxqCXMZWyQDa4V74zHR8AfCU+jKeY9R9oon5SAtqU=; b=H/THW33k33Ttm5zi5f0DY0Z7mxT1n3o8DnBO4hfUZbptImyuQCqClLacM8VEvOHCvTvU1yInE87Oy8bsW/tzg1/zOme8Y5rUVOVHbC5enpFfFv4Kl8fkxfPah3hMhKSIvwO1Dley+GjCLHv20A4wwenujf0PsoNmthjUiX2SXhA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+78736+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1628181372452700.0558589700688; Thu, 5 Aug 2021 09:36:12 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id mQfJYY1788612xO7bgZ1glh9; Thu, 05 Aug 2021 09:36:11 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.11376.1628181366913029124 for ; Thu, 05 Aug 2021 09:36:07 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8448612FC; Thu, 5 Aug 2021 09:36:06 -0700 (PDT) X-Received: from u200856.usa.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 32F783F66F; Thu, 5 Aug 2021 09:36:06 -0700 (PDT) From: "Jeremy Linton" To: devel@edk2.groups.io Cc: pete@akeo.ie, ardb+tianocore@kernel.org, awarkentin@vmware.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 Date: Thu, 5 Aug 2021 11:35:48 -0500 Message-Id: <20210805163551.488035-3-jeremy.linton@arm.com> In-Reply-To: <20210805163551.488035-1-jeremy.linton@arm.com> References: <20210805163551.488035-1-jeremy.linton@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jeremy.linton@arm.com X-Gm-Message-State: y14YscvHi4Awf6LLf71n3ZQOx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1628181371; bh=Y+idHw6pdlCohg06l7kjkrp22+GrQqONR1/iFI9uXhY=; h=Cc:Date:From:Reply-To:Subject:To; b=kmPfFoTvEERyTY177eluueu8xtkMg+CN0leoOqPKqogDFoUrhrORerDXyhDKj6EJiKB Ns6PZTEU5WI9bt3PiTfvhWKRr2zTNS1D8uPg5rfl/HdIhZRlYVntIheDNKfH2rRBAg+X2 hvcSnT4L7YrPkCWH65Ei9iO86U02AW7lips= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1628181372833100006 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andrei Warkentin --- 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 =20 [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 =20 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 @@ =20 #include =20 +#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 =20 -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) =20 - 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) - } + } =20 - 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) { , , ) - }) + }) =20 - 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, --=20 2.13.7 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#78736): https://edk2.groups.io/g/devel/message/78736 Mute This Topic: https://groups.io/mt/84688698/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-