From nobody Tue Feb 10 03:44:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+50695+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50695+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1573747687; cv=none; d=zoho.com; s=zohoarc; b=hhULO2uWUrZKD2djlhez34XSqx4B3hxPa53yCYH2KAJllK+BO35STbBnbdAiKyR5KjmMcA6atCfpemzNGHOObf56S6lQig6nrbTLyDlVKaSmrEKZV7eGlawWuk2RaP7OeJk3Ktcvld+sxcUOkwUAgROGzElH2AV8mdPGhMnglRM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573747687; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=iEgIhl9OZLllJSMy4GHJdJHO7qa7oPgzB9xDw8kGgzw=; b=LlfS0SaNYpXt6VNnnsvaetYQI/FJyvx1UFMcd1PJAoDp4W9wScQrkoOerx4qk6jvnyETdo6NgydDLAnwTKpcbPjDuMjzXnEDn5seBFXCeFfIPsCoHQG7IDgT4Ybvjx/jqHNeu3/z3/228/B9vPPRLNHDykAnBJOLbVnvpxFCb3o= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+50695+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1573747687004296.84731369379585; Thu, 14 Nov 2019 08:08:07 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 2k6OYY1788612xoJceUBXHLy; Thu, 14 Nov 2019 08:08:06 -0800 X-Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by mx.groups.io with SMTP id smtpd.web11.6525.1573747684925150847 for ; Thu, 14 Nov 2019 08:08:05 -0800 X-Received: by mail-wm1-f68.google.com with SMTP id z19so6532088wmk.3 for ; Thu, 14 Nov 2019 08:08:04 -0800 (PST) X-Gm-Message-State: MWeQW9tfc4oau5MikRWia947x1787277AA= X-Google-Smtp-Source: APXvYqyapV+L8o4o1NGb3HLpSpk5QAudc0Szbp3xIduIitqwgvwDBvg89rqCNOCF1sGFW0Fq1A0/rg== X-Received: by 2002:a1c:2d4b:: with SMTP id t72mr9291591wmt.112.1573747683104; Thu, 14 Nov 2019 08:08:03 -0800 (PST) X-Received: from localhost.localdomain ([84.203.67.47]) by smtp.gmail.com with ESMTPSA id a16sm6793088wmd.11.2019.11.14.08.08.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Nov 2019 08:08:02 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, philmd@redhat.com Subject: [edk2-devel] [edk2-platforms][PATCH 6/8] Platform/RPi: Replace Mailbox and Watchdog addresses with PCDs Date: Thu, 14 Nov 2019 16:07:38 +0000 Message-Id: <20191114160740.10072-7-pete@akeo.ie> In-Reply-To: <20191114160740.10072-1-pete@akeo.ie> References: <20191114160740.10072-1-pete@akeo.ie> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1573747686; bh=BH+rrfnmyjf59txNSZf5pv44myuFGZUx9akbmuXh9hM=; h=Cc:Date:From:Reply-To:Subject:To; b=hNurLeLOm5mZF8NPyVYrb8ggQITmozIusdjEzM0k5G0FJosAeLHeHRvb/X346OE3zq2 GKiMdIYO+N5Ufw5YGqRtNT++/baK2e08uIcb+LpseXX4V2jgBFwu+AQiXs2c/8xiIJeKI 1s9gNKvifjpSKK4x2pg6GhM1i2PRwIqL4uo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Samer El-Haj-Mahmoud Set BCM2836_WDOG_BASE_ADDRESS and BCM2836_MBOX_BASE_ADDRESS to using PCDs instead of hard-coded addresses. This is needed in preparation for adding Raspberry Pi 4 support. Signed-off-by: Pete Batard --- Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.inf | 1 + Platform/RaspberryPi/Library/PlatformLib/PlatformLib.inf | 1 + Platform/RaspberryPi/RPi3/RPi3.dsc | 3 +++ Silicon/Broadcom/Bcm283x/Bcm283x.dec | 2 ++ Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h | 4 ++-- 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.inf= b/Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.inf index a3fc0fa49a3c..527cee8bacc1 100644 --- a/Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.inf +++ b/Platform/RaspberryPi/Drivers/RpiFirmwareDxe/RpiFirmwareDxe.inf @@ -42,6 +42,7 @@ [Protocols] =20 [FixedPcd] gBcm283xTokenSpaceGuid.PcdBcm283xRegistersAddress + gBcm283xTokenSpaceGuid.PcdMboxBaseAddress =20 [Depex] TRUE diff --git a/Platform/RaspberryPi/Library/PlatformLib/PlatformLib.inf b/Pla= tform/RaspberryPi/Library/PlatformLib/PlatformLib.inf index c0e2a75451c3..f627fca2e406 100644 --- a/Platform/RaspberryPi/Library/PlatformLib/PlatformLib.inf +++ b/Platform/RaspberryPi/Library/PlatformLib/PlatformLib.inf @@ -58,6 +58,7 @@ [FixedPcd] gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize gBcm27xxTokenSpaceGuid.PcdBcm27xxRegistersAddress gBcm283xTokenSpaceGuid.PcdBcm283xRegistersAddress + gBcm283xTokenSpaceGuid.PcdMboxBaseAddress =20 [Ppis] gArmMpCoreInfoPpiGuid diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc b/Platform/RaspberryPi/RPi3= /RPi3.dsc index 4e5a9f0b05e6..88af37e6edaa 100644 --- a/Platform/RaspberryPi/RPi3/RPi3.dsc +++ b/Platform/RaspberryPi/RPi3/RPi3.dsc @@ -376,6 +376,9 @@ [PcdsFixedAtBuild.common] # Device specific addresses # gBcm283xTokenSpaceGuid.PcdBcm283xRegistersAddress|0x3f000000 + gBcm283xTokenSpaceGuid.PcdMboxBaseAddress|0x3f00b880 + gBcm283xTokenSpaceGuid.PcdWdogBaseAddress|0x3f100000 + ## NS16550 compatible UART gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x3f215040 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE diff --git a/Silicon/Broadcom/Bcm283x/Bcm283x.dec b/Silicon/Broadcom/Bcm283= x/Bcm283x.dec index 5b839b00d286..fe1907cb8cf1 100644 --- a/Silicon/Broadcom/Bcm283x/Bcm283x.dec +++ b/Silicon/Broadcom/Bcm283x/Bcm283x.dec @@ -21,3 +21,5 @@ [Guids] =20 [PcdsFixedAtBuild.common] gBcm283xTokenSpaceGuid.PcdBcm283xRegistersAddress|0x0|UINT32|0x00000001 + gBcm283xTokenSpaceGuid.PcdMboxBaseAddress|0x0|UINT32|0x00000002 + gBcm283xTokenSpaceGuid.PcdWdogBaseAddress|0x0|UINT32|0x00000003 diff --git a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h b/= Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h index 8bd68c234bfd..6bc21f0ddcf8 100644 --- a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h +++ b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h @@ -23,7 +23,7 @@ #define BCM2836_DMA_DEVICE_OFFSET 0xc0000000 =20 /* watchdog constants */ -#define BCM2836_WDOG_BASE_ADDRESS 0x3f100000 +#define BCM2836_WDOG_BASE_ADDRESS (FixedPcdGet64= (PcdWdogBaseAddress)) #define BCM2836_WDOG_PASSWORD 0x5a000000 #define BCM2836_WDOG_RSTC_OFFSET 0x0000001c #define BCM2836_WDOG_WDOG_OFFSET 0x00000024 @@ -31,7 +31,7 @@ #define BCM2836_WDOG_RSTC_WRCFG_FULL_RESET 0x00000020 =20 /* mailbox interface constants */ -#define BCM2836_MBOX_BASE_ADDRESS 0x3f00b880 +#define BCM2836_MBOX_BASE_ADDRESS (FixedPcdGet64= (PcdMboxBaseAddress)) #define BCM2836_MBOX_READ_OFFSET 0x00000000 #define BCM2836_MBOX_STATUS_OFFSET 0x00000018 #define BCM2836_MBOX_CONFIG_OFFSET 0x0000001c --=20 2.21.0.windows.1 -=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 (#50695): https://edk2.groups.io/g/devel/message/50695 Mute This Topic: https://groups.io/mt/57792653/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-