Re: [edk2-devel] [PATCH] ArmVirtPkg: Allow EFI memory attributes protocol to be disabled

2023-12-06 Thread Ard Biesheuvel
0:00:00 2001 > From: Gerd Hoffmann > Date: Wed, 6 Dec 2023 13:00:53 +0100 > Subject: [PATCH 1/1] ArmVirtPkg: add runtime option to enable/disable > MemoryAttributesProtocol > > Based on a patch by Ard Biesheuvel > > Usage: > qemu-system-aarch64 $args \ > -

Re: [edk2-devel] [PATCH v2] MdeModulePkg/UefiBootManagerLib: Signal ReadyToBoot on platform recovery

2023-12-06 Thread Ard Biesheuvel
(cc Liming) On Thu, 7 Dec 2023 at 05:48, Neal Gompa wrote: > > On Fri, Nov 24, 2023 at 6:36 PM Neal Gompa wrote: > > > > On Thu, Nov 2, 2023 at 6:35 AM Laszlo Ersek wrote: > > > > > > On 10/31/23 23:27, Jeremy Linton wrote: > > > > On 10/31/23 12:37, Neal Gompa via groups.io wrote: > > > >> Fro

Re: [edk2-devel] [PATCH] ArmVirtPkg: Allow EFI memory attributes protocol to be disabled

2023-12-06 Thread Ard Biesheuvel
> a bit more sensical. > No worries - and congrats! > On 12/6/2023 5:23 AM, Ard Biesheuvel wrote: > > But what we might do is invent a way to avoid setting the XP attribute > > on the entire region based on some heuristic. Given that the main > > purpose of the EFI me

Re: [edk2-devel] [PATCH] ArmVirtPkg: Allow EFI memory attributes protocol to be disabled

2023-12-07 Thread Ard Biesheuvel
On Tue, 5 Dec 2023 at 10:56, Marcin Juszkiewicz wrote: > ... > > I use 'sbsa-ref' with QEMU and upstream EDK2. And cannot use either RHEL > 9.3 nor CentOS Stream 9 installers because they hang. > > And this is not the only platform where upstream EDK2 is used. > > Sure, I can hack something, use G

[edk2-devel] [PATCH v2] ArmVirt: Allow memory attributes protocol to be disabled on first boot

2023-12-07 Thread Ard Biesheuvel
From: Ard Biesheuvel Shim's PE loader uses the EFI memory attributes protocol in a way that results in an immediate crash when invoking the loaded image, unless the base and size of its executable segment are both aligned to 4k. If this is not the case, it will strip the memory allocati

Re: [edk2-devel] [PATCH v2 1/1] OvmfPkg/VirtNorFlashDxe: sanity-check variables

2023-12-07 Thread Ard Biesheuvel
Hi Gerd, On Thu, 7 Dec 2023 at 10:44, Gerd Hoffmann wrote: > > Extend the ValidateFvHeader function, additionally to the header checks > walk over the list of variables and sanity check them. > > In case we find inconsistencies indicating variable store corruption > return EFI_NOT_FOUND so the va

Re: [edk2-devel] [PATCH v2 1/1] OvmfPkg/Bhyve: use a proper PCI IO range

2023-12-07 Thread Ard Biesheuvel
usr.sbin/bhyve/pci_emul.c#L133-L134 > [2] > https://github.com/tianocore/edk2/blob/fb044b7fe893a4545995bfe2701fd38e593355d9/OvmfPkg/Bhyve/PlatformPei/Platform.c#L156-L157 > [3] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274389 > > Signed-off-by: Corvin Köhne > Reviewed-by: L

Re: [edk2-devel] [PATCH v2] ArmVirt: Allow memory attributes protocol to be disabled on first boot

2023-12-08 Thread Ard Biesheuvel
On Thu, 7 Dec 2023 at 11:06, Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > Shim's PE loader uses the EFI memory attributes protocol in a way that > results in an immediate crash when invoking the loaded image, unless the > base and size of its executable segment

Re: [edk2-devel] [PATCH v2] ArmVirt: Allow memory attributes protocol to be disabled on first boot

2023-12-08 Thread Ard Biesheuvel
Thanks for the review. On Fri, 8 Dec 2023 at 15:34, Laszlo Ersek wrote: > > On 12/7/23 11:06, Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > > > Shim's PE loader uses the EFI memory attributes protocol in a way that > > results in an immediate crash whe

Re: [edk2-devel] [PATCH 4/4] ArmVirtPkg: Sync debug level comments in ArmVirt.dsc.inc

2023-12-08 Thread Ard Biesheuvel
On Sat, 9 Dec 2023 at 01:20, Rebecca Cran wrote: > > Update the debug level comments in ArmVirt.dsc.inc to sync with > MdePkg/Include/Library/DebugLib.h. > > Signed-off-by: Rebecca Cran Reviewed-by: Ard Biesheuvel > --- > ArmVirtPkg/ArmVirt.dsc.inc | 42 ++---

Re: [edk2-devel] RELEASE CLANGPDB OVMF currently does not compile

2023-12-10 Thread Ard Biesheuvel
gt; and removing the STATIC (and adding a comment) in the relevant line in > VirtioSerialDxe. > Removing STATIC means that (modulo LTO) the compiler will not know whether or not the definition can be dropped. It also pollutes the global namespace. IMO, lack of the use of STATIC where ap

Re: [edk2-devel] [PATCH v2] ArmVirt: Allow memory attributes protocol to be disabled on first boot

2023-12-11 Thread Ard Biesheuvel
On Mon, Dec 11, 2023 at 10:06 AM Gerd Hoffmann wrote: > > On Thu, Dec 07, 2023 at 11:06:03AM +0100, Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > > > Shim's PE loader uses the EFI memory attributes protocol in a way that > > results in an immediate c

[edk2-devel] [PATCH v3] ArmVirt: Allow memory attributes protocol to be disabled

2023-12-11 Thread Ard Biesheuvel
From: Ard Biesheuvel Shim's PE loader uses the EFI memory attributes protocol in a way that results in an immediate crash when invoking the loaded image, unless the base and size of its executable segment are both aligned to 4k. If this is not the case, it will strip the memory allocati

Re: [edk2-devel] [PATCH v3] ArmVirt: Allow memory attributes protocol to be disabled

2023-12-11 Thread Ard Biesheuvel
On Mon, 11 Dec 2023 at 15:33, Laszlo Ersek wrote: > > On 12/11/23 11:55, Gerd Hoffmann wrote: > >> + // > >> + // Work around shim's terminally broken use of the EFI memory attributes > >> + // protocol, by uninstalling it if requested on the QEMU command line. > >> + // > >> + // E.g., > >>

Re: [edk2-devel] [PATCH] BaseTools/tools_def: Disable unneeded-internal-declaration warning in CLANGPDB

2023-12-11 Thread Ard Biesheuvel
On Tue, 12 Dec 2023 at 08:17, Mike Beaton wrote: > > > > A completely different approach, which allows clang to spot that the > > > usage has been 'optimised away' and so to not complain (and therefore > > > allows us to re-enable the warning in CLANGDWARF as well), is the > > > following: > > > >

Re: [edk2-devel] [PATCH v2] MdeModulePkg/UefiBootManagerLib: Signal ReadyToBoot on platform recovery

2023-12-12 Thread Ard Biesheuvel
(cc Mike, Leif) On Thu, 7 Dec 2023 at 08:40, Ard Biesheuvel wrote: > > (cc Liming) > > On Thu, 7 Dec 2023 at 05:48, Neal Gompa wrote: > > > > On Fri, Nov 24, 2023 at 6:36 PM Neal Gompa wrote: > > > > > > On Thu, Nov 2, 2023 at 6:35 AM Laszlo Ersek

[edk2-devel] [PATCH v4] ArmVirt: Allow memory attributes protocol to be disabled

2023-12-12 Thread Ard Biesheuvel
From: Ard Biesheuvel Shim's PE loader uses the EFI memory attributes protocol in a way that results in an immediate crash when invoking the loaded image, unless the base and size of its executable segment are both aligned to 4k. If this is not the case, it will strip the memory allocati

Re: [edk2-devel] [PATCH] BaseTools/GenFw: Change opcode when converting ADR to ADRP

2023-12-12 Thread Ard Biesheuvel
On Wed, 6 Dec 2023 at 17:51, Jake Garver wrote: > > Thanks, Pedro and Ard, > > An update on this issue: > > It seems to be very specific to Ubuntu20's 10.5 build of GCC. > I could not reproduce it using a crosstool-ng build of 10.5, even after > trying to configure it identically to Ubuntu20's.

Re: [edk2-devel] [PATCH] DebugLib: Allow -Wunneeded-internal-declaration with clang

2023-12-12 Thread Ard Biesheuvel
On Tue, 12 Dec 2023 at 09:49, Mike Beaton wrote: > > From: Mike Beaton > > Provides a variant of the DEBUG macro for clang when MDEPKG_NDEBUG is defined, > which uses but discards the contained expression, this means clang can tell > that it has optimised away variable usage, therefore we can kee

Re: [edk2-devel] [PATCH] EmbeddedPkg/PrePiMemoryAllocationLib: Add ReallocatePool

2023-12-12 Thread Ard Biesheuvel
On Mon, 11 Dec 2023 at 16:48, Jeff Brasen wrote: > > Add implementation of ReallocatePool which is defined in the > MemoryAllocationLib header file to allow components to not > need special handling for PrePi module types. > > Signed-off-by: Jeff Brasen Reviewed-

Re: [edk2-devel] [PATCH v4] ArmVirt: Allow memory attributes protocol to be disabled

2023-12-12 Thread Ard Biesheuvel
On Tue, 12 Dec 2023 at 11:08, Gerd Hoffmann wrote: > > On Tue, Dec 12, 2023 at 09:36:00AM +0100, Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > > > Shim's PE loader uses the EFI memory attributes protocol in a way that > > results in an immediate crash whe

Re: [edk2-devel] [PATCH V2] DebugLib: Allow -Wunneeded-internal-declaration with clang

2023-12-12 Thread Ard Biesheuvel
On Tue, 12 Dec 2023 at 22:46, Mike Beaton wrote: > > From: Mikhail Krichanov > > Provides a variant of the DEBUG macro for clang when MDEPKG_NDEBUG is > defined, which uses but discards the contained expression. This means > clang can tell that it has optimised away variable usage as part of > va

Re: [edk2-devel] [PATCH] BaseTools/GenFw: Change opcode when converting ADR to ADRP

2023-12-13 Thread Ard Biesheuvel
On Wed, 13 Dec 2023 at 15:58, Jake Garver wrote: > > Totally understand and agree, Ard. > > In the meantime, I've now experienced the issue with Ubuntu22's GCC 12.3. > Originally, we didn't see the issue on this toolchain, but a developer ran > into when preparing a change. Even more concernin

Re: [edk2-devel] [PATCH V4 2/2] ArmPkg: Remove manual exclusion of debug vars when MDEPKG_NDEBUG is not defined

2023-12-13 Thread Ard Biesheuvel
On Thu, 14 Dec 2023 at 08:28, Mike Beaton wrote: > > From: Mike Beaton > > This is no longer required since the revised DEBUG macro automatically > compiles away unused var accesses when MDEPKG_NDEBUG is defined; > keeping these lines is incompatible with the updated DEBUG macro, as > there has t

Re: [edk2-devel] [PATCH V3] DebugLib: Update DEBUG macro used when MDEPKG_NDEBUG is defined

2023-12-13 Thread Ard Biesheuvel
(cc MdePkg and BaseTools maintainers) On Thu, 14 Dec 2023 at 00:08, Mike Beaton wrote: > > From: Mike Beaton > > The variant provided when MDEPKG_NDEBUG is defined will be optimised > away in RELEASE builds, but by referencing the argument list, avoids > unused variable errors from valid debug c

Re: [edk2-devel] [PATCH V5] DebugLib: Update DEBUG macro used when MDEPKG_NDEBUG is defined

2023-12-14 Thread Ard Biesheuvel
(cc Michael) On Thu, 14 Dec 2023 at 08:58, Mike Beaton wrote: > > From: Mike Beaton > > The variant provided when MDEPKG_NDEBUG is defined will be optimised > away in RELEASE builds, but by referencing the argument list, avoids > unused variable errors from valid debug code, for example when STA

Re: [edk2-devel] [PATCH V4 2/2] ArmPkg: Remove manual exclusion of debug vars when MDEPKG_NDEBUG is not defined

2023-12-14 Thread Ard Biesheuvel
On Thu, 14 Dec 2023 at 08:40, Ard Biesheuvel wrote: > > On Thu, 14 Dec 2023 at 08:28, Mike Beaton wrote: > > > > From: Mike Beaton > > > > This is no longer required since the revised DEBUG macro automatically > > compiles away unused var accesses when M

Re: [edk2-devel] [PATCH V6] DebugLib: Update DEBUG macro used when MDEPKG_NDEBUG is defined

2023-12-14 Thread Ard Biesheuvel
Please stop sending patches. On Thu, 14 Dec 2023 at 10:12, Mike Beaton wrote: > > Repeats V5, but with a hopefully clearer (on motivation and history) commit > message. > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112512): https:/

[edk2-devel] [PATCH] ArmPkg/DebugPeCoffExtraActionLib: Drop RVCT and Cygwin support

2023-12-14 Thread Ard Biesheuvel
From: Ard Biesheuvel The DebugPeCoffExtraActionLib implemention in ArmPkg contains some cruft that dates back to the original RVCT based ARM port, and support for RVCT was dropped a while ago. Also drop the handling of Cygwin specific paths, which is highly unlikely to be still depended upon by

Re: [edk2-devel] [PATCH V5] DebugLib: Update DEBUG macro used when MDEPKG_NDEBUG is defined

2023-12-14 Thread Ard Biesheuvel
On Thu, 14 Dec 2023 at 10:37, Mike Beaton wrote: > > > IOW, please don't send a v6 until the discussion comes to a conclusion. > > Apologies, I did _not_ see this before sending. > > > > - #if !defined (MDEPKG_NDEBUG) > > > + #if defined (__CC_ARM) || defined (__GNUC__) > > > > No, this is not goi

Re: [edk2-devel] [PATCH] ArmPkg/DebugPeCoffExtraActionLib: Drop RVCT and Cygwin support

2023-12-14 Thread Ard Biesheuvel
, I have stopped using Cygwin. > Also, this patch looks good to me. > > Reviewed-by: Sami Mujawar > Merged as #5148 Thanks all > > On Thu, Dec 14, 2023 at 10:20:46 +0100, Ard Biesheuvel wrote: > > From: Ard Biesheuvel mailto:a...@kernel.org>> > > > > The Deb

Re: [edk2-devel] [PATCH v2] MdeModulePkg/UefiBootManagerLib: Signal ReadyToBoot on platform recovery

2023-12-18 Thread Ard Biesheuvel
Tue, 12 Dec 2023 at 09:11, Ard Biesheuvel wrote: > > (cc Mike, Leif) > > On Thu, 7 Dec 2023 at 08:40, Ard Biesheuvel wrote: > > > > (cc Liming) > > > > On Thu, 7 Dec 2023 at 05:48, Neal Gompa wrote: > > > > > > On Fri, Nov 24, 2023 at 6:36 PM

Re: [edk2-devel] [PATCH V4 2/2] ArmPkg: Remove manual exclusion of debug vars when MDEPKG_NDEBUG is not defined

2023-12-19 Thread Ard Biesheuvel
On Fri, Dec 15, 2023 at 12:56 PM Mike Beaton wrote: > > > For the exception handler case, we can just drop the #Ifdefs around > > the definition of BaseName () entirely given that it will now always > > be referenced. But that does depend a lot on how other toolchains deal > > with this (VS201x pr

Re: [edk2-devel] [PATCH v4 0/4] StandaloneMmCore finds drivers in uncompressed inner fv.

2023-12-19 Thread Ard Biesheuvel
3 1:02 PM > To: Xu, Wei6 ; devel@edk2.groups.io > Cc: Laszlo Ersek ; Ard Biesheuvel > ; Sami Mujawar > Subject: RE: [edk2-devel] [PATCH v4 0/4] StandaloneMmCore finds drivers in > uncompressed inner fv. > > Reviewed-by: Ray Ni > > Can you kindly update the PR to a

Re: [edk2-devel] [PATCH v2] MdeModulePkg/UefiBootManagerLib: Signal ReadyToBoot on platform recovery

2023-12-19 Thread Ard Biesheuvel
-Haj-Mahmoud > > > > 主题: Re: [edk2-devel] [PATCH v2] MdeModulePkg/UefiBootManagerLib: > > Signal ReadyToBoot on platform recovery > > > > On Mon, Dec 18, 2023 at 22:55:21 +0100, Ard Biesheuvel wrote: > > > Hello all, > > > > > > Same quest

Re: [edk2-devel] [PATCH] BaseTools/GenFw: Change opcode when converting ADR to ADRP

2023-12-19 Thread Ard Biesheuvel
_ > From: Jake Garver > Sent: Wednesday, December 13, 2023 2:47 PM > To: Pedro Falcato ; Ard Biesheuvel > Cc: devel@edk2.groups.io ; rebe...@bsdio.com > ; gaolim...@byosoft.com.cn ; > bob.c.f...@intel.com ; yuwei.c...@intel.com > > Subject: Re: [edk2-devel] [PATCH

Re: [edk2-devel] [PATCH v4 19/37] UefiCpuPkg: Add MMIO method in CpuIo2Dxe

2023-12-19 Thread Ard Biesheuvel
eems unnecessary to me. But perhaps I missed something? > > From: Chao Li > Sent: Tuesday, December 19, 2023 9:04 PM > To: devel@edk2.groups.io; Ni, Ray > Cc: Kumar, Rahul R ; Gerd Hoffmann > ; Leif Lindholm ; Ard > Biesheuvel ; Sami Mujawar > Subject: Re: [edk2-dev

Re: [edk2-devel] [PATCH v4 19/37] UefiCpuPkg: Add MMIO method in CpuIo2Dxe

2023-12-20 Thread Ard Biesheuvel
On Wed, 20 Dec 2023 at 10:44, Ni, Ray wrote: > > Ard, > Let me try to understand: > > 1. CPU does not support IO instructions to access IO ports. > 2. PCI devices contain IO space. > 3. A special PCI host bridge can be configured to map a range of MMIO space > from CPU side to another range of IO

Re: [edk2-devel] [PATCH v4 19/37] UefiCpuPkg: Add MMIO method in CpuIo2Dxe

2023-12-20 Thread Ard Biesheuvel
On Wed, 20 Dec 2023 at 13:28, Ni, Ray wrote: > > Thanks for pointing it out. > I found it in ACPI spec that tells how to use "Resource Type Specific Flags" > to describe a MEM resource while maps to IO, > and an IO resource while maps to MEM. > > I assume that the IO port accesses are all from PC

Re: [edk2-devel] [PATCH] StandaloneMmPkg/Core: Remove dead code

2023-12-20 Thread Ard Biesheuvel
On Wed, 20 Dec 2023 at 10:11, Ray Ni wrote: > > Load-module-at-fixed-address feature does not work in standalone MM core. > > The patch removes the 2 dead functions and related global variables > that are related to the feature. > > Signed-off-by: Ray Ni > Cc: Sami Mu

Re: [edk2-devel] [PATCH v4 19/37] UefiCpuPkg: Add MMIO method in CpuIo2Dxe

2023-12-20 Thread Ard Biesheuvel
On Thu, 21 Dec 2023 at 04:48, Chao Li wrote: > ... > Ard, > > PcdPciIoTranslationIsEnabled is only use for whether to trigger the Ffio read > or write, it seem that only x86 or x64 need them, not others. > > When I was submitted the patch V2, CpuIo2Dxe was private to LoongArch, just > like Arm a

Re: [edk2-devel] [PATCH v2] BaseTools/GenFw: Correct offset when relocating an ADR

2023-12-21 Thread Ard Biesheuvel
30cc:f460adrpx0, 0x92000 > > 30d0:912ec000add x0, x0, #0xbb0 > > > > Note that we're now setting the stack canary from the wrong address, > > resulting in an erroneous stack fault. > > > > After this fix, the offset wil

Re: [edk2-devel] [PATCH v4 19/37] UefiCpuPkg: Add MMIO method in CpuIo2Dxe

2023-12-21 Thread Ard Biesheuvel
On Thu, 21 Dec 2023 at 13:11, Chao Li wrote: > > Hi Ard, > > > Thanks, > Chao > On 2023/12/21 15:31, Ard Biesheuvel wrote: > > On Thu, 21 Dec 2023 at 04:48, Chao Li wrote: > > ... > > Ard, > > PcdPciIoTranslationIsEnabled is only use for whether to tr

Re: [edk2-devel] [PATCH v4 19/37] UefiCpuPkg: Add MMIO method in CpuIo2Dxe

2023-12-21 Thread Ard Biesheuvel
On Thu, 21 Dec 2023 at 13:41, Chao Li wrote: > ... > A given platform will either be able to use port IO, or it will need > to use MMIO translation. So a driver that can do both based on a PCD > is not very useful, it makes more sense to have two different drivers, > and the platform incorporates

Re: [edk2-devel] [PATCH] EmbeddedPkg/PrePiMemoryAllocationLib: Add ReallocatePool

2023-12-21 Thread Ard Biesheuvel
On Mon, 18 Dec 2023 at 03:23, Chang, Abner wrote: > > [AMD Official Use Only - General] > > Reviewed-by: Abner Chang > I've queued this up, along with the mock one - thanks. > > -Original Message- > > From: Jeff Brasen > > Sent: Monday, December 11, 2023 11:48 PM > > To: devel@edk2.gro

Re: [edk2-devel] [PATCH] EmbeddedPkg/PrePiMemoryAllocationLib: Add ReallocatePool

2023-12-21 Thread Ard Biesheuvel
On Thu, 21 Dec 2023 at 15:39, Ard Biesheuvel wrote: > > On Mon, 18 Dec 2023 at 03:23, Chang, Abner wrote: > > > > [AMD Official Use Only - General] > > > > Reviewed-by: Abner Chang > > > > I've queued this up, along with the mock one - thanks.

Re: [edk2-devel] [PATCH v4 19/37] UefiCpuPkg: Add MMIO method in CpuIo2Dxe

2023-12-22 Thread Ard Biesheuvel
On Fri, 22 Dec 2023 at 03:37, Ni, Ray wrote: > > Good to me. > > > > Thanks, > > Ray > > From: Chao Li > Sent: Friday, December 22, 2023 9:15 AM > To: devel@edk2.groups.io; a...@kernel.org; Ni, Ray > Cc: Kumar, Rahul R ; Gerd Hoffmann > ; Leif L

Re: [edk2-devel] [PATCH] Maintainers: Update my email address

2024-01-03 Thread Ard Biesheuvel
On Tue, 26 Dec 2023 at 00:03, Marcin Wojtas wrote: > > I no longer use m...@semihalf.com email. Update Marvell entry with > my alternative address. As there are more than one SolidRun > pltaforms, on the occasion extend the scope. > > Signed-off-by: Marcin Wojtas Applied, thanks. > --- > Maint

Re: [edk2-devel] [edk2-platforms: PATCH v4] Marvell/Armada80x0Db: Fix build

2024-01-03 Thread Ard Biesheuvel
On Sun, 31 Dec 2023 at 12:07, Marcin Wojtas wrote: > > Commit ec5de71d83 ("Silicon/Marvell: Restructure package") > broke Armada80x0Db build by unintentional removal of > device tree component. Restore it. > > Signed-off-by: Marcin Wojtas Applied, thanks. > --- > Platform/Marvell/Armada80x0Db/

Re: [edk2-devel] [PATCH v2 0/3] EmbeddedPkg ReallocatePool and Mock changes

2024-01-03 Thread Ard Biesheuvel
On Thu, 28 Dec 2023 at 21:47, Jeff Brasen wrote: > > Adding Mock support for DtPlatformLoaderLib and changing ci.yaml to support > this > Adding ReallocatePool support to PrePi Library. > > Passing CI in https://github.com/tianocore/edk2/pull/5197 > > Change log > v2 - > Fix uncrustify errors >

Re: [edk2-devel] [Patch V2 0/3] Move gMpInformationHobGuid from StandaloneMmPkg to UefiCpuPkg.

2024-01-03 Thread Ard Biesheuvel
(cc Samer and Jose) Hello Dun Tan, On Fri, 17 Nov 2023 at 10:57, Tan, Dun wrote: > > Hi Ard, > > I'm working on moving gMpInformationHobGuid from StandaloneMmPkg to > UefiCpuPkg in this patch series. Currently in Edk2, the HOB is only consumed > by StandaloneMmCpu.inf. > > As we know that this

Re: [edk2-devel] [PATCH 3/3] StandaloneMmPkg:Remove MpInformation.h

2024-01-03 Thread Ard Biesheuvel
On Thu, 9 Nov 2023 at 03:51, duntan wrote: > > Remove MpInformation.h in StandaloneMmPkg since > it has been moved to UefiCpuPkg > > Signed-off-by: Dun Tan > Cc: Ard Biesheuvel > Cc: Sami Mujawar > Cc: Ray Ni Doesn't this break the ARM build? >

Re: [edk2-devel] [PATCH 2/3] ArmPkg: Fix the calculation of the timer period in GenericWatchdogDxe

2024-01-03 Thread Ard Biesheuvel
Hi Rebecca, On Wed, 3 Jan 2024 at 21:44, Rebecca Cran wrote: > > Fix the calculation of the timer period in GenericWatchdogDxe: we need > to multiply before dividing to keep the values as integers. > > Signed-off-by: Rebecca Cran > --- > ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c |

Re: [edk2-devel] [PATCH 3/3] StandaloneMmPkg:Remove MpInformation.h

2024-01-04 Thread Ard Biesheuvel
, there might be more than 1 HOB > instance of this gMpInformationHobGuid2. > There is no change in ARM related code in the new patch set. > > Thanks, > Dun > > -Original Message- > From: Ard Biesheuvel > Sent: Wednesday, January 3, 2024 11:12 PM > To: d

Re: [edk2-devel] [PATCH v3 0/3] ArmPkg: GenericWatchdogDxe fixes and improvements

2024-01-05 Thread Ard Biesheuvel
On Fri, 5 Jan 2024 at 06:15, Rebecca Cran wrote: > > Fixes and improvements to GenericWatchdogDxe. > What is the difference between v2 and v3? > PR: https://github.com/tianocore/edk2/pull/5176 > > Rebecca Cran (3): > ArmPkg: Update GenericWatchdogDxe to allow setting full 48-bit offset > Arm

Re: [edk2-devel] [PATCH v3 2/3] ArmPkg: Introduce global mTimerPeriod and remove calculation

2024-01-05 Thread Ard Biesheuvel
On Fri, 5 Jan 2024 at 06:15, Rebecca Cran wrote: > > The calculation of the timer period was broken. Introduce a global > mTimerPeriod so the calculation can be removed. Since mTimerFrequencyHz > is only used in one place, remove the global and make it a local > variable. Do the same with mNumTime

Re: [edk2-devel] [PATCH v1 1/1] StandaloneMmPkg: Initialise serial port early in StandaloneMmEntryPoint

2024-01-05 Thread Ard Biesheuvel
On Fri, 5 Jan 2024 at 12:49, levi.yun wrote: > > Serial port used by the DEBUG macro is initialised in StandaloneMmMain > by the DebugLib constructor. > > When we use a serial port initialised by TF-A it is not a problem. > However, if we use a serial port that is not initialised by TF-A, > the de

Re: [edk2-devel] Updates to .mailmap needed for Jeff Brasen, Jake Garver, Joey Vagades and Michael Roth?

2024-01-09 Thread Ard Biesheuvel
On Tue, 9 Jan 2024 at 10:17, Laszlo Ersek wrote: > > On 1/5/24 01:05, Rebecca Cran via groups.io wrote: > > I noticed recent commits by Jeff Brasen, Jake Garver, Joey Vagades and > > Michael Roth have funky Author lines, which I think means .mailmap needs > > updated? > > > > Author: Jeff Brasen v

Re: [edk2-devel] [PATCH v1 2/4] StandaloneMmPkg/Hob: Integer Overflow in CreateHob()

2024-01-10 Thread Ard Biesheuvel
> performing the following operation: > ``` > HobLength = (UINT16)((HobLength + 0x7) & (~0x7)); > ``` > > No checks are performed to ensure this value doesn't > overflow, and could lead to CreateHob() returning a smaller > HOB than requested, which could lead to OOB HOB a

Re: [edk2-devel] [PATCH v1 3/4] EmbeddedPkg/Hob: Integer Overflow in CreateHob()

2024-01-10 Thread Ard Biesheuvel
accesses. > > Reported-by: Marc Beatove > Cc: Leif Lindholm > Cc: Ard Biesheuvel > Cc: Abner Chang > Cc: John Mathew > Signed-off-by: Gerd Hoffmann This is missing a signed-off line from the sender. (the signoff is not a statement of authorship, it is a promise by the se

Re: [edk2-devel] [PATCH v1 2/4] StandaloneMmPkg/Hob: Integer Overflow in CreateHob()

2024-01-10 Thread Ard Biesheuvel
On Thu, 11 Jan 2024 at 07:52, Ard Biesheuvel wrote: > > On Thu, 11 Jan 2024 at 06:15, wrote: > > > > From: Gerd Hoffmann > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4166 > > > > Fix integer overflow in various CreateHob instances. >

Re: [edk2-devel] [PATCH 1/5] Platform/RaspberryPi/DualSerialPortLib: Always configure the pl011

2024-01-10 Thread Ard Biesheuvel
Hi Jeremy, Thanks for the patches. On Thu, 11 Jan 2024 at 00:52, Jeremy Linton wrote: > > The rpi's config.txt controls which uart (pl011, or miniuart) is > selected as the console. TFA and edk2 follow its lead, but if the > miniuart is selected as the primary and the machine is booted in ACPI

Re: [edk2-devel] [PATCH 4/5] Platform/RaspberryPi: Give the user control over the XHCI mailbox

2024-01-10 Thread Ard Biesheuvel
On Thu, 11 Jan 2024 at 00:52, Jeremy Linton wrote: > > Its a complete tossup whether removing the mailbox call after we have > set up the XHCI works for a given kernel+distro in DT mode. So lets > give users which want to try DT the option of flipping this on/off. > > Users that don't want to have

Re: [edk2-devel] [PATCH 5/5] Platform/RaspberryPi: Update PCIe MMIO window for DT

2024-01-10 Thread Ard Biesheuvel
On Thu, 11 Jan 2024 at 00:52, Jeremy Linton wrote: > > Since we are updating the DT memory map and telling it how > we have configured the PCIe, there isn't a reason for moving the > MMIO window. In fact this appears to fix OpenBSD+DT as well as > it makes the linux XHCI reset sequence happier. >

Re: [edk2-devel] [PATCH v1 0/4] Bz4166: Integer Overflow in CreateHob()

2024-01-11 Thread Ard Biesheuvel
On Thu, 11 Jan 2024 at 09:35, Guo, Gua wrote: > > CC: @Mathews, John and @Zimmer, Vincent > > Hi @Gerd Hoffmann > > My company teammate share me your patch can resolved > https://bugzilla.tianocore.org/show_bug.cgi?id=4166. So the signed-off name > is your name. > Again, a signed-off-by line is

Re: [edk2-devel] [PATCH 1/4] OvmfPkg/VirtNorFlashDxe: fix shadowbuffer reads

2024-01-12 Thread Ard Biesheuvel
log. This should have been 0xff. > > This patch fixes the calculation. > > Signed-off-by: Gerd Hoffmann Thanks a lot for taking the time to track this down and fix it. Reviewed-by: Ard Biesheuvel > --- > OvmfPkg/VirtNorFlashDxe/VirtNorFlash.c | 2 +- > 1 file changed,

Re: [edk2-devel] [PATCH 2/4] OvmfPkg/VirtNorFlashDxe: clarify block write logic

2024-01-12 Thread Ard Biesheuvel
to handle updates larger > than two P30_MAX_BUFFER_SIZE_IN_BYTES blocks, even though the patch > does not actually change the size limit. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel Nit below > --- > OvmfPkg/VirtNorFlashDxe/VirtNorFlash.c | 31

Re: [edk2-devel] [PATCH 3/4] OvmfPkg/VirtNorFlashDxe: allow larger writes without block erase

2024-01-12 Thread Ard Biesheuvel
FER_SIZE_IN_BYTES)) { > + if ((*NumBytes + (Offset & BOUNDARY_OF_32_WORDS)) <= (4 * > P30_MAX_BUFFER_SIZE_IN_BYTES)) { > // Check to see if we need to erase before programming the data into NOR. > // If the destination bits are only changing from 1s to 0s we can j

Re: [edk2-devel] [PATCH 4/4] OvmfPkg/VirtNorFlashDxe: ValidateFvHeader: unwritten state is EOL too

2024-01-12 Thread Ard Biesheuvel
On Fri, 12 Jan 2024 at 12:38, Gerd Hoffmann wrote: > > It is possible to find variable entries with State being 0xff, > i.e. not updated since flash block erase. This indicates the > header write was not completed (and therefore State was not set > to VAR_HEADER_VALID_ONLY). Treat this as addit

Re: [edk2-devel] Memory Attribute for depex section

2024-01-15 Thread Ard Biesheuvel
On Mon, 15 Jan 2024 at 14:07, Nhi Pham wrote: > > On 1/12/2024 4:45 PM, Laszlo Ersek wrote: > > (Independently: I think that's a valid thing to do for *SMM* drivers, > > because the entry point functions of those drivers are permitted to use > > both SMM and DXE/UEFI protocols. But whether the sam

Re: [edk2-devel] [PATCH v3 0/3] Support CloudHv guests with >1TB of RAM

2024-01-15 Thread Ard Biesheuvel
2/tree/cloud-hv-1tb-ram > > > > Cc: Anatol Belski > > Cc: Ard Biesheuvel > > Cc: Gerd Hoffmann > > Cc: Jianyong Wu > > Cc: Jiewen Yao > > Cc: Laszlo Ersek > > Cc: Rob Bradford > > > > Thomas Barrett (3): > > OvmfPkg: Add

Re: [edk2-devel] [PATCH v3 0/3] Support CloudHv guests with >1TB of RAM

2024-01-15 Thread Ard Biesheuvel
On Mon, 15 Jan 2024 at 16:32, Ard Biesheuvel wrote: > > On Mon, 15 Jan 2024 at 16:27, Gerd Hoffmann wrote: > > > > On Fri, Jan 12, 2024 at 06:31:41PM +, Thomas Barrett wrote: > > > This series adds support for cloud-hypervisor guests with >1TiB > > >

Re: [edk2-devel] [PATCH v3 0/3] Support CloudHv guests with >1TB of RAM

2024-01-15 Thread Ard Biesheuvel
.cgi?id=1468526. The bug is > > still occuring for CloudHv guests because the PlatformScanE820 > > utility is not currently supported for CloudHv. > > > > My working branch for these changes can be found here: > > https://github.com/thomasbarrett/edk2/tree/cloud-hv-1tb-ram

Re: [edk2-devel] [PATCH 0/4] OvmfPkg/VirtNorFlashDxe: fix corruption + misc small improvements

2024-01-15 Thread Ard Biesheuvel
On Mon, 15 Jan 2024 at 11:21, Laszlo Ersek wrote: > > On 1/12/24 12:37, Gerd Hoffmann wrote: > > This is a little series containing the flash corruption fix sent > > yesterday with an slightly improved commit message and some small > > improvements on top of this. > > > > Gerd Hoffmann (4): > >

Re: [edk2-devel] [PATCH 0/4] OvmfPkg/VirtNorFlashDxe: fix corruption + misc small improvements

2024-01-16 Thread Ard Biesheuvel
On Tue, 16 Jan 2024 at 10:37, Laszlo Ersek wrote: > > On 1/15/24 18:56, Ard Biesheuvel wrote: > > On Mon, 15 Jan 2024 at 11:21, Laszlo Ersek wrote: > >> > >> On 1/12/24 12:37, Gerd Hoffmann wrote: > >>> This is a little series containing the flash c

Re: [edk2-devel] [PATCH 0/2] OvmfPkg: drop support for TPM 1.2

2024-01-16 Thread Ard Biesheuvel
(cc Jiewen. Laszlo) On Tue, 16 Jan 2024 at 16:42, Gerd Hoffmann wrote: > > > > Gerd Hoffmann (2): > OvmfPkg: remove TPM1_ENABLE build option > OvmfPkg/Tcg2Config: remove unused TPM 1.2 support > Good riddance Acked-by: Ard Biesheuvel -=-=-=-=-=-=-=-=-=-=-=- Groups.

Re: [edk2-devel] [PATCH v3 0/6] OvmfPkg/VirtNorFlashDxe: fix corruption + misc small improvements

2024-01-18 Thread Ard Biesheuvel
On Thu, 18 Jan 2024 at 21:28, Laszlo Ersek wrote: > > On 1/16/24 18:10, Gerd Hoffmann wrote: > > This is a little series containing the flash corruption fix sent > > yesterday with an slightly improved commit message and some small > > improvements on top of this. > > > > v3: > > - fix diagram >

Re: [edk2-devel] [PATCH 1/1] StandaloneMmPkg/Core: Remove optimization for depex evaluation

2024-01-19 Thread Ard Biesheuvel
On Fri, 19 Jan 2024 at 05:58, Nhi Pham via groups.io wrote: > > From: Laszlo Ersek > > The current dependency evaluator violates the memory access permission > when patching depex grammar directly in the read-only depex memory area. > > Laszlo pointed out the optimization issue in the thread (1)

Re: [edk2-devel] [PATCH v3 5/5] MdeModulePkg: Extend NestedInterruptTplLib to support Arm CPUs

2024-01-23 Thread Ard Biesheuvel
eInterrupts(), which also sets both > flags). > > Tested by patching ArmPkg's TimerDxe to use NestedInterruptTplLib and > verifying that ArmVirtQemu passes the NestedInterruptTplLib self-tests > for both ARM and AARCH64. > > Cc: Ard Biesheuvel > Signed-off-by: Michael

Re: [edk2-devel] [PATCH RESEND 1/1] StandaloneMmPkg/Core: Remove optimization for depex evaluation

2024-01-23 Thread Ard Biesheuvel
On Mon, 22 Jan 2024 at 03:34, Nhi Pham via groups.io wrote: > > From: Laszlo Ersek > > The current dependency evaluator violates the memory access permission > when patching depex grammar directly in the read-only depex memory area. > > Laszlo pointed out the optimization issue in the thread (1)

Re: [edk2-devel] [PATCH v5 00/11] DynamicTablesPkg: Enable _PSD/_CPC generation using SCMI

2024-01-25 Thread Ard Biesheuvel
vant information > > A patchset for Juno-r2 platforms will be submitted to demonstrate > this functionality. > > [1] https://edk2.groups.io/g/devel/message/111901 > > Pierre Gondois (11): > ArmPkg/ArmScmiDxe: Rename PERFORMANCE_PROTOCOL_VERSION > ArmPkg/ArmScmiDxe: Add PERFORMANCE_DE

Re: [edk2-devel] [PATCH edk2-platforms v3 1/4] SbsaQemu: introduce macro to compare platform version

2023-10-18 Thread Ard Biesheuvel
On Tue, 17 Oct 2023 at 15:23, Marcin Juszkiewicz wrote: > > We want to check "if platver < 0.3" in an easy way. > --- > .../IndustryStandard/SbsaQemuPlatformVersion.h | 25 > > 1 file changed, 25 insertions(+) > > diff --git > a/Silicon/Qemu/SbsaQemu/Include/IndustryS

Re: [edk2-devel] [PATCH edk2-platforms v3 1/4] SbsaQemu: introduce macro to compare platform version

2023-10-18 Thread Ard Biesheuvel
On Wed, 18 Oct 2023 at 10:45, Ard Biesheuvel wrote: > > On Tue, 17 Oct 2023 at 15:23, Marcin Juszkiewicz > wrote: > > > > We want to check "if platver < 0.3" in an easy way. > > --- > > .../IndustryStandard/SbsaQemuPlatformVersion.h | 25 &g

Re: [edk2-devel] [PATCH edk2-platforms v3 4/4] SbsaQemu: disable XHCI in DSDT if not present

2023-10-18 Thread Ard Biesheuvel
On Wed, 18 Oct 2023 at 07:56, Marcin Juszkiewicz wrote: > > W dniu 18.10.2023 o 05:28, Nhi Pham pisze: > > Hi Marcin, > > > > There is a nitpicking below. > > > > Other than, it looks good to me. > > > > Acked-by: Nhi Pham > > > >> a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c

Re: [edk2-devel] [PATCH] ArmPkg/ArmPsciMpServices Add EFI_NOT_READY return

2023-10-18 Thread Ard Biesheuvel
On Tue, 17 Oct 2023 at 00:55, Rebecca Cran wrote: > > Reviewed-by: Rebecca Cran > > > Looks like this is still waiting to be merged by an ArmPkg maintainer. > > Thanks for the reminder Really queued up now > > On 6/29/23 14:46, Jeff Brasen wrote: > > Add EFI_NOT_READY return if the CPU can no

Re: [edk2-devel] [PATCH v1] EmbeddedPkg/NorFlashInfoLib: Update norflash device list

2023-10-18 Thread Ard Biesheuvel
but I'm happy to merge it if someone else reviews it > > -Original Message- > From: YuinYee Chew > Sent: Friday, September 29, 2023 9:35 PM > To: 'Heinrich Schuchardt' > Cc: Sunil V L ; Li Yong ; Leif > Lindholm ; Ard Biesheuvel > ; Abner Chang ;

Re: [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class

2023-10-18 Thread Ard Biesheuvel
that module is a > > *driver*, not a library instance; what's more, > > PcatRealTimeClockRuntimeDxe does not depend on "EmbeddedPkg.dec" at all. > > Treat that module too as case (a), right at the front of the series. > > > > Finally, drop the LibRtcVirtualNotifyEv

Re: [edk2-devel] [PATCH v1] EmbeddedPkg/NorFlashInfoLib: Update norflash device list

2023-10-20 Thread Ard Biesheuvel
On Fri, 20 Oct 2023 at 11:49, Laszlo Ersek wrote: > > On 10/18/23 10:57, Ard Biesheuvel wrote: > > On Wed, 18 Oct 2023 at 10:49, YuinYee Chew > > wrote: > >> > >> Dear Maintainers, > >> > >> Just a friendly reminder to ask if you could tak

Re: [edk2-devel] [edk2-platforms PATCH 0/7] drop needless init steps in RealTimeClockLib instances

2023-10-20 Thread Ard Biesheuvel
e already performs those actions. > > Cc: Ard Biesheuvel > Cc: Bibo Mao > Cc: Chao Li > Cc: Leif Lindholm > Cc: Ling Jia > Cc: Marcin Wojtas > Cc: Peng Xie > Cc: Wenyi Xie > Cc: Xianglai li > Cc: Yiqi Shu > > Thanks > Laszlo > > Laszlo Ersek (7):

Re: [edk2-devel] [PATCH] ArmPlatformPkg/PL031RealTimeClockLib: remove superfluous instance init steps

2023-10-20 Thread Ard Biesheuvel
es to notify the DXE Foundation > about said runtime services being available.) > > Clean up ArmPlatformPkg/PL031RealTimeClockLib accordingly (it only has > code that's redundant for step (3); it does not try to set "gRT" fields). > > (Note that the lib instance INF file a

Re: [edk2-devel] [PATCH 0/9] ArmVirtPkg: support two PL011 UARTs

2023-10-26 Thread Ard Biesheuvel
On Thu, 26 Oct 2023 at 16:46, Julien Grall wrote: > > Hi, > > On 26/10/2023 15:21, Peter Maydell wrote: > > On Tue, 10 Oct 2023 at 16:33, Laszlo Ersek wrote: > >> On 10/10/23 09:43, Ard Biesheuvel wrote: > >>> Thanks for looking into this - a cleanup was

Re: [edk2-devel] [PATCH 0/9] ArmVirtPkg: support two PL011 UARTs

2023-10-26 Thread Ard Biesheuvel
On Thu, 26 Oct 2023 at 17:19, Laszlo Ersek wrote: > > On 10/26/23 16:21, Peter Maydell wrote: > > On Tue, 10 Oct 2023 at 16:33, Laszlo Ersek wrote: > >> On 10/10/23 09:43, Ard Biesheuvel wrote: > >>> Thanks for looking into this - a cleanup was overdue here.

Re: [edk2-devel] [PATCH] BaseTools/GenFw: Change opcode when converting ADR to ADRP

2023-10-27 Thread Ard Biesheuvel
Hello all, Apologies for the late response. On Fri, 27 Oct 2023 at 14:44, Jake Garver via groups.io wrote: > > Thanks for your response, Pedro. > > I chased this as a toolchain bug originally, but concluded that the ADR > indeed works before GenFw rewrites it. But I see your point regarding th

Re: [edk2-devel] [PATCH] BaseTools/GenFw: Change opcode when converting ADR to ADRP

2023-10-27 Thread Ard Biesheuvel
On Fri, 27 Oct 2023 at 16:09, Jake Garver via groups.io wrote: > > Hi Ard: > > > Can you double check the object file? I suspect this is a linker relaxation > > not a compiler issue. > > With LTO in play, is there a way to check the object file? It's not in > aarch64 assembly. > Perhaps not.

Re: [edk2-devel] [PATCH] BaseTools/GenFw: Change opcode when converting ADR to ADRP

2023-10-27 Thread Ard Biesheuvel
On Fri, 27 Oct 2023 at 16:26, Pedro Falcato wrote: > > On Fri, Oct 27, 2023 at 3:13 PM Ard Biesheuvel wrote: > > > > On Fri, 27 Oct 2023 at 16:09, Jake Garver via groups.io > > wrote: > > > > > > Hi Ard: > > > > > > > C

Re: [edk2-devel] [PATCH v2 0/3] Add Variable Policy Audit App and Shell Command

2023-10-28 Thread Ard Biesheuvel
included to > give a greater sense of platform UEFI variable state. > Thanks, this looks usefu. For the series, Reviewed-by: Ard Biesheuvel Could we add it to ArmVirtPkg as well please? > Like all dynamic shell commands, a platform only needs to include > VariablePolicyDynamicCo

Re: [edk2-devel] [PATCH 6/7] OvmfPkg: use BaseIoLibIntrinsic.inf in dsc files

2023-10-30 Thread Ard Biesheuvel
On Fri, 27 Oct 2023 at 07:43, duntan wrote: > > Use BaseIoLibIntrinsic.inf in dsc files. The > BaseIoLibIntrinsic supports Tdx and sev now. > The BaseIoLibIntrinsicSev will be removed in > the following patches. > > Signed-off-by: Dun Tan > Cc: Ard Biesheuvel > C

Re: [edk2-devel] [PATCH 5/7] OvmfPkg: Add CcProbeLib in PlatformInitLib.inf

2023-10-30 Thread Ard Biesheuvel
On Fri, 27 Oct 2023 at 07:43, Dun Tan wrote: > > PlatformInitLib uses the CcProbe API in MemDetect.c > but doensn't add CcProbeLib in .inf LibraryClasses > section. Add CcProbeLib to fix the build error. > > Signed-off-by: Dun Tan > Cc: Ard Biesheuvel > Cc: Jiewen Y

Re: [edk2-devel] [PATCH v3 4/4] ArmVirtPkg: Add varpolicy shell command

2023-10-30 Thread Ard Biesheuvel
rate variable statistic information > - `"varpolicy -p"` shows accurate UEFI variable policy information > - `"varpolicy-v -b"` dumps all information including variable data hex dump > > Cc: Ard Biesheuvel > Cc: Gerd Hoffmann > Cc: Julien Grall

Re: [edk2-devel] [PATCH 6/7] OvmfPkg: use BaseIoLibIntrinsic.inf in dsc files

2023-10-31 Thread Ard Biesheuvel
On Tue, 31 Oct 2023 at 13:30, Laszlo Ersek wrote: > > On 10/30/23 15:36, Ard Biesheuvel wrote: > > On Fri, 27 Oct 2023 at 07:43, duntan wrote: > >> > >> Use BaseIoLibIntrinsic.inf in dsc files. The > >> BaseIoLibIntrinsic supports Tdx and sev now. > &g

  1   2   3   4   5   6   7   8   9   10   >