* [PATCH edk2-platforms 0/2] Couple of ARM cleanups
@ 2023-02-13 11:13 Ard Biesheuvel
2023-02-13 11:13 ` [PATCH edk2-platforms 1/2] Platform/BeagleBoard: Drop PeCoff protocol Ard Biesheuvel
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2023-02-13 11:13 UTC (permalink / raw)
To: devel; +Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Rebecca Cran
A pair of cleanups regarding the use of code that I will propose to
remove from the core EDK2 in an upcoming series.
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Ard Biesheuvel (2):
Platform/BeagleBoard: Drop PeCoff protocol
Silicon/Marvell: Drop use of NONSECURE ARM memory region type
Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc | 6 +--
Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf | 39 --------------------
Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c | 2 +-
3 files changed, 3 insertions(+), 44 deletions(-)
delete mode 100644 Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf
--
2.39.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH edk2-platforms 1/2] Platform/BeagleBoard: Drop PeCoff protocol
2023-02-13 11:13 [PATCH edk2-platforms 0/2] Couple of ARM cleanups Ard Biesheuvel
@ 2023-02-13 11:13 ` Ard Biesheuvel
2023-02-13 11:13 ` [PATCH edk2-platforms 2/2] Silicon/Marvell: Drop use of NONSECURE ARM memory region type Ard Biesheuvel
2023-02-15 10:53 ` [PATCH edk2-platforms 0/2] Couple of ARM cleanups Leif Lindholm
2 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2023-02-13 11:13 UTC (permalink / raw)
To: devel; +Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Rebecca Cran
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@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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH edk2-platforms 2/2] Silicon/Marvell: Drop use of NONSECURE ARM memory region type
2023-02-13 11:13 [PATCH edk2-platforms 0/2] Couple of ARM cleanups Ard Biesheuvel
2023-02-13 11:13 ` [PATCH edk2-platforms 1/2] Platform/BeagleBoard: Drop PeCoff protocol Ard Biesheuvel
@ 2023-02-13 11:13 ` Ard Biesheuvel
2023-02-15 10:53 ` [PATCH edk2-platforms 0/2] Couple of ARM cleanups Leif Lindholm
2 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2023-02-13 11:13 UTC (permalink / raw)
To: devel; +Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Rebecca Cran
The ARM memory region types with the NONSECURE qualification should only
be used in places where this makes a difference, i.e., in the secure
world. The Marvell firmware generally runs at EL2, which is non-secure
only (in ARM v8.0) so the NONSECURE marking is unnecessary here, and
should be dropped.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c
index 43aacb7a1133..026947c1077e 100644
--- a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c
+++ b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c
@@ -25,7 +25,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 16
// DDR attributes
-#define DDR_ATTRIBUTES_CACHED ARM_MEMORY_REGION_ATTRIBUTE_NONSECURE_WRITE_BACK
+#define DDR_ATTRIBUTES_CACHED ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK
#define DDR_ATTRIBUTES_UNCACHED ARM_MEMORY_REGION_ATTRIBUTE_UNCACHED_UNBUFFERED
STATIC ARM_MEMORY_REGION_DESCRIPTOR mVirtualMemoryTable[MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS];
--
2.39.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH edk2-platforms 0/2] Couple of ARM cleanups
2023-02-13 11:13 [PATCH edk2-platforms 0/2] Couple of ARM cleanups Ard Biesheuvel
2023-02-13 11:13 ` [PATCH edk2-platforms 1/2] Platform/BeagleBoard: Drop PeCoff protocol Ard Biesheuvel
2023-02-13 11:13 ` [PATCH edk2-platforms 2/2] Silicon/Marvell: Drop use of NONSECURE ARM memory region type Ard Biesheuvel
@ 2023-02-15 10:53 ` Leif Lindholm
2023-02-15 18:35 ` Ard Biesheuvel
2 siblings, 1 reply; 5+ messages in thread
From: Leif Lindholm @ 2023-02-15 10:53 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: devel, Sami Mujawar, Rebecca Cran
On Mon, Feb 13, 2023 at 12:13:37 +0100, Ard Biesheuvel wrote:
> A pair of cleanups regarding the use of code that I will propose to
> remove from the core EDK2 in an upcoming series.
>
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Cc: Rebecca Cran <rebecca@bsdio.com>
For series:
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
> Ard Biesheuvel (2):
> Platform/BeagleBoard: Drop PeCoff protocol
> Silicon/Marvell: Drop use of NONSECURE ARM memory region type
>
> Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc | 6 +--
> Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf | 39 --------------------
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c | 2 +-
> 3 files changed, 3 insertions(+), 44 deletions(-)
> delete mode 100644 Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf
>
> --
> 2.39.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH edk2-platforms 0/2] Couple of ARM cleanups
2023-02-15 10:53 ` [PATCH edk2-platforms 0/2] Couple of ARM cleanups Leif Lindholm
@ 2023-02-15 18:35 ` Ard Biesheuvel
0 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2023-02-15 18:35 UTC (permalink / raw)
To: Leif Lindholm; +Cc: devel, Sami Mujawar, Rebecca Cran
On Wed, 15 Feb 2023 at 11:53, Leif Lindholm <quic_llindhol@quicinc.com> wrote:
>
> On Mon, Feb 13, 2023 at 12:13:37 +0100, Ard Biesheuvel wrote:
> > A pair of cleanups regarding the use of code that I will propose to
> > remove from the core EDK2 in an upcoming series.
> >
> > Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> > Cc: Sami Mujawar <sami.mujawar@arm.com>
> > Cc: Rebecca Cran <rebecca@bsdio.com>
>
> For series:
> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
>
Thanks.
Pushed as e2353ad640d5..f5bca45953a6
>
> > Ard Biesheuvel (2):
> > Platform/BeagleBoard: Drop PeCoff protocol
> > Silicon/Marvell: Drop use of NONSECURE ARM memory region type
> >
> > Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc | 6 +--
> > Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf | 39 --------------------
> > Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c | 2 +-
> > 3 files changed, 3 insertions(+), 44 deletions(-)
> > delete mode 100644 Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf
> >
> > --
> > 2.39.1
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-15 18:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-13 11:13 [PATCH edk2-platforms 0/2] Couple of ARM cleanups Ard Biesheuvel
2023-02-13 11:13 ` [PATCH edk2-platforms 1/2] Platform/BeagleBoard: Drop PeCoff protocol Ard Biesheuvel
2023-02-13 11:13 ` [PATCH edk2-platforms 2/2] Silicon/Marvell: Drop use of NONSECURE ARM memory region type Ard Biesheuvel
2023-02-15 10:53 ` [PATCH edk2-platforms 0/2] Couple of ARM cleanups Leif Lindholm
2023-02-15 18:35 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox