Re: [edk2-devel] [PATCH v1] UefiCpuPkg: Get processor extended information for SmmCpuServiceProtocol

2023-11-14 Thread joeyli via groups.io
Hi Hongbin1, On Mon, May 29, 2023 at 02:39:38PM +0800, Zhang, Hongbin1 via groups.io wrote: > Some features like RAS need to use processor extended information > under smm, So add code to support it > > Signed-off-by: Hongbin1 Zhang I got a ASSERT when booting edk2-stable202308 on a issue

[edk2-devel] [PATCH] CloudHv: Add CI for CloudHv on AArch64

2023-11-14 Thread Jianyong Wu
Add the long lost CI for CloudHv on AArch64. Signed-off-by: Jianyong Wu --- .../.azurepipelines/Ubuntu-GCC5.yml | 13 ArmVirtPkg/PlatformCI/CloudHvBuild.py | 32 +++ 2 files changed, 45 insertions(+) create mode 100644

[edk2-devel] [PATCH v5 6/6] MdePkg: Use macro CR4_CET_BIT to replace hard code value.

2023-11-14 Thread Sheng Wei
The macro is used in file LongJump.nasm and SetJump.nasm. Signed-off-by: Sheng Wei Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Cc: Wu Jiaxin Cc: Tan Dun --- MdePkg/Library/BaseLib/Ia32/LongJump.nasm | 3 ++- MdePkg/Library/BaseLib/Ia32/SetJump.nasm | 3 ++-

[edk2-devel] [PATCH v5 5/6] UefiCpuPkg: Backup and Restore MSR IA32_U_CET in SMI handler.

2023-11-14 Thread Sheng Wei
OS may enable CET-IBT feature by set MSR IA32_U_CET.bit2. If IA32_U_CET.bit2 is set, CPU is in WAIT_FOR_ENDBRANCH state and the next assemble code is not ENDBR, it will trigger #CP exception when set CR4.CET bit. SMI handler needs to backup MSR IA32_U_CET and clear MSR IA32_U_CET before set

[edk2-devel] [PATCH v5 4/6] UefiCpuPkg: Only change CR4.CET bit for enable and disable CET.

2023-11-14 Thread Sheng Wei
Signed-off-by: Sheng Wei Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Cc: Wu Jiaxin Cc: Tan Dun Reviewed-by: Laszlo Ersek --- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.nasm | 10 +++--- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm | 10 +++--- 2 files changed, 14 insertions(+), 6

[edk2-devel] [PATCH v5 3/6] UefiCpuPkg: Use CET macro definitions in Cet.inc for SmiEntry.nasm files.

2023-11-14 Thread Sheng Wei
Signed-off-by: Sheng Wei Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Cc: Wu Jiaxin Cc: Tan Dun Reviewed-by: Laszlo Ersek --- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.nasm | 14 +- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm | 15 +-- 2 files changed, 2 insertions(+),

[edk2-devel] [PATCH v5 2/6] UefiCpuPkg: Use macro CR4_CET_BIT to replace hard code value in Cet.nasm.

2023-11-14 Thread Sheng Wei
Signed-off-by: Sheng Wei Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Cc: Wu Jiaxin Cc: Tan Dun Reviewed-by: Laszlo Ersek --- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/Cet.nasm | 5 +++-- UefiCpuPkg/PiSmmCpuDxeSmm/X64/Cet.nasm | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git

[edk2-devel] [PATCH v5 0/6] MdePkg: Add macro definitions for CET feature for NASM files.

2023-11-14 Thread Sheng Wei
Patch V5: File cet.inc will be used in both MdePkg UefiCpuPkg. Move cet.inc file from UefiCpuPkg to MdePkg. Use macro CR4_CET_BIT to replace hard code value for both LongJump.nasm and SetJump.nasm. Patch V4: Separate the changes to 5 patches. 1) Add macro definitions for CET

[edk2-devel] [PATCH v5 1/6] MdePkg: Add macro definitions for CET feature for NASM files.

2023-11-14 Thread Sheng Wei
Signed-off-by: Sheng Wei Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Cc: Wu Jiaxin Cc: Tan Dun Reviewed-by: Laszlo Ersek --- MdePkg/Include/Cet.inc | 26 ++ 1 file changed, 26 insertions(+) create mode 100644 MdePkg/Include/Cet.inc diff --git

Re: [edk2-devel] [PATCH v5 2/2] RedfishPkg: RedfishDiscoverDxe: Optimize the Redfish Discover flow

2023-11-14 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Just let you know I just merged this change. Igor can help to follow up the suggestions given by Leif and Mike. Thanks Abner > -Original Message- > From: Chang, Abner > Sent: Wednesday, November 15, 2023 9:20 AM > To: Mike Maslenkin ;

Re: [edk2-devel] [PATCH v2 24/30] OvmfPkg/LoongArchVirt: Add platform boot manager library

2023-11-14 Thread Chao Li
Well, let's discuss the ARM version name once moved. I have two plans: *Plan A:* Merge the ARM version into PlatformBootmanagerLib and modify the inf file to separate X64 and other ARCH, like be: [Sources.Common]     QemuKernel.c     BdsPlatform.h [Sources.X64, Sources.IA32]    

[edk2-devel] [PATCH] DynamicTablesPkg: Fix ETE _UID Creation

2023-11-14 Thread Ashish Singhal via groups.io
Just like CPU _UID, ETE UID also needs to be unique so use AcpiProcessorUid instead of CpuName Signed-off-by: Ashish Singhal --- .../Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpuTopologyGenerator.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

Re: [edk2-devel] [PATCH 1/2] EmbeddedPkg: Fix Android Boot Command Line Length Bug

2023-11-14 Thread Ashish Singhal via groups.io
Hello Abner, Thanks for the feedback. I have pushed v2 of the patch set. Thanks Ashish From: Chang, Abner Sent: Thursday, November 9, 2023 7:06 PM To: Ashish Singhal ; devel@edk2.groups.io ; quic_llind...@quicinc.com ; ardb+tianoc...@kernel.org ;

[edk2-devel] [PATCH v2 1/2] EmbeddedPkg: Fix Android Boot Command Line Length Bug

2023-11-14 Thread Ashish Singhal via groups.io
Curently, AndroidBootImgLib expects input kernel command line to never exceed 256 unicode characters where the image header allows for 512 ascii characters. If image header allows 512 ascii characters, similar number of unicode characters should be allowed at the minimum. Signed-off-by: Ashish

[edk2-devel] [PATCH v2 2/2] EmbeddedPkg: Allow longer android kernel command line

2023-11-14 Thread Ashish Singhal via groups.io
AndroidBootImgLib allows for platforms to append to kernel command line but does not allow for the overall kernel command line to go beyond the limit set by the image header. Address this limitation by adding a pcd where platform can tell how many extra characters they expect on their platform in

Re: [edk2-devel] [PATCH v4 1/5] UefiCpuPkg: Add macro definitions for CET feature for NASM files.

2023-11-14 Thread Ni, Ray
If only CpuSmm driver consumes these macros, can we move the macro definitions into CpuSmm driver folder? Thanks, Ray From: Sheng, W Sent: Monday, November 13, 2023 2:22 PM To: devel@edk2.groups.io Cc: Dong, Eric ; Ni, Ray ; Laszlo Ersek ; Wu, Jiaxin ; Tan,

Re: [edk2-devel] [PATCH v4 0/6] StarFive/VisionFive2: Add VisionFive 2 platform

2023-11-14 Thread John Chew
Hi Sunil, I have performed the CI check for this series. It passes the check. Can you have to merge it when you have the time? Thanks! John -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111226):

Re: [edk2-devel] [PATCH v5 2/2] RedfishPkg: RedfishDiscoverDxe: Optimize the Redfish Discover flow

2023-11-14 Thread Igor Kulchytskyy via groups.io
Hi Abner, I will address Leif's and Mike's comments after stable release. Thank you, Igor Get Outlook for Android From: Chang, Abner Sent: Tuesday, November 14, 2023 8:19:41 PM To: Mike Maslenkin ; devel@edk2.groups.io ; Igor Kulchytskyy

Re: [edk2-devel] [PATCH v5 2/2] RedfishPkg: RedfishDiscoverDxe: Optimize the Redfish Discover flow

2023-11-14 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Hi Mike and Leif, Thanks for your comments on this change. As we are rushing to get this change to be pulled in stable release 202312 this week, I will just merge this code to master branch and let the discussing keeps going. I think there is no functionality

Re: [edk2-devel] CodeQL Analysis in edk2

2023-11-14 Thread Michael Kubacki
On 11/13/2023 8:42 AM, Laszlo Ersek wrote: sorry, unfinished thought: On 11/13/23 14:39, Laszlo Ersek wrote: - the "sarif emacs" output seems a bit broken, actually, so it's not usable. Consider the following entry from the original JSON file: }, { "ruleId" :

Re: [edk2-devel] [PATCH 0/3] Move gMpInformationHobGuid from StandaloneMmPkg to UefiCpuPkg.

2023-11-14 Thread duntan
Laszlo, Thanks for your comments. Yes the StatusFlag field of a given ProcessorId does change in the scenario you mentioned. I think it's ok to call SwitchBSP() and Enable/DisableAP() after creating the hob, since smm elects its own BSP and all CPU will enter smm after receiving smi

Re: [edk2-devel] [PATCH v1 1/3] .pytool/UncrustifyCheck: Update to 73.0.8

2023-11-14 Thread Sean
Reviewed-by: Sean Brogan From: devel@edk2.groups.io on behalf of Michael Kubacki Sent: Tuesday, November 14, 2023 12:22:24 PM To: devel@edk2.groups.io Cc: Sean Brogan ; Michael Kubacki ; Michael D Kinney ; Liming Gao Subject: [edk2-devel] [PATCH v1 1/3]

Re: [edk2-devel] [PATCH v5 2/2] RedfishPkg: RedfishDiscoverDxe: Optimize the Redfish Discover flow

2023-11-14 Thread Mike Maslenkin
On Tue, Nov 14, 2023 at 9:57 PM Igor Kulchytskyy via groups.io wrote: > > Hi Leif, > Please see my comments below. > Thank you, > Igor > > > -Original Message- > From: Leif Lindholm > Sent: Tuesday, November 14, 2023 12:26 PM > To: devel@edk2.groups.io; Igor Kulchytskyy > Cc: Abner

Re: [edk2-devel] [edk2-platforms PATCH v2 1/1] Silicon/Marvell: Retructure package

2023-11-14 Thread Marcin Wojtas via groups.io
Hi Narinder, Thanks for the patch. 2 comments: s/Retructure/Restructure/ from the commit title. czw., 2 lis 2023 o 04:47 Narinder Dhillon napisał(a): > > From: Narinder Dhillon > > Current Marvell package structure makes it difficult to add new silicon > packages that reuse common elements

[edk2-devel] [PATCH v1 3/3] OvmfPkg: Format with Uncrustify 73.0.8

2023-11-14 Thread Michael Kubacki
From: Michael Kubacki Cc: Ard Biesheuvel Cc: Corvin Köhne Cc: Gerd Hoffmann Cc: Jiewen Yao Cc: Rebecca Cran Signed-off-by: Michael Kubacki --- OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.c | 4 ++--

[edk2-devel] [PATCH v1 2/3] EmulatorPkg: Format with Uncrustify 73.0.8

2023-11-14 Thread Michael Kubacki
From: Michael Kubacki Cc: Andrew Fish Cc: Ray Ni Signed-off-by: Michael Kubacki --- EmulatorPkg/FvbServicesRuntimeDxe/FvbInfo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EmulatorPkg/FvbServicesRuntimeDxe/FvbInfo.c b/EmulatorPkg/FvbServicesRuntimeDxe/FvbInfo.c

[edk2-devel] [PATCH v1 0/3] Update from Uncrustify 73.0.3 to 73.0.8

2023-11-14 Thread Michael Kubacki
From: Michael Kubacki This patch series updates to 73.0.8 Uncrustify release which brings the following changes: - A fix for preventing endless indentation in struct assignment. - Updates to code areas impacted by the change. This currently updates 5 files in two packages - EmulatorPkg

Re: [edk2-devel] [PATCH v2 4/5] MdeModulePkg/Bus/Pci/PciBusDxe: Fix NULL_RETURNS Coverity issue

2023-11-14 Thread Michael Kubacki
On 11/14/2023 11:21 AM, Michael D Kinney wrote: Hi Ranbir, First I want to recognize your efforts to collect Coverity issues and propose changes to address them. I still disagree with adding CpuDealLoop() for any static analysis issues. There have been previous discussions about adding a

Re: [edk2-devel] [PATCH v5 2/2] RedfishPkg: RedfishDiscoverDxe: Optimize the Redfish Discover flow

2023-11-14 Thread Igor Kulchytskyy via groups.io
Hi Leif, Please see my comments below. Thank you, Igor -Original Message- From: Leif Lindholm Sent: Tuesday, November 14, 2023 12:26 PM To: devel@edk2.groups.io; Igor Kulchytskyy Cc: Abner Chang ; Nickle Wang Subject: [EXTERNAL] Re: [edk2-devel] [PATCH v5 2/2] RedfishPkg:

Re: [edk2-devel] [PATCH v5 2/2] RedfishPkg: RedfishDiscoverDxe: Optimize the Redfish Discover flow

2023-11-14 Thread Leif Lindholm
On 2023-11-14 14:28, Igor Kulchytskyy via groups.io wrote: Filter out the network interfaces which are not supported by Redfish Host Interface. Cc: Abner Chang Cc: Nickle Wang Signed-off-by: Igor Kulchytskyy --- RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 163

Re: [edk2-devel] [PATCH] UefiCpuPkg: Use NonSmm BSP as BSP if BSP election is not enabled.

2023-11-14 Thread Laszlo Ersek
On 11/14/23 17:53, Laszlo Ersek wrote: > Second, "SMM_DISPATCHER_MP_SYNC_DATA.BspIndex" has type "(volatile) > UINT32", but WhoAmI() writes an UINTN. On IA32, you're going to corrupt > memory. sorry, it's on X64 where you are going to corrupt memory (the UINTN write is a UINT64 write, but the

Re: [edk2-devel] [PATCH] UefiCpuPkg: Use NonSmm BSP as BSP if BSP election is not enabled.

2023-11-14 Thread Laszlo Ersek
Small patch, but I have several comments :) On 11/14/23 03:08, Zhiguang Liu wrote: > Currently, if BSP election is not enabled, will use Core0 as SMM BSP, > however, Core0 does not always have the highest performance core. > So, we can used NonSmm BSP as default BSP. (1) Please consider

Re: [edk2-devel] [PATCH v2 4/5] MdeModulePkg/Bus/Pci/PciBusDxe: Fix NULL_RETURNS Coverity issue

2023-11-14 Thread Ranbir Singh
On Tue, Nov 14, 2023 at 9:51 PM Kinney, Michael D < michael.d.kin...@intel.com> wrote: > Hi Ranbir, > > > > First I want to recognize your efforts to collect Coverity issues and > propose changes to address > > them. > Thanks Mike. > > > I still disagree with adding CpuDealLoop() for any

Re: [edk2-devel] [PATCH v3 1/2] MdeModulePkg/Bus/Pci/PciHostBridgeDxe: Fix OVERRUN Coverity issues

2023-11-14 Thread Ranbir Singh
On Mon, Nov 13, 2023 at 9:42 PM Laszlo Ersek wrote: > On 11/10/23 05:07, Ranbir Singh wrote: > > Options before us till now - > > > > 1. Add array overrun check and Debug statement before CpuDeadLoop within > > This would be useless. > > Your current patch implements the following pattern: > >

Re: [edk2-devel] [PATCH v2 4/5] MdeModulePkg/Bus/Pci/PciBusDxe: Fix NULL_RETURNS Coverity issue

2023-11-14 Thread Michael D Kinney
Hi Ranbir, First I want to recognize your efforts to collect Coverity issues and propose changes to address them. I still disagree with adding CpuDealLoop() for any static analysis issues. There have been previous discussions about adding a PANIC() or FATAL() macro that would perform platform

Re: [edk2-devel] [PATCH v5 0/2] Fix and optimize the issue if IPv4 installed after RestEx

2023-11-14 Thread Igor Kulchytskyy via groups.io
Hi Leif, I addressed your comments in that v5 patch. Do you have any other concerns? Thank you, Igor -Original Message- From: devel@edk2.groups.io On Behalf Of Igor Kulchytskyy via groups.io Sent: Tuesday, November 14, 2023 9:28 AM To: devel@edk2.groups.io Subject: [EXTERNAL]

Re: [edk2-devel] [PATCH v3 2/2] MdeModulePkg/Bus/Pci/PciHostBridgeDxe: Fix MISSING_BREAK Coverity issue

2023-11-14 Thread Ranbir Singh
On Mon, Nov 13, 2023 at 10:03 PM Laszlo Ersek wrote: > On 11/9/23 18:39, Ranbir Singh wrote: > > From: Ranbir Singh > > > > The function SubmitResources has a switch-case code in which the > > case ACPI_ADDRESS_SPACE_TYPE_MEM: which falls through to > > case ACPI_ADDRESS_SPACE_TYPE_IO: to

Re: [edk2-devel] [PATCH] MdeModulePkg/Variable: Merge variable header + data update into one step

2023-11-14 Thread Laszlo Ersek
+Jiewen (I seem to remember Jiewen co-authored a whitepaper on edk2 variables; I could be wrong) one more comment below: On 11/14/23 09:23, Gao wrote: > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4597 > > When creating a new variable, skip marking VAR_HEADER_VALID_ONLY so that >

Re: [edk2-devel] edk2 uncrustify update (73.0.8)?

2023-11-14 Thread Rebecca Cran via groups.io
On 11/14/2023 7:51 AM, Laszlo Ersek via groups.io wrote: Funnily enough, my stance is quite the opposite. I happen to disagree with some patterns that uncrustify enforces, but I'm thankful that at any given state of CI (= using any given version of uncrustify), we can't have any more debates

Re: [edk2-devel] [PATCH v2 4/5] MdeModulePkg/Bus/Pci/PciBusDxe: Fix NULL_RETURNS Coverity issue

2023-11-14 Thread Ranbir Singh
On Mon, Nov 13, 2023 at 4:58 PM Laszlo Ersek wrote: > On 11/10/23 07:11, Ranbir Singh wrote: > > EFI_NOT_READY was listed as one of the error return values in the > > function header of StartPciDevices(). So, I considered it here. > > > > Maybe we can go by a dual approach, including

Re: [edk2-devel] edk2 uncrustify update (73.0.8)?

2023-11-14 Thread Laszlo Ersek
On 11/13/23 22:33, Pedro Falcato wrote: > On Mon, Nov 13, 2023 at 8:37 PM Rebecca Cran wrote: >> >> On 11/13/2023 1:08 PM, Michael Kubacki wrote: >>> Yes. I just did it. It is relatively minor and impacts expected code >>> areas. >>> >>> https://github.com/tianocore/edk2/pull/5043/files >> >> >>

Re: [edk2-devel] edk2 uncrustify update (73.0.8)?

2023-11-14 Thread Laszlo Ersek
On 11/13/23 20:07, Pedro Falcato wrote: > On Mon, Nov 13, 2023 at 11:58 AM Laszlo Ersek wrote: >> >> Hi Michael, >> >> recently I encountered an uncrustify failure on github. >> >> The reason was that my local uncrustify was *more recent* (73.0.8) than >> the one we use in edk2 CI (which is

Re: [edk2-devel] [PATCH v5 2/2] RedfishPkg: RedfishDiscoverDxe: Optimize the Redfish Discover flow

2023-11-14 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Reviewed-by: Abner Chang > -Original Message- > From: Igor Kulchytskyy > Sent: Tuesday, November 14, 2023 10:28 PM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Nickle Wang > > Subject: [PATCH v5 2/2] RedfishPkg: RedfishDiscoverDxe: Optimize the >

Re: [edk2-devel] [PATCH v5 1/2] RedfishPkg: RedfishDiscoverDxe: Fix issue if IPv4 installed after RestEx

2023-11-14 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Reviewed-by: Abner Chang > -Original Message- > From: Igor Kulchytskyy > Sent: Tuesday, November 14, 2023 10:28 PM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Nickle Wang > > Subject: [PATCH v5 1/2] RedfishPkg: RedfishDiscoverDxe: Fix issue if

[edk2-devel] [PATCH v5 2/2] RedfishPkg: RedfishDiscoverDxe: Optimize the Redfish Discover flow

2023-11-14 Thread Igor Kulchytskyy via groups.io
Filter out the network interfaces which are not supported by Redfish Host Interface. Cc: Abner Chang Cc: Nickle Wang Signed-off-by: Igor Kulchytskyy --- RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 163 ++-- RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverInternal.h

[edk2-devel] [PATCH v5 1/2] RedfishPkg: RedfishDiscoverDxe: Fix issue if IPv4 installed after RestEx

2023-11-14 Thread Igor Kulchytskyy via groups.io
Supported function of the driver changed to wait for all network interface to be installed. Cc: Abner Chang Cc: Nickle Wang Signed-off-by: Igor Kulchytskyy --- RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 31 ++-- 1 file changed, 16 insertions(+), 15 deletions(-) diff

[edk2-devel] [PATCH v5 0/2] Fix and optimize the issue if IPv4 installed after RestEx

2023-11-14 Thread Igor Kulchytskyy via groups.io
Igor Kulchytskyy (2): RedfishPkg: RedfishDiscoverDxe: Fix issue if IPv4 installed after RestEx RedfishPkg: RedfishDiscoverDxe: Optimize the Redfish Discover flow .../RedfishDiscoverDxe/RedfishDiscoverDxe.c | 132 +- .../RedfishDiscoverInternal.h | 6 +

Re: [edk2-devel] [PATCH 0/3] Move gMpInformationHobGuid from StandaloneMmPkg to UefiCpuPkg.

2023-11-14 Thread duntan
Laszlo, Thanks for your comments. Yes the StatusFlag field of a given ProcessorId does change in the scenario you mentioned. I think it's ok to call SwitchBSP() and Enable/DisableAP() after creating the hob, since smm elects its own BSP and all CPU will enter smm after receiving smi

[edk2-devel] [PATCH] MdeModulePkg/Variable: Merge variable header + data update into one step

2023-11-14 Thread Gao
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4597 When creating a new variable, skip marking VAR_HEADER_VALID_ONLY so that variable header + data update can be merged into one flash write. This will greatly reduce the time taken for updating a variable and thus increase performance.