[edk2-devel] [PATCH edk2-platforms 1/2] Platform/BeagleBoard: Drop PeCoff protocol

Ard Biesheuvel ardb at kernel.org
Mon Feb 13 11:13:38 UTC 2023


BeagleBoard is the only user of the so-called 'PE/COFF protocol', which
just exposes the PE/COFF loader library API via a protocol, presumably
to avoid duplicating this code in the PrePi SEC component as well as the
DXE core.

This is a rather questionable practice, and it would be better to drop
this code so we can remove it from the EDK2 main repo as well.

Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
---
 Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc                          |  6 +--
 Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf | 39 --------------------
 2 files changed, 2 insertions(+), 43 deletions(-)

diff --git a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
index d44f4771c622..0834770a6292 100644
--- a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
+++ b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
@@ -167,8 +167,7 @@ [LibraryClasses.common.DXE_CORE]
   DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
   ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
-#  PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
-  PeCoffLib|Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf
+  PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
 
 [LibraryClasses.common.DXE_DRIVER]
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
@@ -190,8 +189,7 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER]
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
-#  PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
-  PeCoffLib|Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf
+  PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf
 
 
diff --git a/Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf b/Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf
deleted file mode 100644
index 654bd8c874f3..000000000000
--- a/Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf
+++ /dev/null
@@ -1,39 +0,0 @@
-#/** @file
-#  PE/COFF Loader Library implementation that wraps a protocol passed up from
-#  SEC/PEI via a HOB. This is done to save space.
-#
-#  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
-#  Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
-#  SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-#
-#**/
-
-[Defines]
-  INF_VERSION                    = 0x00010005
-  BASE_NAME                      = DxeHobPeCoffLib
-  FILE_GUID                      = 671C6FD7-99FB-4EE3-B640-4B1D463BC3B5
-  MODULE_TYPE                    = DXE_DRIVER
-  VERSION_STRING                 = 1.0
-  LIBRARY_CLASS                  = PeCoffLib
-  CONSTRUCTOR                    = DxeHobPeCoffLibConstructor
-
-
-#
-#  VALID_ARCHITECTURES           = IA32 X64 EBC ARM
-#
-
-[Sources.common]
-  DxeHobPeCoff.c
-
-
-[Packages]
-  MdePkg/MdePkg.dec
-  EmbeddedPkg/EmbeddedPkg.dec
-
-[LibraryClasses]
-  DebugLib
-  HobLib
-
-[Protocols]
-  gPeCoffLoaderProtocolGuid
-- 
2.39.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100077): https://edk2.groups.io/g/devel/message/100077
Mute This Topic: https://groups.io/mt/96933404/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list