[edk2-devel] [PATCH v3 1/1] MdeModulePkg: Add the EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE attribute

2024-05-17 Thread Michael Kubacki
From: Patrick Payne Add the EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE resource attribute as per the PI 1.8 spec. This flag is used to indicate that the memory should be treated as special purpose memory (SPM). Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: Michael Kubacki --- Notes: V3:

Re: [edk2-devel] [PATCH v1 1/1] CodeQL: Update from 2.16.1 to 2.17.3

2024-05-17 Thread Michael D Kinney
Approved. I agree there is no impact to FW. Mike > -Original Message- > From: Michael Kubacki > Sent: Friday, May 17, 2024 4:28 PM > To: Kinney, Michael D ; devel@edk2.groups.io; > Andrew Fish ; Leif Lindholm ; > Liming Gao > Cc: Feng, Bob C ; Joey Vagedes > ; Rebecca Cran ; Sean Brogan

Re: [edk2-devel] [PATCH v1 1/1] CodeQL: Update from 2.16.1 to 2.17.3

2024-05-17 Thread Michael Kubacki
Forgot about the hard freeze. Added remaining stewards to consider merging this. It has no impact on firmware but is needed to unblock an immediate issue in CI where the CodeQL queries being fetched are newer and incompatible with the CodeQL CLI being used. As I mentioned in the release note

Re: [edk2-devel] [PATCH v1 1/1] CodeQL: Update from 2.16.1 to 2.17.3

2024-05-17 Thread Michael Kubacki
To ensure CI is unblocked, I am going to add the push tag now. On 5/17/2024 6:31 PM, Michael Kubacki wrote: Thanks Mike. Are you okay with me completing the PR now? On 5/17/2024 5:31 PM, Kinney, Michael D wrote: Reviewed-by: Michael D Kinney -Original Message- From: mikub...@linux.m

Re: [edk2-devel] [PATCH v1 1/1] CodeQL: Update from 2.16.1 to 2.17.3

2024-05-17 Thread Michael Kubacki
Thanks Mike. Are you okay with me completing the PR now? On 5/17/2024 5:31 PM, Kinney, Michael D wrote: Reviewed-by: Michael D Kinney -Original Message- From: mikub...@linux.microsoft.com Sent: Friday, May 17, 2024 2:09 PM To: devel@edk2.groups.io Cc: Feng, Bob C ; Joey Vagedes ; Lim

Re: [edk2-devel] [PATCH v1 1/1] CodeQL: Update from 2.16.1 to 2.17.3

2024-05-17 Thread Joey Vagedes via groups.io
Reviewed-by: Joey Vagedes -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119060): https://edk2.groups.io/g/devel/message/119060 Mute This Topic: https://groups.io/mt/106161774/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: ht

Re: [edk2-devel] [PATCH v1 1/1] CodeQL: Update from 2.16.1 to 2.17.3

2024-05-17 Thread Michael D Kinney
Reviewed-by: Michael D Kinney > -Original Message- > From: mikub...@linux.microsoft.com > Sent: Friday, May 17, 2024 2:09 PM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Joey Vagedes > ; Liming Gao ; Kinney, > Michael D ; Rebecca Cran ; > Sean Brogan ; Chen, Christine > > Subject: [PA

[edk2-devel] [PATCH v1 1/1] CodeQL: Update from 2.16.1 to 2.17.3

2024-05-17 Thread Michael Kubacki
From: Michael Kubacki This fixes an issue where the CodeQL queries currently fetched in the pipeline are incompatible with the current executable used. Update to pick up functional and security fixes. See the following comparison for detailed differences: https://github.com/github/codeql-cli-bi

Re: [edk2-devel] [PATCH] NetworkPkg:MnpDxe:CoverityIssues

2024-05-17 Thread Saloni Kasbekar
Both the cases have ASSERTs checking that the value is greater than 0. Move the checks to the same location as the ASSERT. I'd also prefer if we return with a failure instead of forcing continuation of the function with an invalid value. Thanks, Saloni -Original Message- From: Santhosh

[edk2-devel] [PATCH v2 1/1] MdePkg: Add the EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE attribute

2024-05-17 Thread Michael Kubacki
From: Patrick Payne Add the EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE resource attribute as per the PI 1.8 spec. This flag is used to indicate that the memory should be treated as special purpose memory (SPM). Cc: Liming Gao Cc: Michael D Kinney Signed-off-by: Michael Kubacki --- Notes: V2:

Re: [edk2-devel] [PATCH 7/9] MdeModulePkg:Consume gEdkiiVariableRuntimeCacheInfoHobGuid

2024-05-17 Thread Kun Qin via groups.io
Hi Ray & Dun, Thanks for adding me to the patch. I think the proposed solution should work. One question, which is actually on the hob creator patch (https://edk2.groups.io/g/devel/message/119022), is that I understand the hob creation depends on "gEfiPeiMemoryDiscoveredPpiGuid", but does this

[edk2-devel] [PATCH] CryptoPkg: Check ASN1_get_object() return value

2024-05-17 Thread Sountharya N via groups.io
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4509 In ASN1_get_object(), Inf should compare with 0x80 instead of 0x00. Cc: Sountharya N Signed-off-by: Sountharya N --- CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a

[edk2-devel] [PATCH] CryptoPkg: Check ASN1_get_object() return value

2024-05-17 Thread Sountharya N via groups.io
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4509 ASN1_get_object() returns (0x80) in error case and it is compared with (0x00). If ASN1_get_object() returns 0x80 it should returns FALSE, but here it is compared with (0x00) and if it returns 0x80 it is coming out of the condition and mak

Re: [edk2-devel] [PATCH v2] MdeModulePkg/PciBusDxe: plug device hierarchy leak upon bridge hot-unplug

2024-05-17 Thread Ding, Feng (Sunnyvale) via groups.io
[AMD Official Use Only - AMD Internal Distribution Only] Hi Ray, You are right. The change is NOT necessary. Thanks feng From: Ni, Ray Sent: Tuesday, May 7, 2024 8:26 PM To: Hsueh, Hong-Chih (Neo) ; Laszlo Ersek ; devel@edk2.groups.io Cc: Ding, Feng (Sunnyvale) ; He, Jiangang ; Chang, Abner

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

2024-05-17 Thread suijingfeng
On Thu, May 16, 2024 at 10:54 AM, WangYang wrote: Hi, > > Hi,Ray > > Thank you very much for your attention. > The reviewer Ray told you that you patch has some small problems, For example, the clause "if ((Bus == 1) || (Bus == 2) || (Bus == 3) || (Bus == 4)) " is useless. As both code path

Re: [edk2-devel] Soft Feature Freeze starts now for edk2-stable202405

2024-05-17 Thread Wenxing Hou
Hi Liming and Mike, For the PATCH: Add more crypt APIs based on Mbedtls (https://edk2.groups.io/g/devel/message/118772), I have fixed the code based on Mike’s feedback and added the platform integration test table in commit message. Could you approve this PATCH to catch this table tag? Thanks,

Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc: Add cpuid_ex API to execute CPUID instructions on specific CPU

2024-05-17 Thread Jayaprakash, N
Changes looks good. Reviewed-by: Jayaprakash N Regards, JP -Original Message- From: R, Vishal Sent: Friday, May 17, 2024 12:08 PM To: devel@edk2.groups.io Cc: R, Vishal ; Rebecca Cran ; Kinney, Michael D ; Jayaprakash, N Subject: [edk2-libc Patch 1/1] edk2-libc: Add cpuid_ex API to e

Re: [edk2-devel] [PATCH 9/9] MdeModulePkg:Add global variable mVariableRtCacheInfo

2024-05-17 Thread Ni, Ray
I didn't read through all changes. 2 comments: 1. Please do not remember to call ConvertPointer() for any pointers accessed at runtime. I think your patch contains 4 pointers in the mVariableRtCacheInfo structure. 2. Please do not call FreePages() to free a PEI-allocated runtime memory. It w

Re: [edk2-devel] [PATCH 7/9] MdeModulePkg:Consume gEdkiiVariableRuntimeCacheInfoHobGuid

2024-05-17 Thread Ni, Ray
Dun, All the 6 new pointers that are accessed at runtime should be converted through ConvertPointer(). Please ignore my previous Reviewed-by. Thanks, Ray From: Tan, Dun Sent: Friday, May 17, 2024 17:49 To: devel@edk2.groups.io Cc: Ni, Ray ; Liming Gao Subject:

Re: [edk2-devel] [PATCH 7/9] MdeModulePkg:Consume gEdkiiVariableRuntimeCacheInfoHobGuid

2024-05-17 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Tan, Dun Sent: Friday, May 17, 2024 17:49 To: devel@edk2.groups.io Cc: Ni, Ray ; Liming Gao Subject: [PATCH 7/9] MdeModulePkg:Consume gEdkiiVariableRuntimeCacheInfoHobGuid Consume gEdkiiVariableRuntimeCacheInfoHobGuid in

Re: [edk2-devel] [PATCH 6/9] MdeModulePkg:Remove unnecessary global variable

2024-05-17 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Tan, Dun Sent: Friday, May 17, 2024 17:49 To: devel@edk2.groups.io Cc: Ni, Ray ; Liming Gao ; Wu, Jiaxin Subject: [PATCH 6/9] MdeModulePkg:Remove unnecessary global variable Remove the two unnecessary global variables and

Re: [edk2-devel] [PATCH 5/9] MdeModulePkg:Create gEdkiiVariableRuntimeCacheInfoHobGuid

2024-05-17 Thread Ni, Ray
+ VariableRuntimeCacheHob = BuildGuidHob (&gEdkiiVariableRuntimeCacheInfoHobGuid, sizeof (VARIABLE_RUNTIME_CACHE_INFO)); + ASSERT (VariableRuntimeCacheHob != NULL); + ZeroMem (VariableRuntimeCacheHob, sizeof (VARIABLE_RUNTIME_CACHE_INFO)); + + // + // AllocateRuntimePages for CACHE_INFO_FLAG

Re: [edk2-devel] [PATCH 4/9] OvmfPkg: Add MmUnblockMemoryLib in DSC

2024-05-17 Thread Ni, Ray
it's not needed. Thanks, Ray From: Tan, Dun Sent: Friday, May 17, 2024 17:49 To: devel@edk2.groups.io Cc: Ni, Ray ; Ard Biesheuvel ; Yao, Jiewen ; Gerd Hoffmann Subject: [PATCH 4/9] OvmfPkg: Add MmUnblockMemoryLib in DSC Add MmUnblockMemoryLib in OvmfPkgIa32X6

Re: [edk2-devel] [PATCH 3/9] EmulatorPkg: Add MmUnblockMemoryLib in DSC

2024-05-17 Thread Ni, Ray
It's not needed. Thanks, Ray From: Tan, Dun Sent: Friday, May 17, 2024 17:49 To: devel@edk2.groups.io Cc: Andrew Fish ; Ni, Ray Subject: [PATCH 3/9] EmulatorPkg: Add MmUnblockMemoryLib in DSC Add MmUnblockMemoryLib in EmulatorPkg.dsc. This lib will be required

Re: [edk2-devel] [PATCH 2/9] ArmVirtPkg: Add MmUnblockMemoryLib in DSC

2024-05-17 Thread Ni, Ray
+ MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf [Ray] Do you really need this line as the next "!include" already includes the NULL instance lib? + !include MdePkg/MdeLibs.dsc.inc -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to th

Re: [edk2-devel] [PATCH 1/9] MdeModulePkg:Add new gEdkiiVariableRuntimeCacheInfoHobGuid

2024-05-17 Thread Ni, Ray
There is no need to use pack(1). Explicit pack(1) is needed when you really need to save spaces or the data is saved in some NV storage to be accessed by a different software component. Thanks, Ray From: Tan, Dun Sent: Friday, May 17, 2024 17:49 To: devel@edk2.gr

Re: [edk2-devel] [PATCH] UefiCpuPkg:fix issue when splitting paging entry

2024-05-17 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Tan, Dun Sent: Friday, May 17, 2024 17:44 To: devel@edk2.groups.io Cc: Ni, Ray ; Kumar, Rahul R ; Gerd Hoffmann ; Wu, Jiaxin ; Zhou, Jianfeng Subject: [PATCH] UefiCpuPkg:fix issue when splitting paging entry This patch i

[edk2-devel] [PATCH v4 10/11] CryptoPkg: Update *.inf in BaseCryptLibMbedTls

2024-05-17 Thread Wenxing Hou
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Update all *.inf in BaseCryptLibMbedTls based on new implementation. Cc: Jiewen Yao Cc: Yi Li Signed-off-by: Wenxing Hou Reviewed-by: Yi Li Acked-by: Jiewen Yao --- .../BaseCryptLibMbedTls/BaseCryptLib.inf | 42 ++

[edk2-devel] [PATCH v4 11/11] Add SM3 functions with openssl for Mbedtls

2024-05-17 Thread Wenxing Hou
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Because the Mbedlts 3.3.0 doesn't have Sm3, the Sm3 implementaion is based on Openssl. Cc: Jiewen Yao Cc: Yi Li Signed-off-by: Wenxing Hou Reviewed-by: Yi Li Acked-by: Jiewen Yao --- CryptoPkg/CryptoPkgMbedTls.dsc| 1

[edk2-devel] [PATCH v4 09/11] CryptoPkg: Add ImageTimestampVerify based on Mbedtls

2024-05-17 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 Reviewed-by: Yi Li Acked-by: Jiewen Yao --- .../Library/BaseCryptLibMbedTls/Pk/CryptTs.c | 381 ++

[edk2-devel] [PATCH v4 08/11] CryptoPkg: Add AuthenticodeVerify based on Mbedtls

2024-05-17 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 Reviewed-by: Yi Li Acked-by: Jiewen Yao --- .../Pk/CryptAuthenticode.c| 214 ++ 1 file changed, 214

[edk2-devel] [PATCH v4 07/11] CryptoPkg: Add more RSA related functions based on Mbedtls

2024-05-17 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 Reviewed-by: Yi Li Acked-by: Jiewen Yao --- .../BaseCryptLibMbedTls/Pk/CryptPkcs1Oaep.c | 278 ++ .../B

[edk2-devel] [PATCH v4 04/11] CryptoPkg: Add X509 functions based on Mbedtls

2024-05-17 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 Reviewed-by: Yi Li Acked-by: Jiewen Yao --- .../BaseCryptLibMbedTls/Pk/CryptX509.c| 1940 + 1 f

[edk2-devel] [PATCH v4 06/11] CryptoPkg: Add Pkcs5 functions based on Mbedtls

2024-05-17 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 Reviewed-by: Yi Li Acked-by: Jiewen Yao --- .../BaseCryptLibMbedTls/Pk/CryptPkcs5Pbkdf2.c | 100 ++

[edk2-devel] [PATCH v4 05/11] CryptoPkg: Add Pkcs7 related functions based on Mbedtls

2024-05-17 Thread Wenxing Hou
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Because the current Mbedlts pkcs7 library doesn't support authenticatedAttributes and only support 0 or 1 certificates in Signed data, the patch implement Pkcs7 by low Mbedtls Api. And the implementation has pass unit_tes and integration te

[edk2-devel] [PATCH v4 03/11] CryptoPkg: Add Pem APIs based on Mbedtls

2024-05-17 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 Reviewed-by: Yi Li Acked-by: Jiewen Yao --- .../BaseCryptLibMbedTls/Pem/CryptPem.c| 138 ++ 1 file changed, 138 insertions

[edk2-devel] [PATCH v4 02/11] CryptoPkg: Add rand function for BaseCryptLibMbedTls

2024-05-17 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 Reviewed-by: Yi Li Acked-by: Jiewen Yao --- CryptoPkg/Include/Library/BaseCryptLib.h | 2 + .../BaseCryptLibMbedTls/InternalCryptLib

[edk2-devel] [PATCH v4 00/11] Add more crypt APIs based on Mbedtls

2024-05-17 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/5645 And the patch has passed unit_te

[edk2-devel] [PATCH v4 01/11] CryptoPkg: Add AeadAesGcm based on Mbedtls

2024-05-17 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 Reviewed-by: Yi Li Acked-by: Jiewen Yao --- .../Cipher/CryptAeadAesGcm.c | 227 ++ 1 file changed, 227 in

[edk2-devel] [PATCH 9/9] MdeModulePkg:Add global variable mVariableRtCacheInfo

2024-05-17 Thread duntan
Add global variable mVariableRtCacheInfo to save the content in gEdkiiVariableRuntimeCacheInfoHobGuid. With this new global variable, 7 global variables can be removed. Signed-off-by: Dun Tan Cc: Ray Ni Cc: Liming Gao Cc: Jiaxin Wu --- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRun

[edk2-devel] [PATCH 8/9] MdeModulePkg: Refine InitVariableCache()

2024-05-17 Thread duntan
Refine the code logic in InitVariableCache(). In this commit, three times calling of InitVariableCache() for different type cache are merged into one calling. This commit is to make the code looks cleaner and doesn't change any code functionality. Signed-off-by: Dun Tan Cc: Ray Ni Cc: Liming Gao

[edk2-devel] [PATCH 7/9] MdeModulePkg:Consume gEdkiiVariableRuntimeCacheInfoHobGuid

2024-05-17 Thread duntan
Consume gEdkiiVariableRuntimeCacheInfoHobGuid in VariableSmmRuntimeDxe driver to initialize the following variable cache related buffer: *mVariableRuntimeHobCacheBuffer *mVariableRuntimeNvCacheBuffer *mVariableRuntimeVolatileCacheBuffer *mVariableRuntimeCachePendingUpdate *mVariableRunt

[edk2-devel] [PATCH 6/9] MdeModulePkg:Remove unnecessary global variable

2024-05-17 Thread duntan
Remove the two unnecessary global variables and replace them by two local variables: mVariableRuntimeNvCacheBufferSize mVariableRuntimeVolatileCacheBufferSize Signed-off-by: Dun Tan Cc: Ray Ni Cc: Liming Gao Cc: Jiaxin Wu --- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c

[edk2-devel] [PATCH 5/9] MdeModulePkg:Create gEdkiiVariableRuntimeCacheInfoHobGuid

2024-05-17 Thread duntan
Install the callback of gEfiPeiMemoryDiscoveredPpiGuid to create gEdkiiVariableRuntimeCacheInfoHobGuid in VariablePei module. When PcdEnableVariableRuntimeCache is TRUE, the callback will be installed to allocate the needed buffer for different type variable runtime cache, unblock the buffer and bu

[edk2-devel] [PATCH 3/9] EmulatorPkg: Add MmUnblockMemoryLib in DSC

2024-05-17 Thread duntan
Add MmUnblockMemoryLib in EmulatorPkg.dsc. This lib will be required by VariablePei in following commits. Signed-off-by: Dun Tan Cc: Andrew Fish Cc: Ray Ni --- EmulatorPkg/EmulatorPkg.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.

[edk2-devel] [PATCH 4/9] OvmfPkg: Add MmUnblockMemoryLib in DSC

2024-05-17 Thread duntan
Add MmUnblockMemoryLib in OvmfPkgIa32X64.dsc. This lib will be required by VariablePei in following commits. Signed-off-by: Dun Tan Cc: Ray Ni Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Gerd Hoffmann --- OvmfPkg/OvmfPkgIa32X64.dsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[edk2-devel] [PATCH 2/9] ArmVirtPkg: Add MmUnblockMemoryLib in DSC

2024-05-17 Thread duntan
Add MmUnblockMemoryLib in ArmVirtCloudHv.dsc. This lib will be required by VariablePei in following commits. Signed-off-by: Dun Tan Cc: Ray Ni Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann --- ArmVirtPkg/ArmVirtCloudHv.dsc | 2 ++ 1 file changed, 2 insertions(+) d

[edk2-devel] [PATCH 1/9] MdeModulePkg:Add new gEdkiiVariableRuntimeCacheInfoHobGuid

2024-05-17 Thread duntan
This commit defines VARIABLE_RUNTIME_CACHE_INFO HOB. The HOB is used to store the address and size of the buffer that will be used for variable runtime service when the PcdEnableVariableRuntimeCache is TRUE. In following patches, when PcdEnableVariableRuntimeCache is TRUE, VariablePei module will

[edk2-devel] [PATCH 0/9] Allocate and unblock variable runtime cache buffer in PEI

2024-05-17 Thread duntan
This patch set defines a new VARIABLE_RUNTIME_CACHE_INFO HOB. The HOB is used to store the address and size of the buffer that will be used for variable runtime service when the PcdEnableVariableRuntimeCache is TRUE. In following patches, when PcdEnableVariableRuntimeCache is TRUE, VariablePei w

Re: [edk2-devel] 回复: [edk2-devel] [PATCH v2 03/13] OvmfPkg:PlatformCI: Support virtio-rng-pci

2024-05-17 Thread Gerd Hoffmann
On Fri, May 17, 2024 at 09:27:53AM GMT, Ard Biesheuvel wrote: > On Fri, 17 May 2024 at 05:27, Doug Flick via groups.io > wrote: > > > > On ARM, we can actually do better than this: I have taken Doug's v2 and > > applied some changes on top to make it work with ArmVirtQemu. > > > > https://github.

[edk2-devel] [Patch V2 18/18] UefiCpuPkg: Remove GetAcpiCpuData() in CpuS3.c

2024-05-17 Thread duntan
Remove GetAcpiCpuData() in CpuS3.c. The mAcpiCpuData is not needed in S3 boot anymore. Signed-off-by: Dun Tan Reviewed-by: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Jiaxin Wu --- UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 243 +---

[edk2-devel] [Patch V2 16/18] UefiCpuPkg: Remove unneeded MpService2Ppi assignment

2024-05-17 Thread duntan
Remove the unneeded assignment of MpService2Ppi field in SmmS3ResumeState. Previously, when the execution combination of PEI and DXE are the same, the pointer of mpservice ppi will be passed to CpuS3.c in smm cpu driver to wakeup all APs, instead of init-sipi-sipi. Currently, CpuS3.c doesn't need t

[edk2-devel] [Patch V2 17/18] MdeModulePkg:Remove MpService2Ppi field in SMM_S3_RESUME_STATE

2024-05-17 Thread duntan
This MpService2Ppi field in SMM_S3_RESUME_STATE is used to wakeup AP to do the CPU initialization during smm s3 boot when the execution mode of PEI and DXE are the same. Currently, in CpuS3.c of smm cpu driver, BSP doesn't need to wakeup AP anymore. The initialization for AP will be done in S3Resum

[edk2-devel] [Patch V2 15/18] UefiCpuPkg:Remove code to wakeup AP and relocate ap

2024-05-17 Thread duntan
After the code to load mtrr setting, set register table, handle APIC setting and Interrupt after INIT-SIPI-SIPI is moved, the InitializeCpuProcedure() only contains following code logic: 1.Bsp runs ExecuteFirstSmiInit(). 2.Bsp transfers AP to safe hlt-loop During S3 boot, since APs will be relocat

[edk2-devel] [Patch V2 14/18] UefiCpuPkg:Remove code to handle APIC setting and Interrupt

2024-05-17 Thread duntan
Remove ProgramVirtualWireMode()/DisableLvtInterrupts() since APs won't be waken by INIT-SIPI-SIPI in CpuS3.c any more. The two functions has been executed in MpInitLibInitialize() in PeiMplib. Signed-off-by: Dun Tan Reviewed-by: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Jiaxin Wu --- Uefi

[edk2-devel] [Patch V2 13/18] UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLib

2024-05-17 Thread duntan
In this commit, change PeiMpLib to install callback of gEdkiiEndOfS3ResumeGuid to relocate AP to new safe buffer. The gEdkiiEndOfS3ResumeGuid is installed in S3Resume.c before jmping to OS waking vector. Previously, code in CpuS3.c of PiSmmCpuDxe driver will prepare the new safe buffer for AP and

[edk2-devel] [Patch V2 12/18] UefiCpuPkg: Install gEdkiiEndOfS3ResumeGuid in S3Resume

2024-05-17 Thread duntan
Install gEdkiiEndOfS3ResumeGuid in S3Resume to trigger callback registered by PeiMpLib. The callback is to relocate Ap to new safe memory before jump to OS waking vector in S3 boot flow. Signed-off-by: Dun Tan Reviewed-by: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Jiaxin Wu --- UefiCpuPkg

[edk2-devel] [Patch V2 11/18] UefiCpuPkg:Move some code in DxeMpLib to common place

2024-05-17 Thread duntan
Move some code in DxeMpLib.C to common MpLib.c. The related code is to relocate Ap to new safe buffer before booting into OS. In next commits, these code also will be used by PeiMpLib. This commit doesn't change any code functionality. Signed-off-by: Dun Tan Reviewed-by: Ray Ni Cc: Rahul Kumar

[edk2-devel] [Patch V2 10/18] UefiCpuPkg:Abstract some DxeMpLib code to function

2024-05-17 Thread duntan
Abstract some DxeMpLib code to function in this commit. Some of these internal functions will be moved to common MpLib.c in following commits. Then PeiMpLib can reuse the code. Signed-off-by: Dun Tan Reviewed-by: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Jiaxin Wu --- UefiCpuPkg/Library/M

[edk2-devel] [Patch V2 09/18] UefiCpuPkg: Disable PG in IA32 ApLoopCode

2024-05-17 Thread duntan
Disable paging in IA32 RelocateApLoop assembly code to fix the issue that the AP page table is unavailiable after boot OS under IA32 execution mode. This issue exist in IA32 PEI + IA32 DXE normal boot (also S3 boot with IA32 PEI after previous three commits are accepted). In current MpLib code, th

[edk2-devel] [Patch V2 08/18] UefiCpuPkg: Remove code to set register table

2024-05-17 Thread duntan
Remove code to set register table in CpuS3.c. In previous commit, PcdCpuFeaturesInitOnS3Resume has been set to TRUE. So that CpuFeaturesPei PEIM will initialize the CPU registers and perform CPU features initialization. Signed-off-by: Dun Tan Reviewed-by: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffman

[edk2-devel] [Patch V2 07/18] UefiCpuPkg:Set PcdCpuFeaturesInitOnS3Resume to TRUE

2024-05-17 Thread duntan
Set PcdCpuFeaturesInitOnS3Resume to TRUE. So that CpuFeaturesPei PEIM will initialize the CPU registers and perform CPU features initialization. Signed-off-by: Dun Tan Reviewed-by: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Jiaxin Wu --- UefiCpuPkg/UefiCpuPkg.dec | 4 ++-- 1 file changed,

[edk2-devel] [Patch V2 06/18] UefiCpuPkg: Remove code to load mtrr setting

2024-05-17 Thread duntan
Remove code to load mtrr setting in CpuS3.c. In previous commits, before transferring to CpuS3.c, MTRR setting has been loaded in S3RestoreConfig2() for all CPU. Signed-off-by: Dun Tan Reviewed-by: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Jiaxin Wu --- UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c |

[edk2-devel] [Patch V2 04/18] UefiCpuPkg: Save MTRR by lockbox in CpuS3DataDxe

2024-05-17 Thread duntan
Save MTRR by lockbox in CpuS3DataDxe. In S3 boot, The MTRR setting will be restored in S3Resume.c in following patches. Then S3Resume.c will wakeup all APs to load the MTRR setting. This can avoid waking up APs in CpuS3.c. Signed-off-by: Dun Tan Reviewed-by: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoff

[edk2-devel] [Patch V2 05/18] UefiCpuPkg: LoadMtrrData for all cpu in S3Resume

2024-05-17 Thread duntan
In this commit, S3Resume.c wakeup all Aps to run LoadMtrrData for all cpu before transfer to CpuS3.c in smm cpu driver. The MtrrSetting table can be restored by gEdkiiS3MtrrSettingGuid which is saved by lockbox in PEI phase. This can avoid waking up APs in CpuS3.c. Signed-off-by: Dun Tan Reviewed

[edk2-devel] [Patch V2 03/18] UefiCpuPkg: Add locbox lib instance in DSC

2024-05-17 Thread duntan
Add locbox lib instance in DSC. The SmmLockBoxDxeLib will be consumed by CpuS3DataDxe driver Signed-off-by: Dun Tan Reviewed-by: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Jiaxin Wu --- UefiCpuPkg/UefiCpuPkg.dsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UefiCpuP

[edk2-devel] [Patch V2 02/18] OvmfPkg: Save MTRR by lockbox in CpuS3DataDxe

2024-05-17 Thread duntan
Save MTRR by lockbox in CpuS3DataDxe. In S3 boot, The MTRR setting will be restored in S3Resume.c in following patches. Then S3Resume.c will wakeup all APs to load the MTRR setting. This can avoid waking up APs in CpuS3.c. Signed-off-by: Dun Tan Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Gerd Hoffma

[edk2-devel] [Patch V2 01/18] MdeModulePkg: Add gEdkiiS3MtrrSettingGuid

2024-05-17 Thread duntan
Add gEdkiiS3MtrrSettingGuid a new GUID for s3 MTRR setting. This GUID will be used to save MTRR_SETTINGS at EndOfDxe by LockBox and restore at S3 boot PEI phase for s3 usage. Signed-off-by: Dun Tan Reviewed-by: Ray Ni Cc: Liming Gao Cc: Jiaxin Wu --- MdeModulePkg/MdeModulePkg.dec | 5 - 1

[edk2-devel] [Patch V2 00/18] Remove some S3 related code in CpuS3.c of smm cpu driver

2024-05-17 Thread duntan
Comparing to V1 patchs set, the V2 patch set only adjusts the commits ordering and modifies copy right year in some files. This patch set is to remove some S3 related code in CpuS3.c of smm cpu driver. It contain commits to: 1) S3 MTRRs operation: > MdeModulePkg: Add gEdkiiS3MtrrSettingGuid >

[edk2-devel] [PATCH] UefiCpuPkg:fix issue when splitting paging entry

2024-05-17 Thread duntan
This patch is to fix issue when splitting leaf paging entry in CpuPageTableLib code. In previous code, before we assign the new child paging structure address to the content of splitted paging entry, PageTableLibSetPnle() is called to make sure the bit7 is set to 0, which indicate the previous lea

Re: [edk2-devel] [edk2-platforms][PATCH v2] ManageabilityPkg: add support for the phosphor ipmi blob transfer protocol

2024-05-17 Thread Nhi Pham via groups.io
Hi Abner, It' hard to say actually. I don't spend full-time for open-source work. But I will try to complete it within 2 weeks or sooner. Most of Ampere Altra drivers including IPMI SSIF are living at https://github.com/AmpereComputing/edk2-platforms. The effort now is to port to be compatib

Re: [edk2-devel] [edk2-platforms][PATCH v2] ManageabilityPkg: add support for the phosphor ipmi blob transfer protocol

2024-05-17 Thread Nhi Pham via groups.io
Hi Nickle, Please see my comments inline... P/s: I just realized that I can not test this protocol without IPMI SSIF to be compatible with ManageabilityPkg framework. On 5/15/2024 10:06 PM, Nickle Wang wrote: REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4773 This change implements the

Re: [edk2-devel] [PATCH v1 0/2] Add a new FdtNorFalshQemuLib and enable it in

2024-05-17 Thread Chao Li
Hi Ard, No, it's just that my email was bounced just now, the groupio didn't receive my email when I send the first time, and I sent them again after it unbounce. Thanks, Chao On 2024/5/17 15:21, Ard Biesheuvel wrote: Hello Chao Li, You sent two series in quick succession. Is there any dif

Re: [edk2-devel] 回复: [edk2-devel] [PATCH v2 03/13] OvmfPkg:PlatformCI: Support virtio-rng-pci

2024-05-17 Thread Ard Biesheuvel
On Fri, 17 May 2024 at 05:27, Doug Flick via groups.io wrote: > > On ARM, we can actually do better than this: I have taken Doug's v2 and > applied some changes on top to make it work with ArmVirtQemu. > > https://github.com/ardbiesheuvel/edk2/tree/doug-v2 > > Ard, would you be comfortable with t

Re: [edk2-devel] [PATCH v1 0/2] Add a new FdtNorFalshQemuLib and enable it in

2024-05-17 Thread Ard Biesheuvel
Hello Chao Li, You sent two series in quick succession. Is there any difference between the two? On Fri, 17 May 2024 at 09:17, Chao Li wrote: > > Patch1: Added a new library called FdtNorFlashQemuLib in OvmfPkg/Library > which is non-hardcode dependency. > Patch2: Enable the new library in ArmV

[edk2-devel] [PATCH v1 2/2] ArmVirtPkg: Enable the non-hardcode version FtdNorFlashQemuLib

2024-05-17 Thread Chao Li
Enable the non-hardcode version of FtdNorFlashQemuLib in ArmVirtQemu.dsc and ArmVirtQemuKernel.dsc, and it can work rightly after enabling it. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4770 Build-tested (with "ArmVirtQemu.dsc" and "ArmVirtQemuKernel.dsc"). Cc: Ard Biesheuvel Cc: Leif L

[edk2-devel] [PATCH v1 1/2] OvmfPkg: Add no hardcode version of FtdNorFlashQemuLib

2024-05-17 Thread Chao Li
This library is copied from ArmVirtPkg, in the Arm version, the value of PcdFlashNvStorageVariableBase, PcdFlashNvStorageFtwWorkingBase and PcdFlashNvStorageFtwSpareBase are hardcoded in INC file. This version will calculate them from FDT resource and using the set PCD to store when the NorFlashIn

[edk2-devel] [PATCH v1 0/2] Add a new FdtNorFalshQemuLib and enable it in

2024-05-17 Thread Chao Li
Patch1: Added a new library called FdtNorFlashQemuLib in OvmfPkg/Library which is non-hardcode dependency. Patch2: Enable the new library in ArmVirtQemu.dsc and ArmVirtQemuKernel.dsc. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4770 I have verified on both of the two platforms: Prepare: in

Re: [edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg: introduce RedfishBootstrapAccountDxe

2024-05-17 Thread Nickle Wang via groups.io
Hi Igor, Thanks for your idea. This sounds feasible to me. Let me try to test it on my system. Regards, Nickle > -Original Message- > From: Igor Kulchytskyy > Sent: Thursday, May 16, 2024 7:34 PM > To: Nickle Wang ; Chang, Abner > ; devel@edk2.groups.io > Cc: Nick Ramirez > Subject: R