Re: [edk2-devel] [PATCH v4 5/9] ManageabilityPkg: Add ManageabilityTransportHelperLib

2023-04-14 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] > -Original Message- > From: Tinh Nguyen > Sent: Friday, March 24, 2023 2:31 AM > To: devel@edk2.groups.io; Chang, Abner > Cc: Liming Gao ; Isaac Oram > ; Nate DeSimone > ; Nickle Wang ; > Igor Kulchytskyy ; Attar, AbdulLateef (Abdul Lateef) > > Subje

Re: [edk2-devel] Strange behavior between GCC 11 and GCC 12

2023-04-14 Thread Ni, Ray
I did a quick check on what TemporaryRamMigration does for OVMF. No magic there. I think you could try to remove the code in OvmfPkg/Sec/SecMain.c that does the TemporaryRamSupportPpi installation. If no such PPI, the migration will be done by PEI core. Thanks, Ray From: devel@edk2.groups.io On

Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg: Support 5 level page table in ResetVector

2023-04-14 Thread Ni, Ray
> > But with 5-level paging enabled the reset vector should be able to > fallback to 4-level paging in case the CPU does not support 5-level > paging. The fallback makes sense. Otherwise, forcing to use 5L in an incapable CPU would be a silent failure because IDT and debug log are not enabled at

Re: [edk2-devel] [PATCH v4 8/9] ManageabilityPkg: Add IpmiProtocol to Manageability Package

2023-04-14 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Hi Tinh, Apparently I missed some of your feedback, it was moved to other email folder that I don’t expect it should be. I will add those modules for AARCH64. Thanks Abner > -Original Message- > From: Tinh Nguyen > Sent: Tuesday, March 28, 2023 8:23 PM

Re: [edk2-devel] [PATCH 1/5] RedfishPkg: introduce EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL

2023-04-14 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] > -Original Message- > From: Nickle Wang > Sent: Thursday, April 13, 2023 2:21 PM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Igor Kulchytskyy > ; Nick Ramirez > Subject: [PATCH 1/5] RedfishPkg: introduce > EDKII_REDFISH_PLATFORM_CONFIG_PROTOCOL >

Re: [edk2-devel] Strange behavior between GCC 11 and GCC 12

2023-04-14 Thread Ni, Ray
Why does OVMF choose to migrate the content from NEM to MEM itself? PEI core can do the migration well. thanks, ray From: devel@edk2.groups.io on behalf of Lendacky, Thomas via groups.io Sent: Saturday, April 15, 2023 5:50:25 AM To: Ard Biesheuvel Cc: devel@edk

Re: [edk2-devel] Strange behavior between GCC 11 and GCC 12

2023-04-14 Thread Lendacky, Thomas via groups.io
On 4/14/23 16:39, Ard Biesheuvel wrote: On Fri, 14 Apr 2023 at 22:23, Tom Lendacky wrote: I've been trying to debug a problem I'm seeing when I moved to the GCC 12 compiler. Under SEV it results in the guest crashing. I narrowed the issue down to the call to TemporaryRamMigration() in PeiChec

Re: [edk2-devel] Strange behavior between GCC 11 and GCC 12

2023-04-14 Thread Ard Biesheuvel
On Fri, 14 Apr 2023 at 22:23, Tom Lendacky wrote: > > I've been trying to debug a problem I'm seeing when I moved to the GCC 12 > compiler. Under SEV it results in the guest crashing. > > I narrowed the issue down to the call to TemporaryRamMigration() in > PeiCheckAndSwitchStack() of MdeModulePkg

Re: [edk2-devel] Strange behavior between GCC 11 and GCC 12

2023-04-14 Thread Lendacky, Thomas via groups.io
On 4/14/23 15:23, Tom Lendacky wrote: I've been trying to debug a problem I'm seeing when I moved to the GCC 12 compiler. Under SEV it results in the guest crashing. False alarm, I was on the wrong branch that does not have ff36b2550f94 ("OvmfPkg/Sec: fix stack switch")... disregard. Thanks,

[edk2-devel] Strange behavior between GCC 11 and GCC 12

2023-04-14 Thread Lendacky, Thomas via groups.io
I've been trying to debug a problem I'm seeing when I moved to the GCC 12 compiler. Under SEV it results in the guest crashing. I narrowed the issue down to the call to TemporaryRamMigration() in PeiCheckAndSwitchStack() of MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c. I get this output on GCC1

Re: [edk2-devel] [Patch V2 0/8] Use CpuPageTableLib to create and update smm page table

2023-04-14 Thread Lendacky, Thomas via groups.io
On 4/14/23 12:19, Ni, Ray via groups.io wrote: tom, if the c bit is not required for non leaf page table entries, why the trunk code sets the c bit for all entities including nonleaf ones? Because it's effectively the correct thing to do, even though it doesn't matter. i went back to read

[edk2-devel] [PATCH v2 5/6] OvmfPkg/VirtNorFlashDxe: Not add memory space if it exists

2023-04-14 Thread Tuan Phan
The flash base address can be added to GCD before this driver run. So only add it if it has not been done. Signed-off-by: Tuan Phan --- OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c | 25 +++ 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/OvmfPkg/VirtNorFlashDxe/V

[edk2-devel] [PATCH v2 6/6] OvmfPkg/RiscVVirt: SEC: Add IO memory resource hob for platform devices

2023-04-14 Thread Tuan Phan
Normally, DXE driver would add device resource to GCD before start using. But some key resources such as uart, flash base address are being accessing directly in some core modules. Those resources should be populated to HOB in SEC phase so they are added to GCD before anyone can access them. Sign

[edk2-devel] [PATCH v2 4/6] OvmfPkg/RiscVVirt: VirtNorFlashPlatformLib: Fix wrong flash size

2023-04-14 Thread Tuan Phan
The size should be for single region, not the whole firmware FD. Signed-off-by: Tuan Phan --- .../Library/VirtNorFlashPlatformLib/VirtNorFlashStaticLib.c| 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashStatic

[edk2-devel] [PATCH v2 3/6] UefiCpuPkg: RISC-V: Support MMU with SV39/48/57 mode

2023-04-14 Thread Tuan Phan
During CpuDxe initialization, MMU will be setup with the highest mode that HW supports. Signed-off-by: Tuan Phan --- MdePkg/Include/Library/BaseRiscVMmuLib.h | 39 ++ .../Library/BaseRiscVMmuLib/BaseRiscVMmuLib.c | 569 ++ .../BaseRiscVMmuLib/BaseRiscVMmuLib.inf | 25

[edk2-devel] [PATCH v2 2/6] MdePkg/Register: RISC-V: Add satp mode bits shift definition

2023-04-14 Thread Tuan Phan
The satp mode bits shift is used cross modules. It should be defined in one place. Signed-off-by: Tuan Phan --- MdePkg/Include/Register/RiscV64/RiscVEncoding.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MdePkg/Include/Register/RiscV64/RiscVEncoding.h b/MdePkg/Inc

[edk2-devel] [PATCH v2 1/6] MdePkg/BaseLib: RISC-V: Support getting satp register value

2023-04-14 Thread Tuan Phan
Add an API to retrieve satp register value. Signed-off-by: Tuan Phan --- MdePkg/Include/Library/BaseLib.h | 5 + MdePkg/Library/BaseLib/RiscV64/RiscVMmu.S | 8 2 files changed, 13 insertions(+) diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.

[edk2-devel] [PATCH v2 0/6] RISC-V MMU support

2023-04-14 Thread Tuan Phan
RISC-V: Add MMU support This series adds MMU support for RISC-V. Only SV39/48/57 modes are supported and tested. The MMU is required to support setting page attribute which is the first basic step to support security booting on RISC-V. There are three parts: 1. Add MMU base library. MMU will be e

Re: [edk2-devel] [Patch V2 0/8] Use CpuPageTableLib to create and update smm page table

2023-04-14 Thread Ni, Ray
tom, if the c bit is not required for non leaf page table entries, why the trunk code sets the c bit for all entities including nonleaf ones? i went back to read again the smm issue you met. you said the c bit is set for non leaf entries that caused a deference issue. But the pagetablelib code

Re: [edk2-devel] [Patch V2 5/8] MdeModulePkg: Add UefiCpuPkg.dec to pass DependencyCheck

2023-04-14 Thread Ni, Ray
Mike, What's the rule regarding content in mdepkg and cpupkg? thanks, ray From: Kinney, Michael D Sent: Friday, April 14, 2023 11:16:45 PM To: devel@edk2.groups.io ; Wang, Jian J ; Tan, Dun Cc: Gao, Liming ; Ni, Ray ; Kinney, Michael D Subject: RE: [edk2-devel

Re: [edk2-devel] [PATCH v2] MinPlatformPkg: Add Pcd for FADT REVISION and MINOR REVISION to update FADT entries from board package.

2023-04-14 Thread Chiu, Chasel
Patch merged: https://github.com/tianocore/edk2-platforms/commit/3b7f82b61b552f5bdd415f1bf4ba2866a09ceac0 Thanks, Chasel > -Original Message- > From: Chen, Aryeh > Sent: Wednesday, April 12, 2023 9:27 AM > To: devel@edk2.groups.io > Cc: Chen, Aryeh ; Chiu, Chasel > ; Desimone, Nathani

Re: [edk2-devel] [PATCH v2] IntelFsp2Pkg/Tools: Enhance PathFv.py to patch Fd file directly https://bugzilla.tianocore.org/show_bug.cgi?id=4412

2023-04-14 Thread Chiu, Chasel
Hi Chinni, Please help to correct patch format and make sure it can pass verification by BaseTools/Scripts/PatchCheck.py Thanks, Chasel > -Original Message- > From: Duggapu, Chinni B > Sent: Friday, April 14, 2023 1:34 AM > To: devel@edk2.groups.io > Cc: Chiu, Chasel ; Desimone, Nat

Re: [edk2-devel] [Patch V2 5/8] MdeModulePkg: Add UefiCpuPkg.dec to pass DependencyCheck

2023-04-14 Thread Michael D Kinney
If components outside the UefiCpuPkg need access to the CpuPageTableLib, should we consider moving CpuPageTableLib to MdePkg or MdeModulePkg? There are many different boot phases that need to crate/manage page tables, so we need to find the right common location. Perhaps the only part that need

Re: [edk2-devel] [PATCH v4 01/10] BaseTools: add BASETOOLS define

2023-04-14 Thread Marvin Häuser
> On 14. Apr 2023, at 16:57, Ard Biesheuvel wrote: > > On Fri, 14 Apr 2023 at 16:37, Gerd Hoffmann wrote: >> >>> On Fri, Apr 14, 2023 at 12:29:21PM +, Marvin Häuser wrote: >>> Hi Gerd, >>> >>> Thanks for your effort! >>> >>> Sorry, but I *really* dislike this “BASETOOLS” notion. There

Re: [edk2-devel] [PATCH v4 01/10] BaseTools: add BASETOOLS define

2023-04-14 Thread Ard Biesheuvel
On Fri, 14 Apr 2023 at 16:37, Gerd Hoffmann wrote: > > On Fri, Apr 14, 2023 at 12:29:21PM +, Marvin Häuser wrote: > > Hi Gerd, > > > > Thanks for your effort! > > > > Sorry, but I *really* dislike this “BASETOOLS” notion. There might be > > external tools that also want to use the header (like

Re: [edk2-devel] [PATCH v4 01/10] BaseTools: add BASETOOLS define

2023-04-14 Thread Marvin Häuser
> On 14. Apr 2023, at 16:37, Gerd Hoffmann wrote: > > On Fri, Apr 14, 2023 at 12:29:21PM +, Marvin Häuser wrote: >> Hi Gerd, >> >> Thanks for your effort! >> >> Sorry, but I *really* dislike this “BASETOOLS” notion. There might be >> external tools that also want to use the header (like

Re: [edk2-devel] [PATCH v4 08/10] BaseTools: switch from EFI_IMAGE_MACHINE_* to IMAGE_FILE_MACHINE_*

2023-04-14 Thread Gerd Hoffmann
On Fri, Apr 14, 2023 at 06:16:52AM -0600, Rebecca Cran wrote: > On 4/14/23 02:02, Gerd Hoffmann wrote: > > > diff --git a/BaseTools/Source/C/Include/IndustryStandard/PeImage.h > > b/BaseTools/Source/C/Include/IndustryStandard/PeImage.h > > index 22161edf443d..fb867b5660a9 100644 > > --- a/BaseToo

Re: [edk2-devel] [PATCH v4 01/10] BaseTools: add BASETOOLS define

2023-04-14 Thread Gerd Hoffmann
On Fri, Apr 14, 2023 at 12:29:21PM +, Marvin Häuser wrote: > Hi Gerd, > > Thanks for your effort! > > Sorry, but I *really* dislike this “BASETOOLS” notion. There might be > external tools that also want to use the header (like we do with AUDK) > and also edk2 supports host-based unit tests.

Re: [edk2-devel] [PATCH 5/5] RedfishPkg: Fix compile issue on Linux

2023-04-14 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Reviewed-by: Abner Chang > -Original Message- > From: Minh Nguyen > Sent: Friday, April 14, 2023 4:19 PM > To: devel@edk2.groups.io > Cc: patc...@amperecomputing.com; Chang, Abner > ; nick...@nvidia.com; ig...@ami.com; > n...@os.amperecomputing.com; tin

Re: [edk2-devel] [Patch V2 0/8] Use CpuPageTableLib to create and update smm page table

2023-04-14 Thread Lendacky, Thomas via groups.io
On 4/14/23 00:07, Ni, Ray wrote: -Original Message- From: Tom Lendacky Sent: Friday, April 14, 2023 12:19 AM To: Tan, Dun ; devel@edk2.groups.io Cc: Ni, Ray Subject: Re: [edk2-devel] [Patch V2 0/8] Use CpuPageTableLib to create and update smm page table On 4/13/23 04:14, Tan, Dun wr

Re: [edk2-devel] FW: [PATCH v2 2/3] MdePkg: Support FDT library.

2023-04-14 Thread Benny Lin
Hi, Pedro, Sorry. I will update copyright in Patch v3. In my opinion for edk2 style, a implementation of library is required a header file and LibraryClass name for reference by others externally. Since libfdt is a third-party and we cannot include header files under the library immediately, w

Re: [edk2-devel] [PATCH 1/1] ArmPkg/PlatformBootManagerLib: Add path to boot UEFI Shell over UiApp

2023-04-14 Thread PierreGondois
Hello Ard, On 2/9/23 17:57, Ard Biesheuvel wrote: On Tue, 7 Feb 2023 at 10:07, wrote: From: Pierre Gondois The UEFI Shell is a non-active boot option, at the opposite of UiApp. If no valid boot option is found, UiApp is selected. UiApp requires a human interaction. When installing a new EDK

Re: [edk2-devel] [PATCH v4 01/10] BaseTools: add BASETOOLS define

2023-04-14 Thread Marvin Häuser
Hi Gerd, Thanks for your effort! Sorry, but I *really* dislike this “BASETOOLS” notion. There might be external tools that also want to use the header (like we do with AUDK) and also edk2 supports host-based unit tests. Imo the macro name should be generic, like “HOST_OS” or “USERLAND” or some

Re: [edk2-devel] [PATCH 1/1] ArmPkg/PlatformBootManagerLib: Add path to boot UEFI Shell over UiApp

2023-04-14 Thread PierreGondois
Hello Ard, KvmTool, Qemu, Xen and CloudHv use the following implementation: PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf Testing: - using kvmtool - not pressing any key during the process I end-up in the boot menu (so not the UEFI shell). When trying wit

Re: [edk2-devel] [PATCH v4 00/10] BaseTools: remove duplicate includes.

2023-04-14 Thread Rebecca Cran
If it passes CI, then for the series: Reviewed-by: Rebecca Cran On 4/14/23 02:02, Gerd Hoffmann wrote: There is alot of code duplication between BaseTools and MdePkg (and also MdeModulePkg). This patch series starts reducing this by removing some header files. BaseTools are switched over t

Re: [edk2-devel] [PATCH v4 08/10] BaseTools: switch from EFI_IMAGE_MACHINE_* to IMAGE_FILE_MACHINE_*

2023-04-14 Thread Rebecca Cran
On 4/14/23 02:02, Gerd Hoffmann wrote: diff --git a/BaseTools/Source/C/Include/IndustryStandard/PeImage.h b/BaseTools/Source/C/Include/IndustryStandard/PeImage.h index 22161edf443d..fb867b5660a9 100644 --- a/BaseTools/Source/C/Include/IndustryStandard/PeImage.h +++ b/BaseTools/Source/C/Include/

Re: [edk2-devel] [PATCH v4 0/2] Set Firmware Version from build command line

2023-04-14 Thread Rebecca Cran
Sorry for not commenting on this earlier. Would it be better to have people use the build `--pcd` option instead? e.g. build --pcd="gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString=edk2-stable202302". -- Rebecca Cran On 4/14/23 02:33, Oliver Steffen wrote: ArmVirtXen.dsc allows se

Re: [edk2-devel] [PATCH] CryptoPkg: Enable DXE_CORE support in DxeCryptLib.inf

2023-04-14 Thread Yao, Jiewen
Reviewed-by: JIewen Yao > -Original Message- > From: Li, Yi1 > Sent: Friday, April 14, 2023 3:33 PM > To: devel@edk2.groups.io > Cc: Li, Yi1 ; Wang, Jian J ; Yao, > Jiewen ; Lu, Xiaoyu1 ; Jiang, > Guomin > Subject: [PATCH] CryptoPkg: Enable DXE_CORE support in DxeCryptLib.inf > > REF:

Re: [edk2-devel] [PATCH V1 1/1] OvmfPkg/PlatformPei: Skip PlatformInitEmuVariableNvStore in SEV guest

2023-04-14 Thread Gerd Hoffmann
Hi, >-drive > if=pflash,format=raw,unit=0,file=/root/kernels/qemu-install/OVMF_CODE.fd,readonly=on >-drive if=pflash,format=raw,unit=1,file=./fedora.fd > In this case, only OVMF_CODE.fd will be encrypted. > The fedora.fd (OVMF_VARS.fd) will be unencrypted. >-drive > if=pflash,f

Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg: Support 5 level page table in ResetVector

2023-04-14 Thread Gerd Hoffmann
> Using 5level paging when the below two conditions are both true: > 1. CPU support 5level paging > 2. Platform choose to use 5level paging. (by specifing macro > USE_5_LEVEL_PAGE_TABLE) > > There is an assumption that if platform choose to use 5level paging, > then 5level paging should be su

Re: [edk2-devel] [PATCH 2/5] RedfishPkg: Prevent assertion of allocate zero length region

2023-04-14 Thread Nickle Wang via groups.io
Thanks for your quick response. > but the second change is necessary. How do you think about that? Yes, second change is necessary. Please keep second change in v2 patches. Thanks, Nickle > -Original Message- > From: Minh Nguyen > Sent: Friday, April 14, 2023 5:18 PM > To: Nickle Wang

Re: [edk2-devel] [Patch V2 3/8] MdeModulePkg: Add CpuPageTableLib required by DxeIpl in DSC

2023-04-14 Thread Wang, Jian J
This will cause that MdeModulePkg depends on UefiCpuPkg. Please double check if there's any side effect introduced by breaking unidirectional dependency. Acked-by: Jian J Wang > -Original Message- > From: Tan, Dun > Sent: Friday, March 31, 2023 5:34 PM > To: devel@edk2.groups.io > Cc:

Re: [edk2-devel] [PATCH v2] IntelFsp2Pkg/Tools: Enhance PathFv.py to patch Fd file directly https://bugzilla.tianocore.org/show_bug.cgi?id=4412

2023-04-14 Thread Kuo, Ted
Reviewed-by: Ted Kuo Thanks, Ted -Original Message- From: Duggapu, Chinni B Sent: Friday, April 14, 2023 4:34 PM To: devel@edk2.groups.io Cc: Chiu, Chasel ; Desimone, Nathaniel L ; Zeng, Star ; Kuo, Ted ; Duggapu, Chinni B Subject: [PATCH v2] IntelFsp2Pkg/Tools: Enhance PathFv.py to

Re: [edk2-devel] [PATCH 2/5] RedfishPkg: Prevent assertion of allocate zero length region

2023-04-14 Thread Nickle Wang via groups.io
Hi Minh, > Prevent assertion of allocate zero length region May I know where does zero length allocation happen? According to my understanding, setting the "SubnetAddrInfoIPv6Number" to zero here and it will be handled by below condition check: https://github.com/tianocore/edk2/blob/55b67b6950

Re: [edk2-devel] [Patch V2 5/8] MdeModulePkg: Add UefiCpuPkg.dec to pass DependencyCheck

2023-04-14 Thread Wang, Jian J
MdeModulePkg has never depended on UefiCpuPkg before. Please double check if there's any side effect introduced by this mutual dependency. Acked-by: Jian J Wang > -Original Message- > From: Tan, Dun > Sent: Friday, March 31, 2023 5:34 PM > To: devel@edk2.groups.io > Cc: Gao, Liming ; N

Re: [edk2-devel] [PATCH 4/5] RedfishPkg: Add missing newline character

2023-04-14 Thread Nickle Wang via groups.io
Reviewed-by: Nickle Wang Regards, Nickle > -Original Message- > From: Minh Nguyen > Sent: Friday, April 14, 2023 4:19 PM > To: devel@edk2.groups.io > Cc: patc...@amperecomputing.com; abner.ch...@amd.com; Nickle Wang > ; ig...@ami.com; n...@os.amperecomputing.com; > tinhngu...@os.amperec

Re: [edk2-devel] [PATCH 1/5] RedfishPkg: Correct variable type to prevent memory corruption

2023-04-14 Thread Nickle Wang via groups.io
Reviewed-by: Nickle Wang Regards, Nickle > -Original Message- > From: Minh Nguyen > Sent: Friday, April 14, 2023 4:19 PM > To: devel@edk2.groups.io > Cc: patc...@amperecomputing.com; abner.ch...@amd.com; Nickle Wang > ; ig...@ami.com; n...@os.amperecomputing.com; > tinhngu...@os.amperec

[edk2-devel] [PATCH v2] IntelFsp2Pkg/Tools: Enhance PathFv.py to patch Fd file directly https://bugzilla.tianocore.org/show_bug.cgi?id=4412

2023-04-14 Thread cbduggap
After shrinking the FSP (FV) component using FMMT, Image size in FSP info header is not in sync with the FV length in FV header. This enhancement helps to patch the FSP image size offset with correct length & can be used to patch any offset directly on the FSP Component Fd . Cc: Chasel Chiu Cc: N

[edk2-devel] [PATCH v4 2/2] ArmVirtPkg: allow setting Firmware Version from build command line

2023-04-14 Thread Oliver Steffen
ArmVirtXen.dsc initializes gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString with with the value of the variable "FIRMWARE_VER". Move that functionality to ArmVirt.dsc.inc to make it available to all ArmVirt packages, and make it conditional: only set the PCD string if FIRMWARE_VER is actual

[edk2-devel] [PATCH v4 1/2] OvmfPkg: allow setting Firmware Version from build command line

2023-04-14 Thread Oliver Steffen
Initialize gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString with with the value of the variable "FIRMWARE_VER", if is is defined. Applies to all flavors of OvmfPkg. This behavior is already implemented in ArmVirtXen.dsc. It allows specifying the firmware version string on the build command

[edk2-devel] [PATCH v4 0/2] Set Firmware Version from build command line

2023-04-14 Thread Oliver Steffen
ArmVirtXen.dsc allows setting the firmware version string in gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString via FIRMWARE_VER variable conveniently on the build command line. These two patches add this behavior to all .dsc files in ArmVirtPkg and OvmfPkg. PR: https://github.com/tianocore/

[edk2-devel] [PATCH] IntelFsp2Pkg/Tools: Enhance PathFv.py to patch Fd file directly https://bugzilla.tianocore.org/show_bug.cgi?id=4412

2023-04-14 Thread cbduggap
After shrinking the FSP (FV) component using FMMT, Image size in FSP info header is not in sync with the FV length in FV header. This enhancement helps to patch the FSP image size offset with correct length & can be used to patch any offset directly on the FSP Component Fd . Signed-off-by: Duggapu

[edk2-devel] [PATCH v4 10/10] BaseTools: remove duplicate includes: IndustryStandard/*.h

2023-04-14 Thread Gerd Hoffmann
Use the MdePkg versions instead of maintaining a copy in BaseTools. Signed-off-by: Gerd Hoffmann --- BaseTools/Source/C/EfiRom/EfiRom.h| 4 +- .../C/Include/IndustryStandard/Bluetooth.h| 56 -- .../C/Include/IndustryStandard/EfiPci.h | 51 -- ...emoryMappedConfiguration

[edk2-devel] [PATCH v4 09/10] BaseTools: remove duplicate includes: IndustryStandard/PeImage.h

2023-04-14 Thread Gerd Hoffmann
Use the MdePkg version instead of maintaining a copy in BaseTools. Signed-off-by: Gerd Hoffmann Reviewed-by: Chao Li --- .../C/Include/IndustryStandard/PeImage.h | 790 -- 1 file changed, 790 deletions(-) delete mode 100644 BaseTools/Source/C/Include/IndustryStandard/PeIma

[edk2-devel] [PATCH v4 08/10] BaseTools: switch from EFI_IMAGE_MACHINE_* to IMAGE_FILE_MACHINE_*

2023-04-14 Thread Gerd Hoffmann
Use the newer versions of the machine #defines. Signed-off-by: Gerd Hoffmann Reviewed-by: Chao Li --- BaseTools/Source/C/EfiRom/EfiRom.h| 10 ++--- .../C/Include/IndustryStandard/PeImage.h | 1 + BaseTools/Source/C/Common/BasePeCoff.c| 28 ++--- BaseTools/Sourc

[edk2-devel] [PATCH v4 05/10] BaseTools: remove duplicate includes: IndustryStandard/Acpi*.h

2023-04-14 Thread Gerd Hoffmann
Use the MdePkg version instead of maintaining a copy in BaseTools. Signed-off-by: Gerd Hoffmann Acked-by: Sunil V L --- .../Source/C/Include/IndustryStandard/Acpi.h | 117 --- .../C/Include/IndustryStandard/Acpi1_0.h | 285 .../C/Include/IndustryStandard/Acpi2_0.h | 520

[edk2-devel] [PATCH v4 07/10] BaseTools: drop IMAGE_FILE_MACHINE_ARM hacks

2023-04-14 Thread Gerd Hoffmann
The #define for IMAGE_FILE_MACHINE_ARM is not present in MdePkg, this looks like a relic not used any more. Remove. Signed-off-by: Gerd Hoffmann --- BaseTools/Source/C/Common/BasePeCoff.c | 23 --- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/BaseTools/Sour

[edk2-devel] [PATCH v4 04/10] BaseTools: remove duplicate includes: /ProcessorBind.h

2023-04-14 Thread Gerd Hoffmann
Use the MdePkg version instead of maintaining a copy in BaseTools. Signed-off-by: Gerd Hoffmann Reviewed-by: Chao Li --- .../Source/C/Include/AArch64/ProcessorBind.h | 148 -- .../Source/C/Include/Arm/ProcessorBind.h | 147 -- .../Source/C/Include/Ia32/ProcessorBin

[edk2-devel] [PATCH v4 06/10] MdePkg/PeImage.h: add bits from BaseTools version

2023-04-14 Thread Gerd Hoffmann
The BaseTools and MdePkg versions of PeImage.h diverged over time, add some missing bits to the MdePkg header file in preparation for removing the BaseTools version. Signed-off-by: Gerd Hoffmann --- MdePkg/Include/IndustryStandard/PeImage.h | 31 +++ 1 file changed, 31 insert

[edk2-devel] [PATCH v4 03/10] BaseTools: remove WinNtInclude.h

2023-04-14 Thread Gerd Hoffmann
Appears to be a relic for ancient windows / compiler versions, windows builds in CI work just fine without it. Signed-off-by: Gerd Hoffmann --- BaseTools/Source/C/Common/WinNtInclude.h| 66 - BaseTools/Source/C/GenFv/GenFvInternalLib.c | 1 - BaseTools/Source/C/GenFw/Elf

[edk2-devel] [PATCH v4 01/10] BaseTools: add BASETOOLS define

2023-04-14 Thread Gerd Hoffmann
Allows for BaseTools-specific tweaks in include files. Signed-off-by: Gerd Hoffmann --- BaseTools/Source/C/Makefiles/header.makefile | 3 +++ BaseTools/Source/C/Makefiles/ms.common | 4 ++-- BaseTools/Source/C/VfrCompile/GNUmakefile| 1 + 3 files changed, 6 insertions(+), 2 deletions(-

[edk2-devel] [PATCH v4 02/10] MdePkg: don't set visibility to hidden for BaseTools

2023-04-14 Thread Gerd Hoffmann
Setting visibility to hidden can cause linker errors when BaseTools are linked against standard libraries. Signed-off-by: Gerd Hoffmann --- MdePkg/Include/X64/ProcessorBind.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/

[edk2-devel] [PATCH v4 00/10] BaseTools: remove duplicate includes.

2023-04-14 Thread Gerd Hoffmann
There is alot of code duplication between BaseTools and MdePkg (and also MdeModulePkg). This patch series starts reducing this by removing some header files. BaseTools are switched over to use the include files in MdePkg instead. It also cleans up some (apparently) obsolete code and adapts BaseT

[edk2-devel] [PATCH] CryptoPkg: Enable DXE_CORE support in DxeCryptLib.inf

2023-04-14 Thread Li, Yi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4413 Make the DXE_CORE module able to call the crypto protocol, which can reduce FV size on platforms using the Crypto Binaries. Cc: Jian J Wang Cc: Jiewen Yao Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Yi Li --- CryptoPkg/Library/BaseC

[edk2-devel] [PATCH v2 1/1] Platform/ARM/JunoPkg: Don't setup PCIe root bridge for Juno-r0

2023-04-14 Thread PierreGondois
From: Pierre Gondois Booting a Juno-r0 with a DEBUG build triggers an ASSERT when processing the library constructors of: MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf JunoPciHostBridgeLib.inf::HWPciRbInit() returns an error code as Juno-r0 doesn't support PCIe. Check Juno's revisi

Re: [edk2-devel] [PATCH 1/1] Platform/ARM/JunoPkg: Don't setup PCIe root bridge for Juno-r0

2023-04-14 Thread PierreGondois
On 4/14/23 00:04, Rebecca Cran wrote: On 4/13/23 07:14, PierreGondois wrote: diff --git a/Platform/ARM/JunoPkg/Library/JunoPciHostBridgeLib/XPressRich3.c b/Platform/ARM/JunoPkg/Library/JunoPciHostBridgeLib/XPressRich3.c index 0755dc155616..583efd0efb16 100644 --- a/Platform/ARM/JunoPkg/Libr

Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg: Support 5 level page table in ResetVector

2023-04-14 Thread Zhiguang Liu
Hi Gerd Sorry for responding late. Using 5level paging when the below two conditions are both true: 1. CPU support 5level paging 2. Platform choose to use 5level paging. (by specifing macro USE_5_LEVEL_PAGE_TABLE) There is an assumption that if platform choose to use 5level paging, then 5lev