[edk2-devel] 回复: [PATCH] MdeModulePkg/Library: PcdAcpiS3Enable set FALSE cause Assert

2023-02-14 Thread gaoliming via groups.io
Xueshengfeng: Create PR https://github.com/tianocore/edk2/pull/4047 for this patch. Thanks Liming > -邮件原件- > 发件人: xueshengfeng > 发送时间: 2023年2月15日 12:18 > 收件人: 'gaoliming' ; devel@edk2.groups.io; > jian.j.w...@intel.com > 抄送: heinrich.schucha...@canonical.com; edhaya.chand...@arm.com; >

Re: [edk2-devel][PATCH V1 1/1] BaseTools: Generate compile information in build report

2023-02-14 Thread Yuwei Chen
Hi Mike, thanks for reminder. Hi Willy, currently, BaseTools related changes will be implemented on the edk2-basetools repo. Please send the patch based on the edk2-basetools repo~ Thanks, Christine > -Original Message- > From: Kinney, Michael D > Sent: Wednesday, February 15, 2023 11

[edk2-devel] [PATCH v3 3/3] UsbNetworkPkg/UsbCdcNcm: Add USB Cdc NCM devices support

2023-02-14 Thread RichardHo [何明忠] via groups . io
This driver provides UEFI driver for USB CDC NCM device Signed-off-by: Richard Ho Cc: Andrew Fish Cc: Leif Lindholm Cc: Michael D Kinney Cc: Michael Kubacki Cc: Zhiguang Liu Cc: Liming Gao Reviewed-by: Tony Lo --- UsbNetworkPkg/UsbCdcNcm/ComponentName.c | 170 UsbNetworkPkg/UsbCdcNc

[edk2-devel] [PATCH v3 2/3] UsbNetworkPkg/UsbCdcEcm: Add USB Cdc ECM devices support

2023-02-14 Thread RichardHo [何明忠] via groups . io
This driver provides UEFI driver for USB CDC ECM device Signed-off-by: Richard Ho Cc: Andrew Fish Cc: Leif Lindholm Cc: Michael D Kinney Cc: Michael Kubacki Cc: Zhiguang Liu Cc: Liming Gao Reviewed-by: Tony Lo --- UsbNetworkPkg/UsbCdcEcm/ComponentName.c | 170 + UsbNetworkPkg/UsbCdcE

[edk2-devel] 回复: [PATCH] MdeModulePkg/Library: PcdAcpiS3Enable set FALSE cause Assert

2023-02-14 Thread gaoliming via groups.io
Xueshengfeng: This patch is good to me. Reviewed-by: Liming Gao Does this patch plan to catch this stable tag 202302? Thanks Liming > -邮件原件- > 发件人: xueshengfeng > 发送时间: 2023年2月2日 14:21 > 收件人: devel@edk2.groups.io; jian.j.w...@intel.com; > gaolim...@byosoft.com.cn > 抄送: heinrich.schu

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

2023-02-14 Thread gaoliming via groups.io
Joey: This patch is good to me. Reviewed-by: Liming Gao Dose this patch plan to catch this stable tag 202302? Thanks Liming 发件人: Joey Vagedes 发送时间: 2023年2月7日 0:53 收件人: Liming Gao ; Michael D Kinney ; Bob Feng ; Yuwei Chen 抄送: devel@edk2.groups.io; Michael Kubacki 主题: Re: [edk2-d

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

2023-02-14 Thread gaoliming via groups.io
Create PR https://github.com/tianocore/edk2/pull/4045 to merge it. Thanks Liming > -邮件原件- > 发件人: devel@edk2.groups.io 代表 Sunny Wang > 发送时间: 2023年2月13日 18:43 > 收件人: Stuart Yoder ; devel@edk2.groups.io > 抄送: gaolim...@byosoft.com.cn; hao.a...@intel.com; Sunny Wang > > 主题: Re: [edk2-devel

Re: [edk2-devel][PATCH V1 1/1] BaseTools: Generate compile information in build report

2023-02-14 Thread Michael D Kinney
Has this been reviewed for edk2-basetools repo? Mike > -Original Message- > From: devel@edk2.groups.io On Behalf Of Yuwei Chen > Sent: Tuesday, February 14, 2023 6:44 PM > To: Palomino Sosa, Guillermo A ; > devel@edk2.groups.io > Cc: Feng, Bob C ; Gao, Liming > Subject: Re: [edk2-devel

Re: [edk2-devel][PATCH V1 1/1] BaseTools: Generate compile information in build report

2023-02-14 Thread Yuwei Chen
Reviewed-by: Yuwei Chen > -Original Message- > From: Palomino Sosa, Guillermo A > Sent: Tuesday, February 7, 2023 11:07 AM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Gao, Liming > ; Chen, Christine > Subject: [edk2-devel][PATCH V1 1/1] BaseTools: Generate compile > information in bu

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

2023-02-14 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:* https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344

Re: [edk2-devel] [PATCH v2] MdeModulePkg/EsrtFmpDxe: Support multiple devices with 0 HardwareInstance

2023-02-14 Thread Michael D Kinney
Merged PR: https://github.com/tianocore/edk2/pull/4043 Commit: https://github.com/tianocore/edk2/commit/090642db7ac124c336da72e1954e1fb09e816fb0 Mike > -Original Message- > From: Kinney, Michael D > Sent: Tuesday, February 14, 2023 3:50 PM > To: Jeff Brasen ; devel@edk2.groups.io; Deme

Re: [edk2-devel] [PATCH] OvmfPkg: Close mAcceptAllMemoryEvent

2023-02-14 Thread Gupta, Pankaj via groups.io
On 2/15/2023 12:07 AM, Dionna Glaze via groups.io wrote: This event should only trigger once. It should be idempotent, but the allocation of the memory map itself is observable and can cause ExitBootServices to fail with a modified map key. Cc: Ard Biesheuvel Cc: Thomas Lendacky Cc: Erdem Akta

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

2023-02-14 Thread Michael D Kinney
Merged PR: https://github.com/tianocore/edk2/pull/4042 Commit: https://github.com/tianocore/edk2/commit/f9c6b5134e5e2c5ca977f422119b1255412acd53 Mike > -Original Message- > From: Kinney, Michael D > Sent: Tuesday, February 14, 2023 3:27 PM > To: devel@edk2.groups.io; Ni, Ray ; abner.ch

Re: [edk2-devel] [PATCH v1 1/1] uefi-sct/SctPkg: update path to edk2-test-parser, check for repo

2023-02-14 Thread Gao Jie via groups.io
Reviewed-by: Barton Gao < gao...@byosoft.com.cn > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100206): https://edk2.groups.io/g/devel/message/100206 Mute This Topic: https://groups.io/mt/96551593/21656 Group Owner: devel+ow...@edk2.gro

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

2023-02-14 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Ah ok, thanks! > -Original Message- > From: Kinney, Michael D > Sent: Wednesday, February 15, 2023 8:41 AM > To: devel@edk2.groups.io; Chang, Abner ; Ni, Ray > > Cc: Wu, Hao A ; Kirkendall, Garrett > ; Kinney, Michael D > > Subject: RE: [edk2-devel] [P

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

2023-02-14 Thread Michael D Kinney
It is already in process of being merged https://github.com/tianocore/edk2/pull/4042 Mike > -Original Message- > From: devel@edk2.groups.io On Behalf Of Chang, Abner > via groups.io > Sent: Tuesday, February 14, 2023 4:29 PM > To: Kinney, Michael D ; devel@edk2.groups.io; Ni, > Ray >

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

2023-02-14 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Thanks Ray and Mike, I will create PR and merge it. Abner > -Original Message- > From: Kinney, Michael D > Sent: Wednesday, February 15, 2023 7:27 AM > To: devel@edk2.groups.io; Ni, Ray ; Chang, Abner > > Cc: Wu, Hao A ; Kirkendall, Garrett > ; Kinney,

Re: [edk2-devel] [PATCH v2] MdeModulePkg/EsrtFmpDxe: Support multiple devices with 0 HardwareInstance

2023-02-14 Thread Michael D Kinney
Hi Jeff, I have been studying the code for side effects from Version >= 3 and HardwareInstance = 0. I think the only side effect with your patch is extra entries in HardwareIntances with the same GUID value and HardwareInstance value of 0. IN OUT GUID_HARDWAREINSTANCE_PAIR *HardwareInsta

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

2023-02-14 Thread Michael D Kinney
Acked-by: Michael D Kinney > -Original Message- > From: devel@edk2.groups.io On Behalf Of Ni, Ray > Sent: Monday, February 13, 2023 6:18 PM > To: devel@edk2.groups.io; abner.ch...@amd.com > Cc: Wu, Hao A ; Garrett Kirkendall > > Subject: Re: [edk2-devel] [PATCH V4] MdeModulePkg/Pci: Di

Re: [edk2-devel] [PATCH] OvmfPkg: Close mAcceptAllMemoryEvent

2023-02-14 Thread Ard Biesheuvel
On Wed, 15 Feb 2023 at 00:07, Dionna Glaze wrote: > > This event should only trigger once. It should be idempotent, but the > allocation of the memory map itself is observable and can cause > ExitBootServices to fail with a modified map key. > > Cc: Ard Biesheuvel > Cc: Thomas Lendacky > Cc: Erd

[edk2-devel] [PATCH] OvmfPkg: Close mAcceptAllMemoryEvent

2023-02-14 Thread Dionna Glaze via groups.io
This event should only trigger once. It should be idempotent, but the allocation of the memory map itself is observable and can cause ExitBootServices to fail with a modified map key. Cc: Ard Biesheuvel Cc: Thomas Lendacky Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Min Xu Cc: Mic

Re: [edk2-devel] [PATCH] OvmfPkg: Remove gbs FreePool in AcceptAllMemory()

2023-02-14 Thread Ard Biesheuvel
On Tue, 14 Feb 2023 at 23:35, Ard Biesheuvel wrote: > > On Tue, 14 Feb 2023 at 23:15, Pankaj Gupta wrote: > > > > System Memory map is changed when a memory range is Accepted. > > While returning from AcceptAllMemory(), "gBS->FreePool" is wrongly > > used which results in changing memory map and

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

2023-02-14 Thread Lendacky, Thomas via groups.io
On 2/14/23 11:28, Dionna Amalie Glaze wrote: Do you have any pointers on the IVARS service? Documentation, guest code, host code? Agh, I thought for sure there was a public API for VM owners to view or change their UEFI variables, but I guess not. It's an instance-specific small data store f

Re: [edk2-devel] [PATCH] OvmfPkg: Fix SevMemoryAcceptance memory attributes

2023-02-14 Thread Ard Biesheuvel
On Thu, 2 Feb 2023 at 21:42, Dionna Amalie Glaze wrote: > > > > > > > This change is made given a request from Ard. The CC capability is not > > > applied to other system memory ranges that probably should also have > > > that capability, given that it's encrypted and accepted. I haven't > > > con

Re: [edk2-devel] [PATCH] OvmfPkg: Remove gbs FreePool in AcceptAllMemory()

2023-02-14 Thread Ard Biesheuvel
On Tue, 14 Feb 2023 at 23:15, Pankaj Gupta wrote: > > System Memory map is changed when a memory range is Accepted. > While returning from AcceptAllMemory(), "gBS->FreePool" is wrongly > used which results in changing memory map and hence return an error. > Fix this by removing the "gBs->FreePool"

[edk2-devel] [PATCH] OvmfPkg: Remove gbs FreePool in AcceptAllMemory()

2023-02-14 Thread Gupta, Pankaj via groups.io
System Memory map is changed when a memory range is Accepted. While returning from AcceptAllMemory(), "gBS->FreePool" is wrongly used which results in changing memory map and hence return an error. Fix this by removing the "gBs->FreePool" call altogether. Before this patch, KVM guest throws an err

Re: [edk2-devel] [RFC PATCH 1/1] MdePkg: Add library to parse SPD data and create SMBIOS Type 17 table

2023-02-14 Thread Rebecca Cran
Obviously this will need split up into several patches, but I wanted to get it sent out as an rfc so it doesn't get lost. -- Rebecca Cran On 2/14/23 14:58, Rebecca Cran wrote: SmbiosType17SpdLib can parse a buffer containing SPD data from a DDR4 or DDR5 DIMM and construct an SMBIOS Type17 tabl

[edk2-devel] [RFC PATCH 1/1] MdePkg: Add library to parse SPD data and create SMBIOS Type 17 table

2023-02-14 Thread Rebecca Cran
SmbiosType17SpdLib can parse a buffer containing SPD data from a DDR4 or DDR5 DIMM and construct an SMBIOS Type17 table. Signed-off-by: Rebecca Cran --- MdePkg/MdePkg.dec | 3 + MdePkg/MdeLibs.dsc.inc

Re: [edk2-devel] [PATCH v2 1/1] MdePkg: Add DDR5 SPD defs to IndustryStandard per JESD400-5A.01

2023-02-14 Thread Rebecca Cran
+Liming On 2/14/23 08:36, Rebecca Cran wrote: Copying the style of SdramSpdDdr4.h, add DDR5 SPD definitions to SpdDdr5.h per JEDEC JESD400-5A.01 specification (https://www.jedec.org/standards-documents/docs/jesd400-5a01). Signed-off-by: Rebecca Cran Cc: Liming Gao Cc: Michael D Kinney Cc: Zh

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

2023-02-14 Thread Gupta, Pankaj via groups.io
On 2/14/2023 9:44 PM, Dionna Amalie Glaze wrote: Adding the diff. diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c index 6391d1f775..df51c2c050 100644 --- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c +++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c @@ -123,7 +123,7 @@ AcceptAllMemory ( }

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

2023-02-14 Thread Dionna Glaze via groups.io
> > Adding the diff. > > diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c > index 6391d1f775..df51c2c050 100644 > --- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c > +++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c > @@ -123,7 +123,7 @@ AcceptAllMemory ( > } > } > > - gBS->FreePool (AllDe

[edk2-devel] [PATCH 1/1] MdePkg: Add new JedecJep106Lib to fetch JEDEC JEP106 manufacturer

2023-02-14 Thread Rebecca Cran
Add a new library, JedecJep106Lib which provides a service to return the JEDEC JEP106 manufacturer string given the code and continuation bytes values. Signed-off-by: Rebecca Cran --- MdePkg/MdePkg.dec|3 + MdePkg/MdePkg.dsc|

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

2023-02-14 Thread Dionna Glaze via groups.io
> > Do you have any pointers on the IVARS service? Documentation, guest > code, host code? > Agh, I thought for sure there was a public API for VM owners to view or change their UEFI variables, but I guess not. It's an instance-specific small data store for nonvolatile memory like vTPM and UEFI v

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

2023-02-14 Thread Jeshua Smith via groups.io
Thanks for the reply. The issue (and associated patch) is actually in BdsEntry.c, not PlatformBootManagerLib. The BdsEntry.c code is preventing our own PlatformBootManagerLib implementation from doing what it needs to do. We have copied and modified PlatformBootManagerLib for our platform as yo

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.c

2023-02-14 Thread Sunny Wang
Looks good to me. Thanks for working on this, Sam. Just for others' information, I also had an offline discussion with Sam. - This is change is based on UEFI 2.10 section 4.6. EFI Configuration Table & Properties Table https://uefi.org/specs/UEFI/2.10/04_EFI_System_Table.html#efi-configuratio

Re: [edk2-devel] [PATCH 1/1] MdePkg: Add DDR5 SPD defs to IndustryStandard per JESD400-5A.01

2023-02-14 Thread Rebecca Cran
On 2/10/23 11:01, Kinney, Michael D wrote: We usually do not include basetype includes from .h files in Protocol/PPI/GUID/IndustryStandard. This is because we always get base types from AutoGen.h and from C/H files in modules/libs That have to include top level include files for their module t

[edk2-devel] [PATCH v2 1/1] MdePkg: Add DDR5 SPD defs to IndustryStandard per JESD400-5A.01

2023-02-14 Thread Rebecca Cran
Copying the style of SdramSpdDdr4.h, add DDR5 SPD definitions to SpdDdr5.h per JEDEC JESD400-5A.01 specification (https://www.jedec.org/standards-documents/docs/jesd400-5a01). Signed-off-by: Rebecca Cran Cc: Liming Gao Cc: Michael D Kinney Cc: Zhiguang Liu --- MdePkg/Include/IndustryStandard/

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

2023-02-14 Thread Michael Kubacki
I know the second case was missed, that will be updated. I agree calculating the remaining buffer space is more straightforward here without the library so I'll go with that approach in a v4 of the series. Thanks for the detailed feedback. On 2/14/2023 9:11 AM, Gerd Hoffmann wrote: Hi,

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

2023-02-14 Thread Gerd Hoffmann
Hi, > [ ... details snipped ... ] > > I'd prefer it if the code were updated to avoid SafeUintnAdd() altogether. > But if not, then at a minimum the redundant check should be removed, and the > calculation involving Smbios.Hdr->Length should also be updated to use > SafeUintnAdd(). Fully agree

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

2023-02-14 Thread Gupta, Pankaj via groups.io
On 2/14/2023 1:55 PM, Gupta, Pankaj via groups.io wrote: On 2/14/2023 1:51 PM, Gupta, Pankaj wrote: ConvertPages: range 100 - 41AEFFF covers multiple entries ConvertPages: range 100 - 41AEFFF covers multiple entries Accepting all memory Accepting all memory Accepting all memory Accepti

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

2023-02-14 Thread Michael Kubacki
Either approach works for me. I understand the desire to avoid code bloat that comes with the library. The most common classes of issues I see at the moment are asserts being misused for error handling (which is significant), general issues with integer conversion/evaluation, and unsafe arithm

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

2023-02-14 Thread Michael Brown
On 14/02/2023 13:01, Gerd Hoffmann wrote: On Mon, Feb 13, 2023 at 04:15:30PM +, Michael Brown wrote: On 13/02/2023 15:48, Michael Kubacki wrote: @@ -1608,9 +1610,12 @@ ParseAndAddExistingSmbiosTable ( // // Make sure not to access memory beyond SmbiosEnd // -if ((Sm

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

2023-02-14 Thread Patrik Berglund
Tested-by: Patrik Berglund 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 option is found, UiApp is selected. UiApp requires a human interaction. When installing a

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

2023-02-14 Thread Igor Kulchytskyy via groups.io
Hi Abner, Yes, I will work on this to create the linked list. Thank you, Igor -Original Message- From: Chang, Abner Sent: Tuesday, February 14, 2023 1:55 AM To: Igor Kulchytskyy ; devel@edk2.groups.io Cc: Nickle Wang Subject: [EXTERNAL] RE: [PATCH] RedfishPkg/RedfishConfigHandler: fix Fr

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

2023-02-14 Thread Gerd Hoffmann
On Mon, Feb 13, 2023 at 04:15:30PM +, Michael Brown wrote: > 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_S

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

2023-02-14 Thread Gupta, Pankaj via groups.io
On 2/14/2023 1:51 PM, Gupta, Pankaj wrote: 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: exit_boot() failed! EFI stu

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

2023-02-14 Thread Gupta, Pankaj via groups.io
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: exit_boot() failed! EFI stub: ERROR: efi_main() failed! StartImage fai

[edk2-devel] [edk2-staging][PATCH] RedfishClientPkg: Add mechanism to reboot system if config is changed

2023-02-14 Thread Nickle Wang via groups.io
When system configuration is updated from RESTful interface, we need a system reboot so that the changes can be applied. Introduce PCD "PcdSystemRebootRequired" to RedfishClientPkg. RedfishFeatureUtility library will enable this flag when system config is updated. RedfishFeatureCore driver will che

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

2023-02-14 Thread Gerd Hoffmann
On Tue, Feb 14, 2023 at 01:17:55AM +, Yao, Jiewen wrote: > Good work, Gerd! > > Do you have any data on how many K can be saved? Essentially we are down to a handfull of source files for SEC and PEI, assuming both only need hash functions for tdx/tpm measurements. https://github.com/kraxel/e

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

2023-02-14 Thread Gerd Hoffmann
On Tue, Feb 14, 2023 at 04:33:10PM +0800, Jiaxin Wu wrote: > This patch is to replace mIsBsp by mBspApicId check. > mIsBsp becomes the local variable (IsBsp), then it can be > checked dynamically in the function. Instead, we define the > mBspApicId, which is to record the BSP ApicId used for > comp

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

2023-02-14 Thread Gerd Hoffmann
Hi, > In PEI module, it also has such assumption, so we don't pass in the > HOB for the resolved smbase mem size, because we have avoided the > possibility of error in the reference pi smm cpu driver. So you essentially are hoping this will never ever change and hard-code the 8k in both PEI mod

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

2023-02-14 Thread Gerd Hoffmann
On Tue, Feb 14, 2023 at 04:33:09PM +0800, Jiaxin Wu wrote: > 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

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

2023-02-14 Thread Gerd Hoffmann
On Tue, Feb 14, 2023 at 04:33:11PM +0800, Jiaxin Wu wrote: > 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. >

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

2023-02-14 Thread Gerd Hoffmann
Hi, > A recent import found incompatibilities with measured boot only in > SEV-SNP that we have disabled, but that's related to NVdata, which we > deal with differently in GCE due to the cloud IVARS service and our > allergy to SMM emulation. Should be unrelated. Do you have any pointers on the

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

2023-02-14 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: Las

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

2023-02-14 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 SmmCpuFeaturesInitializeProcessor().

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

2023-02-14 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 SMBASE

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

2023-02-14 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 v7 2/6] UefiCpuPkg/PiSmmCpuDxeSmm: Replace mIsBsp by mBspApicId check

2023-02-14 Thread Wu, Jiaxin
This patch is to replace mIsBsp by mBspApicId check. mIsBsp becomes the local variable (IsBsp), then it can be checked dynamically in the function. Instead, we define the mBspApicId, which is to record the BSP ApicId used for compare in SmmInitHandler. With this change, SmmInitHandler can be run in

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

2023-02-14 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 Don

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

2023-02-14 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 it