From nobody Sat May 4 05:09:59 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+78746+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+78746+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1628181654; cv=none; d=zohomail.com; s=zohoarc; b=npzSYxwHZuClLqRnwxu8mCH+dGjKHPWoL2Sl3ThHf7L+H9QTcMAVd1TOKL9Zjt59s4oT5dZ77xR/hr0LLLKVSX/Zliomisd5rXHuL7Zb6tppy7qsR+q4twyXlU40wAogsaIE94+8MKpRCF6r2dgbPUVGL5OhEnH2hUSJQCmMvLk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628181654; 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=FeN5V9FX4xZMHto1mC4Pf4zfx9w34Qf7p2QO241xBdU=; b=L1MoMsOfhOOt40OLAM6E3s6gkDSJDMpz+TEvtkA2GrWvLUeNOPsTSxf1Y0dYYWP5cb1ZDJJC67bIJkHEGoEaszGKNMl3igs+pQ02qn3Qu7QOIcCoCIQEGVt7I6SmNOXFHCt9AvXtTwM+zuApd2JO+epHlHy6wkleqeFileYIHzY= 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+78746+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 1628181654403659.2691112816312; Thu, 5 Aug 2021 09:40:54 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id RuG5YY1788612x59OtGjfHYh; Thu, 05 Aug 2021 09:40:54 -0700 X-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 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 54D2111FB; Thu, 5 Aug 2021 09:40:53 -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 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: [edk2-devel] [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> In-Reply-To: <20210805164047.488137-1-jeremy.linton@arm.com> References: <20210805164047.488137-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: obN7w9ZYNReqCS8XBmMvrToYx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1628181654; bh=F7mnXHiPEGcJmnNP/wCQbb7bpYSwrf8jZwM1IQJd2eA=; h=Cc:Date:From:Reply-To:Subject:To; b=A7rgWmdZho/qHykU1Y5n22fZswoaXZ5aMEURjcGOWrAySpprVPOjH2w72gjhc7SukQM g2BQtXJXtbQ68C+gSaKIszgi/1sIMKDvdSqj9BTpMRL+YSRtnDVzPilfhNRfr9COdGnRd B2+Jx8HoNlZg1zDwJjPJjV8ZZOidWxxT2GQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1628181655825100005 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Andrei Warkentin --- Platform/RaspberryPi/AcpiTables/Pci.asl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Platform/RaspberryPi/AcpiTables/Pci.asl b/Platform/RaspberryPi= /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", "RPI4P= CIE", 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", "RPI4P= CIE", 2) 2 // SANITIZED_PCIE_MMIO_LEN += 1 ,,,MMI1,,TypeTranslation ) + + QWordMemory ( // Root port registers, not to be used if SMCCC = is utilized + ResourceConsumer, , + MinFixed, MaxFixed, + NonCacheable, ReadWrite, // cacheable? is that right? + 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 -=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 (#78746): https://edk2.groups.io/g/devel/message/78746 Mute This Topic: https://groups.io/mt/84688820/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-