Re: [edk2-devel] [PATCH v1 21/26] OvmfPkg/LoongArchVirt: Add FdtQemuFwCfgLib

2024-04-16 Thread Gerd Hoffmann
On Wed, Apr 17, 2024 at 10:53:21AM +0800, Chao Li wrote: > Hi Gerd, > > Part 2 has been be merged, I'm separating  this Lib into two serve the PEI > stage and DXE stage. > > Currently, This DXE library uses three global variables, and when I simulate > the no-mmio version: MmioLib.c + Dxe.c + Pei

Re: [edk2-devel] [PATCH v1] MdeModulePkg: Fixup MAT Attributes After Splitting EFI Memory Map

2024-04-16 Thread Ard Biesheuvel
Hi Taylor, On Wed, 17 Apr 2024 at 04:28, Taylor Beebe wrote: > > The Memory Attributes Table is generated by fetching the EFI > memory map and splitting entries which contain loaded > images so DATA and CODE sections have separate descriptors. > The splitting is done via a call to SplitTable() wh

回复: [edk2-devel] [PATCH 1/1] BaseTool/Ecc: Fix incorrect parsing of variable initialisation

2024-04-16 Thread gaoliming via groups.io
Sami: I have no comments for this change. Acked-by: Liming Gao Thanks Liming > -邮件原件- > 发件人: devel@edk2.groups.io 代表 Sami > Mujawar > 发送时间: 2024年4月16日 11:51 > 收件人: devel@edk2.groups.io; rebe...@bsdio.com; > gaolim...@byosoft.com.cn; bob.c.f...@intel.com; yuwei.c...@intel.com > 抄送: Yeo

Re: [edk2-devel] [PATCH v2 02/10] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance

2024-04-16 Thread Ni, Ray
Comments below starting with [Ray] Thanks, Ray From: Wu, Jiaxin Sent: Tuesday, April 16, 2024 20:58 To: Ni, Ray ; devel@edk2.groups.io Cc: Zeng, Star ; Gerd Hoffmann ; Kumar, Rahul R Subject: RE: [PATCH v2 02/10] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationL

Re: [edk2-devel] [PATCH V1 0/5] Move Tdx specific lib from SecurityPkg to OvmfPkg

2024-04-16 Thread Yao, Jiewen
I have merged this one https://github.com/tianocore/edk2/pull/5566 Hi Gerd If you prefer that we move all TDX / SEV specific component to IntelTdx and AmdSev, I am OK with that. Personally, I like your idea. Please submit Bugzilla and work on it, if you would like to. Thank you Yao, Jiewen >

Re: [edk2-devel] [PATCH v1 21/26] OvmfPkg/LoongArchVirt: Add FdtQemuFwCfgLib

2024-04-16 Thread Chao Li
Hi Gerd, Part 2 has been be merged, I'm separating  this Lib into two serve the PEI stage and DXE stage. Currently, This DXE library uses three global variables, and when I simulate the no-mmio version: MmioLib.c + Dxe.c + Pei.c, I can abstract some helper functions as the public functions i

Re: [edk2-devel] MdeModulePkg: Fix MAT SplitRecord() Logic introduce one bug and will cause SUT reset when boot to windows

2024-04-16 Thread Taylor Beebe
Hi Yanbo, Can you confirm that the following resolves the issue you're seeing? [PATCH v1] MdeModulePkg: Fixup MAT Attributes After Splitting EFI Memory Map (groups.io) -Taylor On 4/15/2024 6:17 PM, Taylor Beebe wrote: On 4/15/2024 3:57 AM, Bi,

[edk2-devel] [PATCH v1] MdeModulePkg: Fixup MAT Attributes After Splitting EFI Memory Map

2024-04-16 Thread Taylor Beebe
The Memory Attributes Table is generated by fetching the EFI memory map and splitting entries which contain loaded images so DATA and CODE sections have separate descriptors. The splitting is done via a call to SplitTable() which marks image DATA sections with the EFI_MEMORY_XP attribute and CODE s

Re: [edk2-devel] [PATCH] NetworkPkg/WifiConnectionManagerDxe: Update UI according to UEFI spec

2024-04-16 Thread Michael D Kinney
Merged: https://github.com/tianocore/edk2/pull/5487 > -Original Message- > From: Kinney, Michael D > Sent: Monday, April 15, 2024 10:32 PM > To: devel@edk2.groups.io; Clark-williams, Zachary willi...@intel.com>; Tan, Ming > Cc: Kasbekar, Saloni ; Bi, Dandan > ; POLUDOV, FELIX ; Liu, L

Re: [edk2-devel] [PATCH V1 0/5] Move Tdx specific lib from SecurityPkg to OvmfPkg

2024-04-16 Thread Yao, Jiewen
Yeah, I also considered that before. But after look at current code structure, I give up. Since following SEV component are NOT in AmdSev directory (especially the TCG one), I do not see a strong reason to put them to IntelTdx dir. https://github.com/tianocore/edk2/tree/master/OvmfPkg/AmdSevDxe

[edk2-devel] [PATCH v2 2/4] uefi-sct/SctPkg: TCG2 Protocol: use OFFSET_OF for computing offsets

2024-04-16 Thread Stuart Yoder
Use compiler-independent OFFSET_OF macro defined from Base.h instead of the GCC specific __builtin_offsetof Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTestConformance.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-)

[edk2-devel] [PATCH v2 3/4] uefi-sct/SctPkg: TCG2 Protocol: #pragma pack cleanup

2024-04-16 Thread Stuart Yoder
Fix compiler warning by adding #pragma pack() to close a pragma section. Also delete extraneous #pragma pack(1). Signed-off-by: Stuart Yoder Reviewed-by: Heinrich Schuchardt --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTest.h | 3 +-- 1 file changed, 1 inser

[edk2-devel] [PATCH v2 4/4] uefi-sct/SctPkg: TCG2 Protocol: clean up type conversion warnings

2024-04-16 Thread Stuart Yoder
The VS2015x86 build encountered errors due to type conversion warnings. Resolve these by adding casts and refactoring. Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTestConformance.c | 18 -- 1 file changed, 8 insert

[edk2-devel] [PATCH v2 0/4] TCG2 protocol clean up

2024-04-16 Thread Stuart Yoder
This patch series cleans up some issues found when building edk2-test with a non-GCC compiler: -TPMT_HA struct had an error due to incorrect use of C flexible array member -compute struct member offsets using OFFSET_OF, which is not GCC specific -clean up of #pragma pack in one file -resolv

[edk2-devel] [PATCH v2 1/4] uefi-sct/SctPkg: TCG2 Protocol: correct definition of TPMT_HA struct

2024-04-16 Thread Stuart Yoder
The TPMT_HA struct defining event log hash algorithms was cut/pasted from the TCG EFI Protocol specification which used a C struct with a flexible array member as the last element. This is incorrect because TPMT_HA itself is used as an array element, and thus can't be variable size. Because the s

[edk2-devel] Cancelled Event: TianoCore Bug Triage - APAC / NAMO - Tuesday, April 16, 2024 #cal-cancelled

2024-04-16 Thread Group Notification
BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Groups.io Inc//Groups.io Calendar//EN METHOD:CANCEL REFRESH-INTERVAL;VALUE=DURATION:PT1H X-PUBLISHED-TTL:PT1H CALSCALE:GREGORIAN BEGIN:VTIMEZONE TZID:America/Los_Angeles LAST-MODIFIED:20231222T233358Z TZURL:https://www.tzurl.org/zoneinfo-outlook/America/Los_Ang

[edk2-devel] DxeSmmReadyToLockProtocol interface doesn't get installed

2024-04-16 Thread memristor2 via groups.io
Hello everyone, I am developing a platform based on MinPlatformPkg everything works fine up until the BDS phase. To be more specific what's happening is that inside the BdsDxe module when the BdsEntry function calls the platform-dependent "PlatformBootManagerBeforeConsole" function (Inside MinPl

Re: [edk2-devel] [PATCH v1 03/13] UefiCpuPkg/SmmRelocationLib: Add library instance for OVMF

2024-04-16 Thread Wu, Jiaxin
Hi Gerd, > > I don't the background why AMD and OVMF has such difference. Maybe > OVFM doesn't not support the MSR "EFER_ADDRESS". > > It surely does, it's a rather essential MSR for x64 CPUs. > > > > The SmBase configuration for OVMF looks suspicious to me. I'm > wondering > > > whenever the O

Re: [edk2-devel] [PATCH v1 03/13] UefiCpuPkg/SmmRelocationLib: Add library instance for OVMF

2024-04-16 Thread Gerd Hoffmann
Hi, > > > 2) Existing SmBase configuration is different between the AMD & OVMF. > > > OVMF: > > > AmdCpuState->x64.SMBASE = (UINT32)mSmBaseForAllCpus[CpuIndex]; > > > > > > AMD: > > > if ((CpuSaveState->x86.SMMRevId & 0x) == 0) { > > > CpuSaveState->x86.SMBASE = (UINT32)mSmBaseForAllCp

Re: [edk2-devel] [PATCH v1 04/13] UefiCpuPkg/SmmRelocationLib: Add library instance for AMD

2024-04-16 Thread Abdul Lateef Attar via groups.io
Reviewed-by: Abdul Lateef Attar On 10-04-2024 19:27, Jiaxin Wu wrote: Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. Due to the definition difference of SMRAM Save State, SmmBase config in SMRAM Save State

Re: [edk2-devel] [PATCH V1 0/5] Move Tdx specific lib from SecurityPkg to OvmfPkg

2024-04-16 Thread Gerd Hoffmann
On Mon, Apr 15, 2024 at 03:55:49PM +0800, Min Xu wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4752 > > HashLibTdx and TdTcg2Dxe are designed for Intel TDX enlightened OVMF. > They're more reasonable to be put in OvmfPkg than in SecurityPkg. > > SecTpmMeasurementLibTdx is not used a

Re: [edk2-devel] [PATCH v1 03/13] UefiCpuPkg/SmmRelocationLib: Add library instance for OVMF

2024-04-16 Thread Wu, Jiaxin
> > On Mon, Apr 15, 2024 at 01:04:58PM +, Wu, Jiaxin wrote: > > Hi Gred, > > > > Because: > > 1) The mode of the CPU check is different between the AMD & OVMF. > > OVMF: > > CpuSaveState->x86.SMMRevId & 0X > > > > AMD: > > LMAValue = (UINT32)AsmReadMsr64 (EFER_ADDRESS) & LMA > > > > 2) Ex

Re: [edk2-devel] [PATCH v2 00/10] Add SmmRelocationLib

2024-04-16 Thread Wu, Jiaxin
Yes, because I moved the SmmRelocationLib within the condition of SMM_REQUIRE == TRUE in the version 2 patch. It should be always included since the PlatformPei need consume it. I will fix it in the next version patch. It won't impact the code review & test with SMM_REQUIRE == TRUE build. Than

Re: [edk2-devel] [PATCH 0/9] Add DeviceSecurity feature based on PFP 1.06 spec

2024-04-16 Thread Yao, Jiewen
Hi Wenxing I just realized that this libspdm submodule does NOT use the latest tag. Since DMTF release 3.3.0 for libspdm https://github.com/DMTF/libspdm/releases/tag/3.3.0, I recommend we update to the latest one. Thank you Yao, Jiewen > -Original Message- > From: devel@edk2.groups.io

Re: [edk2-devel] [PATCH 0/9] Add DeviceSecurity feature based on PFP 1.06 spec

2024-04-16 Thread Yao, Jiewen
Reviewed-by: Jiewen Yao > -Original Message- > From: Hou, Wenxing > Sent: Monday, April 15, 2024 10:08 AM > To: Kinney, Michael D ; devel@edk2.groups.io > Cc: Sean Brogan ; Joey Vagedes > ; Liming Gao ; Andrew > Fish ; Liu, Zhiguang ; Kumar, Rahul R > ; Yao, Jiewen > Subject: RE: [PATCH

Re: [edk2-devel] [PATCH V1 0/5] Move Tdx specific lib from SecurityPkg to OvmfPkg

2024-04-16 Thread Yao, Jiewen
Reviewed-by: Jiewen Yao > -Original Message- > From: Xu, Min M > Sent: Monday, April 15, 2024 3:59 PM > To: devel@edk2.groups.io > Cc: Ard Biesheuvel ; Yao, Jiewen > ; Gerd Hoffmann > Subject: RE: [PATCH V1 0/5] Move Tdx specific lib from SecurityPkg to OvmfPkg > > The code is at: http

Re: [edk2-devel] [PATCH v5 0/2] SecurityPkg/OpalPasswordDxe: Update according to UEFI spec

2024-04-16 Thread Yao, Jiewen
Merged https://github.com/tianocore/edk2/pull/5563 > -Original Message- > From: devel@edk2.groups.io On Behalf Of Cindy Kuo > Sent: Tuesday, April 16, 2024 1:03 PM > To: devel@edk2.groups.io > Cc: Kuo, CindyX > Subject: [edk2-devel] [PATCH v5 0/2] SecurityPkg/OpalPasswordDxe: Update > ac

Re: [edk2-devel] ACPI table generators and ConfigurationManagerProtocol

2024-04-16 Thread Marcin Juszkiewicz
W dniu 16.04.2024 o 09:38, Marcin Juszkiewicz via groups.io pisze: And if someone considers using ConfigurationManager for their platform: please reconsider it as it may not be worth your time. Wrote blog post about my adventure with CM: https://marcin.juszkiewicz.com.pl/2024/04/16/configurati

Re: [edk2-devel] [PATCH v3 00/24] Provide SEV-SNP support for running under an SVSM

2024-04-16 Thread Ard Biesheuvel
(cc'ing the stewards) On Fri, 12 Apr 2024 at 17:14, Tom Lendacky wrote: > > On 4/12/24 10:05, Ard Biesheuvel wrote: > > On Fri, 12 Apr 2024 at 16:02, Tom Lendacky wrote: > >> > >> Re-pinging the list/maintainers, again. I need reviews from the > >> maintainers on patches #2, #7, #10, #11 and #13

[edk2-devel] [PATCH 6/9] CryptoPkg: Add Pkcs5 functions based on Mbedtls

2024-04-16 Thread Wenxing Hou
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 PBKDF2 Key Derivation Function Wrapper Implementation over MbedTLS. Cc: Jiewen Yao Cc: Yi Li Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/Pk/CryptPkcs5Pbkdf2.c | 100 ++ 1 file changed, 100 insertions(+) creat

[edk2-devel] [PATCH 9/9] CryptoPkg: Add ImageTimestampVerify based on Mbedtls

2024-04-16 Thread Wenxing Hou
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Timestamp Countersignature Verification implementaion based on Mbedtls. Cc: Jiewen Yao Cc: Yi Li Signed-off-by: Wenxing Hou --- .../Library/BaseCryptLibMbedTls/Pk/CryptTs.c | 381 ++ 1 file changed, 381 insertions(+) c

[edk2-devel] [PATCH 8/9] CryptoPkg: Add AuthenticodeVerify based on Mbedtls

2024-04-16 Thread Wenxing Hou
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Implement AuthenticodeVerify based on Mbedtls. Cc: Jiewen Yao Cc: Yi Li Signed-off-by: Wenxing Hou --- .../Pk/CryptAuthenticode.c| 214 ++ 1 file changed, 214 insertions(+) create mode 100644 CryptoP

[edk2-devel] [PATCH 7/9] CryptoPkg: Add more RSA related functions based on Mbedtls

2024-04-16 Thread Wenxing Hou
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Implement more RSA functions such as RsaPkcs1Sign based Mbedlts. Cc: Jiewen Yao Cc: Yi Li Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/Pk/CryptPkcs1Oaep.c | 278 ++ .../BaseCryptLibMbedTls/Pk/CryptRsaExt.c |

[edk2-devel] [PATCH 5/9] CryptoPkg: Add Pkcs7 related functions based on Mbedtls

2024-04-16 Thread Wenxing Hou
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Because the current Mbedlts pkcs7 library doesn't support authenticatedAttributes: Mbed-TLS/mbedtls@bb82ab7 and only support 0 or 1 certificates in Signed data: tianocore/edk2-staging@9c5b26b The patch implement Pkcs7 by low Mbedtls Api. An

[edk2-devel] [PATCH 4/9] CryptoPkg: Add X509 functions based on Mbedtls

2024-04-16 Thread Wenxing Hou
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 X.509 Certificate Handler Wrapper Implementation over MbedTLS. Cc: Jiewen Yao Cc: Yi Li Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/Pk/CryptX509.c| 1924 + 1 file changed, 1924 insertions(+) create mo

[edk2-devel] [PATCH 3/9] CryptoPkg: Add Pem APIs based on Mbedtls

2024-04-16 Thread Wenxing Hou
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Implement Pem API based on Mbedtls. Cc: Jiewen Yao Cc: Yi Li Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/Pem/CryptPem.c| 138 ++ 1 file changed, 138 insertions(+) create mode 100644 CryptoPkg/Library/

[edk2-devel] [PATCH 2/9] CryptoPkg: Add rand function for BaseCryptLibMbedTls

2024-04-16 Thread Wenxing Hou
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Add rand function for BaseCryptLibMbedTls. Cc: Jiewen Yao Cc: Yi Li Signed-off-by: Wenxing Hou --- CryptoPkg/CryptoPkg.ci.yaml | 1 + .../BaseCryptLibMbedTls/InternalCryptLib.h| 16 +++ .../BaseCryptLibMbedTls/R

[edk2-devel] [PATCH 1/9] CryptoPkg: Add AeadAesGcm based on Mbedtls

2024-04-16 Thread Wenxing Hou
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 AeadAesGcm implementation based on Mbedtls. Cc: Jiewen Yao Cc: Yi Li Signed-off-by: Wenxing Hou --- .../Cipher/CryptAeadAesGcm.c | 227 ++ 1 file changed, 227 insertions(+) create mode 100644 CryptoPkg

[edk2-devel] [PATCH 0/9] Add more crypt APIs based on Mbedtls

2024-04-16 Thread Wenxing Hou
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Add AeadAesGcm/Pem(only RSA)/X509(only RSA)/More RSA/PKCS5 /pKCS7/Authenticode/Timestamp implementation based on Mbedtls. The patch has passed the EDKII CI check: https://github.com/tianocore/edk2/pull/5552 And the patch has passed unit_te

Re: [edk2-devel] ACPI table generators and ConfigurationManagerProtocol

2024-04-16 Thread Marcin Juszkiewicz
W dniu 12.04.2024 o 14:43, Marcin Juszkiewicz via groups.io pisze: W dniu 8.10.2023 o 19:25, Marcin Juszkiewicz via groups.io pisze: I hate replying to myself after half a year of not seeing any answer. So added some people from repo to Cc: Can someone point me to documentation on how to use

Re: [edk2-devel] [PATCH 1/1] BaseTool/Ecc: Fix incorrect parsing of variable initialisation

2024-04-16 Thread PierreGondois
Tested-by: Pierre Gondois On 4/15/24 20:59, levi.yun wrote: If a global variable is initialised using a macro with multiple arguments, ECC incorrectly parses the statement and reports the macro arguments as variable declarations. Example: In the following statement: STATIC INT WrongVariable

Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Warn if out of space when writing variables

2024-04-16 Thread Gerd Hoffmann
On Mon, Apr 15, 2024 at 09:46:37PM +0200, Oliver Steffen wrote: > Emit a DEBUG_ERROR message if there is not enough flash variable left to > write/update a variable. This condition is currently not logged > appropriately in all cases, given that full variable store can easily > render the system un

Re: [edk2-devel] [PATCH v1 03/13] UefiCpuPkg/SmmRelocationLib: Add library instance for OVMF

2024-04-16 Thread Gerd Hoffmann
On Mon, Apr 15, 2024 at 01:04:58PM +, Wu, Jiaxin wrote: > Hi Gred, > > Because: > 1) The mode of the CPU check is different between the AMD & OVMF. > OVMF: > CpuSaveState->x86.SMMRevId & 0X > > AMD: > LMAValue = (UINT32)AsmReadMsr64 (EFER_ADDRESS) & LMA > > 2) Existing SmBase configura

Re: [edk2-devel] [PATCH v2 00/10] Add SmmRelocationLib

2024-04-16 Thread Gerd Hoffmann
On Mon, Apr 15, 2024 at 09:30:11PM +0800, Wu, Jiaxin wrote: > Intel plans to separate the smbase relocation logic from > PiSmmCpuDxeSmm driver, and the related behavior will be > moved to the new interface defined by the SmmRelocationLib > class. > > The SmmRelocationLib class provides the SmmRelo