From nobody Mon Feb 9 20:09:58 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+59252+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59252+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1589270128; cv=none; d=zohomail.com; s=zohoarc; b=O3/meWhxC4A+kPnlPkdtN73rugy1Qln/quH8dX6zQb15mv42LI+Op453rp4wlWZI7jbX+bcsD9KLS/r9F9GsUOB+AOHfNSlfl9SXG6LLyr9ewb5plyC3JRCnI3ZCJRY4UBkEi5/bS2Noaoc1TqCvWS/yfwmTO9VISIsjxT+QERE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589270128; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=t/GmMHYYSEa6fSGq36GebCVVvIuUAy62FHRlzo+0Kvk=; b=hcEUwrQRTNN69Ip1WhMElhfGsU87mwKEJamS/Al7aOn6m3ACrNIC3FDNd8IHMHi1m5T2V9wllp9pLt153dLfg0Je2s8UzPb5G71DNUMeufNXP82qqFWWE7u+jkwBcgSOqdTU+IjQiRusILVDXOXw3QstF94USlBMq2E14kfUtEE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+59252+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 15892701282901022.9959926467799; Tue, 12 May 2020 00:55:28 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id HdGnYY1788612xAzPjnYQ0uT; Tue, 12 May 2020 00:55:27 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.1655.1589270127226670289 for ; Tue, 12 May 2020 00:55:27 -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 EE2A81FB; Tue, 12 May 2020 00:55:26 -0700 (PDT) X-Received: from e123331-lin.nice.arm.com (unknown [10.37.8.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BF7203F305; Tue, 12 May 2020 00:55:25 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: leif@nuviainc.com, philmd@redhat.com, Andrei Warkentin , Ard Biesheuvel Subject: [edk2-devel] [PATCH edk2-platforms v2 6/7] Platform/RaspberryPi4: Remove PlatformPcdLib Date: Tue, 12 May 2020 09:55:11 +0200 Message-Id: <20200512075512.12645-7-ard.biesheuvel@arm.com> In-Reply-To: <20200512075512.12645-1-ard.biesheuvel@arm.com> References: <20200512075512.12645-1-ard.biesheuvel@arm.com> 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,ard.biesheuvel@arm.com X-Gm-Message-State: lQMEZg7VFL30rUwHffhainRdx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589270127; bh=5B+D01pvddpa9ktJQ6KRc5gW9UHvqNIN0ahy04AkEL4=; h=Cc:Date:From:Reply-To:Subject:To; b=i+OrhcqMD/JTCHkq3qxKE5vRRz9CALMzVHZZ3FMtujUIvmJl4r8bYVjCiXWcXD8Mb1I 4vwHagVva+mLZUswXcDWRucT4xmfwmYQJ7OQhtf4qPf2GWwqSdlp08a26Kq6NfxdAQSuM WxzAyr0HMp4lnyn80I0tWvRJK1YXpEYcfyg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Andrei Warkentin Remove the PlatformPcdLib. It is completely unnecessary. Originally, this was meant for the GENET driver, but now that ConfigDxe registers the platform device, the library is superfluous. Signed-off-by: Ard Biesheuvel --- Platform/RaspberryPi/RaspberryPi.dec | 3 -- Platform/RaspberryPi/RPi4/RPi4.dsc | 2 - Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf | 44 ------= ------------- Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c | 45 ------= -------------- 4 files changed, 94 deletions(-) diff --git a/Platform/RaspberryPi/RaspberryPi.dec b/Platform/RaspberryPi/Ra= spberryPi.dec index 7a22621a6905..1a3c44e0eb01 100644 --- a/Platform/RaspberryPi/RaspberryPi.dec +++ b/Platform/RaspberryPi/RaspberryPi.dec @@ -68,6 +68,3 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, Pc= dsDynamicEx] gRaspberryPiTokenSpaceGuid.PcdSystemTableMode|1|UINT32|0x0000001B gRaspberryPiTokenSpaceGuid.PcdRamMoreThan3GB|0|UINT32|0x00000019 gRaspberryPiTokenSpaceGuid.PcdRamLimitTo3GB|0|UINT32|0x0000001A - -[PcdsDynamic] - gRaspberryPiTokenSpaceGuid.PcdBcmGenetMacAddress|0x0|UINT64|0x00000040 diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4= /RPi4.dsc index 0dca782c9058..5910082deb04 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.dsc +++ b/Platform/RaspberryPi/RPi4/RPi4.dsc @@ -683,8 +683,6 @@ [Components.common] # !include NetworkPkg/Network.dsc.inc Silicon/Broadcom/Drivers/Net/BcmGenetDxe/BcmGenetDxe.inf { - - NULL|Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf gEmbeddedTokenSpaceGuid.PcdDmaDeviceOffset|0x00000000 gEmbeddedTokenSpaceGuid.PcdDmaDeviceLimit|0xffffffff diff --git a/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf= b/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf deleted file mode 100644 index c97453e4e7c1..000000000000 --- a/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf +++ /dev/null @@ -1,44 +0,0 @@ -#/** @file -# -# Copyright (c) 2020, Pete Batard -# -# SPDX-License-Identifier: BSD-2-Clause-Patent -# -#**/ - -[Defines] - INF_VERSION =3D 0x0001001A - BASE_NAME =3D PlatformPcdLib - FILE_GUID =3D 3B8409D7-D3C7-4006-823B-BFB184435363 - MODULE_TYPE =3D DXE_DRIVER - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D NULL|DXE_DRIVER UEFI_APPLICATION - CONSTRUCTOR =3D PlatformPcdLibConstructor - -[Sources] - PlatformPcdLib.c - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - Platform/RaspberryPi/RaspberryPi.dec - Silicon/Broadcom/Drivers/Net/BcmNet.dec - Silicon/Broadcom/Bcm27xx/Bcm27xx.dec - -[LibraryClasses] - DebugLib - PcdLib - UefiLib - PrintLib - -[Protocols] - gRaspberryPiFirmwareProtocolGuid ## CONSUMES - -[Pcd] - gRaspberryPiTokenSpaceGuid.PcdBcmGenetMacAddress ## SOMETIMES_PRODUCES - -[FixedPcd] - gBcm27xxTokenSpaceGuid.PcdBcmGenetRegistersAddress - -[Depex] - gRaspberryPiFirmwareProtocolGuid diff --git a/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c b= /Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c deleted file mode 100644 index e78518c81374..000000000000 --- a/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c +++ /dev/null @@ -1,45 +0,0 @@ -/** @file - * - * Copyright (c) 2020, Pete Batard - * - * SPDX-License-Identifier: BSD-2-Clause-Patent - * - **/ - -#include -#include -#include -#include -#include -#include -#include - -EFI_STATUS -EFIAPI -PlatformPcdLibConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - EFI_STATUS Status; - UINT64 MacAddr; - RASPBERRY_PI_FIRMWARE_PROTOCOL *mFwProtocol; - - if (PcdGet64 (PcdBcmGenetMacAddress) =3D=3D 0) { - Status =3D gBS->LocateProtocol (&gRaspberryPiFirmwareProtocolGuid, NUL= L, - (VOID**)&mFwProtocol); - ASSERT_EFI_ERROR(Status); - - // - // Get the MAC address from the firmware - // - Status =3D mFwProtocol->GetMacAddress ((UINT8*) &MacAddr); - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_WARN, "%a: failed to retrieve MAC address\n", __FUNCTI= ON__)); - } else { - PcdSet64S (PcdBcmGenetMacAddress, MacAddr); - } - } - - return EFI_SUCCESS; -} --=20 2.17.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 (#59252): https://edk2.groups.io/g/devel/message/59252 Mute This Topic: https://groups.io/mt/74154335/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-