Re: [edk2-devel] [PATCH 1/2] MdeModulePkg/DxeIpl: Add 5 level paging support

2023-12-13 Thread Zhiguang Liu
Hi MdeModulePkg/UefiPayloadPkg Maintainers, This patch set fix a potential issue when handling paging table. Please help review. Thanks Zhiguang > -Original Message- > From: Liu, Zhiguang > Sent: Thursday, December 7, 2023 10:39 AM > To: devel@edk2.groups.io > Cc: Liu, Zhiguang ; Gao,

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

2023-12-13 Thread Mike Beaton
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 STATIC variables are used only in DEBUG statements. Variable EventNames in

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

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

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

2023-12-13 Thread Mike Beaton
Hi, I'm not fully used to email-based git commits. In this case, I've got two commits with different messages which are meant to make one patch set. I was under the impression that the first line of each commit is taken from the subject, but in that case these cease to appear as one thread in

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

2023-12-13 Thread Mike Beaton
Apologies - sent in error without V4 tag, please ignore. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112502): https://edk2.groups.io/g/devel/message/112502 Mute This Topic: https://groups.io/mt/103166248/21656 Group Owner:

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

2023-12-13 Thread Mike Beaton
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 to be a variable, access to which to discard. Signed-off-by:

[edk2-devel] [PATCH V4 1/2] DebugLib: Update DEBUG macro used when MDEPKG_NDEBUG is defined

2023-12-13 Thread Mike Beaton
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 STATIC variables are used only in DEBUG statements. Variables EventNames in

[edk2-devel] [PATCH 1/2] DebugLib: Update DEBUG macro used when MDEPKG_NDEBUG is defined

2023-12-13 Thread Mike Beaton
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 STATIC variables are used only in DEBUG statements. Variables EventNames in

Re: [edk2-devel] Question about the boundary and difference between System Firmware and UEFI CXL drivers

2023-12-13 Thread Yoshinoya
CXL Device could be accessed and configured with CXL.io path. UEFI Standard pci bus driver could enumerate CXL device as a normal pcie device through CXL.io path. A dedicated CXL Device driver could be dispatched and run after standard pci bus enumeration. Figure-35 is an addiontal boot

Re: [edk2-devel] [PATCH v3 4/5] DynamicTablesPkg: Adds API to generate a method with ArgN

2023-12-13 Thread Abdul Lateef Attar via groups.io
Hi Pierre, Thanks for reviewing the patch series. I'll address the review comments and work on the suggested alternative solution. Thanks Abdul -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112497):

Re: [edk2-devel] [PATCH v4 12/37] UefiCpuPkg: Add CpuMmuLib.h to UefiCpuPkg

2023-12-13 Thread Chao Li
Hi Ray, For you two comments: BTY, can you review the other UefiCpuPkg patches in this series? On 2023/12/13 下午1:17, Ni, Ray wrote: Chao, Thanks for providing such a cleaner lib API. Only 2 comments in below: + +#define EFI_MEMORY_CACHETYPE_MASK (EFI_MEMORY_UC | \ +

Re: [edk2-devel] [PATCH v2 1/1] ShellPkg: Tidy for code readability

2023-12-13 Thread Gao, Zhichao
The patch looks good to me. Reviewed-by: Zhichao Gao Thanks, Zhichao > -Original Message- > From: Tom Pilar > Sent: Wednesday, December 13, 2023 7:45 PM > To: devel@edk2.groups.io; Daniel Nguyen > Cc: nd ; Gao, Zhichao ; Ni, Ray > > Subject: Re: [edk2-devel] [PATCH v2 1/1] ShellPkg:

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

2023-12-13 Thread Mike Beaton
Got it. These are the fixes for ArmVirtQemu.dsc. If people have already manually worked round this issue it interferes with this global fix (we had this in one file in Acidanthera code). There don't seem to be many instances of that in the entire EDK-II codebase, however, fortunately. diff --git

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

2023-12-13 Thread Mike Beaton
I have currently gone with `if (FALSE)` in the above, even though Michael Brown kindly offered tests which showed that `if ((FALSE))` might help in a closely related context - i.e. when discussing Mikhail's variant of this and related code - two years ago now:

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

2023-12-13 Thread Mike Beaton
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 STATIC variables are used only in DEBUG statements. Signed-off-by: Mike

Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Resolve regex syntax warnings

2023-12-13 Thread Joey Vagedes via groups.io
Hello! Raw strings (the r prefix for a string) has been around since python 2, so this change will not break anything. It just ensures that the backwards slash is never treated as an escape character, which is what is expected for regex strings. The only change that occurred is that python 3.12

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

2023-12-13 Thread Jake Garver via groups.io
Fantastic! When we hit this in GCC 12.3 toolchain, the ADR was indeed at a 0xffc page offset. So, that connects. This also explains why the issue seemed to be specific to stack protection: Because it's comparing values right away. If we hit this with other loads, we might not notice until

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

2023-12-13 Thread Pedro Falcato
On Wed, Dec 13, 2023 at 5:31 PM Ard Biesheuvel wrote: > > 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

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

Re: [edk2-devel] [PATCH v3 4/6] OvmfPkg: Specifies SmmCpuSyncLib instance

2023-12-13 Thread Laszlo Ersek
On 12/6/23 11:01, Wu, Jiaxin wrote: > This patch is to specify SmmCpuSyncLib instance for OvmfPkg. > > Cc: Laszlo Ersek > Cc: Ard Biesheuvel > Cc: Jiewen Yao > Cc: Jordan Justen > Cc: Eric Dong > Cc: Ray Ni > Cc: Zeng Star > Cc: Rahul Kumar > Cc: Gerd Hoffmann > Signed-off-by: Jiaxin Wu

Re: [edk2-devel] [PATCH v2] CloudHv: Add CI for CloudHv on AArch64

2023-12-13 Thread Sami Mujawar
Hi Laszlo, I have posted a v3 patch to fix the issue at https://edk2.groups.io/g/devel/message/112485 I have done a draft pull request to check the v3 patch passes CI and this can be seen at https://github.com/tianocore/edk2/pull/5145 Regards, Sami Mujawar -=-=-=-=-=-=-=-=-=-=-=- Groups.io

[edk2-devel] [PATCH v3 1/1] CloudHv: Add CI for CloudHv on AArch64

2023-12-13 Thread Sami Mujawar
From: Jianyong Wu Add the long lost CI for CloudHv on AArch64. As CloudHv CI works nearly the same way with other VMMs like KvmTool, thus we can easily create its CI configuration based on KvmTool. Reviewed-by: Laszlo Ersek Signed-off-by: Jianyong Wu Signed-off-by: Sami Mujawar --- The

Re: [edk2-devel] [PATCH v3 2/6] UefiCpuPkg: Adds SmmCpuSyncLib library class

2023-12-13 Thread Laszlo Ersek
On 12/13/23 05:23, Wu, Jiaxin wrote: >> >> Thanks. This documentation (in the commit message and the lib class >> header file) seems really good (especially with the formatting updates >> suggested by Ray). >> >> (1) I think there is one typo: exist <-> exits. >> > > agree, I will fix this. >

[edk2-devel] [PATCH v10 5/5] OvmfPkg/RiscVVirt: Override for RISC-V CPU Features

2023-12-13 Thread Dhaval Sharma
This PCD provides a way for platform to override any HW features that are default enabled by previous stages of FW (like OpenSBI). For the case where previous/prev stage has disabled the feature, this override is not useful and its usage should be avoided. Cc: Ard Biesheuvel Cc: Jiewen Yao Cc:

[edk2-devel] [PATCH v10 3/5] MdePkg: Implement RISC-V Cache Management Operations

2023-12-13 Thread Dhaval Sharma
Implement Cache Management Operations (CMO) defined by RISC-V spec https://github.com/riscv/riscv-CMOs. Notes: 1. CMO only supports block based Operations. Meaning cache flush/invd/clean Operations are not available for the entire range. In that case we fallback on fence.i instructions. 2.

[edk2-devel] [PATCH v10 4/5] MdePkg: Utilize Cache Management Operations Implementation For RISC-V

2023-12-13 Thread Dhaval Sharma
Use newly defined cache management operations for RISC-V where possible It builds up on the support added for RISC-V cache management instructions in BaseLib. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Laszlo Ersek Cc: Pedro Falcato Signed-off-by: Dhaval Sharma Acked-by:

[edk2-devel] [PATCH v10 2/5] MdePkg: Rename Cache Management Function To Clarify Fence Based Op

2023-12-13 Thread Dhaval Sharma
There are different ways to manage cache on RISC-V Processors. One way is to use fence instruction. Another way is to use CPU specific cache management operation instructions ratified as per RISC-V ISA specifications to be introduced in future patches. Current method is fence instruction based,

[edk2-devel] [PATCH v10 1/5] MdePkg: Move RISC-V Cache Management Declarations Into BaseLib

2023-12-13 Thread Dhaval Sharma
The declarations for cache Management functions belong to BaseLib instead of instance source file. This helps with further restructuring of cache management code for RISC-V. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Laszlo Ersek Cc: Pedro Falcato Signed-off-by: Dhaval Sharma

[edk2-devel] [PATCH v10 0/5] Cache Management Operations Support For RISC-V

2023-12-13 Thread Dhaval Sharma
Implementing code to support Cache Management Operations (CMO) defined by RISC-V CMO instructions.https://github.com/riscv/riscv-CMOs This is a re-write of original series v5. The patchset contains 5 patches- created based on V5 feedback. 1. Restructuring of existing code and move instruction

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

2023-12-13 Thread Jake Garver via groups.io
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 concerning, when I instrumented that change, it went away. So, it

Re: [edk2-devel] [PATCH v3 3/6] UefiCpuPkg: Implements SmmCpuSyncLib library instance

2023-12-13 Thread Laszlo Ersek
On 12/6/23 11:01, Wu, Jiaxin wrote: > Implements SmmCpuSyncLib Library instance. The instance refers the > existing SMM CPU driver (PiSmmCpuDxeSmm) sync implementation > and behavior: > 1.Abstract Counter and Run semaphores into SmmCpuSyncCtx. > 2.Abstract CPU arrival count operation to >

Re: [edk2-devel] [RFC PATCH] RedfishPkg: RedfishDiscoverDxe: add [] brackets to URI for IPv6 addresses

2023-12-13 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] And Mike, you can also go head to create a PR after you sending out the patch. Thus I can merge it later. Thanks Abner > -Original Message- > From: Mike Maslenkin > Sent: Wednesday, December 13, 2023 9:35 PM > To: Pedro Falcato > Cc:

Re: [edk2-devel] [RFC PATCH] RedfishPkg: RedfishDiscoverDxe: add [] brackets to URI for IPv6 addresses

2023-12-13 Thread Mike Maslenkin
Fair. I'll try to make some cleanups before applying this patch after committing Abner's remedy patch https://github.com/tianocore/edk2/pull/5139. Regards, Mike.. On Wed, Dec 13, 2023 at 4:15 PM Pedro Falcato wrote: > > On Thu, Dec 7, 2023 at 1:24 PM Mike Maslenkin > wrote: > > > > URI is

Re: [edk2-devel] [RFC PATCH] RedfishPkg: RedfishDiscoverDxe: add [] brackets to URI for IPv6 addresses

2023-12-13 Thread Pedro Falcato
On Thu, Dec 7, 2023 at 1:24 PM Mike Maslenkin wrote: > [...] > +DiscoveredInstance->Information.Location = (CHAR16 *)AllocatePool > (AllocSize); Forgot to mention: don't cast void *! It's completely unneeded in C and may hide real problems (implicit declarations); it also clutters code.

Re: [edk2-devel] [RFC PATCH] RedfishPkg: RedfishDiscoverDxe: add [] brackets to URI for IPv6 addresses

2023-12-13 Thread Pedro Falcato
On Thu, Dec 7, 2023 at 1:24 PM Mike Maslenkin wrote: > > URI is generated based on the RedfishLocation containing an ASCII string > representing the IP address. So, in the case of IPv4 the canonical > representation of an IPv4 address was inserted into the resulting Unicode > string i.e:

Re: [edk2-devel] [PATCH v2 1/1] ShellPkg: Tidy for code readability

2023-12-13 Thread Tom Pilar
Hi Zhichao & Ray, Can you have a quick review of this patch, no logic has changed, just a code tidy. Cheers, Tom > On 29 Nov 2023, at 18:28, Daniel Nguyen via groups.io > wrote: > > Warning: EXTERNAL SENDER, use caution when opening links or attachments. > > > Use error handling instead

Re: [edk2-devel] [RFC PATCH] RedfishPkg: RedfishDiscoverDxe: add [] brackets to URI for IPv6 addresses

2023-12-13 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] > -Original Message- > From: Mike Maslenkin > Sent: Thursday, December 7, 2023 9:24 PM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Nickle Wang > ; Igor Kulchytskyy > Subject: [RFC PATCH] RedfishPkg: RedfishDiscoverDxe: add [] brackets to URI > for

Re: [edk2-devel] [PATCH v2] CloudHv: Add CI for CloudHv on AArch64

2023-12-13 Thread Sami Mujawar
Hi Laszlo, I will look into this and provide a fix shortly. Regards, Sami Mujawar On 11/12/2023, 17:21, "Laszlo Ersek" mailto:ler...@redhat.com>> wrote: Hi Jianyong, On 12/11/23 17:31, Laszlo Ersek wrote: > On 11/23/23 04:22, Jianyong Wu wrote: >> Add the long lost CI for CloudHv on

Re: [edk2-devel] [Patch V2] UefiCpuPkg/PiSmmCpuDxeSmm: SmmCpuRendezvous ensure all Aps in Present.

2023-12-13 Thread Wu, Jiaxin
> > WaitForAllAPs() has two purpose: > >1. Make sure all Aps have set the Present. > >2. Get ready for programming MTRRs to make sure cpus in the same start > line. > > > > if so, that will be better as existing logic, it can also save some time > > for the > Present flag check in

Re: [edk2-devel] [PATCH v4 1/1] MdeModulePkg: Support customized FV Migration Information

2023-12-13 Thread Wang Fan
Thank you Ray. For your question 1, my thought is to keep only one way to turn on/off this feature. So I'm preferring two-steps work: Step #1. Introduce this HOB, let PCD control this feature turn on/off and HOB to publish extra information, which is a compatible change. Step #2. Retire this