From nobody Tue Feb 10 03:38:18 2026 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+75042+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+75042+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1620772916; cv=none; d=zohomail.com; s=zohoarc; b=VJQHXmY4DSf6gSQObs9IH326tkSquTgbwKDyXY7N49NdOl26e+Ch2sKdlojiIZrP7c68vu8TEz1oEfluIy0E/c30Rezkd6avAbS3beG3AEK2rHw2DKzhxon6dDapgD+iVHIrNbnebszSIKKVfgDhfDGTSwy9WqprviChGGnJSgw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620772916; 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=ammcqqw7GEUtnbV002qgMbro0UM6+1zr57jQBcoUHdg=; b=Qludg4kLq+IhUl8A2/nSf18j4ON8guVnjtAOULvUDjz0lHoHCfOBhK1fGZIuBfRUt6UE7tYnvyLemtW6DzZ5koeB40QCrfFf1zmfafG2clLu2HToTOg02Ot2kx4yVYjB64Js6E1QgzWJG3bJNidoBgqhTO1Mh+dheBwzHDyQ33s= 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+75042+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1620772916252381.7302615262721; Tue, 11 May 2021 15:41:56 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id UQY6YY1788612xzzETOcL3OD; Tue, 11 May 2021 15:41:55 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.4281.1620772915177083806 for ; Tue, 11 May 2021 15:41:55 -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 BF940D6E; Tue, 11 May 2021 15:41:54 -0700 (PDT) X-Received: from mammon-tx2.austin.arm.com (mammon-tx2.austin.arm.com [10.118.28.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id ACE703F718; Tue, 11 May 2021 15:41:54 -0700 (PDT) From: "Jeremy Linton" To: devel@edk2.groups.io Cc: ardb+tianocore@kernel.org, pete@akeo.ie, samer.el-haj-mahmoud@arm.com, awarkentin@vmware.com, Jeremy Linton Subject: [edk2-devel] [PATCH 1/2] Platform/Raspberrypi: Update DMA constants based on SOC revision Date: Tue, 11 May 2021 17:41:48 -0500 Message-Id: <20210511224149.864718-2-jeremy.linton@arm.com> In-Reply-To: <20210511224149.864718-1-jeremy.linton@arm.com> References: <20210511224149.864718-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: weGz2zzwwF6A1gsoaJh1ootax1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1620772915; bh=kHbO2AlnW5oHHcWmRn/JA/3tHS0Q7K2YlaFp0hPdK/w=; h=Cc:Date:From:Reply-To:Subject:To; b=D7UpFZXusAgjeGEzIpw8JbyNmpvqtPhJzZswQ2L0T2HLoDNDc7MzwfViJiRqLeVr714 5QYGft31V7rVYQVVuLT8RqnuFck/qc4ie28EKw67aZPjOQ9MXef8Qb8toHxxUOeH0uFY8 xVOWmXq4y4HBLz835c7YdB5+3G+InO90yVU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The newer BCM2711 SoC's don't have a DMA constraint on the emmc2 controller. So we don't need to do the 1G translation. Lets allow the AML to detect the SoC revision and return a different _DMA resource. Signed-off-by: Jeremy Linton Reviewed-by: Pete Batard --- Platform/RaspberryPi/AcpiTables/Emmc.asl | 39 ++++++++++++++++++= +++- .../Bcm27xx/Include/IndustryStandard/Bcm2711.h | 2 ++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/Platform/RaspberryPi/AcpiTables/Emmc.asl b/Platform/RaspberryP= i/AcpiTables/Emmc.asl index 23febe37b4..c6691e81dc 100644 --- a/Platform/RaspberryPi/AcpiTables/Emmc.asl +++ b/Platform/RaspberryPi/AcpiTables/Emmc.asl @@ -8,6 +8,7 @@ =20 #include #include +#include =20 #include "AcpiTables.h" =20 @@ -31,7 +32,8 @@ DefinitionBlock (__FILE__, "SSDT", 2, "RPIFDN", "RPI4EMMC= ", 2) Return (^RBUF) } =20 - Name (_DMA, ResourceTemplate() { + // Translated DMA region for < C0 + Name (DMTR, ResourceTemplate() { QWordMemory (ResourceProducer, , MinFixed, @@ -48,6 +50,41 @@ DefinitionBlock (__FILE__, "SSDT", 2, "RPIFDN", "RPI4EMM= C", 2) ) }) =20 + // Non translated DMA region for >=3D C0 + Name (DMNT, ResourceTemplate() { + QWordMemory (ResourceProducer, + , + MinFixed, + MaxFixed, + NonCacheable, + ReadWrite, + 0x0, + 0x0000000000000000, // MIN + 0x000000FFFFFFFFFF, // MAX + 0x0000000000000000, // TRA + 0x0000010000000000, // LEN + , + , + ) + }) + + Method (_DMA, 0x0, Serialized) + { + OperationRegion (CHPR, SystemMemory, ID_CHIPREV, 0x4) + Field (CHPR, DWordAcc, NoLock, Preserve) { + SOCI, 32 + } + + if ((SOCI & 0xFF) >=3D 0x20) + { + return (^DMNT); + } + else + { + return (^DMTR); + } + } + // emmc2 Host Controller. (brcm,bcm2711-emmc2) Device (SDC3) { diff --git a/Silicon/Broadcom/Bcm27xx/Include/IndustryStandard/Bcm2711.h b/= Silicon/Broadcom/Bcm27xx/Include/IndustryStandard/Bcm2711.h index 86906b2438..8a69128d11 100644 --- a/Silicon/Broadcom/Bcm27xx/Include/IndustryStandard/Bcm2711.h +++ b/Silicon/Broadcom/Bcm27xx/Include/IndustryStandard/Bcm2711.h @@ -88,4 +88,6 @@ =20 #define THERM_SENSOR 0xfd5d2200 =20 +#define ID_CHIPREV 0xfc404000 + #endif /* BCM2711_H__ */ --=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 (#75042): https://edk2.groups.io/g/devel/message/75042 Mute This Topic: https://groups.io/mt/82759461/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-