Re: [edk2-devel] [PATCH] RedfishPkg/RedfishConfigHandler: fix FreePool issue

2023-02-13 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Hi Igor, Thanks for catching this issue, I have a comment below inline. > -Original Message- > From: Igor Kulchytskyy > Sent: Saturday, February 11, 2023 5:43 AM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Nickle Wang > > Subject: [PATCH]

[edk2-devel] Event: TianoCore Bug Triage - APAC / NAMO - Tuesday, February 14, 2023 #cal-reminder

2023-02-13 Thread Group Notification
*Reminder: TianoCore Bug Triage - APAC / NAMO* *When:* Tuesday, February 14, 2023 6:30pm to 7:30pm (UTC-08:00) America/Los Angeles *Where:*

Re: [edk2-devel] [PATCH 1/4] CryptoPkg/BaseCryptLib: avoid using SHA1()

2023-02-13 Thread Yao, Jiewen
I think so, we can still use 1.1 APIs in compatible mode. Please refer to: https://www.openssl.org/docs/man3.0/man7/OPENSSL_API_COMPAT.html https://github.com/openssl/openssl/blob/openssl-3.0.8/INSTALL.md#api-level as recommended in https://github.com/openssl/openssl/issues/17930 Thank you Yao,

Re: [edk2-devel] [PATCH V4] MdeModulePkg/Pci: Display more information of PCIe devices

2023-02-13 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: devel@edk2.groups.io On Behalf Of Chang, > Abner via groups.io > Sent: Thursday, January 12, 2023 1:14 PM > To: devel@edk2.groups.io > Cc: Wu, Hao A ; Ni, Ray ; Garrett > Kirkendall ; Abner Chang > > Subject: [edk2-devel] [PATCH V4]

Re: [edk2-devel] [PATCH v6 3/6] UefiCpuPkg/SmmBaseHob.h: Add SMM Base HOB Data

2023-02-13 Thread Wu, Jiaxin
Ok, I will change to SmBase[] instead of SmBase[1]. > -Original Message- > From: Ni, Ray > Sent: Monday, February 13, 2023 5:35 PM > To: Wu, Jiaxin ; devel@edk2.groups.io > Cc: Dong, Eric ; Zeng, Star ; > Laszlo Ersek ; Gerd Hoffmann ; > Kumar, Rahul R > Subject: RE: [PATCH v6 3/6]

Re: [edk2-devel] [PATCH v6 2/6] UefiCpuPkg/PiSmmCpuDxeSmm: Replace mIsBsp by mBspApicId

2023-02-13 Thread Wu, Jiaxin
It's hard to say the motivation for this change if we leave the patch series. Standing in a single patch, it's optional change. That's the reason I didn't want to separate this. It's hard to say the benefits of too small granularity patches. But it's fine to me also, I can explain more

Re: [edk2-devel] [PATCH v6 4/6] UefiCpuPkg/PiSmmCpuDxeSmm: Consume SMM Base Hob for SmBase info

2023-02-13 Thread Wu, Jiaxin
Hi Gerd, > > Ok, so TileSize is what the firmware needs to store code and state. > Where does the SIZE_8KB come from? I assume this is the amount of > per-cpu memory allocated by the PEI module? Shouldn't this be passed > in the HOB instead of being hard-coded? > Yes, TileSize is for

Re: [edk2-devel] [PATCH v1 1/1] .devcontainer/devcontainer.json: Add devcontainer file

2023-02-13 Thread Michael D Kinney
Merged Commit: https://github.com/tianocore/edk2/commit/540522fec06b87bf11ad5624abe23b515f282d60 Mike From: Michael Kubacki Sent: Monday, February 13, 2023 6:14 AM To: Kinney, Michael D ; devel@edk2.groups.io Subject: Re: [edk2-devel] [PATCH v1 1/1] .devcontainer/devcontainer.json: Add

Re: [edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain openssl library calls

2023-02-13 Thread Yao, Jiewen
Good work, Gerd! Do you have any data on how many K can be saved? > -Original Message- > From: devel@edk2.groups.io On Behalf Of Gerd > Hoffmann > Sent: Tuesday, February 14, 2023 3:20 AM > To: devel@edk2.groups.io > Cc: Oliver Steffen ; Pawel Polawski > ; Gerd Hoffmann > Subject:

[edk2-devel] Now: Tools, CI, Code base construction meeting series - Monday, February 13, 2023 #cal-notice

2023-02-13 Thread Group Notification
*Tools, CI, Code base construction meeting series* *When:* Monday, February 13, 2023 4:30pm to 5:30pm (UTC-08:00) America/Los Angeles *Where:* https://github.com/tianocore/edk2/discussions/2614 View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=1753758 ) *Description:* TianoCore

Re: [edk2-devel] [PATCH v1 1/1] .mergify/config.yml: Remove rebase_fallback attribute (deprecated)

2023-02-13 Thread Michael D Kinney
Changes to mergify configuration require manual merge. Push label does not work. Merged PR: https://github.com/tianocore/edk2/pull/4037 Commit: https://github.com/tianocore/edk2/commit/b3f321f2d7871868951cf73edb8fa4d5a88854a5 Mike > -Original Message- > From: Kinney, Michael D >

[edk2-devel] Event: Tools, CI, Code base construction meeting series - Monday, February 13, 2023 #cal-reminder

2023-02-13 Thread Group Notification
*Reminder: Tools, CI, Code base construction meeting series* *When:* Monday, February 13, 2023 4:30pm to 5:30pm (UTC-08:00) America/Los Angeles *Where:* https://github.com/tianocore/edk2/discussions/2614 View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=1753758 ) *Description:*

Re: [edk2-devel] [PATCH v1 1/1] .mergify/config.yml: Remove rebase_fallback attribute (deprecated)

2023-02-13 Thread Michael D Kinney
Hi Michael, Thank you for fixing this. I will merge it immediately. EDK II CI is blocked today without this change. Mike > -Original Message- > From: Kinney, Michael D > Sent: Monday, February 13, 2023 11:56 AM > To: mikub...@linux.microsoft.com; devel@edk2.groups.io > Cc: Gao,

Re: [edk2-devel] [PATCH] MdeModulePkg: allow PlatformBootManagerLib to use BootNext

2023-02-13 Thread Michael D Kinney
Hi Jeshua, Some comments on the interpretation of 'next' in BootNext. The UEFI Specification's main objective is an interface between the platform firmware and an operating system. This is a 2-way communications path. The firmware passes critical information to the OS required for the OS to

Re: [edk2-devel] [RFC 13/13] ArmVirtPkg/ArmVirtQemu: Enable hardware enforced W^X memory permissions

2023-02-13 Thread Ard Biesheuvel
On Mon, 13 Feb 2023 at 23:23, Marvin Häuser wrote: > > > On 13. Feb 2023, at 22:59, Ard Biesheuvel wrote: > > No, the only reason for adding -fpie here is to ensure that statically > initialized CONST pointers are emitted into .data.rel.ro and not into > .rodata, as this is under the control of

Re: [edk2-devel] [RFC 07/13] MdeModulePkg/DxeCore: Permit preliminary CPU arch fallback

2023-02-13 Thread Marvin Häuser
Sounds good to me, thanks! Best regards, Marvin > On 13. Feb 2023, at 23:07, Ard Biesheuvel wrote: > > On Mon, 13 Feb 2023 at 22:32, Marvin Häuser wrote: >> >> Without wanting to blow up your RFC with another one - I discussed this with >> various people, including Bret when he was still at

Re: [edk2-devel] [RFC 13/13] ArmVirtPkg/ArmVirtQemu: Enable hardware enforced W^X memory permissions

2023-02-13 Thread Marvin Häuser
> On 13. Feb 2023, at 22:59, Ard Biesheuvel wrote: > > No, the only reason for adding -fpie here is to ensure that statically > initialized CONST pointers are emitted into .data.rel.ro and not into > .rodata, as this is under the control of the compiler. Although, > thinking about this, I

Re: [edk2-devel] [PATCH 1/4] CryptoPkg/BaseCryptLib: avoid using SHA1()

2023-02-13 Thread Michael D Kinney
Hi Gerd, This is an interesting pattern for the openssl 3.0 size issues. It looks like the 1.1.1 APIs we are currently using are still available. Are those legacy APIs guaranteed to be supported under openssl 3.0? Mike > -Original Message- > From: devel@edk2.groups.io On Behalf Of

Re: [edk2-devel] [PATCH] MdeModulePkg: allow PlatformBootManagerLib to use BootNext

2023-02-13 Thread Jeshua Smith via groups.io
TL;DR - The spec indicates BootNext and BootOrder are to be processed together at the point in time where the choice about boot device is being made. The current implementation allows PlatformBootManagerLib to freely control BootOrder, but explicitly takes control of BootNext away from

Re: [edk2-devel] [RFC 07/13] MdeModulePkg/DxeCore: Permit preliminary CPU arch fallback

2023-02-13 Thread Ard Biesheuvel
On Mon, 13 Feb 2023 at 22:32, Marvin Häuser wrote: > > Without wanting to blow up your RFC with another one - I discussed this with > various people, including Bret when he was still at Project Mu, and there was > a consensus among them that integrating the whole CPU arch code right into >

Re: [edk2-devel] [RFC 13/13] ArmVirtPkg/ArmVirtQemu: Enable hardware enforced W^X memory permissions

2023-02-13 Thread Ard Biesheuvel
On Mon, 13 Feb 2023 at 22:16, Marvin Häuser wrote: > > Hey Ard, > > *Praise* to you for this series. Comments inline. > Thanks :-) > On Mon, Feb 13, 2023 at 07:19 AM, Ard Biesheuvel wrote: > > Enable the WXN system control bit straight out of reset when running in > EL1 with the initial ID map

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-13 Thread Dionna Glaze via groups.io
> Not solving the issue. Now, getting 4 calls. See below: > > ConvertPages: range 100 - 41AEFFF covers multiple entries > ConvertPages: range 100 - 41AEFFF covers multiple entries > Accepting all memory > Accepting all memory > Accepting all memory > Accepting all memory > EFI stub: ERROR:

Re: [edk2-devel] [RFC 07/13] MdeModulePkg/DxeCore: Permit preliminary CPU arch fallback

2023-02-13 Thread Marvin Häuser
Without wanting to blow up your RFC with another one - I discussed this with various people, including Bret when he was still at Project Mu, and there was a consensus among them that integrating the whole CPU arch code right into DxeCore would be a good idea. This would especially remove the

Re: [edk2-devel] [RFC 13/13] ArmVirtPkg/ArmVirtQemu: Enable hardware enforced W^X memory permissions

2023-02-13 Thread Marvin Häuser
Hey Ard, *Praise* to you for this series. Comments inline. On Mon, Feb 13, 2023 at 07:19 AM, Ard Biesheuvel wrote: > > Enable the WXN system control bit straight out of reset when running in > EL1 with the initial ID map from flash. This setting will be inherited > by the page table code after

Re: [edk2-devel] [edk2][PATCH V1 1/1] MdePkg/IndustryStandard: add definitions for MPAM ACPI specification

2023-02-13 Thread Rohit Mathew
Hi all, Gentle reminder on the patch. Thanks, Rohit > -Original Message- > From: gaoliming > Sent: 29 January 2023 05:39 > To: Rohit Mathew ; devel@edk2.groups.io > Cc: 'Michael D Kinney' ; Sami Mujawar > ; 'Zhiguang Liu' ; > Thomas Abraham ; 'Swatisri Kantamsetti' > > Subject: 回复:

Re: [edk2-devel] [PATCH v1 1/1] .mergify/config.yml: Remove rebase_fallback attribute (deprecated)

2023-02-13 Thread Michael D Kinney
Reviewed-by: Michael D Kinney > -Original Message- > From: mikub...@linux.microsoft.com > Sent: Monday, February 13, 2023 8:05 AM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Gao, Liming > ; Sean Brogan > > Subject: [PATCH v1 1/1] .mergify/config.yml: Remove rebase_fallback

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-13 Thread Gupta, Pankaj via groups.io
On 2/13/2023 7:31 PM, Dionna Amalie Glaze wrote: I'm rather confused at the moment how our internal testing succeeds given the premise of the protocol is to use the specified behavior that the OS must call get_memory_map again if ebs fails with efi_invalid_parameter, but upstream does not appear

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-13 Thread Lendacky, Thomas via groups.io
On 2/13/23 12:31, Dionna Amalie Glaze wrote: I'm rather confused at the moment how our internal testing succeeds given the premise of the protocol is to use the specified behavior that the OS must call get_memory_map again if ebs fails with efi_invalid_parameter, but upstream does not appear to

Re: [edk2-devel] [PATCH v1 1/1] .mergify/config.yml: Remove rebase_fallback attribute (deprecated)

2023-02-13 Thread Rebecca Cran
Reviewed-by: Rebecca Cran On 2/13/23 09:04, Michael Kubacki wrote: From: Michael Kubacki PR builds and CI are currently broken due to a mergify brownout today because edk2 uses the `rebase_fallback` attribute of the `queue` action. Message from Mergify/Summary: ``` The configuration

[edk2-devel] [PATCH 3/4] CryptoPkg/BaseCryptLib: avoid using SHA384()

2023-02-13 Thread Gerd Hoffmann
In openssl 3.0 SHA384() goes through the provider logic, requiring a huge amount of openssl code. The individual functions do not, so use them instead. Signed-off-by: Gerd Hoffmann --- .../Library/BaseCryptLib/Hash/CryptSha512.c | 16 +--- 1 file changed, 13 insertions(+), 3

[edk2-devel] [PATCH 1/4] CryptoPkg/BaseCryptLib: avoid using SHA1()

2023-02-13 Thread Gerd Hoffmann
In openssl 3.0 SHA1() goes through the provider logic, requiring a huge amount of openssl code. The individual functions do not, so use them instead. Signed-off-by: Gerd Hoffmann --- CryptoPkg/Library/BaseCryptLib/Hash/CryptSha1.c | 16 +--- 1 file changed, 13 insertions(+), 3

[edk2-devel] [PATCH 4/4] CryptoPkg/BaseCryptLib: avoid using SHA512()

2023-02-13 Thread Gerd Hoffmann
In openssl 3.0 SHA512() goes through the provider logic, requiring a huge amount of openssl code. The individual functions do not, so use them instead. Signed-off-by: Gerd Hoffmann --- .../Library/BaseCryptLib/Hash/CryptSha512.c | 16 +--- 1 file changed, 13 insertions(+), 3

[edk2-devel] [PATCH 2/4] CryptoPkg/BaseCryptLib: avoid using SHA256()

2023-02-13 Thread Gerd Hoffmann
In openssl 3.0 SHA256() goes through the provider logic, requiring a huge amount of openssl code. The individual functions do not, so use them instead. Signed-off-by: Gerd Hoffmann --- .../Library/BaseCryptLib/Hash/CryptSha256.c | 16 +--- 1 file changed, 13 insertions(+), 3

[edk2-devel] [PATCH 0/4] CryptoPkg/BaseCryptLib: avoid certain openssl library calls

2023-02-13 Thread Gerd Hoffmann
In preparation for the openssl 3.0 switch ... openssl 3.0 sneak preview (WIP still, does not yet pass CI) is at https://github.com/kraxel/edk2/commits/openssl3 Gerd Hoffmann (4): CryptoPkg/BaseCryptLib: avoid using SHA1() CryptoPkg/BaseCryptLib: avoid using SHA256() CryptoPkg/BaseCryptLib:

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-13 Thread Dionna Glaze via groups.io
I'm rather confused at the moment how our internal testing succeeds given the premise of the protocol is to use the specified behavior that the OS must call get_memory_map again if ebs fails with efi_invalid_parameter, but upstream does not appear to do this. If you're able to make progress by

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-13 Thread Gupta, Pankaj via groups.io
- If no memory is getting accepted at all, should guest boot fail with below errors? No, the guest should not error. EBS should return success on the second call and permit progress. - Why unaccepted memory not being set in my setup but works fine for you? Does it require any other

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-13 Thread Dionna Glaze via groups.io
> > So, no memory is getting accepted. Questions below: > > - If no memory is getting accepted at all, should guest boot fail with >below errors? No, the guest should not error. EBS should return success on the second call and permit progress. > - Why unaccepted memory not being set in my

[edk2-devel] [Help] in Setting up EFI Shell in QEMU to allow for HTTP Requests

2023-02-13 Thread CrossedCarpet
Greetings, I want to create an UEFI App with internet connection. Before I start developing the code, I wanted to make sure my setup is working properly so that the app can make http requests. To that end, I spent the last days trying to make the `http` command work in the EFI Shell launched

[edk2-devel] how to enable postcode when edk2 payload is executing

2023-02-13 Thread ritul guru
Hi, I Want to print the edk2 payload postcode in logs, how can that be enabled? *Thanks & RegardsRitul Guru+91-9916513186* -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100117): https://edk2.groups.io/g/devel/message/100117 Mute

Re: [edk2-devel] [PATCH v3 01/12] MdeModulePkg/SmbiosDxe: Fix pointer and buffer overflow CodeQL alerts

2023-02-13 Thread Michael Brown
On 13/02/2023 15:48, Michael Kubacki wrote: @@ -1608,9 +1610,12 @@ ParseAndAddExistingSmbiosTable ( // // Make sure not to access memory beyond SmbiosEnd // -if ((Smbios.Raw + sizeof (SMBIOS_STRUCTURE) > SmbiosEnd.Raw) || -(Smbios.Raw + sizeof (SMBIOS_STRUCTURE) <

Re: [edk2-devel] [PATCH v2] DynamicTablesPkg: Allow multiple top level physical nodes

2023-02-13 Thread Jeff Brasen via groups.io
The changes on your branch seem pretty good to me > -Original Message- > From: Pierre Gondois > Sent: Monday, February 6, 2023 2:28 AM > To: Jeff Brasen ; devel@edk2.groups.io > Cc: sami.muja...@arm.com; alexei.fedo...@arm.com; > quic_llind...@quicinc.com; ardb+tianoc...@kernel.org >

[edk2-devel] [PATCH v1 1/1] .mergify/config.yml: Remove rebase_fallback attribute (deprecated)

2023-02-13 Thread Michael Kubacki
From: Michael Kubacki PR builds and CI are currently broken due to a mergify brownout today because edk2 uses the `rebase_fallback` attribute of the `queue` action. Message from Mergify/Summary: ``` The configuration uses the deprecated rebase_fallback attribute of the queue action. A

[edk2-devel] [PATCH v3 03/12] BaseTools/VfrCompile: Fix potential buffer overwrites

2023-02-13 Thread Michael Kubacki
From: Michael Kubacki While more portable methods exist to handle these cases, this change does not attempt to do more than fix the immediate problem and follow the conventions already established in this code. `snprintf()` is introduced as the minimum improvement apart from making the buffers

[edk2-devel] [PATCH v3 02/12] BaseTools/PatchCheck.py: Add PCCTS to tab exemption list

2023-02-13 Thread Michael Kubacki
From: Michael Kubacki Purdue Compiler Construction Tool Set (PCCTS) source code was copied/ pasted into BaseTools/Source/C/VfrCompile/Pccts/. The code contains tab characters instead of spaces. PatchCheck.py gives an error on modifications to files that contain tabs. This change adds that

[edk2-devel] [RFC 13/13] ArmVirtPkg/ArmVirtQemu: Enable hardware enforced W^X memory permissions

2023-02-13 Thread Ard Biesheuvel
Enable the WXN system control bit straight out of reset when running in EL1 with the initial ID map from flash. This setting will be inherited by the page table code after it sets up the permanent boot time page tables, resulting in all memory mappings that are not explicitly mapped as read-only

[edk2-devel] [RFC 12/13] BaseTools/GccBase AARCH64: Avoid page sharing between code and data

2023-02-13 Thread Ard Biesheuvel
The AArch64 ARM architecture supports a hardware enforcement mode for mutual exclusion between code and data: any page that is mapped writable is implicitly non-executable as well. This means that remapping part of a runtime image for reapplying relocation fixups may result in any code sharing

[edk2-devel] [RFC 11/13] ArmVirtPkg/ArmVirtQemu: Use read-only memory region type for code flash

2023-02-13 Thread Ard Biesheuvel
Map the code flash with read-only attributes so we can execute from it even under a memory protection regime that enables WXN, making all writable memory regions non-executable by default. Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c | 2 +- 1

[edk2-devel] [RFC 10/13] ArmVirtPkg/ArmVirtQemu: Use PEI flavor of ArmMmuLib for all PEIMs

2023-02-13 Thread Ard Biesheuvel
The PEI flavor of the ArmMmuLib will install a HOB that exposes its implementation of the special helper routine that is used to update live entries, so that other instantiations of ArmMmuLib can invoke it. This is needed to ensure that splitting page tables using break-before-make (BBM) does not

[edk2-devel] [RFC 09/13] ArmVirtPkg/ArmVirtQemu: Use XP memory mappings by default

2023-02-13 Thread Ard Biesheuvel
Now that all the plumbing is in place, we can switch to a default policy of XP for all memory mappings straight out of reset. This reduces the risk of running with memory ranges mapped as both writable and executable at the same time. Note this this requires the overlay library to be added to the

[edk2-devel] [RFC 08/13] ArmPkg: Implement ArmSetMemoryOverrideLib

2023-02-13 Thread Ard Biesheuvel
Implement the ARM version of a NULL class library that can be overlaid on top of the DXE core to equip it right from its launch with an implementation of the CPU arch protocol member that sets type and permission attributes on memory regions. This bridges the gap between dispatch of DXE core and

[edk2-devel] [RFC 07/13] MdeModulePkg/DxeCore: Permit preliminary CPU arch fallback

2023-02-13 Thread Ard Biesheuvel
Store the address of the SetMemoryAttributes() member of the CPU arch protocol in a global variable, and invoke it via this variable. This by itself should have not result in functional changes, but it permits platforms to provide an preliminary implementation of this member at link time, allowing

[edk2-devel] [RFC 06/13] MdeModulePkg/DxeCore: Reduce range of W+X remaps at EBS time

2023-02-13 Thread Ard Biesheuvel
Instead of remapping all DXE runtime drivers with read-write-execute permissions entirely when ExitBootServices() is called, remap only the parts of those images that require writable access for applying relocation fixups at SetVirtualAddressMap() time. As illustrated below, this greatly reduces

[edk2-devel] [RFC 05/13] MdeModulePkg/DxeIpl AARCH64: Remap DXE core code section before launch

2023-02-13 Thread Ard Biesheuvel
To permit the platform to adopt a stricter policy when it comes to memory protections, and map all memory XP by default, add the necessary handling to the DXE IPL PEIM to ensure that the DXE core code section is mapped executable before invoking the DXE core. It is up to the DXE core itself to

[edk2-devel] [RFC 04/13] MdeModulePkg/DxeIpl: Avoid shadowing IPL PEIM by default

2023-02-13 Thread Ard Biesheuvel
Currently, the DXE IPL relies on permanent memory being available, but does not DEPEX on the associated PPI. Instead, it registers for PEIM shadowing, and only proceeds when running shadowed, and this implies that permanent memory has been installed. While PEIM shadowing is typically good for

[edk2-devel] [RFC 03/13] MdePkg/BasePeCoffLib: Add API to keep track of relocation range

2023-02-13 Thread Ard Biesheuvel
Add a library call to obtain the start and end of the region covered by relocation fixups. This will be used in a future patch to limit the range of memory that needs to be remapped with read-write-execute permissions at ExitBootServices() time. Signed-off-by: Ard Biesheuvel ---

[edk2-devel] [RFC 02/13] ArmPkg/ArmMmuLib: Introduce region types for RO/XP WB cached memory

2023-02-13 Thread Ard Biesheuvel
To prepare for the enablement of booting EFI with the SCTLR.WXN control enabled, which makes all writeable memory regions non-executable by default, introduce a memory type that we will use to describe the flash region that carries the SEC and PEIM modules that execute in place. Even if these are

[edk2-devel] [RFC 01/13] ArmPkg/Mmu: Remove handling of NONSECURE memory regions

2023-02-13 Thread Ard Biesheuvel
Non-secure memory is a distinction that only matters when executing code in the secure world that reasons about the secure vs non-secure address spaces. EDK2 was not designed for that, and the AArch64 version of the MMU handling library already treats them as identical, so let's just drop the ARM

Re: [edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

2023-02-13 Thread Gupta, Pankaj via groups.io
With this patch I observe an issue where my Linux (6.2.0-rc7) guest recur to Bootloader menu again. I am testing this with SEV SNP (w/o UPM). Also, guest don't have lazy memory acceptance support. Thanks for the report. I'll try to reproduce it on our UEFI and if I'm unable, then we'll

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

2023-02-13 Thread Patrik Berglund
Tested the patch on a N1SDP board and it works as intended with PcdUefiShellDefaultBootEnable as TRUE and FALSE. Regards, Patrik On 2023-02-07 09:06, pierre.gond...@arm.com wrote: From: Pierre Gondois The UEFI Shell is a non-active boot option, at the opposite of UiApp. If no valid boot

Re: [edk2-devel] [PATCH v1 1/1] .devcontainer/devcontainer.json: Add devcontainer file

2023-02-13 Thread Michael Kubacki
Hi Mike, I rebased the PR branch and updated the Ab to Rb. https://github.com/tianocore/edk2/pull/4015 Thanks, Michael -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100084): https://edk2.groups.io/g/devel/message/100084 Mute This

Re: [edk2-devel] [PATCH v6 4/6] UefiCpuPkg/PiSmmCpuDxeSmm: Consume SMM Base Hob for SmBase info

2023-02-13 Thread Gerd Hoffmann
Hi, > + if (GuidHob != NULL) { > +// > +// Check whether the Required TileSize is enough. > +// > +if (TileSize > SIZE_8KB) { > + DEBUG ((DEBUG_ERROR, "The Range of Smbase in SMRAM is not enough -- > Required TileSize = 0x%08x, Actual TileSize = 0x%08x\n", TileSize,

Re: [edk2-devel] [PATCH v6 2/6] UefiCpuPkg/PiSmmCpuDxeSmm: Replace mIsBsp by mBspApicId

2023-02-13 Thread Gerd Hoffmann
On Mon, Feb 13, 2023 at 04:44:13PM +0800, Jiaxin Wu wrote: > This patch is to replace mIsBsp by mBspApicId. ... and mIsBsp becomes the local variable IsBsp ... > EFIAPI > SmmInitHandler ( >VOID >) > { > - UINT32 ApicId; > - UINTN Index; > + UINT32 ApicId; > + UINTNIndex;

Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/BmBoot: Skip removable media if it is not present

2023-02-13 Thread Ni, Ray
@Wang, Jian J thanks, ray From: devel@edk2.groups.io on behalf of Sheng Lean Tan Sent: Monday, February 13, 2023 6:01:21 PM To: Rhodes, Sean ; devel@edk2.groups.io Subject: Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/BmBoot: Skip

Re: [edk2-devel] [PATCH v2 00/10] OvmfPkg: add Crypto Driver support

2023-02-13 Thread Ard Biesheuvel
On Mon, 13 Feb 2023 at 12:39, Gerd Hoffmann wrote: > > On Fri, Feb 10, 2023 at 02:46:34PM +0100, Ard Biesheuvel wrote: > > On Fri, 10 Feb 2023 at 14:42, Ard Biesheuvel wrote: > > > > > > > Can LTO be enabled for the NOOPT build? Or depends that on > > > > optimizations being turned on? > >

Re: [edk2-devel] [PATCH v2 00/10] OvmfPkg: add Crypto Driver support

2023-02-13 Thread Gerd Hoffmann
On Fri, Feb 10, 2023 at 02:46:34PM +0100, Ard Biesheuvel wrote: > On Fri, 10 Feb 2023 at 14:42, Ard Biesheuvel wrote: > > > > > Can LTO be enabled for the NOOPT build? Or depends that on > > > optimizations being turned on? Turns out: kind of. The crypto driver effectively does if

[edk2-devel] [PATCH edk2-platforms 1/2] Platform/BeagleBoard: Drop PeCoff protocol

2023-02-13 Thread Ard Biesheuvel
BeagleBoard is the only user of the so-called 'PE/COFF protocol', which just exposes the PE/COFF loader library API via a protocol, presumably to avoid duplicating this code in the PrePi SEC component as well as the DXE core. This is a rather questionable practice, and it would be better to drop

[edk2-devel] [PATCH edk2-platforms 2/2] Silicon/Marvell: Drop use of NONSECURE ARM memory region type

2023-02-13 Thread Ard Biesheuvel
The ARM memory region types with the NONSECURE qualification should only be used in places where this makes a difference, i.e., in the secure world. The Marvell firmware generally runs at EL2, which is non-secure only (in ARM v8.0) so the NONSECURE marking is unnecessary here, and should be

[edk2-devel] [PATCH edk2-platforms 0/2] Couple of ARM cleanups

2023-02-13 Thread Ard Biesheuvel
A pair of cleanups regarding the use of code that I will propose to remove from the core EDK2 in an upcoming series. Cc: Leif Lindholm Cc: Sami Mujawar Cc: Rebecca Cran Ard Biesheuvel (2): Platform/BeagleBoard: Drop PeCoff protocol Silicon/Marvell: Drop use of NONSECURE ARM memory region

Re: [edk2-devel] [PATCH] MdeModulePkg/Variable: Attribute combination should return EFI_UNSUPPORTED

2023-02-13 Thread Sunny Wang
Looks good to me. Thanks, Stuart. Reviewed-by: Sunny Wang -Original Message- From: Stuart Yoder Sent: 09 February 2023 22:31 To: devel@edk2.groups.io Cc: gaolim...@byosoft.com.cn; hao.a...@intel.com; Sunny Wang Subject: [PATCH] MdeModulePkg/Variable: Attribute combination should

Re: [edk2-devel] [PATCH 1/3] MdeModulePkg/BmBoot: Skip removable media if it is not present

2023-02-13 Thread Sheng Lean Tan
Hi Ray, This patch has been hanging along since last year. Has it been merged? Thanks, Sheng -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100074): https://edk2.groups.io/g/devel/message/100074 Mute This Topic:

Re: [edk2-devel] [PATCH v4 3/5] UefiCpuPkg/PiSmmCpuDxeSmm: Consume SMM Base Hob for SmBase info

2023-02-13 Thread Ni, Ray
Will review v6 of PiSmmCpu driver change after you two are aligned. > -Original Message- > From: Wu, Jiaxin > Sent: Monday, February 13, 2023 12:15 PM > To: kra...@redhat.com; Ni, Ray > Cc: devel@edk2.groups.io; Dong, Eric ; Zeng, Star > ; Laszlo Ersek ; Kumar, Rahul R > > Subject: RE:

Re: [edk2-devel] [PATCH v6 5/6] UefiCpuPkg/SmmCpuFeaturesLib: Skip SMBASE configuration

2023-02-13 Thread Ni, Ray
I remember I already provided the R-B. Reviewed-by: Ray Ni > -Original Message- > From: Wu, Jiaxin > Sent: Monday, February 13, 2023 4:44 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Zeng, Star > ; Laszlo Ersek ; Gerd Hoffmann > ; Kumar, Rahul R > Subject: [PATCH v6 5/6]

Re: [edk2-devel] [PATCH v6 6/6] OvmfPkg/SmmCpuFeaturesLib: Check SmBase relocation supported or not

2023-02-13 Thread Ni, Ray
I remember both Gerd and I have provided R-b. You can carry the R-B on the patch since it doesn't change. Reviewed-by: Ray Ni > -Original Message- > From: devel@edk2.groups.io On Behalf Of Wu, > Jiaxin > Sent: Monday, February 13, 2023 4:44 PM > To: devel@edk2.groups.io > Cc: Dong, Eric

Re: [edk2-devel] [PATCH v6 3/6] UefiCpuPkg/SmmBaseHob.h: Add SMM Base HOB Data

2023-02-13 Thread Ni, Ray
> + UINT64SmBase[1]; Can you please use "SmBase[]" as what Marvin pointed out? Thanks, Ray -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100070): https://edk2.groups.io/g/devel/message/100070 Mute This Topic:

Re: [edk2-devel] [PATCH v6 2/6] UefiCpuPkg/PiSmmCpuDxeSmm: Replace mIsBsp by mBspApicId

2023-02-13 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Wu, Jiaxin > Sent: Monday, February 13, 2023 4:44 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Zeng, Star > ; Laszlo Ersek ; Gerd Hoffmann > ; Kumar, Rahul R > Subject: [PATCH v6 2/6] UefiCpuPkg/PiSmmCpuDxeSmm: Replace

Re: [edk2-devel] [PATCH v6 1/6] UefiCpuPkg/PiSmmCpuDxeSmm: Fix invalid InitializeMpSyncData call

2023-02-13 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Wu, Jiaxin > Sent: Monday, February 13, 2023 4:44 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Zeng, Star > ; Laszlo Ersek ; Gerd Hoffmann > ; Kumar, Rahul R > Subject: [PATCH v6 1/6] UefiCpuPkg/PiSmmCpuDxeSmm: Fix invalid

[edk2-devel] [PATCH v6 6/6] OvmfPkg/SmmCpuFeaturesLib: Check SmBase relocation supported or not

2023-02-13 Thread Wu, Jiaxin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4337 This patch is to check SmBase relocation supported or not. If gSmmBaseHobGuid found, means SmBase info has been relocated and recorded in the SmBase array. ASSERT it's not supported in OVMF. Cc: Eric Dong Cc: Ray Ni Cc: Zeng Star Cc:

[edk2-devel] [PATCH v6 5/6] UefiCpuPkg/SmmCpuFeaturesLib: Skip SMBASE configuration

2023-02-13 Thread Wu, Jiaxin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4337 This patch is to avoid configure SMBASE if SmBase relocation has been done. If gSmmBaseHobGuid found, means SmBase info has been relocated and recorded in the SmBase array. No need to do the relocation in

[edk2-devel] [PATCH v6 4/6] UefiCpuPkg/PiSmmCpuDxeSmm: Consume SMM Base Hob for SmBase info

2023-02-13 Thread Wu, Jiaxin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4337 Existing SMBASE Relocation is in the PiSmmCpuDxeSmm driver, which will relocate the SMBASE of each processor by setting the SMBASE field in the saved state map (at offset 7EF8h) to a new value. The RSM instruction reloads the internal

[edk2-devel] [PATCH v6 3/6] UefiCpuPkg/SmmBaseHob.h: Add SMM Base HOB Data

2023-02-13 Thread Wu, Jiaxin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4337 The default SMBASE for the x86 processor is 0x3. When SMI happens, CPU runs the SMI handler at SMBASE+0x8000. Also, the SMM save state area is within SMBASE+0x1. One of the SMM initialization from CPU perspective is to relocate and

[edk2-devel] [PATCH v6 2/6] UefiCpuPkg/PiSmmCpuDxeSmm: Replace mIsBsp by mBspApicId

2023-02-13 Thread Wu, Jiaxin
This patch is to replace mIsBsp by mBspApicId. Cc: Eric Dong Cc: Ray Ni Cc: Zeng Star Cc: Laszlo Ersek Cc: Gerd Hoffmann Cc: Rahul Kumar Signed-off-by: Jiaxin Wu --- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-)

[edk2-devel] [PATCH v6 1/6] UefiCpuPkg/PiSmmCpuDxeSmm: Fix invalid InitializeMpSyncData call

2023-02-13 Thread Wu, Jiaxin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4338 No need call InitializeMpSyncData during normal boot SMI init, because mSmmMpSyncData is NULL at that time. mSmmMpSyncData is allocated in InitializeMpServiceData, which is invoked after normal boot SMI init (SmmRelocateBases). Cc: Eric

[edk2-devel] [PATCH v6 0/6] Simplify SMM Relocation Process

2023-02-13 Thread Wu, Jiaxin
Existing SMBASE Relocation is in the PiSmmCpuDxeSmm driver, which will relocate the SMBASE of each processor by setting the SMBASE field in the saved state map (at offset 7EF8h) to a new value. The RSM instruction reloads the internal SMBASE register with the value in SMBASE field when each time

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

2023-02-13 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