[edk2-devel] [PATCH edk2-platforms 1/1] Platform AARCH64: Drop bogus local copy of gArmMpCoreInfoPpiGuid GUID

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel There is a pattern that has been copy-pasted a number of times where a missing references in the INFs [Ppis] section is 'fixed' by creating a local GUID variable. Fix all of those. This is just a janitorial patch with no functional changes so fixing all of these in one go.

[edk2-devel] [PATCH RFC edk2-platforms 0/5] Phase out MPCore SEC drivers

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The original EDK2 port to 32-bit ARM supported multi-core but on today's ARM systems, only a single CPU enters the non-secure firmware and the MPCore drivers are obsolete. Stop using them in edk2-platforms so we can remove them entirely from edk2. Cc: Leif Lindholm Cc:

[edk2-devel] [PATCH RFC edk2-platforms 4/5] Platform/Durian: Switch to unicore SEC implementation

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Spec adherent AArch64 systems use PSCI to manage secondary CPUs, and only enter the execution level where UEFI and the OS live using a single CPU. This means using a SEC implementation of the MPCore variety is never needed, and in practice, those drivers don't work

[edk2-devel] [PATCH RFC edk2-platforms 3/5] Platform/Ampere: Switch to unicore SEC implementation

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Spec adherent AArch64 systems use PSCI to manage secondary CPUs, and only enter the execution level where UEFI and the OS live using a single CPU. This means using a SEC implementation of the MPCore variety is never needed, and in practice, those drivers don't work

[edk2-devel] [PATCH RFC edk2-platforms 5/5] Platform/HiSilicon/D0x: Switch to unicore SEC implementation

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Spec adherent AArch64 systems use PSCI to manage secondary CPUs, and only enter the execution level where UEFI and the OS live using a single CPU. This means using a SEC implementation of the MPCore variety is never needed, and in practice, those drivers don't work

[edk2-devel] [PATCH edk2-platforms v2 6/8] Platform/RaspberryPi/PlatformBootManagerLib: Reimplement reset hook

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Duplicate the logic that is triggered on a system reset into the platform boot manager driver, and hook it up to the EDK2 platform specific reset notification driver. This is supported by generic EDK2 code in MdeModulePkg, allowing us to retire the platform-specific

[edk2-devel] [PATCH RFC edk2-platforms 1/5] Platform AARCH64: Drop leftover references to deleted timer PCD

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz was made obsolete as AArch64 firmware runs in the non-secure world while programming the timer frequency must be done from the secure world. Drop some remaining references to the PCD. Signed-off-by: Ard Biesheuvel ---

[edk2-devel] [PATCH RFC edk2-platforms 2/5] Platform AARCH64: Remove bogus references to MPCore stack

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Remove references to the MPCore stack from platforms that do not use the MPCore SEC implementations to begin with. Signed-off-by: Ard Biesheuvel --- Platform/ARM/Morello/MorelloPlatform.dsc.inc| 2 -- Platform/ARM/SgiPkg/SgiPlatform.dsc.inc

[edk2-devel] [PATCH edk2-platforms v2 7/8] Platform/RaspberryPi: Switch to generic reset runtime

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Drop the reference to the special reset runtime DXE driver in EmbeddedPkg, and move to the one in MdeModulePkg shared between all architectures. This version implements reset notifications, allowing us to retire the home grown version of that functionality in a subsequent

[edk2-devel] [PATCH edk2-platforms v2 8/8] Platform/RaspberryPi: Drop platform specific EfiResetSystemLib

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Drop the now unused EfiResetSystemLib implementation, which has been superseded by the generic one from EDK2. Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/RaspberryPi/RaspberryPi.dec | 1 -

[edk2-devel] [PATCH edk2-platforms v2 3/8] Platform/RaspberryPi: Use depex based dispatch order for varstore

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The VarBlockServiceDxe driver needs to be dispatched before the common VariableRuntimeDxe, but we are currently relying on FDF order and lack of transitive dependencies for this, which is fragile, and will break once we move to the generic reset runtime. So use the existing

[edk2-devel] [PATCH edk2-platforms v2 4/8] Platform/RaspberryPi/VarBlockServiceDxe: Refactor DumpVars event handler

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The DumpVars() routine is called directly and via an event notification callback, and the latter therefore defines the function's prototype, even though the arguments are unused. We will introduce another callback into this logic, but via a reset notifier, which has yet

[edk2-devel] [PATCH edk2-platforms v2 2/8] Platform/RaspberryPi: Fix line endings in DSCs

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Get rid of spurious LF-only line endings. Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/RaspberryPi/RPi3/RPi3.dsc | 2 +- Platform/RaspberryPi/RPi4/RPi4.dsc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[edk2-devel] [PATCH edk2-platforms v2 5/8] Platform/RaspberryPi/VarBlockServiceDxe: Register for reset notification

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel In addition to setting up the home grown reset notification, register with the generic EFI protocol that does the same. This event is triggered from the reset runtime implemented in MdeModulePkg, to which we will be switching the RPi platforms in a subsequent patch.

[edk2-devel] [PATCH edk2-platforms v2 1/8] Platform/RaspberryPi: Mark RAM regions as write/execute protectable

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Mark RAM ranges as write/execute protectable in the GCD memory map. This is needed to avoid issues with NonCoherentDmaLib in EmbeddedPkg, which will fail if it does not manage to set the EFI_MEMORY_XP attribute on the allocated DMA buffers. Signed-off-by: Ard Biesheuvel

[edk2-devel] [PATCH edk2-platforms v2 0/8] RPi: Drop EmbeddedPkg reset runtime

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The EmbeddedPkg runtime DXE is being retired in favour of the generic one in MdeModulePkg which is actually being maintained. RPi uses this driver and the associated EfiResetSystemLib, of which it has an implementation with value-add for reset notification. So this logic

[edk2-devel] [PATCH edk2-platforms 5/5] Platform/RaspberryPi: Drop platform specific EfiResetSystemLib

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Drop the now unused EfiResetSystemLib implementation, which has been superseded by the generic one from EDK2. Signed-off-by: Ard Biesheuvel --- Platform/RaspberryPi/RaspberryPi.dec | 1 -

[edk2-devel] [PATCH edk2-platforms 4/5] Platform/RaspberryPi: Switch to generic reset runtime

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Drop the reference to the special reset runtime DXE driver in EmbeddedPkg, and move to the one in MdeModulePkg shared between all architectures. This version implements reset notifications, allowing us to retire the home grown version of that functionality in a subsequent

[edk2-devel] [PATCH edk2-platforms 3/5] Platform/RaspberryPi/PlatformBootManagerLib: Reimplement reset hook

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Duplicate the logic that is triggered on a system reset into the platform boot manager driver, and hook it up to the EDK2 platform specific reset notification driver. This is supported by generic EDK2 code in MdeModulePkg, allowing us to retire the platform-specific

[edk2-devel] [PATCH edk2-platforms 0/5] RPi: Drop EmbeddedPkg reset runtime

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The EmbeddedPkg runtime DXE is being retired in favour of the generic one in MdeModulePkg which is actually being maintained. RPi uses this driver and the associated EfiResetSystemLib, of which it has an implementation with value-add for reset notification. So this logic

[edk2-devel] [PATCH edk2-platforms 1/5] Platform/RaspberryPi/VarBlockServiceDxe: Refactor DumpVars event handler

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The DumpVars() routine is called directly and via an event notification callback, and the latter therefore defines the function's prototype, even though the arguments are unused. We will introduce another callback into this logic, but via a reset notifier, which has yet

[edk2-devel] [PATCH edk2-platforms 11/11] Silicon/Phytium: Switch to generic ArmPsciResetSystemLib

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The PSCI reset libraries in ArmPkg are being consolidated into a single one to reduce the maintenance burden of having multiple libraries doing the same thing in a slightly different way. Move this platform to the generic ArmPsciResetSystemLib, and drop the dependency on

[edk2-devel] [PATCH edk2-platforms 06/11] Platform/SynQuacer: Switch to generic ArmPsciResetSystemLib

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The PSCI reset libraries in ArmPkg are being consolidated into a single one to reduce the maintenance burden of having multiple libraries doing the same thing in a slightly different way. Move this platform to the generic ArmPsciResetSystemLib, and drop the dependency on

[edk2-devel] [PATCH edk2-platforms 07/11] Silicon/Ampere: Switch to generic ArmPsciResetSystemLib

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The PSCI reset libraries in ArmPkg are being consolidated into a single one to reduce the maintenance burden of having multiple libraries doing the same thing in a slightly different way. Move this platform to the generic ArmPsciResetSystemLib, and drop the dependency on

[edk2-devel] [PATCH edk2-platforms 09/11] Silicon/Armada7k8k: Switch to generic ArmPsciResetSystemLib

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The PSCI reset libraries in ArmPkg are being consolidated into a single one to reduce the maintenance burden of having multiple libraries doing the same thing in a slightly different way. Move this platform to the generic ArmPsciResetSystemLib, and drop the dependency on

[edk2-devel] [PATCH edk2-platforms 05/11] Platform/SbsaQemu: Switch to generic ArmPsciResetSystemLib

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The PSCI reset libraries in ArmPkg are being consolidated into a single one to reduce the maintenance burden of having multiple libraries doing the same thing in a slightly different way. Move this platform to the generic ArmPsciResetSystemLib, and drop the dependency on

[edk2-devel] [PATCH edk2-platforms 08/11] Silicon/HiSilicon: Switch to generic ArmPsciResetSystemLib

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The PSCI reset libraries in ArmPkg are being consolidated into a single one to reduce the maintenance burden of having multiple libraries doing the same thing in a slightly different way. Move this platform to the generic ArmPsciResetSystemLib, and drop the dependency on

[edk2-devel] [PATCH edk2-platforms 2/5] Platform/RaspberryPi/VarBlockServiceDxe: Register for reset notification

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel In addition to setting up the home grown reset notification, register with the generic EFI protocol that does the same. This event is triggered from the reset runtime implemented in MdeModulePkg, to which we will be switching the RPi platforms in a subsequent patch.

[edk2-devel] [PATCH edk2-platforms 10/11] Silicon/NxpQoriqLs: Switch to generic ArmPsciResetSystemLib

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The PSCI reset libraries in ArmPkg are being consolidated into a single one to reduce the maintenance burden of having multiple libraries doing the same thing in a slightly different way. Move this platform to the generic ArmPsciResetSystemLib, and drop the dependency on

[edk2-devel] [PATCH edk2-platforms 02/11] Silicon/SynQuacer: Fix CLANGDWARF build

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Drop the CLANG3x build options, and add ones for CLANGDWARF so that SynQuacer based platforms can be built with it. Instead of copying the -no-integrated-as option that CLANG3x used, let's fix the assembler code so it can be built with Clang's integrated assembler. Also

[edk2-devel] [PATCH edk2-platforms 00/11] Phase out ArmSmcPsciResetSystemLib

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel ArmSmcPsciResetSystemLib is being replaced with a generic implementation that is shared between physical and virtual placement, executing at either EL2 or EL1. So update all library class resolutions for ResetSystemLib and provide additional resolutions for its dependency

[edk2-devel] [PATCH edk2-platforms 03/11] Platform/AMD/Styx: Switch to generic ArmPsciResetSystemLib

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The PSCI reset libraries in ArmPkg are being consolidated into a single one to reduce the maintenance burden of having multiple libraries doing the same thing in a slightly different way. Move this platform to the generic ArmPsciResetSystemLib, and drop the dependency on

[edk2-devel] [PATCH edk2-platforms 04/11] Platform/ARM: Switch to generic ArmPsciResetSystemLib

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The PSCI reset libraries in ArmPkg are being consolidated into a single one to reduce the maintenance burden of having multiple libraries doing the same thing in a slightly different way. Move the ARM platforms to the generic ArmPsciResetSystemLib, and drop the dependency

[edk2-devel] [PATCH edk2-platforms 01/11] Platform,Silicon: Fix line endings

2024-07-30 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Fix some instances of a lone LF in DSCs that should all be CR-LF entirely. Signed-off-by: Ard Biesheuvel --- Silicon/Hisilicon/Hisilicon.dsc.inc | 2 +- Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 2 +-

[edk2-devel] [PATCH edk2-platforms 4/4] Platform/Phytium: Switch to generic ResetRuntime DXE driver

2024-07-23 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The reset runtime DXE driver is deprecated and will be removed soon. It is superseded by a generic implementation in MdeModulePkg, which is shared between all architectures, and implements the notification protocols that the EFI spec describes. So move the Phytium Durian

[edk2-devel] [PATCH edk2-platforms 2/4] Platform/LoongArchQemu: Drop bogus EfiResetSystemLib resolutions

2024-07-23 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The LoongArchQemuPkg platforms do not include any drivers that depend on a resolution for EfiResetSystemLib, and the provided resolutions of that library class do not refer to libraries of the correct type anyway. So just drop the bogus resolutions entirely. Signed-off-by:

[edk2-devel] [PATCH edk2-platforms 3/4] Platform/Ampere: Switch to generic ResetRuntime DXE driver

2024-07-23 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The reset runtime DXE driver is deprecated and will be removed soon. It is superseded by a generic implementation in MdeModulePkg, which is shared between all architectures, and implements the notification protocols that the EFI spec describes. So move the Ampere Jade

[edk2-devel] [PATCH edk2-platforms 0/4] Phase out ArmPsciResetSystemLib

2024-07-23 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Replace references to ArmPsciResetSystemLib, which implements the deprecated EfiResetSystemLib library class which is consumed only by the ResetRuntimeDxe in EmbeddedPkg, which should no longer be used. Cc: Leif Lindholm Cc: Oliver Smith-Denny Cc: Rebecca Cran Cc: Nhi

[edk2-devel] [PATCH edk2-platforms 1/4] Platform/*: Fix line endings in DSCs

2024-07-23 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Fix incorrect LFs in DSCs that should be CR-LF only. Signed-off-by: Ard Biesheuvel --- Silicon/Phytium/PhytiumCommonPkg/PhytiumCommonPkg.dsc.inc | 2 +- Platform/Loongson/LoongArchQemuPkg/Loongson.dsc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

[edk2-devel] [PATCH] ArmVirtPkg/ArmVirtQemu: always build XIP code with strict alignment

2024-04-19 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The optimization that enabled entry with MMU and caches enabled at EL1 removed the strict alignment requirement for XIP code (roughly, any code that might execute with the MMU and caches off, which means SEC and PEI phase modules but also *all* BASE libraries), on the basis

[edk2-devel] [PATCH 1/1] EmbeddedPkg/NonCoherentIoMmuDxe: Make SetAttributes always succeed

2024-03-12 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel NonCoherentIoMmuSetAttribute() does nothing except return EFI_UNSUPPORTED. This was fine when it was introduced, but now, the PCI bus driver will fail a PCI I/O Map() operation if the SetAttributes fails. So return EFI_SUCCESS instead. Signed-off-by: Ard Biesheuvel ---

[edk2-devel] [PATCH edk2-platforms 1/1] Platform/RPI4: Grow FV size to accommodate DEBUG build

2024-03-12 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The DEBUG build no longer fits when all build options used by the release script on github.com/pftf are used, presumably due to the OpenSSL upgrade. So bump the size for all builds. Signed-off-by: Ard Biesheuvel --- Platform/RaspberryPi/RPi4/RPi4.fdf | 14 +++---

[edk2-devel] [PATCH edk2-platforms 1/1] Maintainers: Remove Ard as Platform/ARM reviewer

2024-01-12 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Remove me as reviewer for ARM development platforms: I am no longer employed by ARM and have no access to or knowledge about ARM development/reference hardware. Signed-off-by: Ard Biesheuvel --- Maintainers.txt | 1 - 1 file changed, 1 deletion(-) diff --git

[edk2-devel] [PATCH edk2-platforms 1/1] Silicon/SynQuacer: Fix CLANGDWARF build

2023-12-26 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Drop the CLANG3x build options, and add ones for CLANGDWARF so that SynQuacer based platforms can be built with it. Instead of copying the -no-integrated-as option that CLANG3x used, let's fix the assembler code so it can be built with Clang's integrated assembler. Also

[edk2-devel] [PATCH edk2-platforms] Platform, Silicon: Drop AMD Seattle support

2023-12-19 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel AMD Seattle support in edk2-platforms is implemented using a number of closed source components delivered as binary drivers via edk2-non-osi, some of which have dependencies on internal EDK2 APIs that are not considered stable, and some of which have evolved over the years

[edk2-devel] [PATCH] ArmPkg/ArmMmuLib: Drop buggy secure memory type check

2023-09-12 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel Jake reports that the IS_ARM_MEMORY_REGION_ATTRIBUTES_SECURE() macro is no longer accurate since commit 852227a9d52e3cb9 ("ArmPkg/Mmu: Remove handling of NONSECURE memory regions"). Fortunately, it only affects the NS bit in level 1 short descriptors, which is ignored when