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

2023-02-03 Thread Ard Biesheuvel
On Sat, 4 Feb 2023 at 02:08, Pedro Falcato wrote: > > On Fri, Feb 3, 2023 at 11:25 PM Ard Biesheuvel wrote: > > > > On Fri, 3 Feb 2023 at 20:45, Pedro Falcato wrote: > > > > > > On Fri, Feb 3, 2023 at 4:28 PM Gerd Hoffmann wrote: > > > > > > > > Hi, > > > > > > > > > > Unfortunately it is not

Re: [edk2-devel] [PATCH 2/2] RedfishPkg: Redfish discover driver improvement

2023-02-03 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Please ignore my comment for adding space between "Index" and operators. Thanks Abner > -Original Message- > From: devel@edk2.groups.io On Behalf Of Chang, > Abner via groups.io > Sent: Saturday, February 4, 2023 12:25 PM > To: Nickle Wang ; devel@edk2.g

Re: [edk2-devel] [PATCH 1/1] RedfishPkg/RedfishDebugLib: provide Redfish debug functions

2023-02-03 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Thanks for introducing the debug lib for Redfish as Redfish has bunch of information to output. We can create a new debug print level for Redfish in MdePkg.dec later. Reviewed-by: Abner Chang > -Original Message- > From: Nickle Wang > Sent: Wednesday,

Re: [edk2-devel] [PATCH 2/2] RedfishPkg: Redfish discover driver improvement

2023-02-03 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Thanks for catching these bugs. Other comments below in line. > -Original Message- > From: Nickle Wang > Sent: Wednesday, February 1, 2023 11:05 AM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Igor Kulchytskyy > ; Nick Ramirez > Subject: [PATCH 2/2]

Re: [edk2-devel] [PATCH 1/2] RedfishPkg: fix config handler driver bug

2023-02-03 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Reviewed-by: Abner Chang > -Original Message- > From: Nickle Wang > Sent: Wednesday, February 1, 2023 11:05 AM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Igor Kulchytskyy > ; Nick Ramirez > Subject: [PATCH 1/2] RedfishPkg: fix config handler drive

Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Update WindowsVsToolChain plugin

2023-02-03 Thread Michael Kubacki
Acked-by: Michael Kubacki On 2/1/2023 3:22 PM, Joey Vagedes wrote: This patch updates edk2-pytool-library dependency to v0.13.0, which has an interface change to FindWithVsWhere. The BaseTools plugin uses this function, so it is being updated to account for the interface change. Cc: Bob Feng

Re: [edk2-devel] EDKII -CI weird issue

2023-02-03 Thread Michael D Kinney
Hi Jiewen, On Azure size it says that a resource was not available. I have requested the failed checks on all 3 PRs to be re-run. Mike > -Original Message- > From: Yao, Jiewen > Sent: Friday, February 3, 2023 5:28 PM > To: devel@edk2.groups.io; a...@kernel.org; Sunil V L > ; Sean Br

Re: [edk2-devel] [PATCH] RedfishPkg: fix multiple SMBIOS type 42 version issue

2023-02-03 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Reviewed-by: Abner Chang > -Original Message- > From: Nickle Wang > Sent: Wednesday, February 1, 2023 10:30 AM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Igor Kulchytskyy > ; Nick Ramirez > Subject: [PATCH] RedfishPkg: fix multiple SMBIOS type 42

[edk2-devel] EDKII -CI weird issue

2023-02-03 Thread Yao, Jiewen
Hi Sean/Mike/Liming I notice all recent P-R failed. Besides Ard's PR, https://github.com/tianocore/edk2/pull/3992 has 2 cancelled task. https://github.com/tianocore/edk2/pull/3993 has 6 cancelled task. https://github.com/tianocore/edk2/pull/3997 has 7 cancelled task. What does the "cancelled tas

Re: [edk2-devel] [PATCH] EmbeddedPkg/PrePiLib: Drop unused PCD PcdPrePiCpuIoSize

2023-02-03 Thread Michael Kubacki
Hi Ard, I'm not an admin on the tianocore Azure DevOps organization so I cannot view or do much more than you can. It appears to me to be a transient issue during provisioning on the particular agent. Normally, I'd use a "rerun failed jobs" button to see if it continues to repro as a next st

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

2023-02-03 Thread Marvin Häuser
Hi Ard, While I agree the tone is a bit irritating, I am not sure what kind of context you expect there to be. The library is nearing EOL and usage beyond EOL is unacceptable. It will take significant time to solve the related issues, test them, have them merged, and for them to trickle down th

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

2023-02-03 Thread Pedro Falcato
On Fri, Feb 3, 2023 at 11:25 PM Ard Biesheuvel wrote: > > On Fri, 3 Feb 2023 at 20:45, Pedro Falcato wrote: > > > > On Fri, Feb 3, 2023 at 4:28 PM Gerd Hoffmann wrote: > > > > > > Hi, > > > > > > > > Unfortunately it is not a clear size win everywhere. > > > > > > > > > > PEI jumps up in size

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

2023-02-03 Thread Ard Biesheuvel
On Fri, 3 Feb 2023 at 20:45, Pedro Falcato wrote: > > On Fri, Feb 3, 2023 at 4:28 PM Gerd Hoffmann wrote: > > > > Hi, > > > > > > Unfortunately it is not a clear size win everywhere. > > > > > > > > PEI jumps up in size even though I'm using the min_pei config for > > > > CryptoPei, seems it *s

[edk2-devel] [edk2-platforms: PATCH] IntelSiliconPkg/SpiFvbServiceSmm: Rewrite VariableStore header.

2023-02-03 Thread Chiu, Chasel
When invalid VariableStore FV header detected, current SpiFvbService will erase both FV and VariableStore headers from flash, however, it will only rewrite FV header back and cause invalid VariableStore header. This patch adding the support for rewriting both FV header and VariableStore header whe

Re: [edk2-devel] [PATCH 4/4] ArmPkg/CpuDxe: Implement EFI memory attributes protocol

2023-02-03 Thread Marvin Häuser
Hi Taylor, Do you by any chance mean this bug? https://github.com/microsoft/mu_basecore/blob/release/202208/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c#L1544 I reported this a while ago at https://bugzilla.tianocore.org/show_bug.cgi?id=3316 The Mu fix is by no means a workaround and actually

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

2023-02-03 Thread Pedro Falcato
On Fri, Feb 3, 2023 at 4:28 PM Gerd Hoffmann wrote: > > Hi, > > > > Unfortunately it is not a clear size win everywhere. > > > > > > PEI jumps up in size even though I'm using the min_pei config for > > > CryptoPei, seems it *still* has way too much bits compiled in > > > (didn't look into tweak

Re: [edk2-devel] [PATCH 4/4] ArmPkg/CpuDxe: Implement EFI memory attributes protocol

2023-02-03 Thread Taylor Beebe
On 2/2/2023 1:43 AM, Ard Biesheuvel wrote: On Wed, 1 Feb 2023 at 19:41, Taylor Beebe wrote: Hey Ard, Have you encountered complications which stem from the lack of pre-allocated page table memory on ARM devices utilizing the memory protection policy? Interesting. No I haven't, but I agr

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

2023-02-03 Thread Jeff Brasen via groups.io
In SSDT CPU topology generator allow for multiple top level physical nodes as would be seen with a multi-socket system. This will create a top level processor container for all systems. Signed-off-by: Jeff Brasen --- .../SsdtCpuTopologyGenerator.c| 43 ++-

Re: [edk2-devel] regarding build uefipayload in debug mode in linux

2023-02-03 Thread ritul guru
Thanks, build -p "UefiPayloadPkg/UefiPayloadPkg.dsc" *-b DEBUG* -t GCC5 -a IA32 -a X64 -D COREBOOT I used above cmd, added DEBUG option by seeing NO debug messages coming from uefipayload. any idea how to enable debug messages coming from uefipayload built with above cmd? *Thanks & RegardsR

Re: [edk2-devel] [PATCH 1/2] DynamicTablesPkg: IORT generator updates for Rev E.e spec

2023-02-03 Thread PierreGondois
Hello Swatisri, On 1/25/23 19:40, Name wrote: From: Swatisri Kantamsetti The IO Remapping Table, Platform Design Document, Revision E.e, Sept 2022 (https://developer.arm.com/documentation/den0049/ee) added flags in SMMUv3 node for validity of ID mappings for MSIs related to control interrupts.

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

2023-02-03 Thread Jeff Brasen via groups.io
To solve that problem I had added support for allowing the UID/Name to come from the node https://github.com/tianocore/edk2/commit/5fb3f5723a1ea9d9a93e317181e1c11468a9eb45 > -Original Message- > From: Pierre Gondois > Sent: Friday, February 3, 2023 9:28 AM > To: Jeff Brasen ; devel@edk2

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

2023-02-03 Thread Gerd Hoffmann
Hi, > > Unfortunately it is not a clear size win everywhere. > > > > PEI jumps up in size even though I'm using the min_pei config for > > CryptoPei, seems it *still* has way too much bits compiled in > > (didn't look into tweaking the config yet, hints are welcome). > > > > - 17530 TcgPei > >

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

2023-02-03 Thread PierreGondois
On 2/3/23 17:00, Jeff Brasen wrote: I'll on an updated patch this morning that only does the new behavior. We can't reset the procindex as it is used for the _UID as well and we would end up with the same value in two nodes. Yes indeed, then maybe the name/uid selection should not be done

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

2023-02-03 Thread Jeff Brasen via groups.io
I'll on an updated patch this morning that only does the new behavior. We can't reset the procindex as it is used for the _UID as well and we would end up with the same value in two nodes. -Jeff > -Original Message- > From: Pierre Gondois > Sent: Friday, February 3, 2023 6:11 AM > To:

Re: [edk2-devel] [edk2-platforms][PATCH V2 0/5] Enable SoC expansion block and Virtio-P9 for RD-N2 variants

2023-02-03 Thread PierreGondois
Hello Vivek, On 1/27/23 10:23, Vivek Gautam wrote: Arm reference design Fixed Virtual Platforms (FVPs) such as the RD-N2 platform variants have multiple IO virtualization blocks that allow connecting PCIe root bus or non-PCIe SoC peripherals to the system. Each of these IO virtualization blocks

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

2023-02-03 Thread Ard Biesheuvel
On Fri, 3 Feb 2023 at 16:37, Gerd Hoffmann wrote: > > On Fri, Feb 03, 2023 at 02:33:07PM +0100, Ard Biesheuvel wrote: > > What is the point of this series? If we are trying to deduplicate > > crypto code by moving it into a dedicated driver, can we please just > > do that unconditionally, instead

Re: [edk2-devel] [edk2-platforms][PATCH V2 3/5] Platform/Sgi: Add SSDT table for IO virtualization SoC expansion block

2023-02-03 Thread PierreGondois
Hello Vivek, On 1/27/23 10:23, Vivek Gautam wrote: Arm reference design platforms have multiple IO virtualization blocks that allow connecting PCIe root bus or non-PCIe SoC peripherals to the system. Each of these IO virtualization blocks consists of an instance of SMMUv3, a GIC-ITS and a NCI (n

Re: [edk2-devel] [edk2-platforms][PATCH V2 4/5] Platform/Sgi: Initialize additional UART controllers

2023-02-03 Thread PierreGondois
Hello Vivek, On 1/27/23 10:23, Vivek Gautam wrote: From: Shriram K The IO virtualization block on reference design platforms allow connecting SoC expansion devices such as PL011 UART. On platforms that support this, initialize the UART controller connected to the IO virtualization block. Sign

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

2023-02-03 Thread Gerd Hoffmann
On Fri, Feb 03, 2023 at 02:33:07PM +0100, Ard Biesheuvel wrote: > What is the point of this series? If we are trying to deduplicate > crypto code by moving it into a dedicated driver, can we please just > do that unconditionally, instead of doubling the size of the > validation matrix again? Or are

Re: [edk2-devel] [PATCH V1 1/1] OvmfPkg/IntelTdx: Update README

2023-02-03 Thread Gerd Hoffmann
On Fri, Feb 03, 2023 at 10:04:25PM +0800, Min Xu wrote: > From: Min M Xu > > TDVF's README is updated based on the latest feature. > - RTMR based measurement is supported in OvmfPkgX64 (Config-A) > - Features of Config-B have all been implemented, such as removing >unnecessary attack surfac

Re: [edk2-devel] [PATCH v3 1/5] UefiCpuPkg/SmmBaseHob.h: Add SMM Base HOB Data

2023-02-03 Thread Gerd Hoffmann
On Fri, Feb 03, 2023 at 01:22:48PM +, Wu, Jiaxin wrote: > Hi Gerd, > > Is it still the solution with multiple hobs created for big data but you want > the hob splitting and reassembling can be encapsulated in the Hoblib? Exactly. > Does it need define the new hob type for chunk? Adding EFI

Re: [edk2-devel] [PATCH v2] ArmPkg/ArmScmiDxe: Fix the calculation of RequiredArraySize in ClockDescribeRates()

2023-02-03 Thread Sami Mujawar
Hi Sudeep, Thank you for the updated patch. Reviewed-by: Sami Mujawar Tested-by: Sami Mujawar Regards, Sami Mujawar -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#99601): https://edk2.groups.io/g/devel/message/99601 Mute This Topic:

[edk2-devel] [PATCH v2] ArmPkg/ArmScmiDxe: Fix the calculation of RequiredArraySize in ClockDescribeRates()

2023-02-03 Thread Sudeep Holla
As per the SCMI specification, section CLOCK_DESCRIBE_RATES mentions that the value of num_rates_flags[11:0] in the response must be 3 if the return format is the triplet. Due to the buggy firmware, this was not noticed for long time. The firmware is now fixed resulting in ClockDescribeRates() to f

Re: [edk2-devel] [PATCH V1 1/1] OvmfPkg/IntelTdx: Update README

2023-02-03 Thread Yao, Jiewen
Reviewed-by: Jiewen Yao > -Original Message- > From: Xu, Min M > Sent: Friday, February 3, 2023 10:04 PM > To: devel@edk2.groups.io > Cc: Xu, Min M ; Aktas, Erdem > ; James Bottomley ; Yao, > Jiewen ; Gerd Hoffmann ; Tom > Lendacky ; Michael Roth > > Subject: [PATCH V1 1/1] OvmfPkg/Inte

[edk2-devel] [PATCH V1 1/1] OvmfPkg/IntelTdx: Update README

2023-02-03 Thread Min Xu
From: Min M Xu TDVF's README is updated based on the latest feature. - RTMR based measurement is supported in OvmfPkgX64 (Config-A) - Features of Config-B have all been implemented, such as removing unnecessary attack surfaces. Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Gerd

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

2023-02-03 Thread Ard Biesheuvel
On Fri, 3 Feb 2023 at 14:28, Gerd Hoffmann wrote: > What is the point of this series? If we are trying to deduplicate crypto code by moving it into a dedicated driver, can we please just do that unconditionally, instead of doubling the size of the validation matrix again? Or are there reasons why

Re: [edk2-devel] [PATCH v3 1/5] UefiCpuPkg/SmmBaseHob.h: Add SMM Base HOB Data

2023-02-03 Thread Ni, Ray
I think we need to define a new chunk hob type for solution proposed by Gerd. I will leave that to PIWG (PI spec working group) for discussion. In this topic, I prefer to solve the problem in the CPU domain. > -Original Message- > From: Wu, Jiaxin > Sent: Friday, February 3, 2023 9:23 P

[edk2-devel] [PATCH 11/11] OvmfPkg: AmdSev: use crypto includes

2023-02-03 Thread Gerd Hoffmann
Use the new crypto support include files. Signed-off-by: Gerd Hoffmann --- OvmfPkg/AmdSev/AmdSevX64.dsc | 11 +++ OvmfPkg/AmdSev/AmdSevX64.fdf | 6 ++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc index 36

[edk2-devel] [PATCH 07/11] OvmfPkg: OvmfPkgIa32X64: use crypto includes

2023-02-03 Thread Gerd Hoffmann
Use the new crypto support include files. Signed-off-by: Gerd Hoffmann --- OvmfPkg/OvmfPkgIa32X64.dsc | 20 +++- OvmfPkg/OvmfPkgIa32X64.fdf | 6 ++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index

[edk2-devel] [PATCH 09/11] OvmfPkg: Microvm: use crypto includes

2023-02-03 Thread Gerd Hoffmann
Use the new crypto support include files. Signed-off-by: Gerd Hoffmann --- OvmfPkg/Microvm/MicrovmX64.dsc | 22 +- OvmfPkg/Microvm/MicrovmX64.fdf | 7 +++ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/Mi

[edk2-devel] [PATCH 10/11] OvmfPkg: IntelTdx: use crypto includes

2023-02-03 Thread Gerd Hoffmann
Use the new crypto support include files. Signed-off-by: Gerd Hoffmann --- OvmfPkg/IntelTdx/IntelTdxX64.dsc | 15 +-- OvmfPkg/IntelTdx/IntelTdxX64.fdf | 5 + 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/OvmfPkg/IntelTdx/IntelTdxX64.dsc b/OvmfPkg/IntelTdx/Intel

[edk2-devel] [PATCH 06/11] OvmfPkg: add OVMF_X64_CRYPTO_DRIVER test case

2023-02-03 Thread Gerd Hoffmann
Add one build config with USE_CRYPTO_DRIVER=TRUE to CI. Signed-off-by: Gerd Hoffmann --- OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 7 +++ 1 file changed, 7 insertions(+) diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-G

[edk2-devel] [PATCH 08/11] OvmfPkg: OvmfPkgIa32: use crypto includes

2023-02-03 Thread Gerd Hoffmann
Use the new crypto support include files. Signed-off-by: Gerd Hoffmann --- OvmfPkg/OvmfPkgIa32.dsc | 20 +++- OvmfPkg/OvmfPkgIa32.fdf | 6 ++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index f232de13a7b6

[edk2-devel] [PATCH 03/11] OvmfPkg: OvmfPkgX64: use Crypto Libs include

2023-02-03 Thread Gerd Hoffmann
Remove all crypto library references from OvmfPkgX64.dsc, use the new include file instead. Signed-off-by: Gerd Hoffmann --- OvmfPkg/OvmfPkgX64.dsc | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 3f970a79a08

[edk2-devel] [PATCH 04/11] OvmfPkg: Add Crypto driver support, add more OvmfCrypto*.inc files.

2023-02-03 Thread Gerd Hoffmann
This patch adds optional CryptoDriver support to OvmfCryptoLibs.dsc.inc. This can be enabled by setting USE_CRYPTO_DRIVER to TRUE. Using the crypto driver needs changes in more places (configure CryptoDriver, add the driver to flash images etc.), so this patch adds more include files for that. Si

[edk2-devel] [PATCH 05/11] OvmfPkg: OvmfPkgX64: use new Crypto support includes

2023-02-03 Thread Gerd Hoffmann
Use the new include files which needed for CryptoDriver support. This allows to build OvmfPkgX64.dsc with USE_CRYPTO_DRIVER=TRUE. Signed-off-by: Gerd Hoffmann --- OvmfPkg/OvmfPkgX64.dsc | 6 ++ OvmfPkg/OvmfPkgX64.fdf | 6 ++ 2 files changed, 12 insertions(+) diff --git a/OvmfPkg/OvmfPkg

[edk2-devel] [PATCH 02/11] OvmfPkg: add OvmfCryptoLibs.dsc.inc

2023-02-03 Thread Gerd Hoffmann
Create OvmfCryptoLibs.dsc.inc include file with LibraryClasses configuration for crypto support. This include file is supposed to be usable for all OVMF variants and should reduce the duplication we have. The configuration follows mostly the recommendations given in CryptoPkg/Readme.md, with some

[edk2-devel] [PATCH 00/11] OvmfPkg: add Crypto Driver support

2023-02-03 Thread Gerd Hoffmann
Gerd Hoffmann (11): CryptoPkg: move Driver PCD configs to include files OvmfPkg: add OvmfCryptoLibs.dsc.inc OvmfPkg: OvmfPkgX64: use Crypto Libs include OvmfPkg: Add Crypto driver support, add more OvmfCrypto*.inc files. OvmfPkg: OvmfPkgX64: use new Crypto support includes OvmfPkg: a

[edk2-devel] [PATCH 01/11] CryptoPkg: move Driver PCD configs to include files

2023-02-03 Thread Gerd Hoffmann
Makes it easier to reuse the predefined config sets in other places. Signed-off-by: Gerd Hoffmann --- .../Include/Dsc/CryptoServicePcd.all.dsc.inc | 29 +++ .../Dsc/CryptoServicePcd.min_dxe_smm.dsc.inc | 35 + .../Dsc/CryptoServicePcd.min_pei.dsc.inc | 20 + CryptoPkg/Cryp

Re: [edk2-devel] [PATCH v3 1/5] UefiCpuPkg/SmmBaseHob.h: Add SMM Base HOB Data

2023-02-03 Thread Wu, Jiaxin
Hi Gerd, Is it still the solution with multiple hobs created for big data but you want the hob splitting and reassembling can be encapsulated in the Hoblib? Does it need define the new hob type for chunk? Thanks, Jiaxin > -Original Message- > From: kra...@redhat.com > Sent: Friday, Fe

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

2023-02-03 Thread PierreGondois
On 2/2/23 18:53, Jeff Brasen wrote: There are some cases (for example the _PSL list in thermal zones) where we need to have a reference to the node and we have been doing that via an Extern and a reference to the node path. I am push a patch where the effectively the PCD I added was fixed tr

Re: [edk2-devel] [RFC PATCH v2 7/7] ArmVirtPkg: Implement BTI for runtime regions

2023-02-03 Thread Michael Brown
On 03/02/2023 12:55, Ard Biesheuvel wrote: Question: as a producer of externally loaded UEFI binaries (e.g. ipxe.efi): what would I need to do to take advantage of BTI? I'm assuming: - enable -mbranch-protection=bti in my builds (easy) - wait for PE/COFF specification change and then update my

Re: [edk2-devel] [RFC PATCH v2 7/7] ArmVirtPkg: Implement BTI for runtime regions

2023-02-03 Thread Ard Biesheuvel
On Fri, 3 Feb 2023 at 13:33, Michael Brown wrote: > > On 03/02/2023 12:10, Ard Biesheuvel wrote: > > +[BuildOptions] > > +!if $(RUNTIME_BTI_ENABLE) == TRUE > > + GCC:*_*_AARCH64_CC_FLAGS = -mbranch-protection=bti > > +!endif > > Question: as a producer of externally loaded UEFI binaries (e.g. > i

Re: [edk2-devel] [RFC PATCH v2 7/7] ArmVirtPkg: Implement BTI for runtime regions

2023-02-03 Thread Michael Brown
On 03/02/2023 12:10, Ard Biesheuvel wrote: +[BuildOptions] +!if $(RUNTIME_BTI_ENABLE) == TRUE + GCC:*_*_AARCH64_CC_FLAGS = -mbranch-protection=bti +!endif Question: as a producer of externally loaded UEFI binaries (e.g. ipxe.efi): what would I need to do to take advantage of BTI? I'm assumi

Re: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V7 11/20] ArmVirtPkg/PlatformHasAcpiDtDxe: Move to OvmfPkg

2023-02-03 Thread Ard Biesheuvel
On Mon, 30 Jan 2023 at 14:44, Sunil V L wrote: > > Hi Ard, Leif, > > Do you see any issues with this migration? > > Thanks! > Sunil > > On Sun, Jan 29, 2023 at 12:47:58AM +0530, Sunil V L via groups.io wrote: > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4076 > > > > This module is requi

Re: [edk2-devel] edk2setup.sh shortcomings

2023-02-03 Thread tlaro...@polynum.com
Le Thu, Feb 02, 2023 at 04:06:13PM -0700, Rebecca Cran a écrit : > On 2/2/23 14:49, Brian J. Johnson wrote: > This above is misleading: this is not Brian J. Johnson who wrote what is below: this is me (Thierry Laronde): > > Hum... There is a very lethal weapon actually in use: the pillow. I > >

Re: [edk2-devel] [PATCH] ArmPkg/ArmScmiDxe: Fix the calculation of RequiredArraySize in ClockDescribeRates()

2023-02-03 Thread Ard Biesheuvel
On Fri, 3 Feb 2023 at 12:20, Sudeep Holla wrote: > > On Fri, Feb 03, 2023 at 12:10:38PM +0100, Pierre Gondois wrote: > > Hello Sudeep, > > > > On 2/2/23 15:30, Sudeep Holla wrote: > > > As per the SCMI specification, section CLOCK_DESCRIBE_RATES mentions that > > > the value of num_rates_flags[11:

Re: [edk2-devel] [PATCH edk2-platforms v1 1/1] Platform/ARM: Fix BootMonFS device path

2023-02-03 Thread Ard Biesheuvel
On Thu, 2 Feb 2023 at 12:28, Sudeep Holla wrote: > > On Thu, Feb 02, 2023 at 11:21:38AM +, Sami Mujawar wrote: > > The NOR Flash driver was recently moved from the Tianocore\edk2 repository > > to the Tianocore\edk2-platforms repository at the following location: > > Platform\ARM\Drivers\NorFl

[edk2-devel] [RFC PATCH v2 7/7] ArmVirtPkg: Implement BTI for runtime regions

2023-02-03 Thread Ard Biesheuvel
Add a build option RUNTIME_BTI_ENABLE, and wire it up to the command line options passed to the compiler to get it to emit BTI landing pads into all modules. Note that runtime DXE modules may incorporate libraries of type BASE, UEFI_DRIVER or DXE_DRIVER, so the only safe option here is to apply the

[edk2-devel] [RFC PATCH v2 5/7] MdePkg/BasePeCoffLib AARCH64: Implement fwd control flow guard detection

2023-02-03 Thread Ard Biesheuvel
Add the check to infer from the instruction opcode at the image entrypoint whether or not forward edge control flow guards were emitted by the compiler at build time. Given that an image entry point is invoked indirectly by construction, its entrypoint must have such a guard instruction there if it

[edk2-devel] [RFC PATCH v2 6/7] MdeModulePkg: Enable forward edge CFI in mem attributes table

2023-02-03 Thread Ard Biesheuvel
The memory attributes table has been extended with a flag that indicates whether or not the OS is permitted to map the EFI runtime code regions with strict enforcement for IBT/BTI landing pad instructions. The PE/COFF loader will now keep track of whether loaded images are constructed in the expec

[edk2-devel] [RFC PATCH v2 3/7] MdePkg/BasePeCoffLib: Clean up stale Itanium references in comments

2023-02-03 Thread Ard Biesheuvel
The specialized relocation fixup handlers are used by ARM and RISC-V but not by IPF/Itanium anymore, so let's clean up the comments referring to Itanium. No code changes. Signed-off-by: Ard Biesheuvel --- MdePkg/Library/BasePeCoffLib/BasePeCoff.c | 2 +- MdePkg/Library/BasePeCoffLib

[edk2-devel] [RFC PATCH v2 4/7] MdePkg/BasePeCoffLib: Add generic plumbing to detect IBT/BTI support

2023-02-03 Thread Ard Biesheuvel
Add an internal helper that detects whether or not a loaded PE/COFF image was built with support for forward edge control flow guards. The default implementation will return FALSE, architectures can specialize this based on arch specific criteria. Signed-off-by: Ard Biesheuvel --- MdePkg/Includ

[edk2-devel] [RFC PATCH v2 2/7] MdePkg/BasePeCoffLib: Move RISC-V definitions out of generic header

2023-02-03 Thread Ard Biesheuvel
Generic headers should only contain arch specific definitions if really needed, which is not the case for the RISC-V based opcode immediate parsing constants, so move them out of BasePeCoffLibInternals.h. Signed-off-by: Ard Biesheuvel --- MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h | 9

[edk2-devel] [RFC PATCH v2 1/7] MdePkg: Update MemoryAttributesTable to v2.10

2023-02-03 Thread Ard Biesheuvel
UEFI v2.10 introduces a new flag to the memory attributes table to inform the OS whether or not runtime services code regions were emitted by the compiler with guard instructions for forward edge control flow integrity enforcement. So update our definition accordingly. Signed-off-by: Ard Biesheuv

[edk2-devel] [RFC PATCH v2 0/7] enable IBT/BTI codegen and reporting to the OS

2023-02-03 Thread Ard Biesheuvel
v2: - check instruction opcode at image entry point to decide whether the image was built with forward edge control flow guards - add some cleanup patches for BasePeCoffLib while at it Cc: Michael Kinney Cc: Liming Gao Cc: Jiewen Yao Cc: Michael Kubacki Cc: Sean Brogan Cc: Rebecca Cran Cc:

Re: [edk2-devel] [PATCH] EmbeddedPkg/PrePiLib: Drop unused PCD PcdPrePiCpuIoSize

2023-02-03 Thread Ard Biesheuvel
I pushed this here https://github.com/tianocore/edk2/pull/3994 but I am getting weird errors from the CI An error occurred while provisioning resources (Error Type: Failure). Build_VS2019 TARGET_FMP_FAT_TEST The remote provider was unable to process the request. Build_VS2019 TARGET_FMP_FAT_TEST

Re: [edk2-devel] [PATCH v1 3/4] ArmVirtPkg: require self-signed PK when secure boot is enabled

2023-02-03 Thread Gerd Hoffmann
On Fri, Feb 03, 2023 at 11:49:07AM +0100, Ard Biesheuvel wrote: > On Fri, 20 Jan 2023 at 23:59, Jan Bobek wrote: > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2506 > > > > In all DSC files that define SECURE_BOOT_ENABLE, opt-in into requiring > > self-signed PK when SECURE_BOOT_ENABL

Re: [edk2-devel] [PATCH] ArmPkg/ArmScmiDxe: Fix the calculation of RequiredArraySize in ClockDescribeRates()

2023-02-03 Thread Sudeep Holla
On Fri, Feb 03, 2023 at 12:10:38PM +0100, Pierre Gondois wrote: > Hello Sudeep, > > On 2/2/23 15:30, Sudeep Holla wrote: > > As per the SCMI specification, section CLOCK_DESCRIBE_RATES mentions that > > the value of num_rates_flags[11:0] in the response must be 3 if the return > > format is the tr

Re: [edk2-devel] [PATCH v3 5/5] OvmfPkg/SmmCpuFeaturesLib: Skip SMBASE configuration

2023-02-03 Thread Wu, Jiaxin
> > > > > > It's doable to program the hardware interface using DXE MP service > > protocol in > > > CpuSmm driver's entry point. > > > But, considering the standalone MM environment where the CpuMm > > driver runs > > > in a isolated environment and it cannot invoke any DXE or PEI MP service, > >

Re: [edk2-devel] [PATCH] EmbeddedPkg/PrePiLib: Drop unused PCD PcdPrePiCpuIoSize

2023-02-03 Thread Sunil V L
Thanks a lot!, Ard. Reviewed-by: Sunil V L On Fri, Feb 03, 2023 at 12:08:43PM +0100, Ard Biesheuvel wrote: > The code never references the PCD so the INF should not reference it > either. The last reference was moved to PrePiHobLib in commit > 05e48e00834b32e4bd2 (dated 2011!) and dropped from

Re: [edk2-devel] [PATCH v1 3/4] ArmVirtPkg: require self-signed PK when secure boot is enabled

2023-02-03 Thread Ard Biesheuvel
On Fri, 3 Feb 2023 at 12:15, Yao, Jiewen wrote: > > That is fine. This patch is just to maintain the compatibility. > > Feel free to drop it, if you think it is not needed for this platform. > > I can merge rest patches at first. > OK, please go ahead. > > -Original Message- > > From:

Re: [edk2-devel] [PATCH v3 5/5] OvmfPkg/SmmCpuFeaturesLib: Skip SMBASE configuration

2023-02-03 Thread Wu, Jiaxin
> > > > Do you agree just assert mSmmCpuFeaturesSmmRelocated is the false for > OVMF? > > Skip the indirection, just "ASSERT(GetFirstGuidHob(...) == NULL)". > Yes, sure, thanks. > take care, > Gerd > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to thi

Re: [edk2-devel] [PATCH v1 3/4] ArmVirtPkg: require self-signed PK when secure boot is enabled

2023-02-03 Thread Yao, Jiewen
That is fine. This patch is just to maintain the compatibility. Feel free to drop it, if you think it is not needed for this platform. I can merge rest patches at first. > -Original Message- > From: Ard Biesheuvel > Sent: Friday, February 3, 2023 6:49 PM > To: Jan Bobek > Cc: devel@edk

Re: [edk2-devel] [PATCH] ArmPkg/ArmScmiDxe: Fix the calculation of RequiredArraySize in ClockDescribeRates()

2023-02-03 Thread PierreGondois
Hello Sudeep, On 2/2/23 15:30, Sudeep Holla wrote: As per the SCMI specification, section CLOCK_DESCRIBE_RATES mentions that the value of num_rates_flags[11:0] in the response must be 3 if the return format is the triplet. Due to the buggy firmware, this was not noticed for long time. The firmwa

[edk2-devel] [PATCH] EmbeddedPkg/PrePiLib: Drop unused PCD PcdPrePiCpuIoSize

2023-02-03 Thread Ard Biesheuvel
The code never references the PCD so the INF should not reference it either. The last reference was moved to PrePiHobLib in commit 05e48e00834b32e4bd2 (dated 2011!) and dropped from there as well in commit 97106391955337155e7. Cc: Leif Lindholm Cc: Abner Chang Cc: Daniel Schaefer Reported-by: S

Re: [edk2-devel] [PATCH v1 3/4] ArmVirtPkg: require self-signed PK when secure boot is enabled

2023-02-03 Thread Ard Biesheuvel
On Fri, 20 Jan 2023 at 23:59, Jan Bobek wrote: > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2506 > > In all DSC files that define SECURE_BOOT_ENABLE, opt-in into requiring > self-signed PK when SECURE_BOOT_ENABLE is TRUE. > > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Cc: Sami Mujawar

Re: [edk2-devel] [RFC PATCH 2/3] MdeModulePkg: Enable forward edge CFI in mem attributes table

2023-02-03 Thread Yao, Jiewen
Adding bit in Image header is best way. I totally agree. The only disadvantage is that it may take time to update PE/COFF specification and take time to update the compiler to generate such bit. If people want to wait for those spec update, I don't have any concern. Personally, I don't think add

Re: [edk2-devel] edk2setup.sh shortcomings

2023-02-03 Thread Marvin Häuser
Getting a patch reviewed by one maintainer and having the rest not respond even after multiple(!) pings is not „missed“. Let‘s be realistic here. When I was still actively subscribed to the list, I had all mails that CC‘d me go to a separate folder. If I had more patch traffic, I would have had

Re: [edk2-devel] [RFC PATCH 2/3] MdeModulePkg: Enable forward edge CFI in mem attributes table

2023-02-03 Thread Marvin Häuser
Hi Ard and Jiewen, (I‘m replying from groups.io and cannot figure out how to CC Jiewen. Ugh.) Personally, I‘d rather have UEFI itself rely solely on the flag in the image file. If there is a way needed to handle images without the tag, in my opinion use some userland preprocessing tool to check

Re: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V7 10/20] EmbeddedPkg: Enable PcdPrePiCpuIoSize for RISC-V

2023-02-03 Thread Sunil V L
Hi Ard, Leif, Irrespective of refactoring gets accepted or not, this change is necessary for RISC-V. This is a simple change and it will be great if you could merge before freeze window starts. In fact, I don't know why this PCD PcdPrePiCpuIoSize is required in PrePiLib.inf since it is not used i

Re: [edk2-devel] [PATCH v3 5/5] OvmfPkg/SmmCpuFeaturesLib: Skip SMBASE configuration

2023-02-03 Thread Gerd Hoffmann
On Fri, Feb 03, 2023 at 08:59:06AM +, Wu, Jiaxin wrote: > Hi Laszlo & Gerd, > > > SmmCpuFeaturesLibConstructor ( > >IN EFI_HANDLEImageHandle, > >IN EFI_SYSTEM_TABLE *SystemTable > >) > > { > > + // > > + // If gSmmBaseHobGuid found, means SmBase info has been relocated

Re: [edk2-devel] [PATCH v3 5/5] OvmfPkg/SmmCpuFeaturesLib: Skip SMBASE configuration

2023-02-03 Thread Wu, Jiaxin
Hi Laszlo & Gerd, > SmmCpuFeaturesLibConstructor ( >IN EFI_HANDLEImageHandle, >IN EFI_SYSTEM_TABLE *SystemTable >) > { > + // > + // If gSmmBaseHobGuid found, means SmBase info has been relocated and > recorded > + // in the SmBase array. > + // > + mSmmCpuFeaturesSmmRe

Re: [edk2-devel] [PATCH V6 08/12] OvmfPkg/IntelTdx: Measure TdHob and Configuration FV in SecMain

2023-02-03 Thread Gerd Hoffmann
On Fri, Feb 03, 2023 at 11:31:43AM +0800, Min Xu wrote: > From: Min M Xu > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4243 > > TdHob and Configuration FV (Cfv) are external inputs from VMM. From the > security perspective, they should be measured before they're consumed. > This patch m

Re: [edk2-devel] [PATCH v3 5/5] OvmfPkg/SmmCpuFeaturesLib: Skip SMBASE configuration

2023-02-03 Thread Gerd Hoffmann
Hi, > Please don't imagine that "I" want to hide something. If I cannot tell you > something, > that's because the information cannot be public for now required by > the company policy. I fully understand that it not your personal choice but company policy. Just explicitly say so -- ideally r

Re: [edk2-devel] [RFC PATCH 2/3] MdeModulePkg: Enable forward edge CFI in mem attributes table

2023-02-03 Thread Marvin Häuser
Sorry, forgot to ask (and it’s probably obvious), but there is a sane tag for ELFs that could be translated to the potential new PE tag, right? For both GCC and Clang builds? > On 3. Feb 2023, at 09:28, Ard Biesheuvel wrote: > > On Fri, 3 Feb 2023 at 09:25, Marvin Häuser wrote: >> >> Hi Ard

Re: [edk2-devel] [RFC PATCH 2/3] MdeModulePkg: Enable forward edge CFI in mem attributes table

2023-02-03 Thread Ard Biesheuvel
On Fri, 3 Feb 2023 at 09:25, Marvin Häuser wrote: > > Hi Ard, > > Short story: No, TE is not a concern for RT drivers, at least not upstream > [1]. > > Long story: Even if a downstream added support for RT relocation itself, TE > images are loaded misaligned by DxeCore, because it lacks a (terri

Re: [edk2-devel] [RFC PATCH 2/3] MdeModulePkg: Enable forward edge CFI in mem attributes table

2023-02-03 Thread Ard Biesheuvel
(cc Samer, Jose) On Fri, 3 Feb 2023 at 02:16, Yao, Jiewen wrote: > > Hello > Can we assume that the entrypoint of PE/COFF image is always ENDBR64, if the > PE/COFF image is enlightened to support IBT? > > I believe the compiler should do that, because the loader need use indirect > call to the

Re: [edk2-devel] [RFC PATCH 2/3] MdeModulePkg: Enable forward edge CFI in mem attributes table

2023-02-03 Thread Marvin Häuser
Hi Ard, Short story: No, TE is not a concern for RT drivers, at least not upstream [1]. Long story: Even if a downstream added support for RT relocation itself, TE images are loaded misaligned by DxeCore, because it lacks a (terrible) workaround as done in PeiCore [2]. It doesn’t look like anyo