[edk2-devel] [PATCH 4/4] CryptoPkg: add Hkdf UnitTest.

2022-08-25 Thread Qi Zhang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4033 Signed-off-by: Qi Zhang Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang --- .../BaseCryptLib/BaseCryptLibUnitTests.c | 29 +-- .../UnitTest/Library/BaseCryptLib/HkdfTests.c | 202 ++ .../Library/Base

[edk2-devel] [PATCH 2/4] CryptoPkg: add new Hkdf api in Crypt Lib.

2022-08-25 Thread Qi Zhang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4033 Signed-off-by: Qi Zhang Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang --- .../Library/BaseCryptLib/Kdf/CryptHkdf.c | 362 +- .../Library/BaseCryptLib/Kdf/CryptHkdfNull.c | 151 +++- .../BaseCry

[edk2-devel] [PATCH 3/4] CryptoPkg: add new Hkdf api to Crypto Service.

2022-08-25 Thread Qi Zhang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4033 Signed-off-by: Qi Zhang Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang --- CryptoPkg/Driver/Crypto.c | 149 ++ .../BaseCryptLibOnProtocolPpi/CryptLib.c | 144 + 2

[edk2-devel] [PATCH 0/4] CryptoPkg: Add Hkdf SHA384 support

2022-08-25 Thread Qi Zhang
Add Hkdf-SHA384 support and Hkdf-SHA256 extract and expand separately. With this change, the size increase of BaseCyrptLib is about 6K bytes. The new functions are verifed by the Host UnitTest. And also it has been integratd in https://github.com/tianocore/edk2-staging/tree/DeviceSecurity and been

[edk2-devel] [PATCH 1/4] CryptoPkg: add new Hkdf api definition in Crypt Lib.

2022-08-25 Thread Qi Zhang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4033 Signed-off-by: Qi Zhang Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang --- CryptoPkg/Include/Library/BaseCryptLib.h | 129 + .../Pcd/PcdCryptoServiceFamilyEnable.h| 7 +- CryptoPkg/Private/

Re: [edk2-devel] [PATCH 1/1] OvmfPkg: Set default Pci PCDs in Tdx guest

2022-08-25 Thread Gerd Hoffmann
On Fri, Aug 26, 2022 at 08:41:09AM +0800, Min Xu wrote: > From: Min M Xu > > In previous implementation below Pci related PCDs were set based on the > ResourceDescriptor passed in TdHob. > - PcdPciMmio64Base / PcdPciMmio64Size > - PcdPciMmio32Base / PcdPciMmio32Size > - PcdPciIoBase / PcdPciIo

Re: [edk2-devel] [PATCH] OvmfPkg/IncompatiblePciDeviceSupportDxe: Ignore OptionRom in Sev guest

2022-08-25 Thread Gerd Hoffmann
Hi, > - if (TdIsEnabled ()) { > + if (TdIsEnabled () || MemEncryptSevIsEnabled()) { I think you can just use CcProbeLib and CcProbe() function to cover both tdx and sev. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Onli

Re: [edk2-devel] [PATCH V3 2/2] OvmfPkg: Update CcProbeLib to DxeCcProbeLib

2022-08-25 Thread Gerd Hoffmann
Hi, > In DxeCcProbeLib we cache the GuestType in Ovmf work area in first-call. > After that the Guest type is returned with the cached value. So that we > don't need to worry about the access to Ovmf work area after > ExitBootService. This only works in case the first call is early enough. Bett

Re: [edk2-devel] [edk2-stable202208 3/3] Revert "BaseTools: Fix DSC LibraryClass precedence rule"

2022-08-25 Thread Bob Feng
Acked-by: Bob Feng -Original Message- From: devel@edk2.groups.io On Behalf Of gaoliming via groups.io Sent: Friday, August 26, 2022 10:15 AM To: devel@edk2.groups.io Cc: Chen, Christine ; Feng, Bob C Subject: [edk2-devel] [edk2-stable202208 3/3] Revert "BaseTools: Fix DSC LibraryClass

Re: [edk2-devel] MdeModulePkg build fails for AARCH64 on Ubuntu 22.04

2022-08-25 Thread Long1 Huang
Hi All, I'm the submitter. ==Here's the DSC precedence rule from DSC Spec=== The Library Instances will be selected using the following rules to satisfy a library class for each module listed in the [Components] section (in order of highest precedence): 1. asso

[edk2-devel] [edk2-stable202208 0/3] Revert three patches for edk2 stable tag 202208

2022-08-25 Thread gaoliming via groups.io
Two features will be merged after the stable tag 202208 is created. One behavior change will be discussed further. Liming Gao (3): Revert "UefiCpuPkg/CpuPageTableLib/UnitTest: Add host based unit test" Revert "ShellPkg: Adds Local APIC parser to AcpiView" Revert "BaseTools: Fix DSC Library

[edk2-devel] [edk2-stable202208 2/3] Revert "ShellPkg: Adds Local APIC parser to AcpiView"

2022-08-25 Thread gaoliming via groups.io
This reverts commit d5fd86f256b9ab5b4e3aff70d3c177c18faea892 for tag202208. This feature will be merged after stable tag 202208 is created. Signed-off-by: Liming Gao Cc: Abdul Lateef Attar --- .../Parsers/Madt/MadtParser.c | 74 ++- 1 file changed, 7 insertions(+

[edk2-devel] [edk2-stable202208 3/3] Revert "BaseTools: Fix DSC LibraryClass precedence rule"

2022-08-25 Thread gaoliming via groups.io
This reverts commit 039bdb4d3e96f9c9264abf135b8a0eef2e2b4860 for tag202208. This brings the behavior changes, and needs more discussion. Signed-off-by: Liming Gao Cc: Yuwei Chen Cc: Bob Feng --- BaseTools/Source/Python/Workspace/DscBuildData.py | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

Re: [edk2-devel] TianoCore edk2-test Bug Triage Meeting

2022-08-25 Thread Geer, Ken (EXL)
Hi Edhaya, I regret I have been unable to attend or contribute to this meeting. Terry Lee, (Terry Lee terry@hpe.com ) whom some on this team know, will be taking my place. Picking my successor is no doubt my best contribution so far… 😊 Please update the

回复: [edk2-devel] BaseTools no longer builds on macOS: "error: unknown warning option '-Werror=stringop-overflow'"

2022-08-25 Thread gaoliming via groups.io
Mike: I agree with you. Thanks Liming 发件人: devel@edk2.groups.io 代表 Michael D Kinney 发送时间: 2022年8月26日 7:51 收件人: Rebecca Cran ; devel@edk2.groups.io; af...@apple.com; Gao, Liming ; Andrew Fish (af...@apple.com) ; Leif Lindholm ; Kinney, Michael D 主题: Re: [edk2-devel] BaseTools no longer

Re: [edk2-devel] [PATCH edk2-stable202208 1/1] BaseTools: Fix DevicePath GNUmakefile for macOS

2022-08-25 Thread Michael D Kinney
Reviewed-by: Michael D Kinney I approve for edk2-stable202208 Mike > -Original Message- > From: devel@edk2.groups.io On Behalf Of Rebecca Cran > Sent: Thursday, August 25, 2022 6:32 PM > To: devel@edk2.groups.io; Andrew Fish ; Leif Lindholm > ; Kinney, Michael D > ; Feng, Bob C ; Gao,

Re: [edk2-devel] BaseTools no longer builds on macOS: "error: unknown warning option '-Werror=stringop-overflow'"

2022-08-25 Thread Rebecca Cran
Thanks. I've submitted it - the subject is "[PATCH edk2-stable202208 1/1] BaseTools: Fix DevicePath GNUmakefile for macOS" -- Rebecca Cran On 8/25/2022 5:51 PM, Kinney, Michael D wrote: Hi Rebecca, +Liming This looks like a low risk change to me.But given that the release is supposed to

[edk2-devel] [PATCH edk2-stable202208 1/1] BaseTools: Fix DevicePath GNUmakefile for macOS

2022-08-25 Thread Rebecca Cran
On macOS, /usr/bin/gcc is clang, and so doesn't have the -Wno-error=stringop-overflow flag that was added for gcc 12. Update the GNUmakefile for DevicePath to skip setting that on macOS. Signed-off-by: Rebecca Cran --- BaseTools/Source/C/DevicePath/GNUmakefile | 2 ++ 1 file changed, 2 insertion

Re: [edk2-devel] MdeModulePkg build fails for AARCH64 on Ubuntu 22.04

2022-08-25 Thread Bob Feng
+ Huang Long, the bug submitter. I am OK to revert this patch for this stable tag. Since this patch break the MdeModulePkg build, also suggest to add this case in edk2 CI. Thanks, Bob -Original Message- From: Kinney, Michael D Sent: Thursday, August 25, 2022 11:44 PM To: devel@edk2.g

[edk2-devel] [PATCH 1/1] OvmfPkg: Set default Pci PCDs in Tdx guest

2022-08-25 Thread Min Xu
From: Min M Xu In previous implementation below Pci related PCDs were set based on the ResourceDescriptor passed in TdHob. - PcdPciMmio64Base / PcdPciMmio64Size - PcdPciMmio32Base / PcdPciMmio32Size - PcdPciIoBase / PcdPciIoSize The PCDs will not be set if TdHob doesn't include these informat

Re: [edk2-devel] MdeModulePkg build fails for AARCH64 on Ubuntu 22.04

2022-08-25 Thread Ni, Ray
I didn't check with Bob about that patch. I guess that was to fix a bug I found in BaseTools which didn't take care of the library override properly. Or the rule of the library override was in a chaos that didn't seem to be an understood rule. If some platforms happen to rely on this rule, I agr

Re: [edk2-devel] BaseTools no longer builds on macOS: "error: unknown warning option '-Werror=stringop-overflow'"

2022-08-25 Thread Michael D Kinney
Hi Rebecca, +Liming This looks like a low risk change to me. But given that the release is supposed to occur tonight, we may need to delay the release 1-2 days to make sure there are no side effects. Can you please prepare a patch with this change for review and make sure it is marked for th

Re: [edk2-devel] BaseTools no longer builds on macOS: "error: unknown warning option '-Werror=stringop-overflow'"

2022-08-25 Thread Rebecca Cran
Thanks, that patch works. Is it too late to get it in for the stable tag? Reviewed-by: Rebecca Cran On 8/25/22 11:49, Andrew Fish via groups.io wrote: Maybe having the check last would be cleaner. *diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUma

Re: [edk2-devel] BaseTools no longer builds on macOS: "error: unknown warning option '-Werror=stringop-overflow'"

2022-08-25 Thread Andrew Fish via groups.io
Maybe having the check last would be cleaner. diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile index c217674345b1..17f213879e82 100644 --- a/BaseTools/Source/C/DevicePath/GNUmakefile +++ b/BaseTools/Source/C/DevicePath/GNUmakefile @@ -16,10 +16,1

Re: [edk2-devel] BaseTools no longer builds on macOS: "error: unknown warning option '-Werror=stringop-overflow'"

2022-08-25 Thread Andrew Fish via groups.io
Rebecca, FYI /usr/bin/gcc has been a redirector into clang for a lot of years. The build picks different default sets of complier flags based on build type. There is already code that assumes gcc == clang here [1] I think the issue is the check that is wrapping "BUILD_CFLAGS += -Wno-error=str

[edk2-devel] BaseTools no longer builds on macOS: "error: unknown warning option '-Werror=stringop-overflow'"

2022-08-25 Thread Rebecca Cran
BaseTools no longer builds on macOS (12.5.1, Monterey), because 'gcc' in /usr/bin is really clang. I tried installing gcc 12 from Homebrew, but the build then failed saying it couldn't find _stdio.h. It appears the breakage might have been introduced in this commit back in March: commit 22

Re: [edk2-devel] MdeModulePkg build fails for AARCH64 on Ubuntu 22.04

2022-08-25 Thread Michael D Kinney
Hi Bob, There was feedback in the Bugzilla on July 5 asking if this is a DSC spec issue or a BaseTools implementation issue. There was no response to that question. Why was a spec change not considered for this case to match the BaseTools behavior? Why were no additional details added to the B

[edk2-devel] [PATCH v1 1/1] .azurepipelines: Use Python 3.10.6+

2022-08-25 Thread Michael Kubacki
From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3891 Changes the Python version used in pipelines to 3.10.6 or greater since that version introduces a fix (bp0-47231) for inconsistent trailing slashes in tarfile longname directories. This is required for stuart_update t

[edk2-devel] [PATCH V3 2/2] OvmfPkg: Update CcProbeLib to DxeCcProbeLib

2022-08-25 Thread Min Xu
From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3974 CcProbeLib once was designed to probe the Confidential Computing guest type by checking the PcdOvmfWorkArea. But this memory is allocated with either EfiACPIMemoryNVS or EfiBootServicesData. It cannot be accessed after ExitBo

[edk2-devel] [PATCH V3 1/2] OvmfPkg: Add SecPeiCcProbeLib

2022-08-25 Thread Min Xu
From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3974 SecPeiCcProbeLib is designed to probe the Confidential Computing guest type in SEC/PEI phase. The CC guest type was set by each CC guest at the beginning of boot up and saved in PcdOvmfWorkArea. Cc: Erdem Aktas Cc: James Bo

[edk2-devel] [PATCH V3 0/2] Re-design CcProbeLib

2022-08-25 Thread Min Xu
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3974 CcProbeLib once was designed to probe the Confidential Computing guest type by checking the PcdOvmfWorkArea. But this memory is allocated with either EfiACPIMemoryNVS or EfiBootServicesData. It cannot be accessed after ExitBootService. Please

[edk2-devel] [PATCH] OvmfPkg/IncompatiblePciDeviceSupportDxe: Ignore OptionRom in Sev guest

2022-08-25 Thread Lee, Chun-Yi
Reference: https://bugzilla.tianocore.org/show_bug.cgi?id=4031 This patch is similar to the c477b2783f patch for Td guest. Host VMM may inject OptionRom which is untrusted in Sev guest. So PCI OptionRom needs to be ignored if it is Sev guest. According to "Table 20. ACPI 2.0 & 3.0 QWORD Address S

Re: [edk2-devel] [edk2-platforms][PATCH] Maintainers.txt: Update maintainers list for edk2-platforms

2022-08-25 Thread Sunil V L
Reviewed-by: Sunil V L Thanks Sunil On Tue, Aug 23, 2022 at 01:57:54PM +0800, abner.ch...@amd.com wrote: > From: Abner Chang > > Update package maintainers for below folders, > > 1. Platform/RISC-V/PlatformPkg and Silicon/RISC-V/ProcessorPkg >Abner is stepping out from RISC-V stuff for no

Re: [edk2-devel] [PATCH v2 1/8] ArmPlatformPkg/NorFlashDxe: Remove unused debug print specifier

2022-08-25 Thread Leif Lindholm
On Wed, Aug 24, 2022 at 23:48:17 -0400, Michael Kubacki wrote: > From: Michael Kubacki > > These debug messages are repeated in both NorFlashBlockIoReadBlocks() > and NorFlashBlockIoWriteBlocks(): > > "NorFlashBlockIoWriteBlocks(MediaId=0x%x, Lba=%ld, BufferSize=0x%x" > "bytes (%d kB), Buffe

Re: [[edk2-devel] PATH v1 3/3] ArmVirtPkg: take PcdResizeXterm from the QEMU command line

2022-08-25 Thread Gerd Hoffmann
> --- /dev/null > +++ b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c > @@ -0,0 +1,34 @@ > +/** @file > +* Plugin library for setting up dynamic PCDs for TerminalDxe, from fw_cfg > +* > +* Copyright (C) 2015-2020, Red Hat, Inc. > +* Copyright (c) 2014, Linaro Ltd. All rights

Re: [edk2-devel] [PATCH 1/2] Mde Pkg: Support for MPAM ACPI Table

2022-08-25 Thread Hesham Almatary via groups.io
Hello Rohit, On 8/24/2022 5:25 PM, Rohit Mathew wrote: Hi Hesham, The idea for keeping it as separate type was to abstract locator field to have a view similar to that of its definition in the spec (MPAM ACPI 1.0, section 2.2, table 7 - Resource node.) Something of the lines – typedef struc

Re: [edk2-devel] [PATCH] UefiCpuPkg/MpInitLib: Fix potential issue when IDT table is at above 4G

2022-08-25 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Liu, Zhiguang > Sent: Thursday, August 25, 2022 10:55 AM > To: devel@edk2.groups.io > Cc: Liu, Zhiguang ; Dong, Eric > ; Ni, Ray ; Kumar, Rahul R > > Subject: [PATCH] UefiCpuPkg/MpInitLib: Fix potential issue when IDT table is > at above

Re: [edk2-devel] [PATCH] UefiCpuPkg: Enhance logic in InitializeMpExceptionStackSwitchHandlers

2022-08-25 Thread Ni, Ray
> + MpInitLibWhoAmI (&Index); >SwitchStackData = (EXCEPTION_STACK_SWITCH_CONTEXT *)Buffer; > - InitializeSeparateExceptionStacks (SwitchStackData->Buffer, > SwitchStackData->BufferSize); > + if ((SwitchStackData[Index].Status == EFI_NOT_STARTED) || > (SwitchStackData[Index].Status == EFI_BUF

Re: [[edk2-devel] PATH v1 1/3] MdeModulePkg: TerminalDxe: set xterm resolution on mode change

2022-08-25 Thread Gerd Hoffmann
On Tue, Aug 23, 2022 at 03:02:37AM +0200, Paweł Poławski wrote: > From: Laszlo Ersek > > Reference: > Signed-off-by: Laszlo Ersek > > Pawel: Updated commit message for re-submission > > Cc: Jian J Wang > Cc: Liming Gao > > Signed-off-by: Paweł Poławs

Re: [edk2-devel] [PATCH] UefiCpuPkg/MpInitLib: Simplify logic in SwitchBsp

2022-08-25 Thread Ni, Ray
> > ;Store EFLAGS, GDTR and IDTR register to stack > pushfd Can you update the comments? > -moveax, cr4 > -push eax ; push cr4 firstly > -moveax, cr0 > -push eax > - > -sgdt [esi + CPU_EXCHANGE_ROLE_INFO.Gdtr] > -sidt

Re: [edk2-devel] [PATCH] UefiPayloadPkg: To replace the libraries for the capsule driver.

2022-08-25 Thread Guo, Gua
Hold on the change until to next week. Currently Edk2 is under hard freeze. Reviewed-by: Gua Guo -Original Message- From: Liu, KasimX Sent: Thursday, August 25, 2022 11:22 AM To: devel@edk2.groups.io Cc: Liu, KasimX ; Dong, Guo ; Ni, Ray ; Lu, James ; Guo, Gua Subject: [PATCH] UefiPa

[edk2-devel] [PATCH] UefiPayloadPkg: To replace the libraries for the capsule driver.

2022-08-25 Thread kasimx . liu
From: KasimX Liu REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4030 For the system support the Capsule function in UPL, we replace the libraries for the Capsule driver. Cc: Guo Dong Cc: Ray Ni Cc: James Lu Cc: Gua Guo Signed-off-by: KasimX Liu --- UefiPayloadPkg/UefiPayloadPkg.dsc |

Re: [edk2-devel] MdeModulePkg build fails for AARCH64 on Ubuntu 22.04

2022-08-25 Thread Leif Lindholm
Hi Bob, You are suggesting to knowingly break builds between one stable tag and another on a technicality, for one of the most common (and up to date) build operating systems. The purpose of the stable tag is to avoid unplanned breakages. Catching this sort of situation is literally what it

Re: [edk2-devel] [Patch V2] UefiCpuPkg: Use Top of each AP's stack to save CpuMpData

2022-08-25 Thread Ni, Ray
Reviewed-by: Ray Ni > -Original Message- > From: Xie, Yuanhao > Sent: Friday, August 19, 2022 2:17 PM > To: devel@edk2.groups.io > Cc: Xie, Yuanhao ; Dong, Eric > ; Ni, Ray ; Kumar, Rahul R > > Subject: [Patch V2] UefiCpuPkg: Use Top of each AP's stack to save > CpuMpData > > From: Yua

Re: [edk2-devel] [PATCH 1/1] OvmfPkg: Reserve the Ovmf work area as RT_DATA

2022-08-25 Thread Gerd Hoffmann
Hi, > We can design 2 instances of CcProbe. One is to read the OvmfWorkArea. This > is for SEC/PEI phase. > The other is to save the guest type in Ovmf work area to a global variable in > its init function. This is for DXE phase. I mean this one. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 1/1] OvmfPkg: Reserve the Ovmf work area as RT_DATA

2022-08-25 Thread Min Xu
On August 25, 2022 3:42 PM, Gerd Hoffmann wrote: > Hi, > > > > Runtime service call are restricted so that you don't have > > > concurrent threads executing (see section 8.1 of the specification). > > > Without that you would have problems with runtime services today. > > > > > One of the situat

Re: [edk2-devel] [PATCH 1/1] OvmfPkg: Reserve the Ovmf work area as RT_DATA

2022-08-25 Thread Gerd Hoffmann
Hi, > > Runtime service call are restricted so that you don't have concurrent > > threads > > executing (see section 8.1 of the specification). Without that you would > > have > > problems with runtime services today. > > > One of the situation of CcProbe used is in BaseIoLib. > https://github

Re: [edk2-devel] [PATCH v2 0/2] CloudHv/arm: Add specific mem info lib

2022-08-25 Thread Jianyong Wu
Ping ... Any comments? Thanks Jianyong > -Original Message- > From: Jianyong Wu > Sent: Friday, August 19, 2022 4:09 PM > To: devel@edk2.groups.io; Sami Mujawar > Cc: ardb+tianoc...@kernel.org; Justin He ; Jianyong > Wu > Subject: [PATCH v2 0/2] CloudHv/arm: Add specific mem info lib >