From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.11412.1628181653643158066 for ; Thu, 05 Aug 2021 09:40:53 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: jeremy.linton@arm.com) 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 54D2111FB; Thu, 5 Aug 2021 09:40:53 -0700 (PDT) Received: from u200856.usa.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 03AEE3F66F; Thu, 5 Aug 2021 09:40:52 -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: [PATCH 1/1] Platform/RaspberryPi: Add linux quirk support Date: Thu, 5 Aug 2021 11:40:47 -0500 Message-Id: <20210805164047.488137-2-jeremy.linton@arm.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210805164047.488137-1-jeremy.linton@arm.com> References: <20210805164047.488137-1-jeremy.linton@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Linux, for the time being has refused to support the Arm standard SMCCC for PCIe configuration. Instead they want to continue to maintain per device "quirks". As the RPI isn't really ECAM this is a bit more involved because the MADT can't really describe the root port+config registers situation. Further platforms which support the SMCCC shouldn't have a MADT, so we need an additional way to tell linux what it needs to know about this platform. Signed-off-by: Jeremy Linton --- Platform/RaspberryPi/AcpiTables/Pci.asl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Platform/RaspberryPi/AcpiTables/Pci.asl b/Platform/Raspberry= Pi/AcpiTables/Pci.asl index 34474f13ef..3e7fd0d5b7 100644 --- a/Platform/RaspberryPi/AcpiTables/Pci.asl +++ b/Platform/RaspberryPi/AcpiTables/Pci.asl @@ -123,6 +123,15 @@ DefinitionBlock (__FILE__, "SSDT", 5, "RPIFDN", "RPI= 4PCIE", 2) Name(_BBN, Zero) // PCI Base Bus Number Name(_CCA, 0) // Mark the PCI noncoherent =20 + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () { "linux,pcie-quirk", "bcm2711" }, + Package () { "linux,pcie-nomsi", 1 }, + } + }) + + // Root Complex 0 Device (RP0) { Name(_ADR, 0xF0000000) // Dev 0, Func 0 @@ -176,6 +185,18 @@ DefinitionBlock (__FILE__, "SSDT", 5, "RPIFDN", "RPI= 4PCIE", 2) 2 // SANITIZED_PCIE_MMIO_LEN= + 1 ,,,MMI1,,TypeTranslation ) + + QWordMemory ( // Root port registers, not to be used if SMCC= C is utilized + ResourceConsumer, , + MinFixed, MaxFixed, + NonCacheable, ReadWrite, // cacheable? is that righ= t? + 0x00000000, // Granularity + 0xFD500000, // Root port begin + 0xFD509FFF, // Root port end + 0x00000000, // no translation + 0x0000A000, // size + ,, + ) }) // end Name(RBUF) =20 // Work around ASL's inability to add in a resource definition --=20 2.13.7