Re: [edk2-devel] [Patch V2 4/4] BaseTools: FMMT replace new free space fixing in replace

2023-06-28 Thread Bob Feng
Reviewed-by: Bob Feng -Original Message- From: Chen, Christine Sent: Thursday, June 29, 2023 11:35 AM To: devel@edk2.groups.io Cc: Rebecca Cran ; Gao, Liming ; Feng, Bob C Subject: [Patch V2 4/4] BaseTools: FMMT replace new free space fixing in replace In FMMT replace function, when

Re: [edk2-devel] [Patch V2 3/4] BaseTools: FMMT support ELF UPLD parser

2023-06-28 Thread Bob Feng
Reviewed-by: Bob Feng -Original Message- From: Chen, Christine Sent: Thursday, June 29, 2023 11:35 AM To: devel@edk2.groups.io Cc: Rebecca Cran ; Feng, Bob C ; Gao, Liming Subject: [Patch V2 3/4] BaseTools: FMMT support ELF UPLD parser FMMT add new function to support the .elf file p

Re: [edk2-devel] [Patch V2 2/4] BaseTools: FMMT replace output file is not generated successfully

2023-06-28 Thread Bob Feng
Reviewed-by: Bob Feng -Original Message- From: Chen, Christine Sent: Thursday, June 29, 2023 11:35 AM To: devel@edk2.groups.io Cc: Rebecca Cran ; Feng, Bob C ; Gao, Liming Subject: [Patch V2 2/4] BaseTools: FMMT replace output file is not generated successfully For replace function,

Re: [edk2-devel] [Patch V2 1/4] BaseTools: fixing FMMT ShrinkFv issue

2023-06-28 Thread Bob Feng
Reviewed-by: Bob Feng -Original Message- From: Chen, Christine Sent: Thursday, June 29, 2023 11:34 AM To: devel@edk2.groups.io Cc: Rebecca Cran ; Gao, Liming ; Feng, Bob C Subject: [Patch V2 1/4] BaseTools: fixing FMMT ShrinkFv issue 1. FvLength not change issue; 2. FileSystemGuid al

Re: [edk2-devel] [PATCH v1 0/2] Fixing RngDxe error for ARM/AARCH64

2023-06-28 Thread PierreGondois
Hello Kun, Thanks for the patch-set, there is another patch-set that also aims to fix the logic at: https://edk2.groups.io/g/devel/message/104341 but I haven't got feedback so far. Would it be possible to try it out to see if it also solves your issue ? Regards, Pierre On 6/28/23 22:33, Kun Q

[edk2-devel] Managing boot order dependencies with ResetNotification Protocol

2023-06-28 Thread Ajay Iyengar (QUIC)
Hello, This is a comment and query on the Reset Notification Protocol defined by the UEFI specification. The specification requires clients to be notified for ResetSystem() without imposing any specific ordering on how these notifications are dispatched: https://uefi.org/specs/UEFI/2.10/39_Mic

[edk2-devel] [Patch V2 4/4] BaseTools: FMMT replace new free space fixing in replace

2023-06-28 Thread Yuwei Chen
In FMMT replace function, when newffs size <= targetffs size, the new free space is calculated wrong as loss the pad data delta size. That will cause invalid binary generated. This patch fixes this issue. Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Signed-off-by: Yuwei Chen --- BaseTools/Sou

[edk2-devel] [Patch V2 3/4] BaseTools: FMMT support ELF UPLD parser

2023-06-28 Thread Yuwei Chen
FMMT add new function to support the .elf file parsing. Using '-v' option, the UPLD info will be printed out. ''' - UNIVERSAL_PAYLOAD_INFO - 4 bytes align (BOOLEAN) - Identifier - SpecRevision - Attribute - Revision - Capability - ProducerId - ImageId UPLD Buffer '''

[edk2-devel] [Patch V2 2/4] BaseTools: FMMT replace output file is not generated successfully

2023-06-28 Thread Yuwei Chen
For replace function, when target Ffs and new ffs are with same size, the output file can not be generated successfully. This patch fixes this issue. Cc: Rebecca Cran Cc: Bob Feng Cc: Liming Gao Signed-off-by: Yuwei Chen --- BaseTools/Source/Python/FMMT/core/BiosTree.py | 4 ++-- BaseTools/

[edk2-devel] [Patch V2 1/4] BaseTools: fixing FMMT ShrinkFv issue

2023-06-28 Thread Yuwei Chen
1. FvLength not change issue; 2. FileSystemGuid align with File Size; Cc: Rebecca Cran Cc: Liming Gao Cc: Bob Feng Signed-off-by: Yuwei Chen --- BaseTools/Source/Python/FMMT/core/FMMTOperation.py | 2 +- BaseTools/Source/Python/FMMT/core/FvHandler.py | 10 +++--- 2 files changed, 8 i

Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: UsbBusDxe: Build Descriptor table after resetting port

2023-06-28 Thread Mike Maslenkin
Hi Britton and the community. I've faced with some assert in XHCI too. In my case this is: ASSERT [XhciDxe] /Users/test/edk2_workspace/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c(1989): TrsRing != ((void *) 0) Your patch helps to avoid this assert, but as was noticed by Hao Wu,it introduces res

Re: [edk2-devel] [PATCH 2/2] NetworkPkg/HttpDxe: fix driver binding start issue.

2023-06-28 Thread Nickle Wang via groups.io
Hi Saloni, Thanks for your review. When uninstall fails, per UEFI specification, the protocol will be installed again and will be visible to UEFI drivers. Page 190, UEFI spec. 2.10: "If any errors are generated while the protocol interfaces are being uninstalled, then the protocols uninstalled

Re: [edk2-devel] [PATCH v4 5/7] OvmfPkg/RiscVVirt: Add VirtNorFlashDxe to APRIORI list

2023-06-28 Thread Tuan Phan
On Wed, Jun 28, 2023 at 9:47 AM Sunil V L wrote: > On Fri, Jun 23, 2023 at 11:39:32AM -0700, Tuan Phan wrote: > > Make sure VirtNorFlashDxe loaded before VariableRuntimeDxe as it > > is the backend flash driver. > > > > Signed-off-by: Tuan Phan > > --- > > OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf |

Re: [edk2-devel] [PATCH] UefiCpuPkg: CpuTimerDxeRiscV64: Fix timer event not working correctly

2023-06-28 Thread Tuan Phan
Thanks Sunil, Updated pull request: https://github.com/tianocore/edk2/pull/4585 Please help merge it if no objection. Thanks, From: Sunil V L Date: Wednesday, June 28, 2023 at 7:43 AM To: Tuan Phan Cc: devel@edk2.groups.io , andrei.warken...@intel.com Subject: Re: [PATCH] UefiCpuPkg: CpuTimer

[edk2-devel] [PATCH v1 2/2] SecurityPkg: RngDxe: Fixing mAvailableAlgoArray allocator

2023-06-28 Thread Kun Qin
From: Kun Qin REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4491 mAvailableAlgoArray is currently allocated for "RNG_AVAILABLE_ALGO_MAX" number of bytes, whereas it was dereferenced as "EFI_RNG_ALGORITHM". This change fixed the buffer allocation logic by allocating a proper size of buffer

[edk2-devel] [PATCH v1 1/2] SecurityPkg: RngDxe: Unify handling of zero guid

2023-06-28 Thread Kun Qin
From: Kun Qin REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4491 The existing logic of initializing `mAvailableAlgoArrayCount` will treat the zero GUID in `PcdCpuRngSupportedAlgorithm` as a legit case and increment `mAvailableAlgoArrayCount`, causing the RNG protocol be published. However

[edk2-devel] [PATCH v1 0/2] Fixing RngDxe error for ARM/AARCH64

2023-06-28 Thread Kun Qin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4491 On an ARM system that does not support firmware TRNG, the current logic from RngDxe will cause the system to assert at the below line: `ASSERT (Index != mAvailableAlgoArrayCount);` The reason seems to be: 1. When initializing the number of

Re: [edk2-devel] [PATCH v3 0/2] Support MM based variable services in PEI for ARM

2023-06-28 Thread Kun Qin
Thank you so much for the quick turnaround! Regards, Kun On 6/28/2023 11:44 AM, Ard Biesheuvel wrote: On Wed, 28 Jun 2023 at 01:14, Kun Qin wrote: REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4464 This patch series is a follow-up of previous submission: https://edk2.groups.io/g/devel/

Re: [edk2-devel] [PATCH 2/2] NetworkPkg/HttpDxe: fix driver binding start issue.

2023-06-28 Thread Saloni Kasbekar
Hi Nickle, We would want to do the FreePool even if the Uninstall fails (like in the case where we failed to install the multiple protocol interfaces and then went to ON_ERROR). Do you think it's better if we change it to - if (HttpService != NULL) { HttpCleanService (HttpService, UsingI

Re: [edk2-devel] [PATCH v3 0/2] Support MM based variable services in PEI for ARM

2023-06-28 Thread Ard Biesheuvel
On Wed, 28 Jun 2023 at 01:14, Kun Qin wrote: > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4464 > > This patch series is a follow-up of previous submission: > https://edk2.groups.io/g/devel/message/106372 > > The main changes between v2 and v3 patches are: > - Removed header file for M

Re: [edk2-devel] [PATCH v2 1/2] MdePkg: IndustryStandard: Add DLL Characteristics

2023-06-28 Thread Michael D Kinney
Reviewed-by: Michael D Kinney > -Original Message- > From: Joey Vagedes > Sent: Wednesday, June 28, 2023 10:39 AM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Gao, Liming > ; Liu, Zhiguang > Subject: [PATCH v2 1/2] MdePkg: IndustryStandard: Add DLL Characteristics > > Add the b

[edk2-devel] [PATCH v2 2/2] BaseTools: GenFw: auto-set nxcompat flag

2023-06-28 Thread Joey Vagedes via groups.io
Automatically set the nxcompat flag in the DLL Characteristics field of the Optional Header of the PE32+ image. For this flag to be set automatically, it must, the section alignment must be evenly divisible by 4K (EFI_PAGE_SIZE) and no section must be executable and writable. Adds a command line f

[edk2-devel] [PATCH v2 0/2] Automatically set NXCOMPAT bit if requirements are met

2023-06-28 Thread Joey Vagedes via groups.io
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4487 v2: Adds --nonxcompat flag to GenFw; updates man page v2: Updates PeImage.h to reference spec 9.3 rather then 8.3 Utilize GenFw to automatically set the NXCOMPAT bit of the DLL Characteristics field of the Optional Header if the following r

[edk2-devel] [PATCH v2 1/2] MdePkg: IndustryStandard: Add DLL Characteristics

2023-06-28 Thread Joey Vagedes via groups.io
Add the bit masks for DLL Characteristics, used within the optional header of a PE, to the PeImage.h header file. Update the Visual Studio, Microsoft Portable Executable and Common Object File Format Specification, and the PE/COFF Specification to the latest version. Cc: Michael D Kinney Cc: Lim

Re: [edk2-devel] [PATCH v4 5/7] OvmfPkg/RiscVVirt: Add VirtNorFlashDxe to APRIORI list

2023-06-28 Thread Sunil V L
On Fri, Jun 23, 2023 at 11:39:32AM -0700, Tuan Phan wrote: > Make sure VirtNorFlashDxe loaded before VariableRuntimeDxe as it > is the backend flash driver. > > Signed-off-by: Tuan Phan > --- > OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 10 ++ > 1 file changed, 10 insertions(+) > > diff --gi

[edk2-devel] [PATCH edk2-platforms v1 2/2] Platform/QemuSbsa: handle lack of ITS in MADT

2023-06-28 Thread Marcin Juszkiewicz
If system does not have GIC ITS present then do not add ITS information in MADT. Signed-off-by: Marcin Juszkiewicz --- .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 26 --- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpi

[edk2-devel] [PATCH edk2-platforms v1 0/2] Platform/QemuSbsa: add GIC ITS

2023-06-28 Thread Marcin Juszkiewicz
SBSA Reference Platform can have GIC ITS present. And when it has then we can have complex PCI Express setup (and some other things). First patch adds support for GIC ITS. Address is read from TF-A via SMC call. IORT is generated, MADT has ITS information. Linux boots and sees GIC ITS as expected.

[edk2-devel] [PATCH edk2-platforms v1 1/2] Platform/SbsaQemu: add GIC ITS support

2023-06-28 Thread Marcin Juszkiewicz
From: Shashi Mallela SBSA Reference Platform has GIC ITS support. Let make use of it. Base address is read from TF-A via SMC call. GIC ITS allows us to have complex PCI Express setups. Co-authored-by: Marcin Juszkiewicz Signed-off-by: Shashi Mallela Signed-off-by: Marcin Juszkiewicz --- Si

Re: [edk2-devel] [PATCH] UefiCpuPkg: CpuTimerDxeRiscV64: Fix timer event not working correctly

2023-06-28 Thread Sunil V L
On Tue, Jun 27, 2023 at 06:15:57PM -0700, Tuan Phan wrote: > The timer notify function should be called with timer period, not the > value read from timer register. > > Signed-off-by: Tuan Phan > --- LGTM. Reviewed-by: Sunil V L Thanks! Sunil -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You rec

Re: [edk2-devel] [PATCH 1/1] Maintainers.txt: Update reviewers and maintainers for DynamicTablesPkg

2023-06-28 Thread Sami Mujawar
Reviewed-by: Sami Mujawar Thanks. Regards, Sami Mujawar On 28/06/2023, 11:54, "pierre.gond...@arm.com " mailto:pierre.gond...@arm.com>> wrote: From: Pierre Gondois mailto:pierre.gond...@arm.com>> Update reviewers and maintainers for DynamicTablesPkg Signe

Re: [edk2-devel] [PATCH 1/1] Maintainers.txt: Update reviewers and maintainers for DynamicTablesPkg

2023-06-28 Thread Alexei Fedorov
Reviewed-by: Alexei Fedorov From: pierre.gond...@arm.com Sent: 28 June 2023 11:53 To: devel@edk2.groups.io Cc: Alexei Fedorov ; Andrew Fish ; Leif Lindholm ; Michael D Kinney ; Sami Mujawar Subject: [PATCH 1/1] Maintainers.txt: Update reviewers and maintainers

Re: [edk2-devel] [PATCH edk2-platforms v1 1/1] Platform/Arm: Disable memmap platform timers for JunoR0

2023-06-28 Thread PierreGondois
Reviewed-by: Pierre Gondois On 6/16/23 14:40, Sami Mujawar wrote: Juno includes a system-level wakeup timer which is an implementation of the ARM Generic Timer architecture. The CNTCTL frame contains some registers that are accessible using a Non-Secure access. Juno R0 incorrectly limits these

[edk2-devel] [PATCH 1/1] Maintainers.txt: Update reviewers and maintainers for DynamicTablesPkg

2023-06-28 Thread PierreGondois
From: Pierre Gondois Update reviewers and maintainers for DynamicTablesPkg Signed-off-by: Pierre Gondois --- Maintainers.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Maintainers.txt b/Maintainers.txt index c645df397c19..0a415282d9ee 100644 --- a/Maintainers.txt +++

Re: [edk2-devel] [Patch V3 3/5] UefiCpuPkg: Create MpHandOff.

2023-06-28 Thread Yuanhao Xie
Hi Ray, Please check V4 patch series. Thanks for the feedbacks. Yuanhao > > The SaveCpuMpData() function was updated to construct the MP_HAND_OFF > Hob. Additionally, the function introduced the MP_HAND_OFF_SIGNAL, > which solely served the purpose of awakening the APs and transitioning > t

Re: [edk2-devel] [Patch V3 5/5] UefiCpuPkg: Eliminate the second INIT-SIPI-SIPI sequence.

2023-06-28 Thread Yuanhao Xie
Hi Ray, Please check V4 patch series. Thanks for the feedbacks. Yuanhao > + OriginalValue = InterlockedCompareExchange32 ( > +(UINT32 *)ApStartupSignalBuffer, > +MP_HAND_OFF_SIGNAL, > +0

[edk2-devel] [Patch V4 5/5] UefiCpuPkg: Eliminate the second INIT-SIPI-SIPI sequence.

2023-06-28 Thread Yuanhao Xie
When both the PEI and DXE phases operate in the same execution mode(32-bit/64-bit), the BSP send a special start-up signal during the DXE phase to awaken the Application APs. To eliminate the need for the INIT-SIPI-SIPI sequence at the beginning of the DXE phase, the BSP call the SwitchApContext f

[edk2-devel] [Patch V4 3/5] UefiCpuPkg: Create MpHandOff.

2023-06-28 Thread Yuanhao Xie
Initially, the purpose of the Hob was twofold: it served as a way to transfer information from PEI to DXE. However, during the DXE phase, only a few fields from the CPU_MP_DATA which collected in PEI phase were needed. A new Hob was specifically created to transfer information to the DXE phase. T

[edk2-devel] [Patch V4 2/5] UefiCpuPkg: Refactor the logic for placing APs in Mwait/Runloop.

2023-06-28 Thread Yuanhao Xie
Refactor the logic for placing APs in Mwait/Runloop into a separate function. Cc: Gerd Hoffmann Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Tom Lendacky Signed-off-by: Yuanhao Xie --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 83 ++-

[edk2-devel] [Patch V4 4/5] UefiCpuPkg: ApWakeupFunction directly use CpuMpData.

2023-06-28 Thread Yuanhao Xie
In the original design, once the APs finished executing their assembly code and switched to executing C code, they would enter a continuous loop within a function. In this function, they would collect CpuMpData using the MP_CPU_EXCHANGE_INFO mechanism. However, in the updated approach, CpuMpData ca

[edk2-devel] [Patch V4 0/5] Eliminate the second INIT-SIPI-SIPI sequence

2023-06-28 Thread Yuanhao Xie
To speed up MP initialization, this set of patches replaces the time-consuming init-sipi-sipi process in the DXE phase. Instead, a start-up signal is used to wake up the APs and switch context from the PEI phase to the DXE phase. This optimization is effective when both PEI and DXE operate in

[edk2-devel] [Patch V4 1/5] UefiCpuPkg: Refactor the logic for placing APs in HltLoop.

2023-06-28 Thread Yuanhao Xie
Refactor the logic for placing APs in HltLoop into a separate function. Cc: Gerd Hoffmann Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Tom Lendacky Signed-off-by: Yuanhao Xie --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 35 --- 1 file changed, 24 insertions(+),

Re: [edk2-devel] IpmiCommandLib's IpmiGetSystemUuid clarification

2023-06-28 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Hi Aaron, Yes, this is a bug. We should copy the return GUID follow IPMI GUID format. Could you please create a Bugzilla ticket? You can also send the patch to mailing list if you already had a fix. Thank you. Abner > -Original Message- > From: devel@

[edk2-devel] [PATCH 1/1] MdePkg: Add Cxl20.h into IndustryStandard

2023-06-28 Thread Chris Li OS via groups.io
1) Add CXL 2.0 header file to comply with CXL 2.0 specification 2) CXL 2.0 header will embed Cxl11.h 3) Updated Cxl.h to point to 2.0 header file Signed-off-by: Chris Li --- MdePkg/Include/IndustryStandard/Cxl.h | 2 +- MdePkg/Include/IndustryStandard/Cxl20.h | 477