Re: [edk2-devel] [PATCH 10/18] UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLib

2024-05-13 Thread Ni, Ray
Gerd,
I agree that the logic might be duplicated in multi places.

But even CPU supports 1G paging, caller can decide whether to use 1G paging or 
2M paging, or 4K paging.
Using a single API to encapsulate the entire logic may not seem flexible.
Maybe, a lib API to detect 1G paging capability can be added to CpuLib.

Thanks,
Ray

From: Gerd Hoffmann 
Sent: Monday, May 13, 2024 19:07
To: Tan, Dun 
Cc: devel@edk2.groups.io ; Ni, Ray ; 
Laszlo Ersek ; Kumar, Rahul R ; Wu, 
Jiaxin 
Subject: Re: [PATCH 10/18] UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLib

  Hi,

> +  if (sizeof (UINTN) == sizeof (UINT64)) {
> +//
> +// Check Page5Level Support or not.
> +//
> +Cr4.UintN = AsmReadCr4 ();
> +Page5LevelSupport = (Cr4.Bits.LA57 ? TRUE : FALSE);
> +
> +//
> +// Check Page1G Support or not.
> +//
> +Page1GSupport = FALSE;
> +AsmCpuid (CPUID_EXTENDED_FUNCTION, , NULL, NULL, NULL);
> +if (RegEax >= CPUID_EXTENDED_CPU_SIG) {
> +  AsmCpuid (CPUID_EXTENDED_CPU_SIG, NULL, NULL, NULL, );
> +  if (RegEdx.Bits.Page1GB != 0) {
> +Page1GSupport = TRUE;
> +  }
> +}
> +
> +//
> +// Decide Paging Mode according Page5LevelSupport & Page1GSupport.
> +//
> +if (Page5LevelSupport) {
> +  PagingMode = Page1GSupport ? Paging5Level1GB : Paging5Level;
> +} else {
> +  PagingMode = Page1GSupport ? Paging4Level1GB : Paging4Level;
> +}
> +  } else {
> +PagingMode = PagingPae;
> +  }

I'm wondering whenever CpuPageTableLib should get a function for this?
I suspect there a multiple places in edk2 which will need this
functionality ...

take care,
  Gerd



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




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

2024-05-13 Thread Nhi Pham via groups.io

Thanks Nickle. I will help review and verify your patch.

On 5/14/2024 8:56 AM, Nickle Wang wrote:

Hi Nhi,

This task is on my list but with lower priority. I will try to provide version 
2 patch for review here by the end of this week.

Thanks,
Nickle


-Original Message-
From: Nhi Pham 
Sent: Monday, May 13, 2024 5:02 PM
To: devel@edk2.groups.io; abner.ch...@amd.com; Nickle Wang
; Rebecca Cran 
Cc: Isaac Oram ; Attar, AbdulLateef (Abdul Lateef)
; Tinh Nguyen

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

External email: Use caution opening links or attachments


On 2/9/2024 11:37 PM, Chang, Abner via groups.io wrote:

[AMD Official Use Only - General]

Yeah, I forget this patch set and seems we don't have any follow up conversation

after below feedbacks from community.


https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2
.groups.io%2Fg%2Fdevel%2Fmessage%2F103116=05%7C02%7Cnicklew

%40nvi



dia.com%7C8b9e1a8a8d044208f8d608dc732b678d%7C43083d15727340c1b7db
39efd



9ccc17a%7C0%7C0%7C638511877469561600%7CUnknown%7CTWFpbGZsb3d8
eyJWIjoiM



C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7
C%7C

=N4eDH668lBSFxq9r81QrhMgpULvht8isrrEI9lipVKc%3D=0
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2
.groups.io%2Fg%2Fdevel%2Fmessage%2F103087=05%7C02%7Cnicklew

%40nvi



dia.com%7C8b9e1a8a8d044208f8d608dc732b678d%7C43083d15727340c1b7db
39efd



9ccc17a%7C0%7C0%7C638511877469569817%7CUnknown%7CTWFpbGZsb3d8
eyJWIjoiM



C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7
C%7C



=7p0BHb8RFRapFyygr35u0hQBK2bQwKPSypBaUi6cMIQ%3D=0


So Nickle, does NV still has the plan to upstream IPMI blob edk2

implementation? We should keep driving upstream the implementation as
industry needs it to incorporate with OpenBMC.


Hi Rebessa,
As we are on Chinese New Year holidays now, please expect the delay response.
Thanks
Abner



Hi Nickle and Abner,

May I know the status of upstreaming the IPMI Blob Transfer Protocol?
I'm planning to upstream the SMBIOS transfer to OpenBMC by leveraging this
protocol.

Thanks,
Nhi



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




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

2024-05-13 Thread Nickle Wang via groups.io
Hi Nhi,

This task is on my list but with lower priority. I will try to provide version 
2 patch for review here by the end of this week. 

Thanks,
Nickle

> -Original Message-
> From: Nhi Pham 
> Sent: Monday, May 13, 2024 5:02 PM
> To: devel@edk2.groups.io; abner.ch...@amd.com; Nickle Wang
> ; Rebecca Cran 
> Cc: Isaac Oram ; Attar, AbdulLateef (Abdul Lateef)
> ; Tinh Nguyen
> 
> Subject: Re: [edk2-devel] [edk2-platforms][PATCH] ManageabilityPkg: add
> support for the phosphor ipmi blob transfer protocol
> 
> External email: Use caution opening links or attachments
> 
> 
> On 2/9/2024 11:37 PM, Chang, Abner via groups.io wrote:
> > [AMD Official Use Only - General]
> >
> > Yeah, I forget this patch set and seems we don't have any follow up 
> > conversation
> after below feedbacks from community.
> >
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2
> > .groups.io%2Fg%2Fdevel%2Fmessage%2F103116=05%7C02%7Cnicklew
> %40nvi
> >
> dia.com%7C8b9e1a8a8d044208f8d608dc732b678d%7C43083d15727340c1b7db
> 39efd
> >
> 9ccc17a%7C0%7C0%7C638511877469561600%7CUnknown%7CTWFpbGZsb3d8
> eyJWIjoiM
> >
> C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7
> C%7C
> > =N4eDH668lBSFxq9r81QrhMgpULvht8isrrEI9lipVKc%3D=0
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2
> > .groups.io%2Fg%2Fdevel%2Fmessage%2F103087=05%7C02%7Cnicklew
> %40nvi
> >
> dia.com%7C8b9e1a8a8d044208f8d608dc732b678d%7C43083d15727340c1b7db
> 39efd
> >
> 9ccc17a%7C0%7C0%7C638511877469569817%7CUnknown%7CTWFpbGZsb3d8
> eyJWIjoiM
> >
> C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7
> C%7C
> >
> =7p0BHb8RFRapFyygr35u0hQBK2bQwKPSypBaUi6cMIQ%3D=0
> >
> > So Nickle, does NV still has the plan to upstream IPMI blob edk2
> implementation? We should keep driving upstream the implementation as
> industry needs it to incorporate with OpenBMC.
> >
> > Hi Rebessa,
> > As we are on Chinese New Year holidays now, please expect the delay 
> > response.
> > Thanks
> > Abner
> >
> 
> Hi Nickle and Abner,
> 
> May I know the status of upstreaming the IPMI Blob Transfer Protocol?
> I'm planning to upstream the SMBIOS transfer to OpenBMC by leveraging this
> protocol.
> 
> Thanks,
> Nhi


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




[edk2-devel] Cancelled Event: Tools, CI, Code base construction meeting series - Monday, May 13, 2024 #cal-cancelled

2024-05-13 Thread Group Notification
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Groups.io Inc//Groups.io Calendar//EN
METHOD:CANCEL
REFRESH-INTERVAL;VALUE=DURATION:PT1H
X-PUBLISHED-TTL:PT1H
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
LAST-MODIFIED:20240422T053451Z
TZURL:https://www.tzurl.org/zoneinfo-outlook/America/Los_Angeles
X-LIC-LOCATION:America/Los_Angeles
BEGIN:DAYLIGHT
TZNAME:PDT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
DTSTART:19700308T02
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:PST
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
DTSTART:19701101T02
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
X-GIOIDS:Event:2159798 
UID:rvop.1647284497725488626.j...@groups.io
DTSTAMP:20240513T222309Z
ORGANIZER;CN=devel@edk2.groups.io Group;SENT-BY="mailto:devel@edk2.groups
 .io":mailto:devel@edk2.groups.io
DTSTART:20240513T233000Z
DTEND:20240514T003000Z
SUMMARY:Tools\, CI\, Code base construction meeting series
DESCRIPTION:TianoCore community\,\n\nMicrosoft and Intel will be hosting 
 a series of open meetings to discuss build\, CI\, tools\, and other relat
 ed topics. If you are interested\, have ideas/opinions please join us. Th
 ese meetings will be Monday 4:30pm Pacific Time on Microsoft Teams.\n\nMS
  Teams Link in following discussion:\n* https://github.com/tianocore/edk2
 /discussions/2614\n\nAnyone is welcome to join.\n\n* tianocore/edk2: EDK 
 II (github.com)\n* tianocore/edk2-basetools: EDK II BaseTools Python tool
 s as a PIP module (github.com) https://github.com/tianocore/edk2-basetool
 s\n* tianocore/edk2-pytool-extensions: Extensions to the edk2 build syste
 m allowing for a more robust and plugin based build system and tool execu
 tion environment (github.com) https://github.com/tianocore/edk2-pytool-ex
 tensions\n* tianocore/edk2-pytool-library: Python library package that su
 pports UEFI development (github.com) https://github.com/tianocore/edk2-py
 tool-library\n\nMS Teams Browser Clients\n* https://docs.microsoft.com/en
 -us/microsoftteams/get-clients?tabs=Windows#browser-client
LOCATION:https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4N
 mMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%2
 2%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2223af6561-
 6e1c-450d-b917-d9d674eb3cb6%22%7d
SEQUENCE:1
STATUS:CANCELLED
END:VEVENT
END:VCALENDAR


invite.ics
Description: application/ics


Re: [edk2-devel] [PATCH v1 1/1] MinPlatformPkg: Fix DxePhatAcpiLib.inf path in dsc

2024-05-13 Thread Nate DeSimone
Pushed as 59c6866

> -Original Message-
> From: Vivian Nowka-Keane 
> Sent: Thursday, May 9, 2024 7:09 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> 
> Subject: [PATCH v1 1/1] MinPlatformPkg: Fix DxePhatAcpiLib.inf path in dsc
> 
> When building MinPlatformPkg, a build error occured because the inf was not
> found. The path was incorrect -- DxePhatAcpiLib folder doesn't exist,
> PhatAcpiLib does.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Signed-off-by: Vivian Nowka-Keane 
> ---
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc 
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> index ecb4d8f65efa..f81ad3cabf56 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> @@ -64,7 +64,7 @@
>
> PciSegmentInfoLib|MinPlatformPkg/Pci/Library/PciSegmentInfoLibSimple/PciSegmentInfoLibSimple.inf
>
> PlatformBootManagerLib|MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
>
> AslUpdateLib|MinPlatformPkg/Acpi/Library/DxeAslUpdateLib/DxeAslUpdateLib.inf
> -  PhatAcpiLib|MinPlatformPkg/Acpi/Library/DxePhatAcpiLib/DxePhatAcpiLib.inf
> +  PhatAcpiLib|MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf
>  
>#
># Misc
> @@ -209,7 +209,7 @@
>MinPlatformPkg/Library/BaseLargeVariableLib/BaseLargeVariableReadLib.inf
>MinPlatformPkg/Library/BaseLargeVariableLib/BaseLargeVariableWriteLib.inf
>  
> -  MinPlatformPkg/Acpi/Library/DxePhatAcpiLib/DxePhatAcpiLib.inf
> +  MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf
>  
>  [BuildOptions]
>*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
> -- 
> 2.43.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118876): https://edk2.groups.io/g/devel/message/118876
Mute This Topic: https://groups.io/mt/106014298/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 1/1] MinPlatformPkg: Fix DxePhatAcpiLib.inf path in dsc

2024-05-13 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Vivian Nowka-Keane 
> Sent: Thursday, May 9, 2024 7:09 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> 
> Subject: [PATCH v1 1/1] MinPlatformPkg: Fix DxePhatAcpiLib.inf path in dsc
> 
> When building MinPlatformPkg, a build error occured because the inf was not
> found. The path was incorrect -- DxePhatAcpiLib folder doesn't exist,
> PhatAcpiLib does.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Signed-off-by: Vivian Nowka-Keane 
> ---
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc 
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> index ecb4d8f65efa..f81ad3cabf56 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> @@ -64,7 +64,7 @@
>
> PciSegmentInfoLib|MinPlatformPkg/Pci/Library/PciSegmentInfoLibSimple/PciSegmentInfoLibSimple.inf
>
> PlatformBootManagerLib|MinPlatformPkg/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
>
> AslUpdateLib|MinPlatformPkg/Acpi/Library/DxeAslUpdateLib/DxeAslUpdateLib.inf
> -  PhatAcpiLib|MinPlatformPkg/Acpi/Library/DxePhatAcpiLib/DxePhatAcpiLib.inf
> +  PhatAcpiLib|MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf
>  
>#
># Misc
> @@ -209,7 +209,7 @@
>MinPlatformPkg/Library/BaseLargeVariableLib/BaseLargeVariableReadLib.inf
>MinPlatformPkg/Library/BaseLargeVariableLib/BaseLargeVariableWriteLib.inf
>  
> -  MinPlatformPkg/Acpi/Library/DxePhatAcpiLib/DxePhatAcpiLib.inf
> +  MinPlatformPkg/Acpi/Library/PhatAcpiLib/DxePhatAcpiLib.inf
>  
>  [BuildOptions]
>*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
> -- 
> 2.43.0.windows.1


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




Re: [edk2-devel] [edk2-platforms] [PATCH v1 1/2] MinPlatform: Add MpInfo2HobPei

2024-05-13 Thread Nate DeSimone
Thanks for the feedback Chasel and Sai! I have incorporated all your 
suggestions.

> -Original Message-
> From: Chaganty, Rangasai V 
> Sent: Thursday, May 9, 2024 6:15 PM
> To: Desimone, Nathaniel L ;
> devel@edk2.groups.io
> Cc: Chiu, Chasel ; Liming Gao
> ; Dong, Eric ; Chuang,
> Rosen ; Kasbekar, Saloni
> 
> Subject: RE: [edk2-platforms] [PATCH v1 1/2] MinPlatform: Add
> MpInfo2HobPei
> 
> Hi Nate,
> Looks good.
> In addition to optimization suggested by Chasel to save unnecessary call to
> locate PPI, you might also want to consider checking for checking "no error"
> status for locate PPI and perhaps avoid a "goto" label.
> With that, Reviewed-by: Sai Chaganty  for
> the whole patch series.
> 
> Thanks,
> Sai
> 
> 
> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Wednesday, May 8, 2024 5:09 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Liming Gao
> ; Dong, Eric ; Chaganty,
> Rangasai V ; Chuang, Rosen
> ; Kasbekar, Saloni 
> Subject: [edk2-platforms] [PATCH v1 1/2] MinPlatform: Add MpInfo2HobPei
> 
> MpInfo2HobPei provides backwards compatibility between FSP binaries built
> with older versions of EDK II and the latest EDK II.
> 
> Newer versions of CpuMpPei produce the gMpInformation2HobGuid. This
> HOB is required by newer implementations of the CPU DXE driver, however
> older versions of CpuMpPei do not produce it. This PEIM will check if
> CpuMpPei creates gMpInformation2HobGuid and if it does not it creates it.
> 
> Cc: Chasel Chiu 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Cc: Sai Chaganty 
> Cc: Rosen Chuang 
> Cc: Saloni Kasbekar 
> Signed-off-by: Nate DeSimone 
> ---
>  .../FspWrapper/MpInfo2HobPei/MpInfo2HobPei.c  | 236
> ++
>  .../MpInfo2HobPei/MpInfo2HobPei.inf   |  47 
>  .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |   3 +-
>  3 files changed, 285 insertions(+), 1 deletion(-)  create mode 100644
> Platform/Intel/MinPlatformPkg/FspWrapper/MpInfo2HobPei/MpInfo2HobPe
> i.c
>  create mode 100644
> Platform/Intel/MinPlatformPkg/FspWrapper/MpInfo2HobPei/MpInfo2HobPe
> i.inf
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/FspWrapper/MpInfo2HobPei/MpInfo2Hob
> Pei.c
> b/Platform/Intel/MinPlatformPkg/FspWrapper/MpInfo2HobPei/MpInfo2Hob
> Pei.c
> new file mode 100644
> index 00..4cbc4cf7e6
> --- /dev/null
> +++
> b/Platform/Intel/MinPlatformPkg/FspWrapper/MpInfo2HobPei/MpInfo2Hob
> P
> +++ ei.c
> @@ -0,0 +1,236 @@
> +/** @file
> +  Multi-processor Info 2 HOB PEIM.
> +
> +  The purpose of this PEIM is to provide backwards compatibility
> + between FSP  binaries built with older versions of EDK II and the latest 
> EDK II.
> +
> +  Newer versions of CpuMpPei produce the gMpInformation2HobGuid. This
> + HOB is  required by newer implementations of the CPU DXE driver,
> + however older  versions of CpuMpPei do not produce it. This PEIM will
> + check if CpuMpPei  creates gMpInformation2HobGuid and if it does not it
> creates it.
> +
> +Copyright (c) 2024, Intel Corporation. All rights reserved.
> +
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include  #include
> +
> +
> +#include 
> +#include 
> +#include 
> +
> +typedef struct {
> +  EDKII_PEI_MP_SERVICES2_PPI*CpuMpPpi2;
> +  UINT8 *CoreTypes;
> +} GET_PROCESSOR_CORE_TYPE_BUFFER;
> +
> +/**
> +  Get CPU core type.
> +
> +  @param[in, out] Buffer  Argument of the procedure.
> +**/
> +VOID
> +EFIAPI
> +GetProcessorCoreType (
> +  IN OUT VOID  *Buffer
> +  )
> +{
> +  EFI_STATUS   Status;
> +  UINT8*CoreTypes;
> +  CPUID_NATIVE_MODEL_ID_AND_CORE_TYPE_EAX
> NativeModelIdAndCoreTypeEax;
> +  UINTNProcessorIndex;
> +  GET_PROCESSOR_CORE_TYPE_BUFFER   *Params;
> +
> +  Params = (GET_PROCESSOR_CORE_TYPE_BUFFER *)Buffer;  Status =
> + Params->CpuMpPpi2->WhoAmI (Params->CpuMpPpi2, );
> + ASSERT_EFI_ERROR (Status);
> +
> +  CoreTypes = Params->CoreTypes;
> +  AsmCpuidEx (CPUID_HYBRID_INFORMATION,
> +CPUID_HYBRID_INFORMATION_MAIN_LEAF,
> +, NULL, NULL, NULL);
> +  CoreTypes[ProcessorIndex] =
> +(UINT8)NativeModelIdAndCoreTypeEax.Bits.CoreType;
> +}
> +
> +/**
> +  Create gMpInformation2HobGuid.
> +**/
> +VOID
> +BuildMpInformationHob (
> +  IN  EDKII_PEI_MP_SERVICES2_PPI  *CpuMpPpi2
> +  )
> +{
> +  GET_PROCESSOR_CORE_TYPE_BUFFER  Buffer;
> +  EFI_STATUS  Status;
> +  UINTN   ProcessorIndex;
> +  UINTN   NumberOfProcessors;
> +  UINTN   NumberOfEnabledProcessors;
> +  UINTN   NumberOfProcessorsInHob;
> +  UINTN   MaxProcessorsPerHob;
> +  MP_INFORMATION2_HOB_DATA*MpInformation2HobData;
> +  MP_INFORMATION2_ENTRY   *MpInformation2Entry;
> +  UINTN   Index;
> +  UINT8   

Re: [edk2-devel] [edk2-platforms] [PATCH v1 0/2] Intel/MinPlatform: Add MpInfo2HobPei

2024-05-13 Thread Nate DeSimone
The series has been pushed as c31962b~..0ba43d4

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Nate
> DeSimone
> Sent: Wednesday, May 8, 2024 5:09 PM
> To: devel@edk2.groups.io
> Cc: Chaganty, Rangasai V ; Chuang, Rosen
> ; Kasbekar, Saloni ;
> Chiu, Chasel ; Liming Gao
> ; Dong, Eric 
> Subject: [edk2-devel] [edk2-platforms] [PATCH v1 0/2] Intel/MinPlatform:
> Add MpInfo2HobPei
> 
> Newer versions of CpuMpPei produce the gMpInformation2HobGuid. This
> HOB is required by newer implementations of the CPU DXE driver, however
> older versions of CpuMpPei do not produce it. This can cause backwards
> compatibiliity issues if the FSP binary was built with an older version of 
> EDK II
> and the OpenBoard code is built with the latest version of EDK II.
> 
> To solve this problem, this patch series introduces a new PEIM called
> MpInfo2HobPei. This PEIM will check if CpuMpPei creates
> gMpInformation2HobGuid and if it does not then MpInfo2HobPei will create
> it.
> 
> Cc: Sai Chaganty 
> Cc: Rosen Chuang 
> Cc: Saloni Kasbekar 
> Cc: Chasel Chiu 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Nate DeSimone 
> 
> Nate DeSimone (2):
>   MinPlatform: Add MpInfo2HobPei
>   AlderlakeOpenBoardPkg: Include MpInfo2HobPei
> 
>  .../AlderlakePRvp/OpenBoardPkg.dsc|  10 +-
>  .../AlderlakePRvp/OpenBoardPkg.fdf|  10 +-
>  .../FspWrapper/MpInfo2HobPei/MpInfo2HobPei.c  | 236
> ++
>  .../MpInfo2HobPei/MpInfo2HobPei.inf   |  47 
>  .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |   3 +-
>  5 files changed, 303 insertions(+), 3 deletions(-)  create mode 100644
> Platform/Intel/MinPlatformPkg/FspWrapper/MpInfo2HobPei/MpInfo2HobPe
> i.c
>  create mode 100644
> Platform/Intel/MinPlatformPkg/FspWrapper/MpInfo2HobPei/MpInfo2HobPe
> i.inf
> 
> --
> 2.44.0.windows.1
> 
> 
> 
> 
> 



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




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

2024-05-13 Thread Ard Biesheuvel
(cc some ARM folks)

On Mon, 13 May 2024 at 11:23, Gerd Hoffmann  wrote:
>
> On Sat, May 11, 2024 at 10:40:23AM GMT, Ard Biesheuvel wrote:
> > As I pointed out before, on the ARM side there are a few intersecting
> > issues with these changes. (On x86, this is mostly avoided due to the
> > fact that RDRAND is universally supported)
>
> Well, it's not that easy on x86 either.
>
> Current state of affairs is that the time based LibRng is used, all
> OvmfPkg / ArmVirtPkg have this:
>
>   RngLib|MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
>
> So, this is what will be used if something uses LibRng.
>
> On x64 RngDxe will just use call LibRng too.  So adding RngDxe will
> effectively make BaseRngLibTimerLib available via EFI_RNG_PROTOCOL.
>
> In case '-device virtio-rng-pci' is present we now have *two* drivers
> providing EFI_RNG_PROTOCOL.  What will happen in this case?  What we
> surely not want is RngDxe being used in case we have a virtio-rng
> device ...
>

On ARM, we can actually do better than this: I have taken Doug's v2
and applied some changes on top to make it work with ArmVirtQemu.

https://github.com/ardbiesheuvel/edk2/tree/doug-v2

The ARM version of RngLib can be backed by either RNDR or TRNG, and
exposes gEfiRngAlgorithmArmRndr, gEfiRngAlgorithmRaw, or both. If
neither are supported, RngDxe will not be dispatched.

Given that RNDR is implemented by the hardware, and TRNG by the
hypervisor, and neither depend on the UEFI driver model (like
virtio-rng), which is backed by the VMM, I think that in this case,
there is no issue with dispatching both, even if that results in two
implementations of the EFI_RNG_PROTOCOL, and no guarantees regarding
which one you get when you locate the protocol. (Confidential VMs may
want to avoid virtio-rng as it is provided by the host but let's
disregard that for the time being)

The upshot is that existing ARM deployments that do not use the 'max'
CPU in TCG mode, or are on a fairly old version of KVM will lose
network support unless they enable the virtio-rng-pci device. This is
a situation I can live with, but it does require the changes I am
proposing on the branch above.

On x86, we should avoid BaseRngLibTimerLib as well - it is a bit ugly
to expose two EFI_RNG_PROTOCOL instances, but we could at least ensure
that it doesn't matter which one you grab. I intend to look more
deeply into this in the future, and maybe compare notes with Pierre,
as this has been a rather complicated delivery IIRC. Perhaps it would
be better for RngDxe to consume a raw entropy source and implement the
DRBG directly rather than expose the raw protocol (which I think
should not have been introduced in the first place)


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




[edk2-devel] HII Keyword utility

2024-05-13 Thread Jeff Brasen via groups.io
I have a UEFI shell application that can set/get UEFI x-UEFI HII Keyword 
values. edk2-nvidia/Silicon/NVIDIA/Application/HiiKeywordUtil at main · 
NVIDIA/edk2-nvidia (github.com) ( 
https://github.com/NVIDIA/edk2-nvidia/tree/main/Silicon/NVIDIA/Application/HiiKeywordUtil
 )

I have used this to configure iSCSI from the shell. Is this something that is 
desired to be in the main edk2 repo? If so, what package should this go under?

If this is generally useful I'll do some cleanup and make a push request after 
the stable202405 release is out.

-Jeff Brasen


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118870): https://edk2.groups.io/g/devel/message/118870
Mute This Topic: https://groups.io/mt/106076569/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 07/13] SecurityPkg: RngDxe: Remove incorrect limitation on GetRng

2024-05-13 Thread PierreGondois

Hello,
The patch looks good to me:
Reviewed-by: Pierre Gondois 

Regards,
Pierre

On 5/11/24 02:24, Yao, Jiewen wrote:

Thanks to confirm that.

I am OK on what you have said.

Since the ARM part is added by Pierre Gondois pierre.gond...@arm.com 
, I will let him comment if there is any concern 
on the change for ARM.

Thank you

Yao, Jiewen

*From:* Doug Flick via groups.io 
*Sent:* Saturday, May 11, 2024 5:12 AM
*To:* Yao, Jiewen ; devel@edk2.groups.io
*Subject:* Re: [edk2-devel] [PATCH v2 07/13] SecurityPkg: RngDxe: Remove 
incorrect limitation on GetRng

So, I'm trying to consult with some RNG experts because I'm by no means an 
expert and anything I say should be taken with huge grain of salt. When I get 
the experts take, I'll share it.

Basically, the way I read this code is that it by no means tries to enforce any 
entropy requirement outside of what you ask for.

My understanding is the 256 Bit Entropy requirements comes from when you are 
using a DRNG algorithm such as:

|#define EFI_RNG_ALGORITHM_SP800_90_HASH_256_GUID \|

|{0xa7af67cb, 0x603b, 0x4d42,\|

|{0xba, 0x21, 0x70, 0xbf, 0xb6, 0x29, 0x3f, 0x96}}|

||

|#define EFI_RNG_ALGORITHM_SP800_90_HMAC_256_GUID \|

|{0xc5149b43, 0xae85, 0x4f53,\|

|{0x99, 0x82, 0xb9, 0x43, 0x35, 0xd3, 0xa9, 0xe7}}|

||

|#define EFI_RNG_ALGORITHM_SP800_90_CTR_256_GUID \|

|{0x44f0de6e, 0x4d8c, 0x4045, \|

|{0xa8, 0xc7, 0x4d, 0xd1, 0x68, 0x85, 0x6b, 0x9e}}|

"When a Deterministic Random Bit Generator (DRBG) is used on the output of a 
(raw) entropy source, its security level must be at least 256 bits."

https://uefi.org/specs/UEFI/2.10/37_Secure_Technologies.html#random-number-generator-protocol
 


That is, the seed of these algorithms must be at a minimum 256 bits from your 
entropy source.

Now when you call for instance EFI_RNG_ALGORITHM_SP800_90_CTR_256_GUID

On an INTEL CPU it uses the Intel RDRAND Instruction

https://github.com/tianocore/edk2/blob/4b6ee06a090d956f80b4a92fb9bf03098a372f39/SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c#L108C45-L108C51
 


Which from what I can tell the generator takes pairs of 256-bit raw entropy 
samples generated by the hardware entropy source and applies them to an 
Advanced Encryption Standard (AES) (in CBC-MAC mode) conditioner which reduces 
them to a single 256-bit conditioned entropy sample.

https://en.wikipedia.org/wiki/RDRAND 

https://www.intel.com/content/www/us/en/developer/articles/guide/intel-digital-random-number-generator-drng-software-implementation-guide.html
 


Which means, if you are implementing these algorithms in software, you must 
comply with the 256 bit entropy requirement for your source. However in our 
case the CPU is performing that requirement for us.

Again I'm no expert. So if an expert is reading this and I'm completely wrong 
please let me know :)




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118869): https://edk2.groups.io/g/devel/message/118869
Mute This Topic: https://groups.io/mt/105996584/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 1/1] MdePkg: Added new SPCR table Revision 4 structure

2024-05-13 Thread Praveen Sankar N via groups.io
Thanks you so much Liming.

Regards,
Praveen Sankar

-Original Message-
From: gaoliming 
Sent: Friday, May 10, 2024 6:16 AM
To: devel@edk2.groups.io; Praveen Sankar N 
Cc: Srinivasan Mani ; Sundaresan S ; 
michael.d.kin...@intel.com; zhiguang@intel.com; Felix Polyudov 
; Rabisha R 
Subject: [EXTERNAL] 回复: [edk2-devel] 回复: [PATCH v4 1/1] MdePkg: Added new SPCR 
table Revision 4 structure


**CAUTION: The e-mail below is from an external source. Please exercise caution 
before opening attachments, clicking links, or following guidance.**

It has been merged.

Thanks
Liming
> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Praveen Sankar N
> via groups.io
> 发送时间: 2024年5月9日 14:33
> 收件人: gaoliming ; devel@edk2.groups.io
> 抄送: Srinivasan Mani ; Sundaresan S
> ; michael.d.kin...@intel.com;
> zhiguang@intel.com; Felix Polyudov ; Rabisha R
> 
> 主题: Re: [edk2-devel] 回复: [PATCH v4 1/1] MdePkg: Added new SPCR table
> Revision 4 structure
>
> Hi Liming,
>   Pull request is done and pipelines are built successfully and
> the patch is ready to push to the master.
>
> Thanks,
> Praveen Sankar
>
> -Original Message-
> From: gaoliming 
> Sent: Monday, May 6, 2024 7:53 AM
> To: Praveen Sankar N ; devel@edk2.groups.io
> Cc: Srinivasan Mani ; Sundaresan S
> ; michael.d.kin...@intel.com;
> zhiguang@intel.com; Felix Polyudov ; Rabisha R
> 
> Subject: [EXTERNAL] 回复: [PATCH v4 1/1] MdePkg: Added new SPCR table
> Revision 4 structure
>
>
> **CAUTION: The e-mail below is from an external source. Please
> exercise caution before opening attachments, clicking links, or
> following guidance.**
>
> Reviewed-by: Liming Gao 
>
> > -邮件原件-
> > 发件人: Praveen Sankar N 
> > 发送时间: 2024年5月2日 19:16
> > 收件人: devel@edk2.groups.io
> > 抄送: gaolim...@byosoft.com.cn; Srinivasan Mani ;
> > Sundaresan S ; michael.d.kin...@intel.com;
> > zhiguang@intel.com; Felix Polyudov ; Rabisha R
> > 
> > 主题: [PATCH v4 1/1] MdePkg: Added new SPCR table Revision 4 structure
> >
> > In SPCR table, 4 structure members have been added newly as per SPCR
> > table Revision 4, which has to be added in
> > MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h.
> >
> > Signed-off-by: Praveen Sankar N praveensank...@ami.com
> >
> > Cc: michael.d.kin...@intel.com
> >
> > Cc: gaolim...@byosoft.com.cn
> >
> > Cc: zhiguang@intel.com
> >
> > Cc: fel...@ami.com
> >
> > Cc: srinivas...@ami.com
> >
> > Cc: sundares...@ami.com
> >
> > Cc: rabis...@ami.com
> > ---
> >  .../SerialPortConsoleRedirectionTable.h   | 32 +++
> >  1 file changed, 32 insertions(+)
> >
> > diff --git
> > a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.
> > h
> > b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.
> > h
> > index eb5ae28390..bf967880ab 100644
> > ---
> > a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.
> > h
> > +++
> > b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.
> > h
> > @@ -23,6 +23,7 @@
> >  ///
> >
> >  #define
> > EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION  0x02
> >
> >
> >
> > +#define
> > EFI_ACPI_4_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION
> > 0x04
> >
> >  ///
> >
> >  /// Serial Port Console Redirection Table Format
> >
> >  ///
> >
> > @@ -50,6 +51,37 @@ typedef struct {
> >UINT32Reserved3;
> >
> >  } EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE;
> >
> >
> >
> > +///
> >
> > +/// Serial Port Console Redirection Table Format Revision 4
> >
> > +///
> >
> > +typedef struct {
> >
> > +  EFI_ACPI_DESCRIPTION_HEADER   Header;
> >
> > +  UINT8 InterfaceType;
> >
> > +  UINT8 Reserved1[3];
> >
> > +  EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTUREBaseAddress;
> >
> > +  UINT8 InterruptType;
> >
> > +  UINT8 Irq;
> >
> > +  UINT32
> > GlobalSystemInterrupt;
> >
> > +  UINT8 BaudRate;
> >
> > +  UINT8 Parity;
> >
> > +  UINT8 StopBits;
> >
> > +  UINT8 FlowControl;
> >
> > +  UINT8 TerminalType;
> >
> > +  UINT8 Reserved2;
> >
> > +  UINT16PciDeviceId;
> >
> > +  UINT16PciVendorId;
> >
> > +  UINT8 PciBusNumber;
> >
> > +  UINT8 PciDeviceNumber;
> >
> > +  UINT8 PciFunctionNumber;
> >
> > +  UINT32PciFlags;
> >
> > +  UINT8 PciSegment;
> >
> > +  UINT32UartClockFrequency;
> >
> > +  UINT32

Re: [edk2-devel] [PATCH V1] MdePkg: Update GetImage , GetImageInfo description details

2024-05-13 Thread Pethaiyan, Madhan
Hi all ,

I had created EDK2 PR, few weeks ago, thought it will be reviewed and approved 
. Please help to check and approve. 

https://github.com/tianocore/edk2/pull/5584
https://github.com/tianocore/edk2/pull/5586
https://github.com/tianocore/edk2/pull/5587

Thanks,
P. Madhan

-Original Message-
From: gaoliming  
Sent: Thursday, March 28, 2024 6:41 AM
To: Pethaiyan, Madhan ; Kinney, Michael D 
; devel@edk2.groups.io
Cc: Liu, Zhiguang ; Li, Yi1 ; 'GuoX 
Xu' 
Subject: 回复: [edk2-devel] [PATCH V1] MdePkg: Update GetImage , GetImageInfo 
description details

Madhan:
  I have no comments for this patch set. Reviewed-by: Liming Gao 

  
  Have you create Edk2 PR to verify the changes?

Thanks
Liming
> -邮件原件-
> 发件人: Pethaiyan, Madhan 
> 发送时间: 2024年3月14日 16:17
> 收件人: Kinney, Michael D ; 
> devel@edk2.groups.io
> 抄送: Liming Gao ; Liu, Zhiguang 
> ; Li, Yi1 ; GuoX Xu 
> 
> 主题: RE: [edk2-devel] [PATCH V1] MdePkg: Update GetImage , GetImageInfo 
> description details
> 
> Hi Mike ,
> 
> I had raised new code review addressing the coding standard errors and
those
> were not part of my change any way ..
> 
> Thanks,
> P. Madhan
> 
> -Original Message-
> From: Kinney, Michael D 
> Sent: Sunday, March 10, 2024 1:47 AM
> To: devel@edk2.groups.io; Pethaiyan, Madhan 
> 
> Cc: Liming Gao ; Liu, Zhiguang 
> ; Li, Yi1 ; GuoX Xu 
> ; Kinney, Michael D 
> Subject: RE: [edk2-devel] [PATCH V1] MdePkg: Update GetImage , 
> GetImageInfo description details
> 
> Hi Madhan,
> 
> I created a PR with all 3 related patches to run through EDK II CI.
> 
> https://github.com/tianocore/edk2/pull/5453
> 
> There are CI failures.  Please resolve and send updated patches.
> 
> Thanks,
> 
> Mike
> 
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of 
> > Pethaiyan Madhan
> > Sent: Friday, March 8, 2024 3:17 PM
> > To: devel@edk2.groups.io
> > Cc: Pethaiyan, Madhan ; Kinney, Michael 
> > D ; Liming Gao 
> > ; Liu, Zhiguang ; 
> > Li, Yi1 ; GuoX Xu 
> > Subject: [edk2-devel] [PATCH V1] MdePkg: Update GetImage , 
> > GetImageInfo description details
> >
> > 1.For EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage():
> > Add the following sentence at the end of the Image parameter 
> > description. "May be NULL with a zero ImageSize in order to 
> > determine the size of the buffer needed".
> >
> > Modify the description of "EFI_INVALID_PARAMETER" return code as 
> > "The ImageSize is not too small and Image is NULL."
> >
> > 2.For EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImageInfo():
> > Add the following sentence at the end of the ImageInfo parameter 
> > description."May be NULL with a zero ImageInfoSize in order to 
> > determine the size of the buffer needed".
> >
> > Modify the description of "EFI_INVALID_PARAMETER" return code as 
> > "The ImageInfoSize is not too small and Image is NULL." and add new 
> > descriptions for "EFI_INVALID_PARAMETER" return code.
> >
> >  REF: UEFI spec v2.10 23.1.2
> >  REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4660
> >
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> > Cc: Zhiguang Liu 
> > Cc: Yi Li 
> > Cc: GuoX Xu 
> > Signed-off-by: Pethaiyan Madhan 
> > ---
> >  MdePkg/Include/Protocol/FirmwareManagement.h | 14 --
> >  1 file changed, 12 insertions(+), 2 deletions(-)
> >
> > diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h
> > b/MdePkg/Include/Protocol/FirmwareManagement.h
> > index e535bb697d..90b7d83c8f 100644
> > --- a/MdePkg/Include/Protocol/FirmwareManagement.h
> > +++ b/MdePkg/Include/Protocol/FirmwareManagement.h
> > @@ -294,6 +294,8 @@ EFI_STATUS
> >   to contain the image(s) 
> > information if the buffer was too small.
> >@param[in, out] ImageInfo  A pointer to the buffer in which
> > firmware places the current image(s)
> >   information. The
> information is
> > an array of EFI_FIRMWARE_IMAGE_DESCRIPTORs.
> > + May be NULL with a zero
> > ImageInfoSize in order to determine the size of the
> > + buffer needed.
> >@param[out] DescriptorVersion  A pointer to the location in
> > which firmware returns the version number
> >   associated with the 
> > EFI_FIRMWARE_IMAGE_DESCRIPTOR.
> >@param[out] DescriptorCountA pointer to the location in
> > which firmware returns the number of @@ -314,7 +316,12 @@ EFI_STATUS
> >@retval EFI_SUCCESSThe device was successfully
> > updated with the new image.
> >@retval EFI_BUFFER_TOO_SMALL   The ImageInfo buffer was
> too
> > small. The current buffer size
> >   needed to hold the image(s) 
> > information is returned in ImageInfoSize.
> > -  @retval EFI_INVALID_PARAMETER  ImageInfoSize is NULL.
> > +  @retval EFI_INVALID_PARAMETER  ImageInfoSize is not too small
> > and ImageInfo is NULL.
> > +  @retval 

Re: [edk2-devel] [PATCH v2 08/13] NetworkPkg:: SECURITY PATCH CVE-2023-45237

2024-05-13 Thread Ard Biesheuvel
Could we please include

gEfiRngAlgorithmArmRndr

in the list of accepted RNG protocols?

The ARM architecture reference mandates the use of a DRBG that
complies with NIST SP800-90A Rev 1 to produce the random output
emitted by RNDR/RNDRRS, and so it matches the requirement imposed by
this change.



On Thu, 9 May 2024 at 07:57, Doug Flick via groups.io
 wrote:
>
> From: Doug Flick 
>
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4542
>
> Bug Overview:
> PixieFail Bug #9
> CVE-2023-45237
> CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
> CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
>
> Use of a Weak PseudoRandom Number Generator
>
> Change Overview:
>
> Updates all Instances of NET_RANDOM (NetRandomInitSeed ()) to either
>
> >
> > EFI_STATUS
> > EFIAPI
> > PseudoRandomU32 (
> >  OUT UINT32  *Output
> >  );
> >
>
> or (depending on the use case)
>
> >
> > EFI_STATUS
> > EFIAPI
> > PseudoRandom (
> >  OUT  VOID   *Output,
> >  IN   UINTN  OutputLength
> >  );
> >
>
> This is because the use of
>
> Example:
>
> The following code snippet PseudoRandomU32 () function is used:
>
> >
> > UINT32 Random;
> >
> > Status = PseudoRandomU32 ();
> > if (EFI_ERROR (Status)) {
> >   DEBUG ((DEBUG_ERROR, "%a failed to generate random number: %r\n",
> __func__, Status));
> >   return Status;
> > }
> >
>
> This also introduces a new PCD to enable/disable the use of the
> secure implementation of algorithms for PseudoRandom () and
> instead depend on the default implementation. This may be required for
> some platforms where the UEFI Spec defined algorithms are not available.
>
> >
> > PcdEnforceSecureRngAlgorithms
> >
>
> If the platform does not have any one of the UEFI defined
> secure RNG algorithms then the driver will assert.
>
> Cc: Saloni Kasbekar 
> Cc: Zachary Clark-williams 
>
> Signed-off-by: Doug Flick [MSFT] 
> ---
>  NetworkPkg/NetworkPkg.dec  |   7 ++
>  NetworkPkg/Library/DxeNetLib/DxeNetLib.inf |  13 +-
>  NetworkPkg/TcpDxe/TcpDxe.inf   |   3 +
>  NetworkPkg/IScsiDxe/IScsiMisc.h|   6 +-
>  NetworkPkg/Include/Library/NetLib.h|  40 --
>  NetworkPkg/Ip6Dxe/Ip6Nd.h  |   8 +-
>  NetworkPkg/Dhcp4Dxe/Dhcp4Driver.c  |  10 +-
>  NetworkPkg/Dhcp6Dxe/Dhcp6Driver.c  |  11 +-
>  NetworkPkg/DnsDxe/DnsDhcp.c|  10 +-
>  NetworkPkg/DnsDxe/DnsImpl.c|  11 +-
>  NetworkPkg/HttpBootDxe/HttpBootDhcp6.c |  10 +-
>  NetworkPkg/IScsiDxe/IScsiCHAP.c|  19 ++-
>  NetworkPkg/IScsiDxe/IScsiMisc.c|  14 +--
>  NetworkPkg/Ip4Dxe/Ip4Driver.c  |  10 +-
>  NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c  |   9 +-
>  NetworkPkg/Ip6Dxe/Ip6Driver.c  |  17 ++-
>  NetworkPkg/Ip6Dxe/Ip6If.c  |  12 +-
>  NetworkPkg/Ip6Dxe/Ip6Mld.c |  12 +-
>  NetworkPkg/Ip6Dxe/Ip6Nd.c  |  33 -
>  NetworkPkg/Library/DxeNetLib/DxeNetLib.c   | 129 +---
>  NetworkPkg/TcpDxe/TcpDriver.c  |  15 ++-
>  NetworkPkg/Udp4Dxe/Udp4Driver.c|  10 +-
>  NetworkPkg/Udp6Dxe/Udp6Driver.c|  11 +-
>  NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.c   |   9 +-
>  NetworkPkg/UefiPxeBcDxe/PxeBcDhcp6.c   |  11 +-
>  NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c  |  12 +-
>  NetworkPkg/SecurityFixes.yaml  |  39 ++
>  27 files changed, 408 insertions(+), 83 deletions(-)
>
> diff --git a/NetworkPkg/NetworkPkg.dec b/NetworkPkg/NetworkPkg.dec
> index e06f35e7747c..7c4289b77b21 100644
> --- a/NetworkPkg/NetworkPkg.dec
> +++ b/NetworkPkg/NetworkPkg.dec
> @@ -5,6 +5,7 @@
>  #
>  # Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.
>  # (C) Copyright 2015-2020 Hewlett Packard Enterprise Development LP
> +# Copyright (c) Microsoft Corporation
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -130,6 +131,12 @@ [PcdsFixedAtBuild, PcdsPatchableInModule]
># @Prompt Indicates whether SnpDxe creates event for ExitBootServices() 
> call.
>
> gEfiNetworkPkgTokenSpaceGuid.PcdSnpCreateExitBootServicesEvent|TRUE|BOOLEAN|0x100C
>
> +  ## Enforces the use of Secure UEFI spec defined RNG algorithms for all 
> network connections.
> +  # TRUE  - Enforce the use of Secure UEFI spec defined RNG algorithms.
> +  # FALSE - Do not enforce and depend on the default implementation of RNG 
> algorithm from the provider.
> +  # @Prompt Enforce the use of Secure UEFI spec defined RNG algorithms.
> +  
> gEfiNetworkPkgTokenSpaceGuid.PcdEnforceSecureRngAlgorithms|TRUE|BOOLEAN|0x100D
> +
>  [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
>## IPv6 DHCP Unique Identifier (DUID) Type configuration (From RFCs 3315 
> and 6355).
># 01 = DUID Based on Link-layer Address Plus Time [DUID-LLT]
> diff --git a/NetworkPkg/Library/DxeNetLib/DxeNetLib.inf 
> b/NetworkPkg/Library/DxeNetLib/DxeNetLib.inf
> index 8145d256ec10..236ccd362efe 100644
> --- 

回复: [edk2-devel] [PATCH V1] MdePkg: Update GetImage , GetImageInfo description details

2024-05-13 Thread gaoliming via groups.io
These PRs are all failure. Please update them. 

Thanks
Liming
> -邮件原件-
> 发件人: Pethaiyan, Madhan 
> 发送时间: 2024年5月13日 20:10
> 收件人: gaoliming ; Kinney, Michael D
> ; devel@edk2.groups.io
> 抄送: Liu, Zhiguang ; Li, Yi1 ; 'GuoX
> Xu' 
> 主题: RE: [edk2-devel] [PATCH V1] MdePkg: Update GetImage , GetImageInfo
> description details
> 
> Hi all ,
> 
> I had created EDK2 PR, few weeks ago, thought it will be reviewed and 
> approved .
> Please help to check and approve.
> 
> https://github.com/tianocore/edk2/pull/5584
> https://github.com/tianocore/edk2/pull/5586
> https://github.com/tianocore/edk2/pull/5587
> 
> Thanks,
> P. Madhan
> 
> -Original Message-
> From: gaoliming 
> Sent: Thursday, March 28, 2024 6:41 AM
> To: Pethaiyan, Madhan ; Kinney, Michael D
> ; devel@edk2.groups.io
> Cc: Liu, Zhiguang ; Li, Yi1 ; 'GuoX 
> Xu'
> 
> Subject: 回复: [edk2-devel] [PATCH V1] MdePkg: Update GetImage ,
> GetImageInfo description details
> 
> Madhan:
>   I have no comments for this patch set. Reviewed-by: Liming Gao
> 
> 
>   Have you create Edk2 PR to verify the changes?
> 
> Thanks
> Liming
> > -邮件原件-
> > 发件人: Pethaiyan, Madhan 
> > 发送时间: 2024年3月14日 16:17
> > 收件人: Kinney, Michael D ;
> > devel@edk2.groups.io
> > 抄送: Liming Gao ; Liu, Zhiguang
> > ; Li, Yi1 ; GuoX Xu
> > 
> > 主题: RE: [edk2-devel] [PATCH V1] MdePkg: Update GetImage , GetImageInfo
> > description details
> >
> > Hi Mike ,
> >
> > I had raised new code review addressing the coding standard errors and
> those
> > were not part of my change any way ..
> >
> > Thanks,
> > P. Madhan
> >
> > -Original Message-
> > From: Kinney, Michael D 
> > Sent: Sunday, March 10, 2024 1:47 AM
> > To: devel@edk2.groups.io; Pethaiyan, Madhan
> > 
> > Cc: Liming Gao ; Liu, Zhiguang
> > ; Li, Yi1 ; GuoX Xu
> > ; Kinney, Michael D 
> > Subject: RE: [edk2-devel] [PATCH V1] MdePkg: Update GetImage ,
> > GetImageInfo description details
> >
> > Hi Madhan,
> >
> > I created a PR with all 3 related patches to run through EDK II CI.
> >
> > https://github.com/tianocore/edk2/pull/5453
> >
> > There are CI failures.  Please resolve and send updated patches.
> >
> > Thanks,
> >
> > Mike
> >
> > > -Original Message-
> > > From: devel@edk2.groups.io  On Behalf Of
> > > Pethaiyan Madhan
> > > Sent: Friday, March 8, 2024 3:17 PM
> > > To: devel@edk2.groups.io
> > > Cc: Pethaiyan, Madhan ; Kinney, Michael
> > > D ; Liming Gao
> > > ; Liu, Zhiguang ;
> > > Li, Yi1 ; GuoX Xu 
> > > Subject: [edk2-devel] [PATCH V1] MdePkg: Update GetImage ,
> > > GetImageInfo description details
> > >
> > > 1.For EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage():
> > > Add the following sentence at the end of the Image parameter
> > > description. "May be NULL with a zero ImageSize in order to
> > > determine the size of the buffer needed".
> > >
> > > Modify the description of "EFI_INVALID_PARAMETER" return code as
> > > "The ImageSize is not too small and Image is NULL."
> > >
> > > 2.For EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImageInfo():
> > > Add the following sentence at the end of the ImageInfo parameter
> > > description."May be NULL with a zero ImageInfoSize in order to
> > > determine the size of the buffer needed".
> > >
> > > Modify the description of "EFI_INVALID_PARAMETER" return code as
> > > "The ImageInfoSize is not too small and Image is NULL." and add new
> > > descriptions for "EFI_INVALID_PARAMETER" return code.
> > >
> > >  REF: UEFI spec v2.10 23.1.2
> > >  REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4660
> > >
> > > Cc: Michael D Kinney 
> > > Cc: Liming Gao 
> > > Cc: Zhiguang Liu 
> > > Cc: Yi Li 
> > > Cc: GuoX Xu 
> > > Signed-off-by: Pethaiyan Madhan 
> > > ---
> > >  MdePkg/Include/Protocol/FirmwareManagement.h | 14 --
> > >  1 file changed, 12 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h
> > > b/MdePkg/Include/Protocol/FirmwareManagement.h
> > > index e535bb697d..90b7d83c8f 100644
> > > --- a/MdePkg/Include/Protocol/FirmwareManagement.h
> > > +++ b/MdePkg/Include/Protocol/FirmwareManagement.h
> > > @@ -294,6 +294,8 @@ EFI_STATUS
> > >   to contain the image(s)
> > > information if the buffer was too small.
> > >@param[in, out] ImageInfo  A pointer to the buffer in which
> > > firmware places the current image(s)
> > >   information. The
> > information is
> > > an array of EFI_FIRMWARE_IMAGE_DESCRIPTORs.
> > > + May be NULL with a zero
> > > ImageInfoSize in order to determine the size of the
> > > + buffer needed.
> > >@param[out] DescriptorVersion  A pointer to the location in
> > > which firmware returns the version number
> > >   associated with the
> > > EFI_FIRMWARE_IMAGE_DESCRIPTOR.
> > >@param[out] DescriptorCountA pointer to the location in
> > > which firmware 

Re: [edk2-devel] [PATCH 10/18] UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLib

2024-05-13 Thread Gerd Hoffmann
  Hi,

> +  if (sizeof (UINTN) == sizeof (UINT64)) {
> +//
> +// Check Page5Level Support or not.
> +//
> +Cr4.UintN = AsmReadCr4 ();
> +Page5LevelSupport = (Cr4.Bits.LA57 ? TRUE : FALSE);
> +
> +//
> +// Check Page1G Support or not.
> +//
> +Page1GSupport = FALSE;
> +AsmCpuid (CPUID_EXTENDED_FUNCTION, , NULL, NULL, NULL);
> +if (RegEax >= CPUID_EXTENDED_CPU_SIG) {
> +  AsmCpuid (CPUID_EXTENDED_CPU_SIG, NULL, NULL, NULL, );
> +  if (RegEdx.Bits.Page1GB != 0) {
> +Page1GSupport = TRUE;
> +  }
> +}
> +
> +//
> +// Decide Paging Mode according Page5LevelSupport & Page1GSupport.
> +//
> +if (Page5LevelSupport) {
> +  PagingMode = Page1GSupport ? Paging5Level1GB : Paging5Level;
> +} else {
> +  PagingMode = Page1GSupport ? Paging4Level1GB : Paging4Level;
> +}
> +  } else {
> +PagingMode = PagingPae;
> +  }

I'm wondering whenever CpuPageTableLib should get a function for this?
I suspect there a multiple places in edk2 which will need this
functionality ...

take care,
  Gerd



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




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

2024-05-13 Thread Gerd Hoffmann
On Sat, May 11, 2024 at 10:40:23AM GMT, Ard Biesheuvel wrote:
> As I pointed out before, on the ARM side there are a few intersecting
> issues with these changes. (On x86, this is mostly avoided due to the
> fact that RDRAND is universally supported)

Well, it's not that easy on x86 either.

Current state of affairs is that the time based LibRng is used, all
OvmfPkg / ArmVirtPkg have this:

  RngLib|MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf

So, this is what will be used if something uses LibRng.

On x64 RngDxe will just use call LibRng too.  So adding RngDxe will
effectively make BaseRngLibTimerLib available via EFI_RNG_PROTOCOL.

In case '-device virtio-rng-pci' is present we now have *two* drivers
providing EFI_RNG_PROTOCOL.  What will happen in this case?  What we
surely not want is RngDxe being used in case we have a virtio-rng
device ...

take care,
  Gerd



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




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

2024-05-13 Thread Nhi Pham via groups.io

On 2/9/2024 11:37 PM, Chang, Abner via groups.io wrote:

[AMD Official Use Only - General]

Yeah, I forget this patch set and seems we don't have any follow up 
conversation after below feedbacks from community.

https://edk2.groups.io/g/devel/message/103116
https://edk2.groups.io/g/devel/message/103087

So Nickle, does NV still has the plan to upstream IPMI blob edk2 
implementation? We should keep driving upstream the implementation as industry 
needs it to incorporate with OpenBMC.

Hi Rebessa,
As we are on Chinese New Year holidays now, please expect the delay response.
Thanks
Abner



Hi Nickle and Abner,

May I know the status of upstreaming the IPMI Blob Transfer Protocol? 
I'm planning to upstream the SMBIOS transfer to OpenBMC by leveraging 
this protocol.


Thanks,
Nhi


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




Re: [edk2-devel] [PATCH] OvmfPkg: Update VMM Hob list check to support new resource attributes

2024-05-13 Thread Gerd Hoffmann
On Thu, May 09, 2024 at 01:27:07PM GMT, Du Lin wrote:
> Encrypted and Special Purpose resource attributes are introduced in
> PI 1.8 Specification. This patch is to update VMM Hob list integrity
> check to recognise these resource attributes.
> 
> Cc: Ard Biesheuvel 
> Cc: Gerd Hoffmann 
> Cc: Jiewen Yao 
> Signed-off-by: Du Lin 

> +
> EFI_RESOURCE_ATTRIBUTE_ENCRYPTED|
> +
> EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE |

Acked-by: Gerd Hoffmann 

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118859): https://edk2.groups.io/g/devel/message/118859
Mute This Topic: https://groups.io/mt/105996363/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 0/4] Add EINJ table parser.

2024-05-13 Thread PierreGondois

Hello,
For the whole patch-set:
Reviewed-by: Pierre Gondois 

Thanks,
Pierre

On 5/10/24 14:22, levi.yun wrote:

Add Error Injection Table (EINJ) parser for AcpiView and
add some missing Error Injection Action definitions in each Acpi*
headers.

The changes can be seen at:
 https://github.com/LeviYeoReum/edk2/tree/levi/3075_einj_table_v1


levi.yun (4):
   MdePkg/Include/IndustryStandard: Update SET_ERROR_TYPE_WITH_ADDRESS
 Error Injection Actions
   MdePkg/Include/IndustryStandard: Update GET_EXECUTE_OPERATION_TIMINGS
 Error Injection Actions
   MdePkg/Include/IndustryStandard: Update EINJ information according to
 ACPI 6.5
   ShellPkg/Acpiview: Add EINJ Parser

  ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.inf 
|   1 +
  MdePkg/Include/IndustryStandard/Acpi51.h 
|   1 +
  MdePkg/Include/IndustryStandard/Acpi60.h 
|   1 +
  MdePkg/Include/IndustryStandard/Acpi61.h 
|   2 +
  MdePkg/Include/IndustryStandard/Acpi62.h 
|   2 +
  MdePkg/Include/IndustryStandard/Acpi63.h 
|   2 +
  MdePkg/Include/IndustryStandard/Acpi64.h 
|   2 +
  MdePkg/Include/IndustryStandard/Acpi65.h 
|   6 +-
  ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h
|  21 ++
  ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Einj/EinjParser.c   
| 358 
  ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c   
|   1 +
  11 files changed, 396 insertions(+), 1 deletion(-)
  create mode 100644 
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Einj/EinjParser.c

--
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")




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




Re: [edk2-devel] [PATCH 00/19] Remove some S3 related code in CpuS3.c of smm cpu driver

2024-05-13 Thread Ni, Ray
Good suggestions, Jiaxin!


Thanks,
Ray


From: Tan, Dun 
Sent: Monday, May 13, 2024 11:37
To: Wu, Jiaxin ; devel@edk2.groups.io 
; Ni, Ray 
Subject: RE: [edk2-devel] [PATCH 00/19] Remove some S3 related code in CpuS3.c 
of smm cpu driver

Thanks for the comments. Agree that the order adjustment can make the patch set 
clearer. Will modify the commits in next version patch set.

Thanks,
Dun

-Original Message-
From: Wu, Jiaxin 
Sent: Monday, May 13, 2024 10:49 AM
To: devel@edk2.groups.io; Tan, Dun ; Ni, Ray 

Subject: RE: [edk2-devel] [PATCH 00/19] Remove some S3 related code in CpuS3.c 
of smm cpu driver

My comments as below:
1. I stronger recommend re-ordering the patches as below so as to combine all 
related sub-patches together, then we can more easy understand what we are 
target to resolving: 1) S3 MTRRs operation 2) AP page table unavailiable issue 
fix. 3)  S3 ApHltLoopCode Operation 3) Register table cleanup

1) S3 MTRRs operation:
>   MdeModulePkg: Add gEdkiiS3MtrrSettingGuid
>   OvmfPkg: Save MTRR by lockbox in CpuS3DataDxe
>   UefiCpuPkg: Add locbox lib instance in DSC
>   UefiCpuPkg: Save MTRR by lockbox in CpuS3DataDxe
>   UefiCpuPkg: LoadMtrrData for all cpu in S3Resume
>   UefiCpuPkg: Remove code to load mtrr setting

2) AP page table unavailiable issue fix:
>   UefiCpuPkg: Disable PG in IA32 ApLoopCode

3)  S3 ApHltLoopCode Operation:
>   UefiCpuPkg:Abstract some DxeMpLib code to function
>   UefiCpuPkg:Move some code in DxeMpLib to common place
>   UefiCpuPkg: Install gEdkiiEndOfS3ResumeGuid in S3Resume
>   UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLib
>   UefiCpuPkg:Remove code to handle APIC setting and Interrupt
>   UefiCpuPkg:Rremove code to wakeup AP and relocate ap
>   UefiCpuPkg: Remove the duplicated mpservice locate
>   MdeModulePkg: remove MpService2Ppi field in SMM_S3_RESUME_STATE

4) Register table cleanup:
>   UefiCpuPkg:Set PcdCpuFeaturesInitOnS3Resume to TRUE
>   UefiCpuPkg: Remove code to set register table
>   UefiCpuPkg: Remove GetAcpiCpuData() in CpuS3.c

2. Update all intel copyright year.
3. Add all reviewer in the 00 patch.
4. Add PR in the 00 patch (if have).


Thanks,
Jiaxin


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of duntan
> Sent: Friday, May 10, 2024 6:08 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH 00/19] Remove some S3 related code in
> CpuS3.c of smm cpu driver
>
> This patch set is to remove some S3 related code in CpuS3.c of smm cpu
> driver. It contain commits to:
> 1.Save MTRR setting by lockbox in PEI phase 2.Load MTRR in S3Resume.c
> before transferring to CpuS3.c in smm cpu driver.
> 3.Add callback of gEdkiiEndOfS3ResumeGuid in PeiMpLib to relocate Ap
> to new safe buffer.
> 4.Install gEdkiiEndOfS3ResumeGuid in S3Resume.c before booting OS to
> relocate APs 4.Change PcdCpuFeaturesInitOnS3Resume to TRUE to set
> register table in CpuFeaturesPei 5.Remove code to set register
> table/load mtrr/wakeup AP and relocate ap in CpuS3.c.
>
> With this patch set, CpuS3.c in smm CPU driver can be simplified.
>
> Dun Tan (18):
>   MdeModulePkg: Add gEdkiiS3MtrrSettingGuid
>   OvmfPkg: Save MTRR by lockbox in CpuS3DataDxe
>   UefiCpuPkg: Add locbox lib instance in DSC
>   UefiCpuPkg: Save MTRR by lockbox in CpuS3DataDxe
>   UefiCpuPkg: LoadMtrrData for all cpu in S3Resume
>   UefiCpuPkg: Remove the duplicated mpservice locate
>   UefiCpuPkg: Install gEdkiiEndOfS3ResumeGuid in S3Resume
>   UefiCpuPkg:Abstract some DxeMpLib code to function
>   UefiCpuPkg:Move some code in DxeMpLib to common place
>   UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLib
>   UefiCpuPkg: Disable PG in IA32 ApLoopCode
>   UefiCpuPkg: Remove code to load mtrr setting
>   UefiCpuPkg:Set PcdCpuFeaturesInitOnS3Resume to TRUE
>   UefiCpuPkg: Remove code to set register table
>   UefiCpuPkg:Remove code to handle APIC setting and Interrupt
>   UefiCpuPkg:Rremove code to wakeup AP and relocate ap
>   UefiCpuPkg: Remove GetAcpiCpuData() in CpuS3.c
>   MdeModulePkg: remove MpService2Ppi field in SMM_S3_RESUME_STATE
>
> Ray Ni (1):
>   MdePkg: Add MmUnblockMemoryLib to MdeLibs.dsc
>
>  MdeModulePkg/Include/Guid/AcpiS3Context.h   |   1 -
>  MdeModulePkg/MdeModulePkg.dec   |   3 +++
>  MdePkg/MdeLibs.dsc.inc  |   3 ++-
>  OvmfPkg/CpuS3DataDxe/CpuS3Data.c|  11 +++
>  OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf   |   2 ++
>  UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c |  11 +++
>  UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf|   2 ++
>  UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 181
> +++---
> --
> 
> ---
>  UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm  |   4 
>