[edk2-devel] [PATCH v3 13/13] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic

2024-04-17 Thread Wu, Jiaxin
This patch is to remove legacy SmBase relocation in PiSmmCpuDxeSmm Driver. The responsibility for SmBase relocation has been transferred to the SmmRelocationInit interface, which now handles the following tasks: 1. Relocates the SmBase for each processor. 2. Generates the gSmmBaseHobGuid HOB. As a

[edk2-devel] [PATCH v3 11/13] OvmfPkg/PlatformPei: Relocate SmBases in PEI phase

2024-04-17 Thread Wu, Jiaxin
This patch is to consume SmmRelocationInit for SmBase Relocation. Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Ray Ni Signed-off-by: Jiaxin Wu --- OvmfPkg/PlatformPei/Platform.c | 3 + OvmfPkg/PlatformPei/Platform.h | 5 ++ OvmfPkg/Platfor

[edk2-devel] [PATCH v3 12/13] UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib

2024-04-17 Thread Wu, Jiaxin
This patch just includes SmmRelocationLib in UefiPayloadPkg. Cc: Guo Dong Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Cc: Ray Ni Signed-off-by: Jiaxin Wu Reviewed-by: Gua Guo Reviewed-by: Guo Dong --- UefiPayloadPkg/UefiPayloadPkg.dsc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Uef

[edk2-devel] [PATCH v3 10/13] OvmfPkg/SmmCpuFeaturesLib: Check Smbase Relocation is done or not

2024-04-17 Thread Wu, Jiaxin
Based on gSmmBaseHobGuid: If gSmmBaseHobGuid found, means SmBase info has been relocated and recorded in the SmBase array. So, this patch check smbase relocation is done or not in SmmCpuFeaturesInitializeProcessor(). With SmmRelocationLib, gSmmBaseHobGuid will be always created. Here this patch ju

[edk2-devel] [PATCH v3 09/13] OvmfPkg: Refine SmmAccess implementation

2024-04-17 Thread Wu, Jiaxin
This patch refines the SmmAccess implementation: 1. SmramMap will be retrieved from the gEfiSmmSmramMemoryGuid instead of original from the TSEG Memory Base register. 2. Remove the gEfiAcpiVariableGuid creation, thus the DESCRIPTOR_INDEX definition can be also cleaned. 3. The gEfiAcpiVariableGuid H

[edk2-devel] [PATCH v3 08/13] OvmfPkg/PlatformInitLib: Create gEfiSmmSmramMemoryGuid

2024-04-17 Thread Wu, Jiaxin
Background: In the PiSmmCpuDxeSmm driver, SMRAM allocation for SMI handlers and processor Save State areas was traditionally performed using the Smst->AllocatePages() function during the DXE phase. The introduction of SmmRelocationLib changes this process by moving the allocation to the PEI phase,

[edk2-devel] [PATCH v3 07/13] OvmfPkg/SmmRelocationLib: Add library instance for OVMF

2024-04-17 Thread Wu, Jiaxin
There are below 2 differences between AMD & OVMF according existing implementation: 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 configuration is different be

[edk2-devel] [PATCH v3 06/13] UefiCpuPkg/SmmRelocationLib: Add library instance for AMD

2024-04-17 Thread Wu, Jiaxin
Due to the definition difference of SMRAM Save State, SmmBase config in SMRAM Save State for AMD is also different. This patch provides the AmdSmmRelocationLib library instance to handle the SMRAM Save State difference. Cc: Abdul Lateef Attar Cc: Abner Chang Cc: Ray Ni Cc: Zeng Star Cc: Gerd

[edk2-devel] [PATCH v3 05/13] UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable

2024-04-17 Thread Wu, Jiaxin
This patch aims on mProcessorInfo global variable, which can be defined as local variable in SmmRelocateBases(). With this patch, no need to allocate the memory for all CPUs to store the Processor Info. Cc: Ray Ni Cc: Zeng Star Cc: Gerd Hoffmann Cc: Rahul Kumar Signed-off-by: Jiaxin Wu --- .

[edk2-devel] [PATCH v3 04/13] UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory allocation

2024-04-17 Thread Wu, Jiaxin
Since SMM relocation is performed serially for each CPU, there is no need to allocate buffers for all CPUs to store the SmBase address in mSmBase and the Rebased flag in mRebased. A defined global variable is sufficient. This patch focuses on the mSmBase and mRebased global variables to prevent un

[edk2-devel] [PATCH v3 03/13] UefiCpuPkg/SmmRelocationLib: Rename global variables

2024-04-17 Thread Wu, Jiaxin
This patch aims to rename global variables for clearer association with Smm Init, ensuring their names are distinct from those used in the PiSmmCpuDxeSmm Driver. Cc: Ray Ni Cc: Zeng Star Cc: Gerd Hoffmann Cc: Rahul Kumar Signed-off-by: Jiaxin Wu --- .../Library/SmmRelocationLib/Ia32/SmmInit.

[edk2-devel] [PATCH v3 02/13] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance

2024-04-17 Thread Wu, Jiaxin
This patch just separates the smbase relocation logic from PiSmmCpuDxeSmm driver, and moves to the SmmRelocationInit interface. It maintains the original implementation of most functions and leaves the definitions of global variables intact. Further refinements to the code are planned for subsequen

[edk2-devel] [PATCH v3 01/13] UefiCpuPkg: Add SmmRelocationLib class

2024-04-17 Thread Wu, Jiaxin
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 SmmRelocationInit() interface for platform to do the smbase relocation, which s

[edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib

2024-04-17 Thread Wu, Jiaxin
PR: https://github.com/tianocore/edk2/pull/5546 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 SmmRelocationInit() interface

Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc:add rdmsr_ex & wrmsr_ex functions to read/write cpu specific msrs

2024-04-17 Thread Jayaprakash, N
Thanks Mike. I shall make necessary changes and submit the PR again for review. Regards, JP -Original Message- From: Kinney, Michael D Sent: Thursday, April 18, 2024 10:46 AM To: Jayaprakash, N ; devel@edk2.groups.io Cc: Rebecca Cran ; Kinney, Michael D Subject: RE: [edk2-devel] [edk2

Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc:add rdmsr_ex & wrmsr_ex functions to read/write cpu specific msrs

2024-04-17 Thread Michael D Kinney
Please use MP Services Protocol APIs StartupAllAPs() or StarupThisAP() to read/write MSRs on other logical processors. There and many examples of this in the UefiCpuPkg to programming MSRs on all the logical processors. Mike > -Original Message- > From: Jayaprakash, N > Sent: Wednesday

Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc:add rdmsr_ex & wrmsr_ex functions to read/write cpu specific msrs

2024-04-17 Thread Jayaprakash, N
In the validation and debug scenarios, engineers tend to read MSRs and write to MSRs of different CPUs. So we are providing a simple mechanism through these APIs to enable them to do these operations. These APIs will be part of the edk2 module of the Python interpreter and will be used during t

Re: [edk2-devel] [PATCH 1/2] Platform/AMD: Add AmdSvsmLib to required DSC files

2024-04-17 Thread Xing, Eric via groups.io
[AMD Official Use Only - General] Thanks Thomas and Abner. Reviewed-by: For up-stream, please let us verify it first: @Zhai, MingXin (Duke), Duke, please help verify this change on Chachani Board and feedback. Thanks, Eric > -Original Message- > From: Chang, Abner > Sent: Thursday, A

Re: [edk2-devel] [PATCH v2] XiangshanSeriesPkg:Add BOSC NanhuDev platform

2024-04-17 Thread WangYang
Hi,Sunil V L How about this status. Best Regards, Yang Wang > -原始邮件- > 发件人: "Yang Wang" > 发送时间: 2024-04-10 13:50:12 (星期三) > 收件人: suni...@ventanamicro.com, g...@danielschaefer.me, devel@edk2.groups.io > 抄送: "Yang Wang" , "Ran Wang" , > "YunFeng Yang" , "YaXing Guo" , > "Leif Lindhol

Re: [edk2-devel] [PATCH 1/2] Platform/AMD: Add AmdSvsmLib to required DSC files

2024-04-17 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Reviewed-by: Thanks > -Original Message- > From: Lendacky, Thomas > Sent: Monday, April 15, 2024 11:01 PM > To: devel@edk2.groups.io > Cc: Ard Biesheuvel ; Gerd Hoffmann > ; Roth, Michael ; Min Xu > ; Leif Lindholm ; Michael D > Kinney ; Chang, Abner >

Re: [edk2-devel] [PATCH 6/6] OvmfPkg: Use newly defined Unaccepted Memory Type

2024-04-17 Thread Yao, Jiewen
Hi Sachin I like this clean up. Thanks for doing this. I saw this patch is 6/6, but I did not see any other such as 1/6 ~ 5/6 in my mailbox. Not sure what is happening on my side. Just double confirm, have you sent those patches? Thank you Yao, Jiewen > -Original Message- > From: Sachi

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

2024-04-17 Thread Taylor Beebe
Hi Yanbo, I didn't do it in the way you suggest for the same reason that the SplitTable() logic doesn't set attributes on descriptors of type EfiRuntimeServicesData or other memory types. The purpose of the SplitTable() function is to use the input image records to split descriptors so each ima

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

2024-04-17 Thread Oliver Smith-Denny
On 4/17/2024 2:41 PM, Oliver Smith-Denny wrote: Now, for the case of ARM64, where you have 64k runtime granularity and often will end up with the case of many extra pages in a code section, those pages will be marked as RO and executable, even though they contain garbage. I think it would be w

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

2024-04-17 Thread Oliver Smith-Denny
On 4/17/2024 9:52 AM, Ard Biesheuvel wrote: So the purpose of the MAT is to describe RT code (and to a lesser extent, RT data) regions where we cannot apply either RO or XP to the whole thing. IIRC there was never an intent to exhaustively describe all memory runtime regions. Also note that RO wa

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

2024-04-17 Thread Oliver Smith-Denny
On 4/17/2024 7:34 AM, Taylor Beebe wrote: On 4/17/2024 7:09 AM, Oliver Smith-Denny wrote: On 4/17/2024 7:05 AM, Taylor Beebe wrote: On 4/17/2024 6:40 AM, Oliver Smith-Denny wrote: Aside from this, I wonder if we can be more aspirational here. These EfiRuntimeServicesCode regions without attr

Re: [edk2-devel] Is there a way to create filesystem in UEFI Shell ?

2024-04-17 Thread Andrew Fish via groups.io
FYI you can have much larger files in the newer version of the filesystem. See EFI_COMMON_SECTION_HEADER2 https://uefi.org/specs/PI/1.8A/V3_Code_Definitions.html#firmware-file-system https://uefi.org/specs/PI/1.8A/V3_Code_Definitions.html#firmware-file-section Thanks, Andrew Fish > On Apr 3, 2

Re: [edk2-devel] Is there a way to create filesystem in UEFI Shell ?

2024-04-17 Thread charlleygreen . work
Hi, John Can you show how do you add your FV? [FV.MY_FV] balabala I cannot find a way to insert a linux.efi and initrd into FV. But I see you success. If you are willing, your work on this post will be very meaningful. Can you write a blog with all the steps? Thank you very much! Charlley -

[edk2-devel] [PATCH 6/6] OvmfPkg: Use newly defined Unaccepted Memory Type

2024-04-17 Thread Sachin Ganesh via groups.io
EFI_RESOURCE_MEMORY_UNACCEPTED has been officially defined in the PI 1.8 specification. So all temporary solutions have been replaced with the actual definition. Cc: Felix Polyudov Cc: Dhanaraj V Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Erdem Aktas Cc: Min Xu Cc: Tom Lendacky

Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc:add rdmsr_ex & wrmsr_ex functions to read/write cpu specific msrs

2024-04-17 Thread Michael D Kinney
Hi JP, Is there a reason switch BSP is being used. That is not a common operation and is typically used if the current BSP is not stable or there is a good reason to switch the BSP for OS boot. The MP Services can be used to execute a C function on APs to execute MSR related instructions. Mike

Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc: wrmsr function available in edk2module is not working as expected

2024-04-17 Thread Michael D Kinney
> -Original Message- > From: Jayaprakash, N > Sent: Tuesday, April 9, 2024 11:09 PM > To: devel@edk2.groups.io; Jayaprakash, N > Cc: Rebecca Cran ; Kinney, Michael D > > Subject: RE: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc: wrmsr > function available in edk2module is not working

Re: [edk2-devel] [PATCH] OvmfPkg: Harden #VC instruction emulation somewhat (CVE-2024-25742)

2024-04-17 Thread Adam Dunlap via groups.io
On Wed, Apr 17, 2024 at 10:08 AM Ard Biesheuvel wrote: > > (cc Jiewen) > > Please cc the OVMF maintainers when you send edk2 patches. (There is a > Maintainers file in the root of the repo) Thanks, I added everyone returned from the GetMaintainer.py script. > On Wed, 17 Apr 2024 at 18:54, Adam D

Re: [edk2-devel] [PATCH] OvmfPkg: Harden #VC instruction emulation somewhat (CVE-2024-25742)

2024-04-17 Thread Ard Biesheuvel
(cc Jiewen) Please cc the OVMF maintainers when you send edk2 patches. (There is a Maintainers file in the root of the repo) On Wed, 17 Apr 2024 at 18:54, Adam Dunlap via groups.io wrote: > > Ensure that when a #VC exception happens, the instruction at the > instruction pointer matches the inst

[edk2-devel] [PATCH] OvmfPkg: Harden #VC instruction emulation somewhat (CVE-2024-25742)

2024-04-17 Thread Adam Dunlap via groups.io
Ensure that when a #VC exception happens, the instruction at the instruction pointer matches the instruction that is expected given the error code. This is to mitigate the ahoi WeSee attack [1] that could allow hypervisors to breach integrity and confidentiality of the firmware by maliciously injec

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

2024-04-17 Thread Ard Biesheuvel
On Wed, 17 Apr 2024 at 16:34, Taylor Beebe wrote: > > > On 4/17/2024 7:09 AM, Oliver Smith-Denny wrote: > > On 4/17/2024 7:05 AM, Taylor Beebe wrote: > >> > >> On 4/17/2024 6:40 AM, Oliver Smith-Denny wrote: > >>> Aside from this, I wonder if we can be more aspirational here. These > >>> EfiRuntim

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

2024-04-17 Thread Taylor Beebe
On 4/17/2024 7:09 AM, Oliver Smith-Denny wrote: On 4/17/2024 7:05 AM, Taylor Beebe wrote: On 4/17/2024 6:40 AM, Oliver Smith-Denny wrote: Aside from this, I wonder if we can be more aspirational here. These EfiRuntimeServicesCode regions without attributes set are, if I am understanding corr

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

2024-04-17 Thread Oliver Smith-Denny
On 4/17/2024 7:05 AM, Taylor Beebe wrote: On 4/17/2024 6:40 AM, Oliver Smith-Denny wrote: Aside from this, I wonder if we can be more aspirational here. These EfiRuntimeServicesCode regions without attributes set are, if I am understanding correctly, from loaded images. These EfiRuntimeServic

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

2024-04-17 Thread Taylor Beebe
On 4/17/2024 6:40 AM, Oliver Smith-Denny wrote: Hi Ard, On 4/16/2024 11:38 PM, Ard Biesheuvel wrote: For entries where we lack such additional metadata, I don't think we can make assumptions based on the type beyond mapping data and MMIO regions XP. We have no idea how those EfiRuntimeServic

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

2024-04-17 Thread Huang, Yanbo
Hi Taylor, Thanks for your update. After test, issue can be fixed by your patch. But why we not set the EFI_MEMORY_XP or EFI_MEMORY_RO attribute in SplitRecord API? If we set the attribute in the beginning of the NewRecord created, it seems we don’t need to EnforceMemoryMapAttribute later? Best

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

2024-04-17 Thread Oliver Smith-Denny
Hi Ard, On 4/16/2024 11:38 PM, Ard Biesheuvel wrote: For entries where we lack such additional metadata, I don't think we can make assumptions based on the type beyond mapping data and MMIO regions XP. We have no idea how those EfiRuntimeServicesCode regions may be used, and currently, the spec

Re: [edk2-devel] [PATCH 0/4] OvmfPkg: Add VirtHstiDxe driver

2024-04-17 Thread Yao, Jiewen
That is good start. The SMRAM lock and Flash lock seem good to me. Comment: 1) Do we really need to add "Q35" for the policy? #define VIRT_HSTI_BYTE0_Q35_SMM_SMRAM_LOCK BIT0 #define VIRT_HSTI_BYTE0_Q35_SMM_SECURE_VARS_FLASH BIT1 I feel we had better remove it, since SMM_SMRAM_LOCK and SM

回复: [edk2-devel] [PATCH] BaseTools: FMMT Skip empty Lines while parsing FMMTConfig.ini

2024-04-17 Thread gaoliming via groups.io
Ashraf: I just merge it. Thanks Liming > -邮件原件- > 发件人: devel@edk2.groups.io 代表 Ashraf Ali S > 发送时间: 2024年4月17日 16:36 > 收件人: devel@edk2.groups.io; S, Ashraf Ali ; Chen, > Christine ; Rebecca Cran ; > Liming Gao > 抄送: Feng, Bob C ; Chaganty, Rangasai V > > 主题: Re: [edk2-devel] [PATCH]

Re: [edk2-devel] [PATCH 0/4] OvmfPkg: Add VirtHstiDxe driver

2024-04-17 Thread Ard Biesheuvel
On Wed, 17 Apr 2024 at 10:18, Gerd Hoffmann wrote: > > On Fri, Mar 22, 2024 at 03:27:31PM +0100, Gerd Hoffmann wrote: > > > > > > Gerd Hoffmann (2): > > OvmfPkg/VirtHstiDxe: add varstore flash check > > OvmfPkg/VirtHstiDxe: add code flash check > > > > Konstantin Kostiuk (2): > > OvmfPkg: Ad

[edk2-devel] [PATCH 0/2] Align the PPTT tables with qemu configuration

2024-04-17 Thread Xiong Yining
To align the CPU topology information recognized by the operating system with the CPU topology information configured by QEMU, we need to get the information of topology to have complex PPTT tables setups. When creating the pptt table, we considered the cluster layer, SBSA Reference Platform ha

[edk2-devel] [PATCH 2/2] Silicon/SbsaQemu: align the PPTT tables with qemu configuration

2024-04-17 Thread Xiong Yining
To align the CPU topology information recognized by the operating system with the CPU topology information configured by QEMU, we need to make use of the CPU topology information to create complex PPTT tables setups. We can get the CPU topology information via SMC. Signed-off-by: Xiong Yining

[edk2-devel] [PATCH 1/2] Platform/SbsaQemu: get the information of CPU topology via SMC calls

2024-04-17 Thread Xiong Yining
Provide functions to check for CPU topology information: - the number of sockets on sbsa-ref platform. - the number of clusters in one socket. - the number of cores in one cluster. - the number of threads in one cores. As SMC calls can return up to 4 return values. the number of sockets, clusters

Re: [edk2-devel] [PATCH v1 0/4] Adjust the QemuFwCfgLibMmio and add PEI stage

2024-04-17 Thread Chao Li
Hi Gerd, Thanks, Chao On 2024/4/17 17:35, Gerd Hoffmann wrote: On Wed, Apr 17, 2024 at 04:12:56PM +0800, Chao Li wrote: Patch1: Added three PCDs for QemuFwCfgLibMmio Patch2: Sparate QemuFwCfgLibMmio.c into two files and default as DXE stage library. Patch3: Added QemuFwCfgMmiLib PEI version Pa

Re: [edk2-devel] [PATCH v1 0/4] Adjust the QemuFwCfgLibMmio and add PEI stage

2024-04-17 Thread Gerd Hoffmann
On Wed, Apr 17, 2024 at 04:12:56PM +0800, Chao Li wrote: > Patch1: Added three PCDs for QemuFwCfgLibMmio > Patch2: Sparate QemuFwCfgLibMmio.c into two files and default as DXE > stage library. > Patch3: Added QemuFwCfgMmiLib PEI version > Patch4: Rename QemuFwCfgLibMmio.inf to QemuFwCfgMmioDxeLib.i

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

2024-04-17 Thread Min Xu
From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4756 There are below updates in this patch: 1. Rename README to README.md so that it can be show as markdown document. 2. Update some information about TDVF. 2. Fix some typo. Cc: Jiewen Yao Cc: Gerd Hoffmann Signed-off-by:

Re: [edk2-devel] [PATCH] BaseTools: FMMT Skip empty Lines while parsing FMMTConfig.ini

2024-04-17 Thread Ashraf Ali S
Hi @Liming Gao @Rebecca Cran Is this patch already pushed? As its been already reviewed. Thanks., S, Ashraf Ali -Original Message- From: devel@edk2.groups.io On Behalf Of Ashraf Ali S Sent: Monday, March 11, 2024 5:01 PM To: devel@edk2.groups.io; Chen, Christine Cc: Rebecca Cran ; Limi

Re: [edk2-devel] [PATCH 0/4] OvmfPkg: Add VirtHstiDxe driver

2024-04-17 Thread Gerd Hoffmann
On Fri, Mar 22, 2024 at 03:27:31PM +0100, Gerd Hoffmann wrote: > > > Gerd Hoffmann (2): > OvmfPkg/VirtHstiDxe: add varstore flash check > OvmfPkg/VirtHstiDxe: add code flash check > > Konstantin Kostiuk (2): > OvmfPkg: Add VirtHstiDxe driver > OvmfPkg: Add VirtHstiDxe to OVMF firmware bu

[edk2-devel] [PATCH v1 3/4] OvmfPkg: Add the QemuFwCfgMmioLib PEI stage version

2024-04-17 Thread Chao Li
Added the PEI stage library for QemuFwCfgMmioLib, which uses the FDT to find the fw_cfg and parse it. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4755 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Gerd Hoffmann Co-authored-by: Xianglai Li Signed-off-by: Chao Li --- .../Library/QemuFwCfgLib/Q

[edk2-devel] [PATCH v1 4/4] OvmfPkg: Rename QemuFwCfgLibMmio.inf and enable new name in AARCH64 and RISCV64 virtual machines

2024-04-17 Thread Chao Li
Rename QemuFwCfgLibMmio.inf to QemuFwCfgMmioDxeLib.inf, and enable the new name in the AARCH64 and RISCV64 virtual machines. Build-tested only (with "ArmVirtQemu.dsc and RiscVVirtQemu.dsc"). BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4755 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Gerd Hoff

[edk2-devel] [PATCH v1 2/4] OvmfPkg: Separate QemuFwCfgLibMmio.c into two files

2024-04-17 Thread Chao Li
Separate QemuFwCfgLibMmio.c into two files named QemuFwCfgLibMmio.c and QemuFwCfgLibMmioDxe.c, added a new header named QemuFwCfgLibMmioInternal.h for MMIO version. Build-tested only (with "ArmVirtQemu.dsc and RiscVVirtQemu.dsc"). BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4755 Cc: Ard B

[edk2-devel] [PATCH v1 1/4] OvmfPkg: Add three PCDs for QemuFwCfgLib

2024-04-17 Thread Chao Li
Added three PCDs named PcdFwCfgSelectorAddress, PcdFwCfgDataAddress and PcdFwCfgDmaAddress, all of type PcdsDynamic and PcdDynamicEx, whcih will be used in QemuFwCfgLibMmio version to replace the three global variables in QemuFwCfgLib. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4755 Cc: A

[edk2-devel] [PATCH v1 0/4] Adjust the QemuFwCfgLibMmio and add PEI stage

2024-04-17 Thread Chao Li
Patch1: Added three PCDs for QemuFwCfgLibMmio Patch2: Sparate QemuFwCfgLibMmio.c into two files and default as DXE stage library. Patch3: Added QemuFwCfgMmiLib PEI version Patch4: Rename QemuFwCfgLibMmio.inf to QemuFwCfgMmioDxeLib.inf and enable it in AARCH64 and RISCV64. BZ: https://bugzilla.tian

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

2024-04-17 Thread Gerd Hoffmann
On Wed, Apr 17, 2024 at 03:43:30PM +0800, Chao Li wrote: > Hi Gerd, > > > Thanks, > Chao > On 2024/4/17 14:59, Gerd Hoffmann wrote: > > 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 >

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

2024-04-17 Thread Wu, Jiaxin
I'm using the OVMF library, haven't try the AMD library:). > -Original Message- > From: Gerd Hoffmann > Sent: Wednesday, April 17, 2024 3:04 PM > To: Wu, Jiaxin > Cc: thomas.lenda...@amd.com; devel@edk2.groups.io; Ni, Ray > ; Zeng, Star ; Ard Biesheuvel > ; Yao, Jiewen ; Kumar, > Rahul R

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

2024-04-17 Thread Chao Li
Hi Gerd, Thanks, Chao On 2024/4/17 14:59, Gerd Hoffmann wrote: 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

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

2024-04-17 Thread Gerd Hoffmann
On Tue, Apr 16, 2024 at 03:40:08PM +, Yao, Jiewen wrote: > 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 IntelTd

[edk2-devel] [PATCH] XiangshanSeriesPkg:Add Support for Xilinx RC(PCIE) Driver

2024-04-17 Thread WangYang
1.Xilinx RC is XDMA 2.Support NVME storage Nvme storage needs to be formatted to FAT32 format. Reviewed-by: Ran Wang Cc: Leif Lindholm Cc: Michael D Kinney Cc: Sunil V L Cc: Daniel Schaefer Signed-off-by: Yang Wang --- .../XiangshanSeriesPkg/NanhuDev/NanhuDev.dsc | 30 +- .../XiangshanS

[edk2-devel] [PATCH v2] XiangshanSeriesPkg:Add BOSC NanhuDev platform

2024-04-17 Thread WangYang
This commit adds the initial support for BOSC's nanhu platform which provides up to 2 RISC-V RV64 processor cores. Signed-off-by: Yang Wang Signed-off-by: Ran Wang Signed-off-by: YunFeng Yang Signed-off-by: YaXing Guo Cc: Leif Lindholm Cc: Michael D Kinney Cc: Sunil V L Cc: Daniel Schaefer

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

2024-04-17 Thread Gerd Hoffmann
On Tue, Apr 16, 2024 at 11:34:00AM +, Wu, Jiaxin wrote: > Hi Gerd, > > > Is the SmmRelocationLib approach supposed to work with mixed mode > > firmware where PEI is running in ia32 mode and dxe/smm is running > > in x64 mode (i.e. OvmfPkg/OvmfPkgIa32X64.dsc)? > > Yes, I passed the test on the