回复: [edk2-devel] [PATCH V2 1/2] MdePkg: Add ProcessorUpgradeSocket definitions from SMBIOS 3.7.0

2023-08-28 Thread gaoliming via groups.io
Eduardo:
  The patch is good to me. Reviewed-by: Liming Gao


  Besides, I have one minor comment. Please see the below.

Thanks
Liming
> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Eduardo
> Cuevas Farfan
> 发送时间: 2023年8月11日 0:32
> 收件人: devel@edk2.groups.io
> 抄送: Eduardo Cuevas Farfan 
> 主题: [edk2-devel] [PATCH V2 1/2] MdePkg: Add ProcessorUpgradeSocket
> definitions from SMBIOS 3.7.0
> 
> This patch adds below definitions from SMBIOS 3.7.0 into Smbios.h
> - ProcessorUpgradeSocketAM5
> - ProcessorUpgradeSocketSP5
> - ProcessorUpgradeSocketSP6
> - ProcessorUpgradeSocketBGA883
> - ProcessorUpgradeSocketBGA1190
> - ProcessorUpgradeSocketBGA4129
> - ProcessorUpgradeSocketLGA4710
> - ProcessorUpgradeSocketLGA7529
> 
> Signed-off-by: Eduardo Cuevas Farfan 
> ---
>  MdePkg/Include/IndustryStandard/SmBios.h | 12 ++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/MdePkg/Include/IndustryStandard/SmBios.h
> b/MdePkg/Include/IndustryStandard/SmBios.h
> index 89985bb4186b..fb6ed2dee051 100644
> --- a/MdePkg/Include/IndustryStandard/SmBios.h
> +++ b/MdePkg/Include/IndustryStandard/SmBios.h
> @@ -1,7 +1,7 @@
>  /** @file
> 
>Industry Standard Definitions of SMBIOS Table Specification v3.6.0.
> 
[Liming] Please also update the version to v3.7.0

Thanks
Liming
> 
> 
> -Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
> 
> +Copyright (c) 2006 - 2023, Intel Corporation. All rights reserved.
> 
>  (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
> 
>  (C) Copyright 2015 - 2019 Hewlett Packard Enterprise Development LP
> 
>  Copyright (c) 2022, AMD Incorporated. All rights reserved.
> 
> @@ -863,7 +863,15 @@ typedef enum {
>ProcessorUpgradeSocketLGA1211   = 0x45,
> 
>ProcessorUpgradeSocketLGA2422   = 0x46,
> 
>ProcessorUpgradeSocketLGA5773   = 0x47,
> 
> -  ProcessorUpgradeSocketBGA5773   = 0x48
> 
> +  ProcessorUpgradeSocketBGA5773   = 0x48,
> 
> +  ProcessorUpgradeSocketAM5   = 0x49,
> 
> +  ProcessorUpgradeSocketSP5   = 0x4A,
> 
> +  ProcessorUpgradeSocketSP6   = 0x4B,
> 
> +  ProcessorUpgradeSocketBGA883= 0x4C,
> 
> +  ProcessorUpgradeSocketBGA1190   = 0x4D,
> 
> +  ProcessorUpgradeSocketBGA4129   = 0x4E,
> 
> +  ProcessorUpgradeSocketLGA4710   = 0x4F,
> 
> +  ProcessorUpgradeSocketLGA7529   = 0x50
> 
>  } PROCESSOR_UPGRADE;
> 
> 
> 
>  ///
> 
> --
> 2.26.2.windows.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#107695):
> https://edk2.groups.io/g/devel/message/107695
> Mute This Topic: https://groups.io/mt/100667109/4905953
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [gaolim...@byosoft.com.cn]
> -=-=-=-=-=-=
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108076): https://edk2.groups.io/g/devel/message/108076
Mute This Topic: https://groups.io/mt/101025757/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v1 2/2] StandaloneMmPkg: Fix HOB space and heap space conflicted issue

2023-08-28 Thread Nhi Pham via groups.io

Just a gentle ping!

Hi Ard, can you provide your feedback on this patch?

Thanks,

-Nhi

On 8/16/2023 3:55 PM, Nhi Pham via groups.io wrote:

Hi Ard and Ming,

I have been seeing an issue with StandaloneMM HobLib that can be fixed 
by this patch as well.


The function CreateHob() in the HobLib instance 
StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf 
does not work at all. The HobList is early created by the 
StandaloneMmCoreEntryPoint then it is relocated on the heap memory by 
StandaloneMmCore. But the FreeMemoryTop and FreeMemoryBottom are not 
updated accordingly and the HOB free memory top is overlapped with the 
heap space. This causes the CreateHob() function to not work as 
expected. Introducing the PcdMemoryHobSize is reasonable to fix this 
issue.


I tested this patch in my end.

Tested-by: Nhi Pham 

Thanks,

-Nhi

On 5/12/2022 5:09 PM, Ming Huang via groups.io wrote:


在 5/3/22 5:10 PM, Ard Biesheuvel 写道:
On Wed, 9 Feb 2022 at 13:26, Ming Huang 
 wrote:

The heap space will be rewrote if a StandloneMmPkg module create HOB
by BuildGuidHob() interface and write data to HOB space.

Can you elaborate? What is supposed to happen and why, and what is
happening instead?

I tried my best to explain the issue:

-<--HandOffHob->EfiFreeMemoryTop
|   |
|   |
|   |
|   |
|   |
|   |
|  mMmMemoryMap |
|---|<--HandOffHob->EfiFreeMemoryBottom
|  HobEnd   |
|---|<--HandOffHob->EfiEndOfHobList
|   |
|  Hob #1   |
-<--MmHobStart
1 The mMmMemoryMap which use for free page is on above the HobEnd.
2 Create a hob by BuildGuidHob(), the HobEnd will move up and cover
   the structure or list using by free page.

After this patch, there is a pre-allocation space for creating hob.

-<--HandOffHob->EfiFreeMemoryTop
|   |
|   |
|   |
|   |
| mMmMemoryMap  |
|---|<--HandOffHob->EfiFreeMemoryBottom
|  Hob free space   | by PcdMemoryHobSize
|---|
|  HobEnd   |
|---|<--HandOffHob->EfiEndOfHobList
|   |
|  Hob #1   |
-<--MmHobStart


Add a PCD PcdMemoryHobSize for pre-allocation a space to create HOB to
fix this issue.

Signed-off-by: Ming Huang 
---
  StandaloneMmPkg/Core/StandaloneMmCore.c   | 17 -
  StandaloneMmPkg/Core/StandaloneMmCore.inf |  3 +++
  StandaloneMmPkg/StandaloneMmPkg.dec   |  2 ++
  3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.c 
b/StandaloneMmPkg/Core/StandaloneMmCore.c

index d221f1d111..1cf259d946 100644
--- a/StandaloneMmPkg/Core/StandaloneMmCore.c
+++ b/StandaloneMmPkg/Core/StandaloneMmCore.c
@@ -512,6 +512,9 @@ StandaloneMmMain (
    EFI_MMRAM_DESCRIPTOR    *MmramRanges;
    UINTN   MmramRangeCount;
    EFI_HOB_FIRMWARE_VOLUME *BfvHob;
+  EFI_HOB_HANDOFF_INFO_TABLE  *HandOffHobNew;
+  EFI_HOB_HANDOFF_INFO_TABLE  *HandOffHobOrg;
+  UINT64  MaxHobSize = PcdGet64 
(PcdMemoryHobSize);


    ProcessLibraryConstructorList (HobStart, );

@@ -619,10 +622,22 @@ StandaloneMmMain (
    //
    HobSize = GetHobListSize (HobStart);
    DEBUG ((DEBUG_INFO, "HobSize - 0x%x\n", HobSize));
-  MmHobStart = AllocatePool (HobSize);
+  ASSERT (HobSize <= MaxHobSize);
+  MmHobStart = AllocatePool (MaxHobSize);
    DEBUG ((DEBUG_INFO, "MmHobStart - 0x%x\n", MmHobStart));
    ASSERT (MmHobStart != NULL);
    CopyMem (MmHobStart, HobStart, HobSize);
+  //
+  // Initlialize the new HOB table
+  //
+  HandOffHobOrg = (EFI_HOB_HANDOFF_INFO_TABLE *)HobStart;
+  HandOffHobNew = (EFI_HOB_HANDOFF_INFO_TABLE *)MmHobStart;
+  HandOffHobNew->EfiEndOfHobList = (EFI_PHYSICAL_ADDRESS)MmHobStart +
+    (HandOffHobOrg->EfiEndOfHobList - 
(EFI_PHYSICAL_ADDRESS)HobStart);
+  HandOffHobNew->EfiFreeMemoryBottom = 
HandOffHobNew->EfiEndOfHobList +
+   sizeof 
(EFI_HOB_GENERIC_HEADER);
+  HandOffHobNew->EfiFreeMemoryTop = 
(EFI_PHYSICAL_ADDRESS)MmHobStart + MaxHobSize;

+
    Status = MmInstallConfigurationTable (, 
, MmHobStart, HobSize);

    ASSERT_EFI_ERROR (Status);

diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.inf 
b/StandaloneMmPkg/Core/StandaloneMmCore.inf

index c44b9ff333..37e6135d73 100644
--- a/StandaloneMmPkg/Core/StandaloneMmCore.inf
+++ b/StandaloneMmPkg/Core/StandaloneMmCore.inf
@@ -76,6 +76,9 @@
    gEfiEventExitBootServicesGuid
    gEfiEventReadyToBootGuid

+[FixedPcd]
+  

Re: [edk2-devel] [PATCH 1/1] ShellPkg/SmbiosView: Update display of PCIe system slot ID

2023-08-28 Thread Nhi Pham via groups.io
Thanks Zhichao, I updated the commit message and also created a PR at 
https://github.com/tianocore/edk2/pull/4767


Please help check.

Regards,

-Nhi

On 8/21/2023 2:01 PM, Gao, Zhichao wrote:

Better to update the commit message with specific SMBIOS version.
Others looks good to me.

Thanks,
Zhichao


-Original Message-
From: Nhi Pham 
Sent: Friday, August 18, 2023 2:54 PM
To: devel@edk2.groups.io
Cc: Nhi Pham ; Gao, Zhichao

Subject: [PATCH 1/1] ShellPkg/SmbiosView: Update display of PCIe system
slot ID

This updates the system slot ID up to SlotTypePCIExpressGen6andBeyond
(0xC4) to cover modern PCIe Gen.

Cc: Zhichao Gao 
Signed-off-by: Nhi Pham 
---
  ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c | 2
+-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index f55d5f953c04..b6968cb36acb 100644
---
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -3105,7 +3105,7 @@ DisplaySystemSlotId (
break;



  default:

-  if (((SlotType >= 0x0E) && (SlotType <= 0x12)) || ((SlotType >= 0xA6) &&
(SlotType <= 0xB6))) {

+  if (((SlotType >= 0x0E) && (SlotType <= 0x12)) || ((SlotType >= 0xA6) &&
(SlotType <= 0xC4))) {

  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN
(STR_SMBIOSVIEW_PRINTINFO_VALUE_PRESENT), gShellDebug1HiiHandle,
SlotId);

} else {

  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN
(STR_SMBIOSVIEW_PRINTINFO_UNDEFINED_SLOT_ID),
gShellDebug1HiiHandle);

--
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108074): https://edk2.groups.io/g/devel/message/108074
Mute This Topic: https://groups.io/mt/100816049/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




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

2023-08-28 Thread Group Notification
*Reminder: TianoCore Bug Triage - APAC / NAMO*

*When:*
Tuesday, August 29, 2023
6:30pm to 7:30pm
(UTC-07:00) America/Los Angeles

*Where:*
https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22%7d

*Organizer:* Liming Gao gaolim...@byosoft.com.cn ( 
gaolim...@byosoft.com.cn?subject=Re:%20Event:%20TianoCore%20Bug%20Triage%20-%20APAC%20%2F%20NAMO
 )

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=2007253 )

*Description:*

TianoCore Bug Triage - APAC / NAMO

Hosted by Liming Gao



Microsoft Teams meeting

*Join on your computer or mobile app*

Click here to join the meeting ( 
https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22%7d
 )

*Join with a video conferencing device*

te...@conf.intel.com

Video Conference ID: 116 062 094 0

Alternate VTC dialing instructions ( 
https://conf.intel.com/teams/?conf=1160620940=teams=conf.intel.com=test_call
 )

*Or call in (audio only)*

+1 916-245-6934,,77463821# ( tel:+19162456934,,77463821# ) United States, 
Sacramento

Phone Conference ID: 774 638 21#

Find a local number ( 
https://dialin.teams.microsoft.com/d195d438-2daa-420e-b9ea-da26f9d1d6d5?id=77463821
 ) | Reset PIN ( https://mysettings.lync.com/pstnconferencing )

Learn More ( https://aka.ms/JoinTeamsMeeting ) | Meeting options ( 
https://teams.microsoft.com/meetingOptions/?organizerId=b286b53a-1218-4db3-bfc9-3d4c5aa7669e=46c98d88-e344-4ed4-8496-4ed7712e255d=19_meeting_OTUyZTg2NjgtNDhlNS00ODVlLTllYTUtYzg1OTNjNjdiZjFh@thread.v2=0=en-US
 )


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108073): https://edk2.groups.io/g/devel/message/108073
Mute This Topic: https://groups.io/mt/101023449/21656
Mute #cal-reminder:https://edk2.groups.io/g/devel/mutehashtag/cal-reminder
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] Now: Tools, CI, Code base construction meeting series - Monday, August 28, 2023 #cal-notice

2023-08-28 Thread Group Notification
*Tools, CI, Code base construction meeting series*

*When:*
Monday, August 28, 2023
4:30pm to 5:30pm
(UTC-07:00) America/Los Angeles

*Where:*
https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4NmMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2223af6561-6e1c-450d-b917-d9d674eb3cb6%22%7d

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=2006492 )

*Description:*

TianoCore community,

Microsoft and Intel will be hosting a series of open meetings to discuss build, 
CI, tools, and other related topics. If you are interested, have ideas/opinions 
please join us. These meetings will be Monday 4:30pm Pacific Time on Microsoft 
Teams.

MS Teams Link in following discussion: * 
https://github.com/tianocore/edk2/discussions/2614

Anyone is welcome to join.

* tianocore/edk2: EDK II (github.com)
* tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP module 
(github.com) https://github.com/tianocore/edk2-basetools
* tianocore/edk2-pytool-extensions: Extensions to the edk2 build system 
allowing for a more robust and plugin based build system and tool execution 
environment (github.com) https://github.com/tianocore/edk2-pytool-extensions
* tianocore/edk2-pytool-library: Python library package that supports UEFI 
development (github.com) https://github.com/tianocore/edk2-pytool-library

MS Teams Browser Clients * 
https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108072): https://edk2.groups.io/g/devel/message/108072
Mute This Topic: https://groups.io/mt/101021559/21656
Mute #cal-notice:https://edk2.groups.io/g/devel/mutehashtag/cal-notice
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH 0/5] RedfishClientPkg: fix issues with local variables.

2023-08-28 Thread Mike Maslenkin
Hi Nickle,

I incorporated changes required for uncrustify check.
Also I added additional patch with trivial spelling fixes. Do I need
to resend v.2 to the list?

Regards,
Mike.

On Mon, Aug 28, 2023 at 12:03 PM Nickle Wang via groups.io
 wrote:
>
> Hi Mike,
>
> > I didn't find any codyng-style issues in uncrustify output.
>
> I fetch your branch and run uncrustify tool to fix error in vs code editor. I 
> push the fix to your branch at this commit for your reference: 
> https://github.com/ghbaccount/edk2-redfish-client/commit/f22209f7bd5946168326a3197006d92856247d35
>  The uncrustify check on PR is now passed successfully. My commit breaks 
> patch check as expected, please incorporate my changes with yours and do a 
> force push to this PR again.
>
> For the way of fixing uncrustify error, I am using the instructions here: 
> https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-Formatting#recommended-usage-visual-studio-vs-code-plugin
>
> Thanks,
> Nickle
>
> > -Original Message-
> > From: Mike Maslenkin 
> > Sent: Sunday, August 27, 2023 6:57 PM
> > To: devel@edk2.groups.io
> > Cc: abner.ch...@amd.com; Nickle Wang ;
> > ig...@ami.com; Mike Maslenkin 
> > Subject: [PATCH 0/5] RedfishClientPkg: fix issues with local variables.
> >
> > External email: Use caution opening links or attachments
> >
> >
> > This patchset contains fixes that resolve crashes while working with 
> > uninitialized
> > variables and a number of fixes for of leaked memory.
> > Note: looks like uncrustify check is broken at 
> > tianocore/edk2-redfish-client repo,
> > the corresponding PR failed:
> > https://github.co/
> > m%2Ftianocore%2Fedk2-redfish-
> > client%2Fpull%2F46=05%7C01%7Cnicklew%40nvidia.com%7C7cf336153fb
> > f4e2e821008dba6ec62e0%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0
> > %7C638287306436105158%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> > MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C
> > =VUxJA017msZzRYd%2FAxi0KeZvLi2s0QI6uKgHsOuDdws%3D=0
> >
> > I didn't find any codyng-style issues in uncrustify output.
> >
> > Cc: Abner Chang 
> > Cc: Nickle Wang 
> > Cc: Igor Kulchytskyy 
> > Signed-off-by: Mike Maslenkin 
>
>
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108071): https://edk2.groups.io/g/devel/message/108071
Mute This Topic: https://groups.io/mt/100988470/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] Event: Tools, CI, Code base construction meeting series - Monday, August 28, 2023 #cal-reminder

2023-08-28 Thread Group Notification
*Reminder: Tools, CI, Code base construction meeting series*

*When:*
Monday, August 28, 2023
4:30pm to 5:30pm
(UTC-07:00) America/Los Angeles

*Where:*
https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4NmMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2223af6561-6e1c-450d-b917-d9d674eb3cb6%22%7d

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=2006492 )

*Description:*

TianoCore community,

Microsoft and Intel will be hosting a series of open meetings to discuss build, 
CI, tools, and other related topics. If you are interested, have ideas/opinions 
please join us. These meetings will be Monday 4:30pm Pacific Time on Microsoft 
Teams.

MS Teams Link in following discussion: * 
https://github.com/tianocore/edk2/discussions/2614

Anyone is welcome to join.

* tianocore/edk2: EDK II (github.com)
* tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP module 
(github.com) https://github.com/tianocore/edk2-basetools
* tianocore/edk2-pytool-extensions: Extensions to the edk2 build system 
allowing for a more robust and plugin based build system and tool execution 
environment (github.com) https://github.com/tianocore/edk2-pytool-extensions
* tianocore/edk2-pytool-library: Python library package that supports UEFI 
development (github.com) https://github.com/tianocore/edk2-pytool-library

MS Teams Browser Clients * 
https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108070): https://edk2.groups.io/g/devel/message/108070
Mute This Topic: https://groups.io/mt/101000446/21656
Mute #cal-reminder:https://edk2.groups.io/g/devel/mutehashtag/cal-reminder
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v1] IntelFsp2Pkg: Add get and set FspSmmInit upd data pointer functions

2023-08-28 Thread Chiu, Chasel
merged:
https://github.com/tianocore/edk2/commit/b1e558f6369fc85ae053e0c16ffcd600880fe78d

Thanks,
Chasel


> -Original Message-
> From: Zhang, Hongbin1 
> Sent: Thursday, August 24, 2023 8:15 PM
> To: devel@edk2.groups.io
> Cc: Zhang, Hongbin1 ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Duggapu, Chinni B
> ; Ng, Ray Han Lim ;
> Zeng, Star ; Kuo, Ted ; S, Ashraf Ali
> ; Mohapatra, Susovan 
> Subject: [PATCH v1] IntelFsp2Pkg: Add get and set FspSmmInit upd data pointer
> functions
> 
> FSP-SMM module need get and set FspSmmInit upd data pointer functions to get
> and set upd settings.
> 
> Signed-off-by: Hongbin1 Zhang 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Duggapu Chinni B 
> Cc: Ray Han Lim Ng 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Cc: Ashraf Ali S 
> Cc: Susovan Mohapatra 
> ---
>  IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c | 41
> 
>  IntelFsp2Pkg/Include/Library/FspCommonLib.h  | 22 +++
>  2 files changed, 63 insertions(+)
> 
> diff --git a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> index 6f6a086111..d33d01fe22 100644
> --- a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> +++ b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> @@ -372,6 +372,47 @@ GetFspSiliconInitUpdDataPointer (
>return FspData->SiliconInitUpdPtr;
>  }
> 
> +/**
> +  This function sets the FspSmmInit UPD data pointer.
> +
> +  @param[in] SmmInitUpdPtr   FspSmmInit UPD data pointer.
> +**/
> +VOID
> +EFIAPI
> +SetFspSmmInitUpdDataPointer (
> +  IN VOID  *SmmInitUpdPtr
> +  )
> +{
> +  FSP_GLOBAL_DATA  *FspData;
> +
> +  //
> +  // Get the FSP Global Data Pointer
> +  //
> +  FspData = GetFspGlobalDataPointer ();
> +
> +  //
> +  // Set the FspSmmInit UPD data pointer.
> +  //
> +  FspData->SmmInitUpdPtr = SmmInitUpdPtr; }
> +
> +/**
> +  This function gets the FspSmmInit UPD data pointer.
> +
> +  @return FspSmmInit UPD data pointer.
> +**/
> +VOID *
> +EFIAPI
> +GetFspSmmInitUpdDataPointer (
> +  VOID
> +  )
> +{
> +  FSP_GLOBAL_DATA  *FspData;
> +
> +  FspData = GetFspGlobalDataPointer ();
> +  return FspData->SmmInitUpdPtr;
> +}
> +
>  /**
>Set FSP measurement point timestamp.
> 
> diff --git a/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> b/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> index 13b67f8822..12d993b7cc 100644
> --- a/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> +++ b/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> @@ -192,6 +192,28 @@ GetFspSiliconInitUpdDataPointer (
>VOID
>);
> 
> +/**
> +  This function sets the smm init UPD data pointer.
> +
> +  @param[in] SmmInitUpdPtr   smm init UPD data pointer.
> +**/
> +VOID
> +EFIAPI
> +SetFspSmmInitUpdDataPointer (
> +  IN VOID  *SmmInitUpdPtr
> +  );
> +
> +/**
> +  This function gets the smm init UPD data pointer.
> +
> +  @return smm init UPD data pointer.
> +**/
> +VOID *
> +EFIAPI
> +GetFspSmmInitUpdDataPointer (
> +  VOID
> +  );
> +
>  /**
>Set FSP measurement point timestamp.
> 
> --
> 2.37.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108069): https://edk2.groups.io/g/devel/message/108069
Mute This Topic: https://groups.io/mt/100950055/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] Looking for options to mount an external FV on uefi shell

2023-08-28 Thread bharavi peeyush kandala
   1. Is there an inbuilt way to mount an external FV in uefi 2.0 shell ?
   2. I tried the "map" command but wasn't able to mount a fv partition.
   3. Please suggest if this is supported in uefi 2.0 shell out of the box?


Thanks & Regards,
Bharavi Peeyush Kandala



On Mon, Aug 28, 2023 at 1:55 PM bharavi peeyush kandala <
bharavikand...@gmail.com> wrote:

> Hi everyone,
>
>1. Is there an inbuilt way to mount an external FV in uefi 2.0 shell ?
>2. I tried the "map" command but wasn't able to mount a fv partition.
>3. Please suggest if this is supported in uefi 2.0 shell out of the
>box?
>
>
> Thanks & Regards,
> Bharavi Peeyush Kandala
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108067): https://edk2.groups.io/g/devel/message/108067
Mute This Topic: https://groups.io/mt/101019531/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] Looking for options to mount an external FV on uefi shell

2023-08-28 Thread bharavi peeyush kandala
Hi everyone,

   1. Is there an inbuilt way to mount an external FV in uefi 2.0 shell ?
   2. I tried the "map" command but wasn't able to mount a fv partition.
   3. Please suggest if this is supported in uefi 2.0 shell out of the box?


Thanks & Regards,
Bharavi Peeyush Kandala


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108068): https://edk2.groups.io/g/devel/message/108068
Mute This Topic: https://groups.io/mt/101019531/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel][PATCH v2] IntelFsp2Pkg: Support child FV in SplitFspBin.py

2023-08-28 Thread Chiu, Chasel


Merged:
https://github.com/tianocore/edk2/commit/2c7fd32676272e22ed44fdfc8fa7e47f5c7a93b8

Thanks,
Chasel


> -Original Message-
> From: Kuo, Ted 
> Sent: Thursday, July 20, 2023 3:20 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star ; S, Ashraf
> Ali ; Duggapu, Chinni B ;
> Ng, Ray Han Lim ; Mohapatra, Susovan
> 
> Subject: [edk2-devel][PATCH v2] IntelFsp2Pkg: Support child FV in 
> SplitFspBin.py
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=4502
> Update SplitFspBin.py to support child FV in FSP binary. Without the patch, 
> the
> tool won't be able to rebase the images in child FV in FSP binary.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Ashraf Ali S 
> Cc: Chinni B Duggapu 
> Cc: Ray Han Lim Ng 
> Cc: Susovan Mohapatra 
> Signed-off-by: Ted Kuo 
> ---
>  IntelFsp2Pkg/Tools/SplitFspBin.py | 44 ++-
>  1 file changed, 37 insertions(+), 7 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/SplitFspBin.py 
> b/IntelFsp2Pkg/Tools/SplitFspBin.py
> index 419e5ba985..558eaf401a 100644
> --- a/IntelFsp2Pkg/Tools/SplitFspBin.py
> +++ b/IntelFsp2Pkg/Tools/SplitFspBin.py
> @@ -469,6 +469,7 @@ class FirmwareVolume:
>  else: self.FvExtHdr = None self.FfsList  = []+   
>  self.ChildFvList  =
> []  def ParseFv(self): fvsize = len(self.FvData)@@ -483,8 +484,30 
> @@ class
> FirmwareVolume:
>  offset = fvsize else: ffs = 
> FirmwareFile (offset,
> self.FvData[offset:offset + int(ffshdr.Size)])-ffs.ParseFfs()-
> self.FfsList.append(ffs)+# check if there is child fv+
> childfvfound
> = 0+if (ffs.FfsHdr.Type ==
> EFI_FV_FILETYPE.FIRMWARE_VOLUME_IMAGE):+csoffset = offset 
> +
> sizeof (EFI_FFS_FILE_HEADER)+csoffset = 
> AlignPtr(csoffset, 4)+
> # find fv section+while csoffset < (offset + 
> int(ffs.FfsHdr.Size)):+
> cshdr = EFI_COMMON_SECTION_HEADER.from_buffer (self.FvData, csoffset)+
> if (cshdr.Type == EFI_SECTION_TYPE.FIRMWARE_VOLUME_IMAGE):+
> childfvfound = 1+break+
> else:+#
> check next section+csoffset += int(cshdr.Size)+
> csoffset = AlignPtr(csoffset, 4)+if (childfvfound):+  
>   childfvoffset
> = csoffset + sizeof (EFI_COMMON_SECTION_HEADER)+
> childfvhdr =
> EFI_FIRMWARE_VOLUME_HEADER.from_buffer (self.FvData, childfvoffset)+
> childfv = FirmwareVolume (childfvoffset, 
> self.FvData[childfvoffset:childfvoffset +
> int(childfvhdr.FvLength)])+childfv.ParseFv ()+
> self.ChildFvList.append(childfv)+else:+
> ffs.ParseFfs()+
> self.FfsList.append(ffs) offset += int(ffshdr.Size)   
>   offset =
> AlignPtr(offset) @@ -789,6 +812,13 @@ def SplitFspBin (fspfile, outdir,
> nametemplate):
>  hfsp.write(fv.FvData) hfsp.close() +def GetImageFromFv 
> (fd,
> parentfvoffset, fv, imglist):+for ffs in fv.FfsList:+for sec in 
> ffs.SecList:+
> if sec.SecHdr.Type in [EFI_SECTION_TYPE.TE, EFI_SECTION_TYPE.PE32]:   # TE or
> PE32+offset = fd.Offset + parentfvoffset + fv.Offset + 
> ffs.Offset +
> sec.Offset + sizeof(sec.SecHdr)+imglist.append ((offset, 
> len(sec.SecData)
> - sizeof(sec.SecHdr)))+ def RebaseFspBin (FspBinary, FspComponent, FspBase,
> OutputDir, OutputFile): fd = FirmwareDevice(0, FspBinary) fd.ParseFd  
> ()@@ -
> 832,11 +862,11 @@ def RebaseFspBin (FspBinary, FspComponent, FspBase,
> OutputDir, OutputFile):
>  imglist = [] for fvidx in fsp.FvIdxList: fv = 
> fd.FvList[fvidx]-for
> ffs in fv.FfsList:-for sec in ffs.SecList:-   
>  if sec.SecHdr.Type in
> [EFI_SECTION_TYPE.TE, EFI_SECTION_TYPE.PE32]:   # TE or PE32-
> offset = fd.Offset + fv.Offset + ffs.Offset + sec.Offset + sizeof(sec.SecHdr)-
> imglist.append ((offset, len(sec.SecData) - sizeof(sec.SecHdr)))+
> GetImageFromFv (fd, 0, fv, imglist)+# get image from child fv+
> for
> childfv in fv.ChildFvList:+print ("Get image from child fv of 
> fv%d, parent
> fv offset: 0x%x" % (fvidx, fv.Offset))+GetImageFromFv (fd, 
> fv.Offset,
> childfv, imglist)  fcount  = 0 pcount  = 0--
> 2.40.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108066): https://edk2.groups.io/g/devel/message/108066
Mute This Topic: https://groups.io/mt/100252890/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] another PR rejected by CI

2023-08-28 Thread Ard Biesheuvel
On Mon, 28 Aug 2023 at 20:37, Kinney, Michael D
 wrote:
>
> Hi Ard,
>
> I think your main question is how all developers can find the
> details of any of these types of test failures.  It is not
> obvious until you notice there is a "Tests" tab on one of the
> Azure Pipelines pages.
>
> The main interface to developers for these types of failures
> is "Test" results in Azure Pipelines that allows the developer
> to navigate to each test failure using web links:
>
> For example, I see one of the failures following the links from the GitHub 
> details into the Azure pipelines log:
>
> PROGRESS - --Running OvmfPkg: Uncrustify Coding Standard Test NO-TARGET --
> WARNING - A file header template is not specified in the config file.
> WARNING - A function header template is not specified in the config file.
> ERROR - Visit the following instructions to learn how to find the detailed 
> formatting errors in Azure DevOps CI: 
> https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-Formatting#how-to-find-uncrustify-formatting-errors-in-continuous-integration-ci
> ERROR - /__w/1/s/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
> ERROR - --->Test Failed: Uncrustify Coding Standard Test NO-TARGET returned 1
> PROGRESS - --Running OvmfPkg: Dsc Complete Check Test NO-TARGET --
> PROGRESS - --->Test Success: Dsc Complete Check Test NO-TARGET
>
> I followed the following links to get these details, but does not show the 
> detailed log info with the specific uncrustify issue:
> https://github.com/tianocore/edk2/pull/4763
> https://github.com/tianocore/edk2/pull/4763/checks?check_run_id=16279570168
> https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=100301=resultshttps://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=100301=logs=ec42d809-3c3b-54a9-276c-e54a8b9aaee9=bd91c6c3-6d75-5ede-7b63-5767cf827334
>
> If you go back to the results view:
> https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=100301=results
>

Thanks for the help

Weirdly, the 'tests' tab next to 'summary' does not always appear -
'Ubuntu GCC 5 PR' has it, but none of the other failed (sub-)tests do

Does this mean that 'Windows VS2019 PR' failed on another test? Could
someone explain how to navigate this failure and dig up what the
problem is there?


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108065): https://edk2.groups.io/g/devel/message/108065
Mute This Topic: https://groups.io/mt/101015386/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] another PR rejected by CI

2023-08-28 Thread Oliver Smith-Denny

Another option, when the main pipeline page says there is an uncrustify
error is to take the cmdline it ran with and append
UNCRUSTIFY_IN_PLACE=TRUE to it. It will then auto-fixup any uncrustify
errors (which obviously should be audited afterwards). I do this to
avoid having to wade through numerous errors, especially since I
almost always take whatever the auto-format provides.

For example, for your failure, if you ran:

stuart_ci_build -c .pytool/CISettings.py -p OvmfPkg -t NO-TARGET,NOOPT 
-a IA32,X64,ARM,AARCH64,RISCV64,LOONGARCH64 TOOL_CHAIN_TAG=GCC5 
UNCRUSTIFY_IN_PLACE=TRUE


It will autofix the issue.

Oliver

On 8/28/2023 11:19 AM, Taylor Beebe wrote:

Here's a git-patch so you can easily fix it:

---
  OvmfPkg/IoMmuDxe/IoMmuBuffer.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OvmfPkg/IoMmuDxe/IoMmuBuffer.c b/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
index 2764c35044ac..d66763263784 100644
--- a/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
+++ b/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
@@ -434,7 +434,7 @@ IoMmuFreeBounceBuffer (
        mReservedMemBitmap,
        mReservedMemBitmap & ((UINT32)(~MapInfo->ReservedMemBitmap))
        ));
-    MapInfo->PlainTextAddress  = 0;
+    MapInfo->PlainTextAddress = 0;
      ClearReservedMemBit (MapInfo->ReservedMemBitmap);
      MapInfo->ReservedMemBitmap = 0;
    }
--
On 8/28/2023 11:16 AM, Mike Maslenkin wrote:

Hello!

https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=100301=ms.vss-test-web.build-test-results-tab=877528=16=attachments

Uncrustify found formatting errors in IoMmuDxe/IoMmuBuffer.c
See Standard_Error_Output.log in "attachments"

It doesn't like two spaces at assignment
MapInfo->PlainTextAddress_ _= 0;

Best Regards,
Mike


On Mon, Aug 28, 2023 at 8:58 PM Ard Biesheuvel  wrote:

Could someone please explain to me how I can figure out why this PR
was rejected by the CI?

https://github.com/tianocore/edk2/pull/4763













-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108064): https://edk2.groups.io/g/devel/message/108064
Mute This Topic: https://groups.io/mt/101015386/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] another PR rejected by CI

2023-08-28 Thread Michael D Kinney
Hi Ard,

I think your main question is how all developers can find the 
details of any of these types of test failures.  It is not 
obvious until you notice there is a "Tests" tab on one of the
Azure Pipelines pages.

The main interface to developers for these types of failures
is "Test" results in Azure Pipelines that allows the developer
to navigate to each test failure using web links:

For example, I see one of the failures following the links from the GitHub 
details into the Azure pipelines log:

PROGRESS - --Running OvmfPkg: Uncrustify Coding Standard Test NO-TARGET --
WARNING - A file header template is not specified in the config file.
WARNING - A function header template is not specified in the config file.
ERROR - Visit the following instructions to learn how to find the detailed 
formatting errors in Azure DevOps CI: 
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-Formatting#how-to-find-uncrustify-formatting-errors-in-continuous-integration-ci
ERROR - /__w/1/s/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
ERROR - --->Test Failed: Uncrustify Coding Standard Test NO-TARGET returned 1
PROGRESS - --Running OvmfPkg: Dsc Complete Check Test NO-TARGET --
PROGRESS - --->Test Success: Dsc Complete Check Test NO-TARGET

I followed the following links to get these details, but does not show the 
detailed log info with the specific uncrustify issue:
https://github.com/tianocore/edk2/pull/4763
https://github.com/tianocore/edk2/pull/4763/checks?check_run_id=16279570168
https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=100301=resultshttps://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=100301=logs=ec42d809-3c3b-54a9-276c-e54a8b9aaee9=bd91c6c3-6d75-5ede-7b63-5767cf827334

If you go back to the results view:
https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=100301=results

There us a "Tests" Tab:

https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=100301=ms.vss-test-web.build-test-results-tab

And there is a link to a coding standard compliance failure:

https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=100301=ms.vss-test-web.build-test-results-tab=877528=16=debug

Select "Attachments" tab:

https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=100301=ms.vss-test-web.build-test-results-tab=877528=16=attachments

The select "Standard_Error_Output.log" and shows the following details:

Files with formatting errors:
 Formatting errors in IoMmuDxe/IoMmuBuffer.c
 --- /__w/1/s/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
 +++ /__w/1/s/OvmfPkg/IoMmuDxe/IoMmuBuffer.c.uncrustify_plugin
 @@ -434,7 +434,7 @@
 mReservedMemBitmap,
 mReservedMemBitmap & ((UINT32)(~MapInfo->ReservedMemBitmap))
 ));
 -MapInfo->PlainTextAddress  = 0;
 +MapInfo->PlainTextAddress = 0;
 ClearReservedMemBit (MapInfo->ReservedMemBitmap);
 MapInfo->ReservedMemBitmap = 0;
 }

= 

The same information is available by downloading the build artifacts and 
reviewing the TestSuites.xml file:

https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=100301=logs=ec42d809-3c3b-54a9-276c-e54a8b9aaee9
https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=100301=artifacts=false=publishedArtifacts

Select "Build Logs TARGET_PLATFORMS" -> . . . -> Download artifacts

Open "TestSuites.xml" and found the following detailed info:

Found Uncrustify at 
/__w/1/s/.pytool/Plugin/UncrustifyCheck/mu-uncrustify-release_extdep/Linux-x86/uncrustify
 Uncrustify version: Uncrustify-c82ee034
 
 Uncrustify executed against 555 files in OvmfPkg in 3.79 seconds.
 Files with formatting errors:
 Formatting errors in IoMmuDxe/IoMmuBuffer.c
 --- /__w/1/s/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
 +++ /__w/1/s/OvmfPkg/IoMmuDxe/IoMmuBuffer.c.uncrustify_plugin
 @@ -434,7 +434,7 @@
 mReservedMemBitmap,
 mReservedMemBitmap  ((UINT32)(~MapInfo-ReservedMemBitmap))
 ));
 -MapInfo-PlainTextAddress  = 0;
 +MapInfo-PlainTextAddress = 0;
 ClearReservedMemBit (MapInfo-ReservedMemBitmap);
 MapInfo-ReservedMemBitmap = 0;
 }


Mike

> -Original Message-
> From: Ard Biesheuvel 
> Sent: Monday, August 28, 2023 10:58 AM
> To: Michael Kubacki ; Taylor Beebe
> ; Kinney, Michael D ;
> Oliver Smith-Denny ; edk2-devel-groups-io
> 
> Cc: Leif Lindholm 
> Subject: another PR rejected by CI
> 
> Could someone please explain to me how I can figure out why this PR
> was rejected by the CI?
> 
> https://github.com/tianocore/edk2/pull/4763


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108063): https://edk2.groups.io/g/devel/message/108063
Mute This Topic: https://groups.io/mt/101015386/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] another PR rejected by CI

2023-08-28 Thread Taylor Beebe

Here's a git-patch so you can easily fix it:

---
 OvmfPkg/IoMmuDxe/IoMmuBuffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OvmfPkg/IoMmuDxe/IoMmuBuffer.c b/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
index 2764c35044ac..d66763263784 100644
--- a/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
+++ b/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
@@ -434,7 +434,7 @@ IoMmuFreeBounceBuffer (
       mReservedMemBitmap,
       mReservedMemBitmap & ((UINT32)(~MapInfo->ReservedMemBitmap))
       ));
-    MapInfo->PlainTextAddress  = 0;
+    MapInfo->PlainTextAddress = 0;
     ClearReservedMemBit (MapInfo->ReservedMemBitmap);
     MapInfo->ReservedMemBitmap = 0;
   }
--
On 8/28/2023 11:16 AM, Mike Maslenkin wrote:

Hello!

https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=100301=ms.vss-test-web.build-test-results-tab=877528=16=attachments

Uncrustify found formatting errors in IoMmuDxe/IoMmuBuffer.c
See Standard_Error_Output.log in "attachments"

It doesn't like two spaces at assignment
MapInfo->PlainTextAddress_ _= 0;

Best Regards,
Mike


On Mon, Aug 28, 2023 at 8:58 PM Ard Biesheuvel  wrote:

Could someone please explain to me how I can figure out why this PR
was rejected by the CI?

https://github.com/tianocore/edk2/pull/4763













-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108062): https://edk2.groups.io/g/devel/message/108062
Mute This Topic: https://groups.io/mt/101015386/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] another PR rejected by CI

2023-08-28 Thread Mike Maslenkin
Hello!

https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=100301=ms.vss-test-web.build-test-results-tab=877528=16=attachments

Uncrustify found formatting errors in IoMmuDxe/IoMmuBuffer.c
See Standard_Error_Output.log in "attachments"

It doesn't like two spaces at assignment
MapInfo->PlainTextAddress_ _= 0;

Best Regards,
Mike


On Mon, Aug 28, 2023 at 8:58 PM Ard Biesheuvel  wrote:
>
> Could someone please explain to me how I can figure out why this PR
> was rejected by the CI?
>
> https://github.com/tianocore/edk2/pull/4763
>
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108061): https://edk2.groups.io/g/devel/message/108061
Mute This Topic: https://groups.io/mt/101015386/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] another PR rejected by CI

2023-08-28 Thread Ard Biesheuvel
Could someone please explain to me how I can figure out why this PR
was rejected by the CI?

https://github.com/tianocore/edk2/pull/4763


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108060): https://edk2.groups.io/g/devel/message/108060
Mute This Topic: https://groups.io/mt/101015386/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v4 00/14] Add ImagePropertiesRecordLib and Fix MAT Bugs

2023-08-28 Thread Ard Biesheuvel
I was hoping to get around to this before the end of the week (but I
am not a MdeModulePkg maintainer)


On Mon, 28 Aug 2023 at 18:27, Taylor Beebe  wrote:
>
> Can I please get reviews/feedback on this patch series?
>
> On 8/16/23 11:14 AM, Taylor Beebe via groups.io wrote:
> > Can I please get reviews/feedback on this patch series?
> >
> > On 8/4/2023 12:46 PM, Taylor Beebe via groups.io wrote:
> >> From: Taylor Beebe 
> >>
> >> v4:
> >> - Expose additional functions in the Library API
> >> - Add NULL checks to library functions and return a
> >>status where applicable.
> >>
> >> v3:
> >> - Refactor patch series so the transition of logic from the DXE
> >>MAT logic to the new library is more clear.
> >> - Update function headers to improve clarity and follow EDK2
> >>standards.
> >> - Add Create and Delete functions for Image Properties Records
> >>and redirect some of the SMM and DXE MAT code to use these
> >>functions.
> >> - Update/Add DumpImageRecords() to print the image name and code
> >>sections of each runtime image which will be put in the MAT.
> >>The DXE and SMM MAT logic will now invoke the DumpImageRecords()
> >>on DEBUG builds at the EndOfDxe event to install the MAT.
> >>
> >> v2:
> >> - A one-line change in patch 3 was moved to patch 9 for correctness.
> >>
> >> Reference: https://github.com/tianocore/edk2/pull/4590
> >> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4492
> >>
> >> The UEFI and SMM MAT logic contains duplicate logic for manipulating
> >> image
> >> properties records which is used to track runtime images.
> >> This patch series adds a new library, ImagePropertiesRecordLib,
> >> which consolidates this logic and fixes the bugs which currently
> >> exist in
> >> the MAT logic.
> >>
> >> The first patch adds the ImagePropertiesRecordLib implementation which
> >> is a copy of the UEFI MAT logic with minor modifications to remove the
> >> reliance on globabl variables and make the code unit testable.
> >>
> >> The second patch adds a unit test for the ImagePropertiesRecordLib. The
> >> logic tests various potential layouts of the EFI memory map and runtime
> >> images. 3/4 of these tests will fail which demonstrates the MAT logic
> >> bugs.
> >>
> >> The third patch fixes the logic in the ImagePropertiesRecordLib so
> >> that all of the unit tests pass and the MAT logic can be fixed by
> >> using the library.
> >>
> >> The remaining patches add library instances to DSC files and remove
> >> the image properties record logic from the SMM and UEFI MAT logic.
> >>
> >> Cc: Andrew Fish 
> >> Cc: Ard Biesheuvel 
> >> Cc: Dandan Bi 
> >> Cc: Eric Dong 
> >> Cc: Gerd Hoffmann 
> >> Cc: Guo Dong 
> >> Cc: Gua Guo 
> >> Cc: James Lu 
> >> Cc: Jian J Wang 
> >> Cc: Jiewen Yao 
> >> Cc: Jordan Justen 
> >> Cc: Leif Lindholm 
> >> Cc: Liming Gao 
> >> Cc: Rahul Kumar 
> >> Cc: Ray Ni 
> >> Cc: Sami Mujawar 
> >> Cc: Sean Rhodes 
> >>
> >> Taylor Beebe (14):
> >>MdeModulePkg: Add ImagePropertiesRecordLib
> >>ArmVirtPkg: Add ImagePropertiesRecordLib Instance
> >>EmulatorPkg: Add ImagePropertiesRecordLib Instance
> >>OvmfPkg: Add ImagePropertiesRecordLib Instance
> >>UefiPayloadPkg: Add ImagePropertiesRecordLib Instance
> >>MdeModulePkg: Update MemoryAttributesTable.c to Reduce Global
> >> Variable
> >>  Use
> >>MdeModulePkg: Move Some DXE MAT Logic to ImagePropertiesRecordLib
> >>MdeModulePkg: Add ImagePropertiesRecordLib Host-Based Unit Test
> >>MdeModulePkg: Fix Bugs in MAT Logic
> >>MdeModulePkg: Add NULL checks and Return Status to
> >>  ImagePropertiesRecordLib
> >>UefiCpuPkg: Use Attribute From SMM MemoryAttributesTable if Nonzero
> >>MdeModulePkg: Transition SMM MAT Logic to Use
> >> ImagePropertiesRecordLib
> >>MdeModulePkg: Add Logic to Create/Delete Image Properties Records
> >>MdeModulePkg: Update DumpImageRecord() in ImagePropertiesRecordLib
> >>
> >> MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c |  967
> >> +
> >> MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c |   24 +-
> >> MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c |  958
> >> +---
> >> MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.c
> >> | 1144 
> >> MdeModulePkg/Library/ImagePropertiesRecordLib/UnitTest/ImagePropertiesRecordLibUnitTestHost.c
> >> |  938 
> >> UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c |   19 +-
> >> ArmVirtPkg/ArmVirt.dsc.inc |1 +
> >> EmulatorPkg/EmulatorPkg.dsc |1 +
> >> MdeModulePkg/Core/Dxe/DxeMain.h |   20 -
> >> MdeModulePkg/Core/Dxe/DxeMain.inf |1 +
> >> MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf |1 +
> >> MdeModulePkg/Include/Library/ImagePropertiesRecordLib.h |  234 
> >> MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
> >> |   31 +
> >> MdeModulePkg/Library/ImagePropertiesRecordLib/UnitTest/ImagePropertiesRecordLibUnitTestHost.inf
> >> |   

Re: [edk2-devel] [PATCH v4 00/14] Add ImagePropertiesRecordLib and Fix MAT Bugs

2023-08-28 Thread Taylor Beebe

Can I please get reviews/feedback on this patch series?

On 8/16/23 11:14 AM, Taylor Beebe via groups.io wrote:

Can I please get reviews/feedback on this patch series?

On 8/4/2023 12:46 PM, Taylor Beebe via groups.io wrote:

From: Taylor Beebe 

v4:
- Expose additional functions in the Library API
- Add NULL checks to library functions and return a
   status where applicable.

v3:
- Refactor patch series so the transition of logic from the DXE
   MAT logic to the new library is more clear.
- Update function headers to improve clarity and follow EDK2
   standards.
- Add Create and Delete functions for Image Properties Records
   and redirect some of the SMM and DXE MAT code to use these
   functions.
- Update/Add DumpImageRecords() to print the image name and code
   sections of each runtime image which will be put in the MAT.
   The DXE and SMM MAT logic will now invoke the DumpImageRecords()
   on DEBUG builds at the EndOfDxe event to install the MAT.

v2:
- A one-line change in patch 3 was moved to patch 9 for correctness.

Reference: https://github.com/tianocore/edk2/pull/4590
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4492

The UEFI and SMM MAT logic contains duplicate logic for manipulating 
image

properties records which is used to track runtime images.
This patch series adds a new library, ImagePropertiesRecordLib,
which consolidates this logic and fixes the bugs which currently 
exist in

the MAT logic.

The first patch adds the ImagePropertiesRecordLib implementation which
is a copy of the UEFI MAT logic with minor modifications to remove the
reliance on globabl variables and make the code unit testable.

The second patch adds a unit test for the ImagePropertiesRecordLib. The
logic tests various potential layouts of the EFI memory map and runtime
images. 3/4 of these tests will fail which demonstrates the MAT logic
bugs.

The third patch fixes the logic in the ImagePropertiesRecordLib so
that all of the unit tests pass and the MAT logic can be fixed by
using the library.

The remaining patches add library instances to DSC files and remove
the image properties record logic from the SMM and UEFI MAT logic.

Cc: Andrew Fish 
Cc: Ard Biesheuvel 
Cc: Dandan Bi 
Cc: Eric Dong 
Cc: Gerd Hoffmann 
Cc: Guo Dong 
Cc: Gua Guo 
Cc: James Lu 
Cc: Jian J Wang 
Cc: Jiewen Yao 
Cc: Jordan Justen 
Cc: Leif Lindholm 
Cc: Liming Gao 
Cc: Rahul Kumar 
Cc: Ray Ni 
Cc: Sami Mujawar 
Cc: Sean Rhodes 

Taylor Beebe (14):
   MdeModulePkg: Add ImagePropertiesRecordLib
   ArmVirtPkg: Add ImagePropertiesRecordLib Instance
   EmulatorPkg: Add ImagePropertiesRecordLib Instance
   OvmfPkg: Add ImagePropertiesRecordLib Instance
   UefiPayloadPkg: Add ImagePropertiesRecordLib Instance
   MdeModulePkg: Update MemoryAttributesTable.c to Reduce Global 
Variable

 Use
   MdeModulePkg: Move Some DXE MAT Logic to ImagePropertiesRecordLib
   MdeModulePkg: Add ImagePropertiesRecordLib Host-Based Unit Test
   MdeModulePkg: Fix Bugs in MAT Logic
   MdeModulePkg: Add NULL checks and Return Status to
 ImagePropertiesRecordLib
   UefiCpuPkg: Use Attribute From SMM MemoryAttributesTable if Nonzero
   MdeModulePkg: Transition SMM MAT Logic to Use 
ImagePropertiesRecordLib

   MdeModulePkg: Add Logic to Create/Delete Image Properties Records
   MdeModulePkg: Update DumpImageRecord() in ImagePropertiesRecordLib

MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c |  967 
+

MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c |   24 +-
MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c |  958 
+---
MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.c 
| 1144 
MdeModulePkg/Library/ImagePropertiesRecordLib/UnitTest/ImagePropertiesRecordLibUnitTestHost.c 
|  938 

UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c |   19 +-
ArmVirtPkg/ArmVirt.dsc.inc |    1 +
EmulatorPkg/EmulatorPkg.dsc |    1 +
MdeModulePkg/Core/Dxe/DxeMain.h |   20 -
MdeModulePkg/Core/Dxe/DxeMain.inf |    1 +
MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf |    1 +
MdeModulePkg/Include/Library/ImagePropertiesRecordLib.h |  234 
MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf 
|   31 +
MdeModulePkg/Library/ImagePropertiesRecordLib/UnitTest/ImagePropertiesRecordLibUnitTestHost.inf 
|   35 +

MdeModulePkg/MdeModulePkg.dec |    5 +
MdeModulePkg/MdeModulePkg.dsc |    2 +
MdeModulePkg/Test/MdeModulePkgHostTest.dsc |    6 +
OvmfPkg/AmdSev/AmdSevX64.dsc |    1 +
OvmfPkg/Bhyve/BhyveX64.dsc |    1 +
OvmfPkg/CloudHv/CloudHvX64.dsc |    1 +
OvmfPkg/IntelTdx/IntelTdxX64.dsc |    1 +
OvmfPkg/Microvm/MicrovmX64.dsc |    1 +
OvmfPkg/OvmfPkgIa32.dsc |    1 +
OvmfPkg/OvmfPkgIa32X64.dsc |    1 +
OvmfPkg/OvmfPkgX64.dsc |    1 +
OvmfPkg/OvmfXen.dsc |    1 +
OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc |    1 +
UefiPayloadPkg/UefiPayloadPkg.dsc |    1 +
  28 files changed, 2524 insertions(+), 1874 deletions(-)
  create mode 100644 

Re: [edk2-devel] [RFC/RFT PATCH] OvmfPkg/IoMmuDxe: don't rely on TPLs for re-entrancy

2023-08-28 Thread Ard Biesheuvel
On Mon, 28 Aug 2023 at 11:16, Gerd Hoffmann  wrote:
>
>   Hi,
>
> > I have tried the patch below, and I don't see any slowdowns with or
> > without the patch, running both DEBUG and RELEASE builds under
> > ordinary KVM/nested-virt. Note that the change in the first hunk will
> > cause the ASSERT()s removed in the other hunks to trigger so the code
> > is definitely being exercised.
>
> QE team tested again with fresh builds, the slowdown isn't there any
> more.  Not fully clear where it came from, but most likely not from
> this patch.
>
> Only 20 successful test runs so far, which a good start, but with
> a reproduce rate below 20% not that much.I'll post an update
> when it I get more results.
>

Excellent, thanks for the update.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108057): https://edk2.groups.io/g/devel/message/108057
Mute This Topic: https://groups.io/mt/100256049/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [edk2-libc Patch 1/1] edk2-libc: Socket completion functions are not called on Linux Compilation

2023-08-28 Thread Jayaprakash, N
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=983

>From the bug description:
Analysis and root cause


After some investigation and debugging I have figured out the following:

The following function is implemented in file  edk2/StdLib/EfiSocketLib/Tcp4.c

VOID
EslTcp4ListenComplete (
  IN EFI_EVENT Event,
  IN ESL_PORT * pPort
);

The function is used in EslTcp4Listen() as a callback for connection
notification event, it is created by the following code:

Status = gBS->CreateEvent ( EVT_NOTIFY_SIGNAL,
TPL_SOCKETS,
(EFI_EVENT_NOTIFY)EslTcp4ListenComplete,
pPort,
>ListenToken.CompletionToken.Event );

And this is actually introduces a bug: the CreateEvent() third parameter is of
type EFI_EVENT_NOTIFY which is defined as

typedef
VOID
(EFIAPI *EFI_EVENT_NOTIFY) (
   IN EFI_EVENT Event,
   IN VOID *Context
);

That EFIAPI tag is important since it defines an ABI that is used by compiler
in order to call the callback function. Note that EslTcp4ListenComplete() is
not marked as EFIAPI.

Thus, on Linux, where gcc defaults to SYSV ABI, there will be mismatch between
arguments passed to EslTcp4ListenComplete() by the event dispatcher. It expects
function with WIN64 ABI, while its code compiled with default SYSV ABI. It will
look in wrong registers for arguments.

Specifically pPort pointer references an wrong memory location. Luckily
EslTcp4ListenComplete() performs sanity check of the pPort structure and
discovers that it is invalid. This causes discarding of all incoming
connections.

Proposed fix
---

The fix is trivial - mark EslTcp4ListenComplete() as EFIAPI. This is a little
more complicated, since there are additional callback functions that suffer
from the same problem. In addition fixing those causes some compiler warnings
that shall be addressed. Attached patch fixes the problem for me.

Cc: Rebecca Cran 
Cc: Michael D Kinney 
Cc: Jayaprakash N 
Signed-off-by: Dimitry Kloper 
---
 StdLib/EfiSocketLib/Ip4.c| 11 +++
 StdLib/EfiSocketLib/Socket.c |  5 +++--
 StdLib/EfiSocketLib/Socket.h | 12 ++--
 StdLib/EfiSocketLib/Tcp4.c   | 35 ---
 StdLib/EfiSocketLib/Tcp6.c   | 35 ---
 StdLib/EfiSocketLib/Udp4.c   | 10 ++
 StdLib/EfiSocketLib/Udp6.c   | 10 ++
 7 files changed, 68 insertions(+), 50 deletions(-)

diff --git a/StdLib/EfiSocketLib/Ip4.c b/StdLib/EfiSocketLib/Ip4.c
index 4b8f05b..8d25537 100644
--- a/StdLib/EfiSocketLib/Ip4.c
+++ b/StdLib/EfiSocketLib/Ip4.c
@@ -588,16 +588,17 @@ EslIp4RemoteAddressSet (
   @param [in] pIo   The address of an ::ESL_IO_MGMT structure
 
 **/
-VOID
+VOID EFIAPI
 EslIp4RxComplete (
   IN EFI_EVENT Event,
-  IN ESL_IO_MGMT * pIo
+  IN VOID *context
   )
 {
   size_t LengthInBytes;
   ESL_PACKET * pPacket;
   EFI_IP4_RECEIVE_DATA * pRxData;
   EFI_STATUS Status;
+  ESL_IO_MGMT * pIo = (ESL_IO_MGMT *)context;
 
   DBG_ENTER ( );
 
@@ -1117,10 +1118,10 @@ EslIp4TxBuffer (
   @param [in] pIo   The address of an ::ESL_IO_MGMT structure
 
 **/
-VOID
+VOID EFIAPI
 EslIp4TxComplete (
   IN EFI_EVENT Event,
-  IN ESL_IO_MGMT * pIo
+  IN VOID *context
   )
 {
   UINT32 LengthInBytes;
@@ -1128,6 +1129,7 @@ EslIp4TxComplete (
   ESL_PACKET * pPacket;
   ESL_SOCKET * pSocket;
   EFI_STATUS Status;
+  ESL_IO_MGMT * pIo = (ESL_IO_MGMT*)context;
 
   DBG_ENTER ( );
 
@@ -1341,6 +1343,7 @@ CONST ESL_PROTOCOL_API cEslIp4Api = {
   OFFSET_OF ( ESL_PORT, Context.Ip4.ModeData.ConfigData ),
   OFFSET_OF ( ESL_LAYER, pIp4List ),
   OFFSET_OF ( struct sockaddr_in, sin_zero ),
+
   sizeof ( struct sockaddr_in ),
   AF_INET,
   sizeof (((ESL_PACKET *)0 )->Op.Ip4Rx ),
diff --git a/StdLib/EfiSocketLib/Socket.c b/StdLib/EfiSocketLib/Socket.c
index 59b8efa..ee15b62 100644
--- a/StdLib/EfiSocketLib/Socket.c
+++ b/StdLib/EfiSocketLib/Socket.c
@@ -3970,14 +3970,15 @@ EslSocketPortClose (
   @param[in]  Event The close completion event
   @param[in]  pPort Address of an ::ESL_PORT structure.
 **/
-VOID
+VOID EFIAPI
 EslSocketPortCloseComplete (
   IN EFI_EVENT Event,
-  IN ESL_PORT * pPort
+  IN VOID *context
   )
 {
   ESL_IO_MGMT * pIo;
   EFI_STATUS Status;
+  ESL_PORT * pPort = (ESL_PORT*) context;
 
   DBG_ENTER ( );
   VERIFY_AT_TPL ( TPL_SOCKETS );
diff --git a/StdLib/EfiSocketLib/Socket.h b/StdLib/EfiSocketLib/Socket.h
index d7d55e6..81d3b2c 100644
--- a/StdLib/EfiSocketLib/Socket.h
+++ b/StdLib/EfiSocketLib/Socket.h
@@ -591,9 +591,9 @@ EFI_STATUS
 **/
 typedef
 VOID
-(* PFN_API_IO_COMPLETE) (
+(EFIAPI * PFN_API_IO_COMPLETE) (
   IN EFI_EVENT Event,
-  IN ESL_IO_MGMT * pIo
+  IN VOID *pIo //IN ESL_IO_MGMT * pIo
   );
 
 /**
@@ -909,9 +909,9 @@ EFI_STATUS
 **/
 typedef
 VOID
-(* PFN_API_TX_COMPLETE) (
+(EFIAPI * PFN_API_TX_COMPLETE) (
   IN EFI_EVENT Event,
-  IN ESL_IO_MGMT * pIo
+  IN VOID *pIo //IN ESL_IO_MGMT * pIo
   );
 
 /**
@@ 

[edk2-devel] [edk2-libc Patch 0/1] Socket completion functions not called on Linux Compilation

2023-08-28 Thread Jayaprakash, N
This patch fixes the issue reported in BZ given below:
https://bugzilla.tianocore.org/show_bug.cgi?id=983
Patch extracted from PR https://github.com/tianocore/edk2-libc/pull/7

Jayaprakash N (1):
  edk2-libc: Socket completion functions are not called on Linux
Compilation

 StdLib/EfiSocketLib/Ip4.c| 11 +++
 StdLib/EfiSocketLib/Socket.c |  5 +++--
 StdLib/EfiSocketLib/Socket.h | 12 ++--
 StdLib/EfiSocketLib/Tcp4.c   | 35 ---
 StdLib/EfiSocketLib/Tcp6.c   | 35 ---
 StdLib/EfiSocketLib/Udp4.c   | 10 ++
 StdLib/EfiSocketLib/Udp6.c   | 10 ++
 7 files changed, 68 insertions(+), 50 deletions(-)

-- 
2.40.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108055): https://edk2.groups.io/g/devel/message/108055
Mute This Topic: https://groups.io/mt/101006990/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [RFC/RFT PATCH] OvmfPkg/IoMmuDxe: don't rely on TPLs for re-entrancy

2023-08-28 Thread Gerd Hoffmann
  Hi,

> I have tried the patch below, and I don't see any slowdowns with or
> without the patch, running both DEBUG and RELEASE builds under
> ordinary KVM/nested-virt. Note that the change in the first hunk will
> cause the ASSERT()s removed in the other hunks to trigger so the code
> is definitely being exercised.

QE team tested again with fresh builds, the slowdown isn't there any
more.  Not fully clear where it came from, but most likely not from
this patch.

Only 20 successful test runs so far, which a good start, but with
a reproduce rate below 20% not that much.I'll post an update
when it I get more results.

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108054): https://edk2.groups.io/g/devel/message/108054
Mute This Topic: https://groups.io/mt/100256049/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH 0/5] RedfishClientPkg: fix issues with local variables.

2023-08-28 Thread Nickle Wang via groups.io
Hi Mike,

> I didn't find any codyng-style issues in uncrustify output.

I fetch your branch and run uncrustify tool to fix error in vs code editor. I 
push the fix to your branch at this commit for your reference: 
https://github.com/ghbaccount/edk2-redfish-client/commit/f22209f7bd5946168326a3197006d92856247d35
 The uncrustify check on PR is now passed successfully. My commit breaks patch 
check as expected, please incorporate my changes with yours and do a force push 
to this PR again.

For the way of fixing uncrustify error, I am using the instructions here: 
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-Formatting#recommended-usage-visual-studio-vs-code-plugin

Thanks,
Nickle

> -Original Message-
> From: Mike Maslenkin 
> Sent: Sunday, August 27, 2023 6:57 PM
> To: devel@edk2.groups.io
> Cc: abner.ch...@amd.com; Nickle Wang ;
> ig...@ami.com; Mike Maslenkin 
> Subject: [PATCH 0/5] RedfishClientPkg: fix issues with local variables.
>
> External email: Use caution opening links or attachments
>
>
> This patchset contains fixes that resolve crashes while working with 
> uninitialized
> variables and a number of fixes for of leaked memory.
> Note: looks like uncrustify check is broken at tianocore/edk2-redfish-client 
> repo,
> the corresponding PR failed:
> https://github.co/
> m%2Ftianocore%2Fedk2-redfish-
> client%2Fpull%2F46=05%7C01%7Cnicklew%40nvidia.com%7C7cf336153fb
> f4e2e821008dba6ec62e0%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0
> %7C638287306436105158%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C
> =VUxJA017msZzRYd%2FAxi0KeZvLi2s0QI6uKgHsOuDdws%3D=0
>
> I didn't find any codyng-style issues in uncrustify output.
>
> Cc: Abner Chang 
> Cc: Nickle Wang 
> Cc: Igor Kulchytskyy 
> Signed-off-by: Mike Maslenkin 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108053): https://edk2.groups.io/g/devel/message/108053
Mute This Topic: https://groups.io/mt/100988470/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH V2 0/2] Add ProcessorUpgradeSocket definitions from SMBIOS 3.7.0

2023-08-28 Thread Zeng, Star
Liming,

Need your help to review and merge this patch series after the code freeze.

Thanks,
Star
-Original Message-
From: devel@edk2.groups.io  On Behalf Of Zeng, Star
Sent: Friday, August 18, 2023 7:34 PM
To: Gao, Liming ; devel@edk2.groups.io; Cuevas 
Farfan, Eduardo 
Cc: Kinney, Michael D ; Liu, Zhiguang 
; Gao, Zhichao ; Zeng, Star 

Subject: Re: [edk2-devel] [PATCH V2 0/2] Add ProcessorUpgradeSocket definitions 
from SMBIOS 3.7.0

Got it, thanks Liming. So we need wait until 2023-08-25, then you can help 
merge the patches. 

-Original Message-
From: gaoliming 
Sent: Friday, August 18, 2023 3:03 PM
To: devel@edk2.groups.io; Zeng, Star ; Cuevas Farfan, 
Eduardo 
Cc: Kinney, Michael D ; Liu, Zhiguang 
; Gao, Zhichao 
Subject: 回复: [edk2-devel] [PATCH V2 0/2] Add ProcessorUpgradeSocket definitions 
from SMBIOS 3.7.0

This patch seems a new feature to add new definition from SMBIOS 3.7.0. It is 
sent and reviewed after soft feature freeze. 

Based on the release rule, it will not be merged for this stable tag 202308. It 
can be merged after the stable tag is created. 

Thanks
Liming
> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Zeng, Star
> 发送时间: 2023年8月18日 11:11
> 收件人: Gao, Liming ; devel@edk2.groups.io; 
> Cuevas Farfan, Eduardo 
> 抄送: Kinney, Michael D ; Liu, Zhiguang 
> ; Gao, Zhichao ; Zeng, 
> Star 
> 主题: Re: [edk2-devel] [PATCH V2 0/2] Add ProcessorUpgradeSocket 
> definitions from SMBIOS 3.7.0
> 
> I have given review to both patches and Zhichao has given review to 
> ShellPkg patch.
> Liming, need your help to review and merge the patches. 
> 
> 
> Thanks,
> Star
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Eduardo 
> Cuevas Farfan
> Sent: Friday, August 11, 2023 12:32 AM
> To: devel@edk2.groups.io
> Cc: Cuevas Farfan, Eduardo 
> Subject: [edk2-devel] [PATCH V2 0/2] Add ProcessorUpgradeSocket 
> definitions from SMBIOS 3.7.0
> 
> Add ProcessorUpgradeSocket definitions from SMBIOS 3.7.0 to edk2 
> sources
> 
> Eduardo Cuevas Farfan (2):
>   MdePkg: Add ProcessorUpgradeSocket definitions from SMBIOS 3.7.0
>   ShellPkg: Add ProcessorUpgradeSocket definitions from SMBIOS 3.7.0
> 
>  MdePkg/Include/IndustryStandard/SmBios.h  | 12 +--
>  .../SmbiosView/QueryTable.c   | 34
> ++-
>  2 files changed, 43 insertions(+), 3 deletions(-)
> 
> --
> 2.26.2.windows.1
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 










-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108052): https://edk2.groups.io/g/devel/message/108052
Mute This Topic: https://groups.io/mt/101006072/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH] MdeModulePkg/DxeCorePerformanceLib:fix smm perf issue

2023-08-28 Thread Ni, Ray
2 comments as follows, starting with "[ray"

@@ -73,6 +73,7 @@ UINT8*mPerformancePointer  = NULL;
 UINT8*mBootRecordBuffer= NULL;
 BOOLEAN  mLockInsertRecord = FALSE;
 CHAR8*mDevicePathString= NULL;
+UINTNmBootRecordOffset = 0;

[ray.1] How about mSmmBootRecordOffset?

 EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *mDevicePathToText = NULL;

@@ -236,6 +237,7 @@ InternalGetSmmPerfData (
   VOID *SmmBootRecordData;
   UINTNSmmBootRecordDataSize;
   UINTNReservedMemSize;
+  UINTNCurrentRecordOffset;

[ray.2] How about "SmmBootRecordDataRetrieved"?



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108051): https://edk2.groups.io/g/devel/message/108051
Mute This Topic: https://groups.io/mt/100931879/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-