Re: [edk2-devel] [PATCH 19/24] ShellPkg: Remove duplicated words

2022-08-23 Thread Gao, Zhichao
Reviewed-by: Zhichao Gao 

Thanks,
Zhichao

> -Original Message-
> From: pierre.gond...@arm.com 
> Sent: Wednesday, August 24, 2022 12:00 AM
> To: devel@edk2.groups.io
> Cc: Pierre Gondois ; Ni, Ray ;
> Gao, Zhichao 
> Subject: [PATCH 19/24] ShellPkg: Remove duplicated words
> 
> From: Pierre Gondois 
> 
> In an effort to clean the documentation of the above package, remove
> duplicated words.
> 
> Cc: Ray Ni 
> Cc: Zhichao Gao 
> Signed-off-by: Pierre Gondois 
> ---
>  ShellPkg/Include/Library/ShellCommandLib.h| 2 +-
>  ShellPkg/Include/Library/ShellLib.h   | 4 ++--
>  ShellPkg/Include/Protocol/EfiShellEnvironment2.h  | 2 +-
>  .../Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c | 2 +-
>  ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c| 2 +-
>  .../UefiShellDriver1CommandsLib.uni   | 2 +-
>  ShellPkg/Library/UefiShellLevel2CommandsLib/Load.c| 2 +-
>  ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c | 2 +-
>  ShellPkg/Library/UefiShellLib/UefiShellLib.c  | 4 ++--
>  9 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/ShellPkg/Include/Library/ShellCommandLib.h
> b/ShellPkg/Include/Library/ShellCommandLib.h
> index 7a97b203f1ff..de7db40a1525 100644
> --- a/ShellPkg/Include/Library/ShellCommandLib.h
> +++ b/ShellPkg/Include/Library/ShellCommandLib.h
> @@ -87,7 +87,7 @@ SHELL_STATUS
>If the ShellSupportLevel is greater than the value of
>PcdShellSupportLevel, then return RETURN_UNSUPPORTED.
> 
> -  Registers the the handlers specified by GetHelpInfoHandler and
> CommandHandler
> +  Registers the handlers specified by GetHelpInfoHandler and
> + CommandHandler
>with the command specified by CommandString. If the command named by
>CommandString has already been registered, then return
>RETURN_ALREADY_STARTED.
> diff --git a/ShellPkg/Include/Library/ShellLib.h
> b/ShellPkg/Include/Library/ShellLib.h
> index 10cf7f4fefe0..cd0c3bccc89f 100644
> --- a/ShellPkg/Include/Library/ShellLib.h
> +++ b/ShellPkg/Include/Library/ShellLib.h
> @@ -1354,9 +1354,9 @@ ShellFileHandleReturnLine (
>@param[in, out]  BufferThe pointer to buffer to read into.
>@param[in, out]  Size  The pointer to number of bytes in Buffer.
>@param[in]   Truncate  If the buffer is large enough, this has no 
> effect.
> - If the buffer is is too small and Truncate 
> is TRUE,
> + If the buffer is too small and
> + Truncate is TRUE,
>   the line will be truncated.
> - If the buffer is is too small and Truncate 
> is FALSE,
> + If the buffer is too small and
> + Truncate is FALSE,
>   then no read will occur.
> 
>@param[in, out]  Ascii Boolean value for indicating whether the 
> file is
> diff --git a/ShellPkg/Include/Protocol/EfiShellEnvironment2.h
> b/ShellPkg/Include/Protocol/EfiShellEnvironment2.h
> index 8b7c86dc24fc..59714c1b589b 100644
> --- a/ShellPkg/Include/Protocol/EfiShellEnvironment2.h
> +++ b/ShellPkg/Include/Protocol/EfiShellEnvironment2.h
> @@ -541,7 +541,7 @@ EFI_STATUS
>  /**
>This is an internal shell function to enumerate the handle database.
> 
> -  This function resets the the handle database so that NEXT_HANDLE and
> SKIP_HANDLE
> +  This function resets the handle database so that NEXT_HANDLE and
> + SKIP_HANDLE
>will start from EnumIndex on the next call.
> 
>This must be called after INIT_HANDLE_ENUMERATOR and before
> CLOSE_HANDLE_ENUMERATOR.
> diff --git
> a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> index 4a19794b9fe0..0f33d52a67cc 100644
> ---
> a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> +++
> b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> @@ -1252,7 +1252,7 @@ BcfgAddOpt (
>}
> 
>//
> -  // Shouldn't be possible to have have both. Neither is ok though.
> +  // Shouldn't be possible to have both. Neither is ok though.
>//
>ASSERT (FileName == NULL || Data == NULL);
> 
> diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
> b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
> index 36cf46fb2c38..75fa81f7e448 100644
> --- a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
> +++ b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
> @@ -119,7 +119,7 @@ CommandInit (
>}
> 
>//
> -  // Find the best matching matching language from the supported
> languages
> +  // Find the best matching language from the supported languages
>// of Unicode Collation2 protocol.
>//
>BestLanguage = GetBestLanguage (
> diff --git
> 

[edk2-devel] [PATCH v2] DynamicTablesPkg: AcpiSsdtPcieLibArm : Add UID to slot creation

2022-08-23 Thread Jeff Brasen via groups.io
Expose the UID value to GeneratePciSlots().

This is needed for some cases for example:

https://docs.microsoft.com/en-us/windows-hardware/drivers/pci/dsd-for-pcie-root-ports#identifying-externally-exposed-pcie-root-ports



Name (_DSD, Package () {

  ToUUID("EFCC06CC-73AC-4BC3-BFF0-76143807C389"),

  Package () {

Package (2) {"ExternalFacingPort", 1},

Package (2) {"UID", 0},

  }

})



Signed-off-by: Jeff Brasen 

---

 DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h | 8 +---

 .../Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c   | 5 -

 .../Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c| 8 +---

 3 files changed, 14 insertions(+), 7 deletions(-)



diff --git a/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h 
b/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h

index 85e283a994..4171dabc33 100644

--- a/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h

+++ b/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h

@@ -54,9 +54,10 @@ AddOscMethod (

   used. It should be possible to enumerate them, but this is additional

   information.

 

-  @param [in]   PciInfo Pci device information.

-  @param [in]  MappingTable The mapping table structure.

-  @param [in, out]  PciNode Pci node to amend.

+  @param [in]   PciInfo   Pci device information.

+  @param [in]   MappingTable  The mapping table structure.

+  @param [in]   Uid   Unique Id of the Pci device.

+  @param [in, out]  PciNode   Pci node to amend.

 

   @retval EFI_SUCCESSSuccess.

   @retval EFI_INVALID_PARAMETER  Invalid parameter.

@@ -67,6 +68,7 @@ EFIAPI

 GeneratePciSlots (

   IN  CONST CM_ARM_PCI_CONFIG_SPACE_INFO  *PciInfo,

   IN  CONST MAPPING_TABLE *MappingTable,

+  INUINT32Uid,

   IN  OUT   AML_OBJECT_NODE_HANDLEPciNode

   );

 

diff --git 
a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c 
b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c

index ceffe2838c..24e074ea90 100644

--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c

+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c

@@ -295,6 +295,7 @@ GeneratePciDeviceInfo (

   @param [in]   CfgMgrProtocol  Pointer to the Configuration Manager

 Protocol interface.

   @param [in]   PciInfo Pci device information.

+  @param [in]   Uid Unique Id of the Pci device.

   @param [in, out]  PciNode Pci node to amend.

 

   @retval EFI_SUCCESS The function completed successfully.

@@ -308,6 +309,7 @@ GeneratePrt (

   INACPI_PCI_GENERATOR*Generator,

   IN  CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL  *CONST  CfgMgrProtocol,

   IN  CONST CM_ARM_PCI_CONFIG_SPACE_INFO  *PciInfo,

+  INUINT32Uid,

   IN  OUT   AML_OBJECT_NODE_HANDLEPciNode

   )

 {

@@ -416,7 +418,7 @@ GeneratePrt (

   PrtNode = NULL;

 

   // Generate the Pci slots once all the device have been added.

-  Status = GeneratePciSlots (PciInfo, >DeviceTable, PciNode);

+  Status = GeneratePciSlots (PciInfo, >DeviceTable, Uid, PciNode);

   if (EFI_ERROR (Status)) {

 ASSERT (0);

 goto exit_handler;

@@ -687,6 +689,7 @@ GeneratePciDevice (

Generator,

CfgMgrProtocol,

PciInfo,

+   Uid,

PciNode

);

 if (EFI_ERROR (Status)) {

diff --git 
a/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c 
b/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c

index e5ab3a3ca8..b35fb6a7dd 100644

--- a/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c

+++ b/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c

@@ -41,9 +41,10 @@

   used. It should be possible to enumerate them, but this is additional

   information.

 

-  @param [in]   PciInfo Pci device information.

-  @param [in]  MappingTable The mapping table structure.

-  @param [in, out]  PciNode Pci node to amend.

+  @param [in]   PciInfo   Pci device information.

+  @param [in]   MappingTable  The mapping table structure.

+  @param [in]   Uid   Unique Id of the Pci device.

+  @param [in, out]  PciNode   Pci node to amend.

 

   @retval EFI_SUCCESSSuccess.

   @retval EFI_INVALID_PARAMETER  Invalid parameter.

@@ -54,6 +55,7 @@ EFIAPI

 GeneratePciSlots (

   IN  CONST CM_ARM_PCI_CONFIG_SPACE_INFO  *PciInfo,

   IN  CONST MAPPING_TABLE *MappingTable,

+  INUINT32Uid,

   IN  OUT   AML_OBJECT_NODE_HANDLEPciNode

   )

 {

-- 

2.25.1






Re: [edk2-devel][PATCH] Maintainers.txt: Update Maintainers/reviewers for universal payload

2022-08-23 Thread Ni, Ray
Reviewed-by: Ray Ni 

> -Original Message-
> From: Dong, Guo 
> Sent: Tuesday, August 23, 2022 8:06 AM
> To: devel@edk2.groups.io
> Cc: Dong, Guo ; Ni, Ray ; Kinney,
> Michael D ; Rhodes, Sean
> ; Lu, James ; Guo, Gua
> ; Liu, Zhiguang 
> Subject: [edk2-devel][PATCH] Maintainers.txt: Update
> Maintainers/reviewers for universal payload
> 
> From: Guo Dong 
> 
> Add James Lu as UefiPayloadPkg maintainer.
> Add Gua Guo as universal payload reviewer.
> 
> Signed-off-by: Guo Dong 
> Cc: Ray Ni 
> Cc: Michael D Kinney 
> Cc: Sean Rhodes 
> Cc: James Lu 
> Cc: Gua Guo 
> Cc: Zhiguang Liu 
> ---
>  Maintainers.txt | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index a0d8b69685..5f639bffab 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -407,6 +407,7 @@ MdeModulePkg: Universal Payload definitions
>  F: MdeModulePkg/Include/UniversalPayload/
> 
>  R: Zhiguang Liu  [LiuZhiguang001]
> 
>  R: Ray Ni  [niruiyu]
> 
> +R: Gua Guo  [gguo11837463]
> 
> 
> 
>  MdePkg
> 
>  F: MdePkg/
> 
> @@ -604,6 +605,8 @@ W:
> https://github.com/tianocore/tianocore.github.io/wiki/UefiPayloadPkg
>  M: Guo Dong  [gdong1]
> 
>  M: Ray Ni  [niruiyu]
> 
>  M: Sean Rhodes  [Sean-StarLabs]
> 
> +M: James Lu  [jameslu8]
> 
> +R: Gua Guo  [gguo11837463]
> 
>  S: Maintained
> 
> 
> 
>  UnitTestFrameworkPkg
> 
> --
> 2.35.1.windows.2



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




Re: [edk2-devel][PATCH] Maintainers.txt: Update Maintainers/reviewers for universal payload

2022-08-23 Thread Lu, James
Reviewed-by: James Lu 


Thanks,
James

-Original Message-
From: Guo, Gua  
Sent: Tuesday, August 23, 2022 8:45 AM
To: Dong, Guo ; devel@edk2.groups.io
Cc: Ni, Ray ; Kinney, Michael D ; 
Rhodes, Sean ; Lu, James ; Liu, 
Zhiguang 
Subject: RE: [edk2-devel][PATCH] Maintainers.txt: Update Maintainers/reviewers 
for universal payload

Reviewed-by: Gua Guo 

-Original Message-
From: Dong, Guo  
Sent: Tuesday, August 23, 2022 8:06 AM
To: devel@edk2.groups.io
Cc: Dong, Guo ; Ni, Ray ; Kinney, Michael 
D ; Rhodes, Sean ; Lu, James 
; Guo, Gua ; Liu, Zhiguang 

Subject: [edk2-devel][PATCH] Maintainers.txt: Update Maintainers/reviewers for 
universal payload

From: Guo Dong 

Add James Lu as UefiPayloadPkg maintainer.
Add Gua Guo as universal payload reviewer.

Signed-off-by: Guo Dong 
Cc: Ray Ni 
Cc: Michael D Kinney 
Cc: Sean Rhodes 
Cc: James Lu 
Cc: Gua Guo 
Cc: Zhiguang Liu 
---
 Maintainers.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Maintainers.txt b/Maintainers.txt index a0d8b69685..5f639bffab 
100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -407,6 +407,7 @@ MdeModulePkg: Universal Payload definitions
 F: MdeModulePkg/Include/UniversalPayload/ R: Zhiguang Liu 
 [LiuZhiguang001] R: Ray Ni  
[niruiyu]+R: Gua Guo  [gguo11837463]  MdePkg F: MdePkg/@@ 
-604,6 +605,8 @@ W: 
https://github.com/tianocore/tianocore.github.io/wiki/UefiPayloadPkg
 M: Guo Dong  [gdong1] M: Ray Ni  
[niruiyu] M: Sean Rhodes  [Sean-StarLabs]+M: James Lu 
 [jameslu8]+R: Gua Guo  [gguo11837463] 
S: Maintained  UnitTestFrameworkPkg--
2.35.1.windows.2



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




[edk2-devel] [PATCH v1 1/1] OvmfPkg/PlatformDxe: Check RouteConfig arguments for spec compliance

2022-08-23 Thread Yuan Yu via groups.io
Per UEFI Spec 2.9, EFI_HII_CONFIG_ROUTING_PROTOCOL.RouteConfig()
should return EFI_INVALID_PARAMETERS if caller passes in a NULL for
the Configuration parameter (see 35.4 EFI HII Configuration Routing
Protocol).

Add a check to return EFI_INVALID_PARAMETERS when Configuration is NULL.

Cc: Ard Biesheuvel 
Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Anthony Perard 
Cc: Julien Grall 

Signed-off-by: Yuan Yu 
---
 OvmfPkg/PlatformDxe/Platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/OvmfPkg/PlatformDxe/Platform.c b/OvmfPkg/PlatformDxe/Platform.c
index a6d459f3dfd7..83dcd2216c6d 100644
--- a/OvmfPkg/PlatformDxe/Platform.c
+++ b/OvmfPkg/PlatformDxe/Platform.c
@@ -344,7 +344,7 @@ RouteConfig (
 Configuration
 ));
 
-  if (Progress == NULL) {
+  if (Progress == NULL || Configuration == NULL) {
 return EFI_INVALID_PARAMETER;
   }
 
-- 
2.37.2.672.g94769d06f0-goog



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




[edk2-devel] [PATCH v1 0/1] Check arguments to be compliant with spec

2022-08-23 Thread Yuan Yu via groups.io
Some function doesn't have certain checks to be compliant with UEFI
specification.

This series adds a check to return EFI_INVALID_PARAMETER if certain
argument is NULL.

The changes can be seen at:
https://github.com/yyu/edk2/tree/return_value_fix_v1

Cc: Ard Biesheuvel 
Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Anthony Perard 
Cc: Julien Grall 

Yuan Yu (1):
  OvmfPkg/PlatformDxe: Check RouteConfig arguments for spec compliance

 OvmfPkg/PlatformDxe/Platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.37.2.672.g94769d06f0-goog



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92737): https://edk2.groups.io/g/devel/message/92737
Mute This Topic: https://groups.io/mt/93219655/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-resend 1/1] ShellPkg: Add revision check for DSDT Header on Arm

2022-08-23 Thread Gao, Zhichao
Hi Edward,

Sorry, I missed this patch. Please feel free to inform the 
maintainers/reviewers if the patch didn't get response for a long time.
The patch looks good to me.
Reviewed-by: Zhichao Gao 

Thanks,
Zhichao

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Edward
> Pickup
> Sent: Tuesday, August 23, 2022 5:44 PM
> To: devel@edk2.groups.io; Gao, Zhichao 
> Cc: Ni, Ray ; sami.muja...@arm.com; n...@arm.com
> Subject: Re: [edk2-devel] [PATCH v1-resend 1/1] ShellPkg: Add revision
> check for DSDT Header on Arm
> 
> Hi Zhichao,
> 
> Would it be possible to get some feedback on this patch?
> 
> Regards,
> 
> Edward
> 
> On 20/07/2022 09:59, Edward Pickup via groups.io wrote:
> > Bugzilla: 3995 (https://bugzilla.tianocore.org/show_bug.cgi?id=3995)
> >
> > ACPI 6.4 spec states that if the revision field in the DSDT header is
> > less than 2, then all integers are restricted in width to 32 bits,
> > including in SSDTs.
> >
> > Arm Base boot requirements state that platforms must conform to ACPI
> > 6.3 or later, and that legacy tables are not supported.
> >
> > Adds a check for this field and raise warning if revision is less than
> > 2 on arm.
> >
> > Signed-off-by: Edward Pickup 
> > ---
> >
> > The changes can be seen at
> >
> https://github.com/edpickup/edk2/tree/2073_add_DSDT_revision_check_v
> 1_
> > resend
> >
> > Notes:
> >  v1:
> >- Resending with rebase and bugzilla id
> >- No code changes since previous submit.
> >  Ref: https://edk2.groups.io/g/devel/message/89378
> >
> >
> ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dsdt/DsdtParser.c
> | 18 +-
> >   1 file changed, 17 insertions(+), 1 deletion(-)
> >
> > diff --git
> >
> a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dsdt/DsdtParser
> > .c
> >
> b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dsdt/DsdtParser
> > .c index
> >
> e75e4622239ed03b171adc92d32b5eeb75a8edef..7f30a8409bb711d4edf77ed0
> 4319
> > c628ef8aea73 100644
> > ---
> >
> a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dsdt/DsdtParser
> > .c
> > +++
> b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dsdt/DsdtPa
> > +++ rser.c
> > @@ -1,7 +1,7 @@
> >   /** @file
> >
> > DSDT table parser
> >
> >
> >
> > -  Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
> >
> > +  Copyright (c) 2016 - 2022, ARM Limited. All rights reserved.
> >
> > SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> >
> >
> > @par Reference(s):
> >
> > @@ -39,4 +39,20 @@ ParseAcpiDsdt (
> > }
> >
> >
> >
> > DumpAcpiHeader (Ptr);
> >
> > +
> >
> > +  // As per 19.6.29 in the version 6.4 of the ACPI spec, a revision
> > + less than 2
> >
> > +  // restricts integers to 32 bit width. This may not be intended,
> > + raise a
> >
> > +  // warning
> >
> > + #if defined (MDE_CPU_AARCH64) || defined (MDE_CPU_ARM)
> >
> > +  if (AcpiTableRevision < 2) {
> >
> > +IncrementWarningCount ();
> >
> > +Print (
> >
> > +  L"WARNING: DSDT Table Revision less than 2. Integer width restricted
> to "
> >
> > +  L"32 bits. Table Revision = %d.\n",
> >
> > +  AcpiTableRevision
> >
> > +  );
> >
> > +return;
> >
> > +  }
> >
> > +
> >
> > + #endif
> >
> >   }
> >
> 
> 
> 
> 



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




Re: [edk2-devel] [PATCH 20/24] SourceLevelDebugPkg: Remove duplicated words

2022-08-23 Thread Ni, Ray
> +  if it exists, debug agent wiil copied it into the local Mailbox in SMM 
> space.
There are more errors in the original text. E.g.:
wiil -> will
copied -> copy

Can you help to fix them all?

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Wu, Hao A
> Sent: Wednesday, August 24, 2022 8:51 AM
> To: pierre.gond...@arm.com; devel@edk2.groups.io
> Subject: Re: [edk2-devel] [PATCH 20/24] SourceLevelDebugPkg: Remove 
> duplicated words
> 
> Reviewed-by: Hao A Wu 
> 
> Best Regards,
> Hao Wu
> 
> > -Original Message-
> > From: pierre.gond...@arm.com 
> > Sent: Wednesday, August 24, 2022 12:00 AM
> > To: devel@edk2.groups.io
> > Cc: Pierre Gondois ; Wu, Hao A
> > 
> > Subject: [PATCH 20/24] SourceLevelDebugPkg: Remove duplicated words
> >
> > From: Pierre Gondois 
> >
> > In an effort to clean the documentation of the above
> > package, remove duplicated words.
> >
> > Cc: Hao A Wu 
> > Signed-off-by: Pierre Gondois 
> > ---
> >  .../Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git
> > a/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebug
> > AgentLib.c
> > b/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebu
> > gAgentLib.c
> > index f49a592d2762..619f466c68b1 100644
> > ---
> > a/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebug
> > AgentLib.c
> > +++
> > b/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebu
> > gAgentLib.c
> > @@ -158,7 +158,7 @@ RestoreDebugRegister (
> >
> >If InitFlag is DEBUG_AGENT_INIT_SMM, it will override IDT table entries
> >and initialize debug port. It will get debug agent Mailbox from GUIDed 
> > HOB,
> > -  it it exists, debug agent wiil copied it into the local Mailbox in SMM 
> > space.
> > +  if it exists, debug agent wiil copied it into the local Mailbox in SMM 
> > space.
> >it will override IDT table entries and initialize debug port. Context 
> > will be
> >NULL.
> >If InitFlag is DEBUG_AGENT_INIT_ENTER_SMI, debug agent will save Debug
> > --
> > 2.25.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92735): https://edk2.groups.io/g/devel/message/92735
Mute This Topic: https://groups.io/mt/93207406/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 v2 1/1] MinPlatformPkg: Add FspNvsBuffer compression option

2022-08-23 Thread Oram, Isaac W
A PCD to control library class instance seems redundant.  The build already has 
capabilities to control library class instance per driver, per driver type, per 
architecture, etc.  Let me know if there is some benefit to overriding PCD in 
board DSC vs overriding library class in board DSC that I am missing.

We want to simplify what developers need to see and deal with.  Minimize the 
number of basic decisions needed to get a functional port.  I would prefer a 
single instance of LargeVariable*Lib.  As a board port developer, if your 
silicon FSP supports compressing the data and your board port doesn't want the 
redundancy, that is a stage 7 optimization to write your own instance of the 
library class or your own version of SaveMemoryConfigDxe.  No need to burden 
the rest of the boards with needing to know about and configure this to 
optimize a corner case.

I also think decompression and compression decisions should reside at the boot 
loader level not internal to FSP.  First to minimize FSP content, second 
because bootloaders already typically decide and implement decompression that 
matches their build specific compression.  I will grant that it is probably 
mostly the same common algorithm implementation.


Ultimately though, those are mostly philosophical objections.  If you really 
want two instances of the library, I can live with it.  I will be able to have 
reasonable default behavior that is pretty simple for most.

The more concrete objection is the asymmetric design, where common code 
implements compression and per platform code implements decompression.  That 
seems distasteful.  I can live with this too because it is kind of already this 
way, but more consistent combined with more encapsulated seems better than 
expanding the asymmetric design.

Regards,
Isaac

-Original Message-
From: Desimone, Nathaniel L  
Sent: Tuesday, August 23, 2022 12:51 PM
To: Oram, Isaac W ; devel@edk2.groups.io; 
mikub...@linux.microsoft.com
Cc: Chiu, Chasel ; Gao, Liming 
; Dong, Eric 
Subject: RE: [edk2-devel] [edk2-platforms][PATCH v2 1/1] MinPlatformPkg: Add 
FspNvsBuffer compression option

Agreed with Isaac that having the compression capability be more general use 
would be nice. However, I think it would better match the EDK II design style 
if we had a second implementation of LargeVariable*Lib that added the 
compression capability on top of the original LargeVariable*Lib.

I also think having a PCD to explicitly control whether to apply compression to 
the FSP NVS buffer is important. Because there are some FSP implementations 
like ICX and SPR that already include the CompressLib inside the FSP binary 
itself. On those FSP implementations, the data in the 
FSP_NON_VOLATILE_STORAGE_HOB is already compressed. Said PCD would simply 
control which instance of the LibraryClass gets linked with SaveMemoryConfigDxe.

Also agreed with Isaac to please be careful to make sure that any new 
LibraryClasses are in the Include/*.dsc files somewhere so existing boards 
don't need modifications to their BoardPkg.dsc file.

Thanks,
Nate

-Original Message-
From: Oram, Isaac W 
Sent: Tuesday, August 23, 2022 11:34 AM
To: devel@edk2.groups.io; mikub...@linux.microsoft.com
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Gao, Liming ; Dong, 
Eric 
Subject: RE: [edk2-devel] [edk2-platforms][PATCH v2 1/1] MinPlatformPkg: Add 
FspNvsBuffer compression option

Implementing this way will break the build for most of the open MinPlatform 
ports.  At minimum, please add the CompressLib to CoreCommonLib.dsc next to the 
UefiDecompressLib instantiation so that it is included automatically for most 
boards.

Regarding the design, I agree this is a good capability.  And it makes sense to 
me to be board controlled rather than FSP controlled.

I wonder if it might be better to modify the LargeVariableRead/Write such that 
it compresses/decompresses large variables automatically.  Could be controlled 
via library class instance or maybe via PatchablePerModule PCD.  Boards would 
still have a lot of control if they wanted.

Regards,
Isaac

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Michael Kubacki
Sent: Monday, August 22, 2022 8:23 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Oram, Isaac W ; Gao, 
Liming ; Dong, Eric 
Subject: [edk2-devel] [edk2-platforms][PATCH v2 1/1] MinPlatformPkg: Add 
FspNvsBuffer compression option

From: Michael Kubacki 

Adds a PCD called "PcdEnableCompressedFspNvsBuffer" that allows the 
"FspNvsBuffer" UEFI variable data to be saved as compressed data.

Especially due to the nature of the data saved in this variable, it compresses 
well. For example, it has been found to reduce ~63KB of data to ~13KB. Boot 
time impact has been found to be negligible.

The default value is FALSE to keep default behavior consistent.

Decompression can be performed on the variable data using the standard 
UefiDecompressLib.

Cc: Chasel Chiu 
Cc: Nate 

Re: [edk2-devel] [PATCH 20/24] SourceLevelDebugPkg: Remove duplicated words

2022-08-23 Thread Wu, Hao A
Reviewed-by: Hao A Wu 

Best Regards,
Hao Wu

> -Original Message-
> From: pierre.gond...@arm.com 
> Sent: Wednesday, August 24, 2022 12:00 AM
> To: devel@edk2.groups.io
> Cc: Pierre Gondois ; Wu, Hao A
> 
> Subject: [PATCH 20/24] SourceLevelDebugPkg: Remove duplicated words
> 
> From: Pierre Gondois 
> 
> In an effort to clean the documentation of the above
> package, remove duplicated words.
> 
> Cc: Hao A Wu 
> Signed-off-by: Pierre Gondois 
> ---
>  .../Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git
> a/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebug
> AgentLib.c
> b/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebu
> gAgentLib.c
> index f49a592d2762..619f466c68b1 100644
> ---
> a/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebug
> AgentLib.c
> +++
> b/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebu
> gAgentLib.c
> @@ -158,7 +158,7 @@ RestoreDebugRegister (
> 
>If InitFlag is DEBUG_AGENT_INIT_SMM, it will override IDT table entries
>and initialize debug port. It will get debug agent Mailbox from GUIDed HOB,
> -  it it exists, debug agent wiil copied it into the local Mailbox in SMM 
> space.
> +  if it exists, debug agent wiil copied it into the local Mailbox in SMM 
> space.
>it will override IDT table entries and initialize debug port. Context will 
> be
>NULL.
>If InitFlag is DEBUG_AGENT_INIT_ENTER_SMI, debug agent will save Debug
> --
> 2.25.1



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




Re: [edk2-devel] [PATCH 15/24] OvmfPkg: Remove duplicated words

2022-08-23 Thread Yao, Jiewen
Reviewed-by: Jiewen Yao 

> -Original Message-
> From: pierre.gond...@arm.com 
> Sent: Wednesday, August 24, 2022 12:00 AM
> To: devel@edk2.groups.io
> Cc: Pierre Gondois ; Ard Biesheuvel
> ; Yao, Jiewen 
> Subject: [PATCH 15/24] OvmfPkg: Remove duplicated words
> 
> From: Pierre Gondois 
> 
> In an effort to clean the documentation of the above
> package, remove duplicated words.
> 
> Cc: Ard Biesheuvel 
> Cc: Jiewen Yao 
> Signed-off-by: Pierre Gondois 
> ---
>  OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c | 6 +++---
>  OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c | 2 +-
>  OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c | 2 +-
>  OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c | 2 +-
>  OvmfPkg/SataControllerDxe/ComponentName.c | 4 ++--
>  OvmfPkg/SataControllerDxe/SataController.h| 4 ++--
>  OvmfPkg/XenBusDxe/ComponentName.c | 2 +-
>  OvmfPkg/XenBusDxe/ComponentName.h | 2 +-
>  OvmfPkg/XenPvBlkDxe/BlockFront.c  | 2 +-
>  OvmfPkg/XenPvBlkDxe/ComponentName.c   | 2 +-
>  OvmfPkg/XenPvBlkDxe/ComponentName.h   | 2 +-
>  11 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c
> b/OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c
> index 8da06da74ef5..6877e521e485 100644
> --- a/OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c
> +++ b/OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c
> @@ -813,7 +813,7 @@ CreateIdentityMappingPageTables (
>{
>  //
>  // Each PML5 entry points to a page of PML4 entires.
> -// So lets allocate space for them and fill them in in the 
> IndexOfPml4Entries
> loop.
> +// So lets allocate space for them and fill them in the 
> IndexOfPml4Entries
> loop.
>  // When 5-Level Paging is disabled, below allocation happens only once.
>  //
>  PageMapLevel4Entry = (VOID *)BigPageAddress;
> @@ -835,7 +835,7 @@ CreateIdentityMappingPageTables (
>  {
>//
>// Each PML4 entry points to a page of Page Directory Pointer entires.
> -  // So lets allocate space for them and fill them in in the 
> IndexOfPdpEntries
> loop.
> +  // So lets allocate space for them and fill them in the 
> IndexOfPdpEntries
> loop.
>//
>PageDirectoryPointerEntry = (VOID *)BigPageAddress;
>BigPageAddress   += SIZE_4KB;
> @@ -875,7 +875,7 @@ CreateIdentityMappingPageTables (
>  {
>//
>// Each Directory Pointer entries points to a page of Page 
> Directory entires.
> -  // So allocate space for them and fill them in in the
> IndexOfPageDirectoryEntries loop.
> +  // So allocate space for them and fill them in the
> IndexOfPageDirectoryEntries loop.
>//
>PageDirectoryEntry = (VOID *)BigPageAddress;
>BigPageAddress+= SIZE_4KB;
> diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c
> b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c
> index 4e25f198aa76..a4c12b9057e5 100644
> --- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c
> +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c
> @@ -259,7 +259,7 @@ DebugClearMemory (
>ASSERT (Buffer != NULL);
> 
>//
> -  // SetMem() checks for the the ASSERT() condition on Length and returns
> Buffer
> +  // SetMem() checks for the ASSERT() condition on Length and returns Buffer
>//
>return SetMem (Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue));
>  }
> diff --git a/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c
> b/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c
> index 7f37710b964f..30c258313135 100644
> --- a/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c
> +++ b/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c
> @@ -108,7 +108,7 @@ LibGetTime (
> 
>@retval EFI_SUCCESS   The operation completed successfully.
>@retval EFI_INVALID_PARAMETER A time field is out of range.
> -  @retval EFI_DEVICE_ERROR  The time could not be set due due to hardware
> error.
> +  @retval EFI_DEVICE_ERROR  The time could not be set due to hardware
> error.
> 
>  **/
>  EFI_STATUS
> diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c
> b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c
> index 9e074c29bb2b..172d6a4267f8 100644
> --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c
> +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c
> @@ -79,7 +79,7 @@ QemuFlashPtrWrite (
>  // Writing to flash is emulated by the hypervisor through the use of 
> write
>  // protection. This won't work for an SEV-ES guest because the write 
> won't
>  // be recognized as a true MMIO write, which would result in the required
> -// #VC exception. Instead, use the the VMGEXIT MMIO write support 
> directly
> +// #VC 

Re: [edk2-devel] [PATCH 21/24] StandaloneMmPkg: Remove duplicated words

2022-08-23 Thread Yao, Jiewen
Reviewed-by: Jiewen Yao 

> -Original Message-
> From: pierre.gond...@arm.com 
> Sent: Wednesday, August 24, 2022 12:00 AM
> To: devel@edk2.groups.io
> Cc: Pierre Gondois ; Ard Biesheuvel
> ; Sami Mujawar ; Yao,
> Jiewen 
> Subject: [PATCH 21/24] StandaloneMmPkg: Remove duplicated words
> 
> From: Pierre Gondois 
> 
> In an effort to clean the documentation of the above
> package, remove duplicated words.
> 
> Cc: Ard Biesheuvel 
> Cc: Sami Mujawar 
> Cc: Jiewen Yao 
> Signed-off-by: Pierre Gondois 
> ---
>  StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c |
> 2 +-
>  .../Library/StandaloneMmMemLib/StandaloneMmMemLib.inf   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git
> a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c
> b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c
> index e6393272514f..814352369ed3 100644
> ---
> a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c
> +++
> b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c
> @@ -1,7 +1,7 @@
>  /** @file
>Instance of MM memory check library.
> 
> -  MM memory check library library implementation. This library consumes
> MM_ACCESS_PROTOCOL
> +  MM memory check library implementation. This library consumes
> MM_ACCESS_PROTOCOL
>to get MMRAM information. In order to use this library instance, the 
> platform
> should produce
>all MMRAM range via MM_ACCESS_PROTOCOL, including the range for
> firmware (like MM Core
>and MM driver) and/or specific dedicated hardware.
> diff --git
> a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
> b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
> index b29d97a74607..ed3cdf199452 100644
> ---
> a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
> +++
> b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  #  Instance of MM memory check library.
>  #
> -#  MM memory check library library implementation. This library consumes
> MM_ACCESS_PROTOCOL
> +#  MM memory check library implementation. This library consumes
> MM_ACCESS_PROTOCOL
>  #  to get MMRAM information. In order to use this library instance, the 
> platform
> should produce
>  #  all MMRAM range via MM_ACCESS_PROTOCOL, including the range for
> firmware (like MM Core
>  #  and MM driver) and/or specific dedicated hardware.
> --
> 2.25.1



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




Re: [edk2-devel] [PATCH 1/2] Mde Pkg: Support for MPAM ACPI Table

2022-08-23 Thread Andrew Fish via groups.io
Rohit,

FYI I seem to remember when we added the bitfield verbiage to the UEFI Spec it 
was because there was lots of platform code that was using it. We did not 
really want to encourage its use it in public interfaces. 

Given there is lots of code 1st kind of things going on I’d figured I’d mention 
this. 

Thanks,

Andrew Fish

> On Aug 23, 2022, at 2:28 PM, Rohit Mathew  wrote:
> 
> Hi Andrew,
>  
> From: Andrew Fish mailto:af...@apple.com>> 
> Sent: 23 August 2022 21:11
> To: devel@edk2.groups.io ; Rohit Mathew 
> mailto:rohit.mat...@arm.com>>
> Cc: usern...@nvidia.com ; Sami Mujawar 
> mailto:sami.muja...@arm.com>>; Alexei Fedorov 
> mailto:alexei.fedo...@arm.com>>; Mike Kinney 
> mailto:michael.d.kin...@intel.com>>; 
> gaolim...@byosoft.com.cn ; 
> zhiguang@intel.com ; Swatisri Kantamsetti 
> mailto:swatis...@nvidia.com>>; Thomas Abraham 
> mailto:thomas.abra...@arm.com>>; Thanu Rangarajan 
> mailto:thanu.rangara...@arm.com>>; nd 
> mailto:n...@arm.com>>
> Subject: Re: [edk2-devel] [PATCH 1/2] Mde Pkg: Support for MPAM ACPI Table
>  
>  
> 
> 
> On Aug 19, 2022, at 1:26 AM, Rohit Mathew  > wrote:
>  
> Hi Swatisri,
> 
> Thanks for the patch. Please find my comments inline marked [Rohit] -
> 
> 
> -Original Message-
> From: devel@edk2.groups.io  
> mailto:devel@edk2.groups.io>> On Behalf Of Name
> via groups.io 
> Sent: 16 August 2022 21:18
> To: devel@edk2.groups.io ; Sami Mujawar 
> mailto:sami.muja...@arm.com>>;
> Alexei Fedorov mailto:alexei.fedo...@arm.com>>; 
> michael.d.kin...@intel.com ;
> gaolim...@byosoft.com.cn ; 
> zhiguang@intel.com 
> Cc: Swatisri Kantamsetti mailto:swatis...@nvidia.com>>
> Subject: [edk2-devel] [PATCH 1/2] Mde Pkg: Support for MPAM ACPI Table
> 
> From: Swatisri Kantamsetti  >
> 
> Added MPAM table header, MSC and Resource Node info structures
> 
> Signed-off-by: Swatisri Kantamsetti  >
> ---
> MdePkg/Include/IndustryStandard/Acpi64.h |  5 ++
> MdePkg/Include/IndustryStandard/Mpam.h   | 69
> 
> 2 files changed, 74 insertions(+)
> create mode 100644 MdePkg/Include/IndustryStandard/Mpam.h
> 
> diff --git a/MdePkg/Include/IndustryStandard/Acpi64.h
> b/MdePkg/Include/IndustryStandard/Acpi64.h
> index fe5ebfac2b..e54f631186 100644
> --- a/MdePkg/Include/IndustryStandard/Acpi64.h
> +++ b/MdePkg/Include/IndustryStandard/Acpi64.h
> @@ -2952,6 +2952,11 @@ typedef struct {
> ///
> #define
> EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SI
> GNATURE  SIGNATURE_32('P', 'P', 'T', 'T')
> 
> +///
> +/// "MPAM" Memory System Resource Partitioning And Monitoring Table
> ///
> +#define
> +EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORI
> NG_TABLE_STRUC
> +TURE_SIGNATURE  SIGNATURE_32('M', 'P', 'A', 'M')
> +
> ///
> /// "PSDT" Persistent System Description Table  /// diff --git
> a/MdePkg/Include/IndustryStandard/Mpam.h
> b/MdePkg/Include/IndustryStandard/Mpam.h
> new file mode 100644
> index 00..e0f75f0114
> --- /dev/null
> +++ b/MdePkg/Include/IndustryStandard/Mpam.h
> @@ -0,0 +1,69 @@
> +/** @file
> +  ACPI Memory System Resource Partitioning And Monitoring (MPAM)
> +  as specified in ARM spec DEN0065
> +
> +  Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
> +  Copyright (c) 2022, ARM Limited. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent **/
> +
> +#ifndef _MPAM_H_
> +#define _MPAM_H_
> +
> +#pragma pack(1)
> +
> +///
> +/// Memory System Resource Partitioning and Monitoring Table (MPAM)
> ///
> +typedef struct {
> +  EFI_ACPI_DESCRIPTION_HEADERHeader;
> +  UINT32 NumNodes;
> +  UINT32 NodeOffset;
> +  UINT32 Reserved;
> +}
> +EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORI
> NG_TABLE_HEADE
> +R;
> 
> [Rohit] Shouldn't the header be followed by MSC node body type as defined in 
> MPAM ACPI 1.0, section 2, table 3 - The MPAM table and section 2.1, table 4 - 
> MSC Node body?
> 
> 
> +
> +///
> +/// MPAM Revision (as defined in ACPI 6.4 spec.) /// #define
> +EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORI
> NG_TABLE_REVIS
> +ION  0x01
> +
> +///
> +/// Memory System Controller Node Structure ///
> +
> +typedef struct {
> +  UINT16Length;
> +  UINT16Reserved;
> +  UINT32Identifier;
> +  UINT64BaseAddress;
> +  UINT32MmioSize;
> +  UINT32OverflowInterrupt;
> +  UINT32OverflowInterruptFlags;
> 
> [Rohit] Would it be better to have a type (possibly bitfield struct) instead 
> of a plain UINT32 for Flags? (MPAM ACPI 1.0, section 2.1.1, table 5 - 
> Interrupt flags)
> 
>  
> Probably 

Re: [edk2-devel] [PATCH 1/2] Mde Pkg: Support for MPAM ACPI Table

2022-08-23 Thread Rohit Mathew
Hi Andrew,

From: Andrew Fish 
Sent: 23 August 2022 21:11
To: devel@edk2.groups.io; Rohit Mathew 
Cc: usern...@nvidia.com; Sami Mujawar ; Alexei Fedorov 
; Mike Kinney ; 
gaolim...@byosoft.com.cn; zhiguang@intel.com; Swatisri Kantamsetti 
; Thomas Abraham ; Thanu 
Rangarajan ; nd 
Subject: Re: [edk2-devel] [PATCH 1/2] Mde Pkg: Support for MPAM ACPI Table




On Aug 19, 2022, at 1:26 AM, Rohit Mathew 
mailto:rohit.mat...@arm.com>> wrote:

Hi Swatisri,

Thanks for the patch. Please find my comments inline marked [Rohit] -


-Original Message-
From: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>> On Behalf Of Name
via groups.io
Sent: 16 August 2022 21:18
To: devel@edk2.groups.io; Sami Mujawar 
mailto:sami.muja...@arm.com>>;
Alexei Fedorov mailto:alexei.fedo...@arm.com>>; 
michael.d.kin...@intel.com;
gaolim...@byosoft.com.cn; 
zhiguang@intel.com
Cc: Swatisri Kantamsetti mailto:swatis...@nvidia.com>>
Subject: [edk2-devel] [PATCH 1/2] Mde Pkg: Support for MPAM ACPI Table

From: Swatisri Kantamsetti mailto:swatis...@nvidia.com>>

Added MPAM table header, MSC and Resource Node info structures

Signed-off-by: Swatisri Kantamsetti 
mailto:swatis...@nvidia.com>>
---
MdePkg/Include/IndustryStandard/Acpi64.h |  5 ++
MdePkg/Include/IndustryStandard/Mpam.h   | 69

2 files changed, 74 insertions(+)
create mode 100644 MdePkg/Include/IndustryStandard/Mpam.h

diff --git a/MdePkg/Include/IndustryStandard/Acpi64.h
b/MdePkg/Include/IndustryStandard/Acpi64.h
index fe5ebfac2b..e54f631186 100644
--- a/MdePkg/Include/IndustryStandard/Acpi64.h
+++ b/MdePkg/Include/IndustryStandard/Acpi64.h
@@ -2952,6 +2952,11 @@ typedef struct {
///
#define
EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SI
GNATURE  SIGNATURE_32('P', 'P', 'T', 'T')

+///
+/// "MPAM" Memory System Resource Partitioning And Monitoring Table
///
+#define
+EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORI
NG_TABLE_STRUC
+TURE_SIGNATURE  SIGNATURE_32('M', 'P', 'A', 'M')
+
///
/// "PSDT" Persistent System Description Table  /// diff --git
a/MdePkg/Include/IndustryStandard/Mpam.h
b/MdePkg/Include/IndustryStandard/Mpam.h
new file mode 100644
index 00..e0f75f0114
--- /dev/null
+++ b/MdePkg/Include/IndustryStandard/Mpam.h
@@ -0,0 +1,69 @@
+/** @file
+  ACPI Memory System Resource Partitioning And Monitoring (MPAM)
+  as specified in ARM spec DEN0065
+
+  Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
+  Copyright (c) 2022, ARM Limited. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent **/
+
+#ifndef _MPAM_H_
+#define _MPAM_H_
+
+#pragma pack(1)
+
+///
+/// Memory System Resource Partitioning and Monitoring Table (MPAM)
///
+typedef struct {
+  EFI_ACPI_DESCRIPTION_HEADERHeader;
+  UINT32 NumNodes;
+  UINT32 NodeOffset;
+  UINT32 Reserved;
+}
+EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORI
NG_TABLE_HEADE
+R;

[Rohit] Shouldn't the header be followed by MSC node body type as defined in 
MPAM ACPI 1.0, section 2, table 3 - The MPAM table and section 2.1, table 4 - 
MSC Node body?


+
+///
+/// MPAM Revision (as defined in ACPI 6.4 spec.) /// #define
+EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORI
NG_TABLE_REVIS
+ION  0x01
+
+///
+/// Memory System Controller Node Structure ///
+
+typedef struct {
+  UINT16Length;
+  UINT16Reserved;
+  UINT32Identifier;
+  UINT64BaseAddress;
+  UINT32MmioSize;
+  UINT32OverflowInterrupt;
+  UINT32OverflowInterruptFlags;

[Rohit] Would it be better to have a type (possibly bitfield struct) instead of 
a plain UINT32 for Flags? (MPAM ACPI 1.0, section 2.1.1, table 5 - Interrupt 
flags)


Probably better NOT to use bitfields in APIs that are produced and consumed by 
different worlds. While the the UEFI does speak to the bit order of or a 
bitfield the rules around packing of bitfields is compiler defined.

I just saw a bug last week with bitfield compatibility that was introduced by 
clang fixing its -mms-bitfields implementation. The GCC rules for packing 
bitfields is different than VC++ so that is why the compiler flag 
-mms-bitfields exists in the 1st place . A clang -mms-bitfields bug  got fixed 
and it broke the code as the extra padding required by VC++ got added to the 
bitfield.

[Rohit] Thanks for bringing this point. I think, this type could be left 
untouched in that case.

Thanks,

Andrew Fish


+  UINT32Reserved1;
+  UINT32OverflowInterruptAff;
+  UINT32ErrorInterrupt;
+  UINT32ErrorInterruptFlags;

[Rohit ] Same comment as before above.


+  UINT32Reserved2;
+  UINT32ErrorInterruptAff;
+  UINT32MaxNRdyUsec;
+  UINT64LinkedDeviceHwId;
+  UINT32LinkedDeviceInstanceHwId;
+  UINT32NumResourceNodes;

Re: [edk2-devel] [PATCH 1/2] Mde Pkg: Support for MPAM ACPI Table

2022-08-23 Thread Andrew Fish via groups.io


> On Aug 19, 2022, at 1:26 AM, Rohit Mathew  wrote:
> 
> Hi Swatisri,
> 
> Thanks for the patch. Please find my comments inline marked [Rohit] -
> 
>> -Original Message-
>> From: devel@edk2.groups.io  
>> mailto:devel@edk2.groups.io>> On Behalf Of Name
>> via groups.io 
>> Sent: 16 August 2022 21:18
>> To: devel@edk2.groups.io ; Sami Mujawar 
>> mailto:sami.muja...@arm.com>>;
>> Alexei Fedorov mailto:alexei.fedo...@arm.com>>; 
>> michael.d.kin...@intel.com ;
>> gaolim...@byosoft.com.cn ; 
>> zhiguang@intel.com 
>> Cc: Swatisri Kantamsetti mailto:swatis...@nvidia.com>>
>> Subject: [edk2-devel] [PATCH 1/2] Mde Pkg: Support for MPAM ACPI Table
>> 
>> From: Swatisri Kantamsetti 
>> 
>> Added MPAM table header, MSC and Resource Node info structures
>> 
>> Signed-off-by: Swatisri Kantamsetti 
>> ---
>> MdePkg/Include/IndustryStandard/Acpi64.h |  5 ++
>> MdePkg/Include/IndustryStandard/Mpam.h   | 69
>> 
>> 2 files changed, 74 insertions(+)
>> create mode 100644 MdePkg/Include/IndustryStandard/Mpam.h
>> 
>> diff --git a/MdePkg/Include/IndustryStandard/Acpi64.h
>> b/MdePkg/Include/IndustryStandard/Acpi64.h
>> index fe5ebfac2b..e54f631186 100644
>> --- a/MdePkg/Include/IndustryStandard/Acpi64.h
>> +++ b/MdePkg/Include/IndustryStandard/Acpi64.h
>> @@ -2952,6 +2952,11 @@ typedef struct {
>> ///
>> #define
>> EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SI
>> GNATURE  SIGNATURE_32('P', 'P', 'T', 'T')
>> 
>> +///
>> +/// "MPAM" Memory System Resource Partitioning And Monitoring Table
>> ///
>> +#define
>> +EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORI
>> NG_TABLE_STRUC
>> +TURE_SIGNATURE  SIGNATURE_32('M', 'P', 'A', 'M')
>> +
>> ///
>> /// "PSDT" Persistent System Description Table  /// diff --git
>> a/MdePkg/Include/IndustryStandard/Mpam.h
>> b/MdePkg/Include/IndustryStandard/Mpam.h
>> new file mode 100644
>> index 00..e0f75f0114
>> --- /dev/null
>> +++ b/MdePkg/Include/IndustryStandard/Mpam.h
>> @@ -0,0 +1,69 @@
>> +/** @file
>> +  ACPI Memory System Resource Partitioning And Monitoring (MPAM)
>> +  as specified in ARM spec DEN0065
>> +
>> +  Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
>> +  Copyright (c) 2022, ARM Limited. All rights reserved.
>> +  SPDX-License-Identifier: BSD-2-Clause-Patent **/
>> +
>> +#ifndef _MPAM_H_
>> +#define _MPAM_H_
>> +
>> +#pragma pack(1)
>> +
>> +///
>> +/// Memory System Resource Partitioning and Monitoring Table (MPAM)
>> ///
>> +typedef struct {
>> +  EFI_ACPI_DESCRIPTION_HEADERHeader;
>> +  UINT32 NumNodes;
>> +  UINT32 NodeOffset;
>> +  UINT32 Reserved;
>> +}
>> +EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORI
>> NG_TABLE_HEADE
>> +R;
> 
> [Rohit] Shouldn't the header be followed by MSC node body type as defined in 
> MPAM ACPI 1.0, section 2, table 3 - The MPAM table and section 2.1, table 4 - 
> MSC Node body?
> 
>> +
>> +///
>> +/// MPAM Revision (as defined in ACPI 6.4 spec.) /// #define
>> +EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORI
>> NG_TABLE_REVIS
>> +ION  0x01
>> +
>> +///
>> +/// Memory System Controller Node Structure ///
>> +
>> +typedef struct {
>> +  UINT16Length;
>> +  UINT16Reserved;
>> +  UINT32Identifier;
>> +  UINT64BaseAddress;
>> +  UINT32MmioSize;
>> +  UINT32OverflowInterrupt;
>> +  UINT32OverflowInterruptFlags;
> 
> [Rohit] Would it be better to have a type (possibly bitfield struct) instead 
> of a plain UINT32 for Flags? (MPAM ACPI 1.0, section 2.1.1, table 5 - 
> Interrupt flags)
> 

Probably better NOT to use bitfields in APIs that are produced and consumed by 
different worlds. While the the UEFI does speak to the bit order of or a 
bitfield the rules around packing of bitfields is compiler defined.

I just saw a bug last week with bitfield compatibility that was introduced by 
clang fixing its -mms-bitfields implementation. The GCC rules for packing 
bitfields is different than VC++ so that is why the compiler flag 
-mms-bitfields exists in the 1st place . A clang -mms-bitfields bug  got fixed 
and it broke the code as the extra padding required by VC++ got added to the 
bitfield. 

Thanks,

Andrew Fish

>> +  UINT32Reserved1;
>> +  UINT32OverflowInterruptAff;
>> +  UINT32ErrorInterrupt;
>> +  UINT32ErrorInterruptFlags;
> 
> [Rohit ] Same comment as before above.
> 
>> +  UINT32Reserved2;
>> +  UINT32ErrorInterruptAff;
>> +  UINT32MaxNRdyUsec;
>> +  UINT64LinkedDeviceHwId;
>> +  UINT32LinkedDeviceInstanceHwId;
>> +  UINT32NumResourceNodes;
>> +} EFI_ACPI_6_4_MPAM_MSC_NODE;
>> +
>> +///
>> +/// Resource Node Structure
>> +///
>> +
>> +typedef struct {
>> +  UINT32Identifier;
>> +  UINT8 RisIndex;
>> +  UINT16

Re: [edk2-devel] [edk2-platforms][PATCH v2 1/1] MinPlatformPkg: Add FspNvsBuffer compression option

2022-08-23 Thread Nate DeSimone
Agreed with Isaac that having the compression capability be more general use 
would be nice. However, I think it would better match the EDK II design style 
if we had a second implementation of LargeVariable*Lib that added the 
compression capability on top of the original LargeVariable*Lib.

I also think having a PCD to explicitly control whether to apply compression to 
the FSP NVS buffer is important. Because there are some FSP implementations 
like ICX and SPR that already include the CompressLib inside the FSP binary 
itself. On those FSP implementations, the data in the 
FSP_NON_VOLATILE_STORAGE_HOB is already compressed. Said PCD would simply 
control which instance of the LibraryClass gets linked with SaveMemoryConfigDxe.

Also agreed with Isaac to please be careful to make sure that any new 
LibraryClasses are in the Include/*.dsc files somewhere so existing boards 
don't need modifications to their BoardPkg.dsc file.

Thanks,
Nate

-Original Message-
From: Oram, Isaac W  
Sent: Tuesday, August 23, 2022 11:34 AM
To: devel@edk2.groups.io; mikub...@linux.microsoft.com
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Gao, Liming ; Dong, 
Eric 
Subject: RE: [edk2-devel] [edk2-platforms][PATCH v2 1/1] MinPlatformPkg: Add 
FspNvsBuffer compression option

Implementing this way will break the build for most of the open MinPlatform 
ports.  At minimum, please add the CompressLib to CoreCommonLib.dsc next to the 
UefiDecompressLib instantiation so that it is included automatically for most 
boards.

Regarding the design, I agree this is a good capability.  And it makes sense to 
me to be board controlled rather than FSP controlled.

I wonder if it might be better to modify the LargeVariableRead/Write such that 
it compresses/decompresses large variables automatically.  Could be controlled 
via library class instance or maybe via PatchablePerModule PCD.  Boards would 
still have a lot of control if they wanted.

Regards,
Isaac

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Michael Kubacki
Sent: Monday, August 22, 2022 8:23 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Oram, Isaac W ; Gao, 
Liming ; Dong, Eric 
Subject: [edk2-devel] [edk2-platforms][PATCH v2 1/1] MinPlatformPkg: Add 
FspNvsBuffer compression option

From: Michael Kubacki 

Adds a PCD called "PcdEnableCompressedFspNvsBuffer" that allows the 
"FspNvsBuffer" UEFI variable data to be saved as compressed data.

Especially due to the nature of the data saved in this variable, it compresses 
well. For example, it has been found to reduce ~63KB of data to ~13KB. Boot 
time impact has been found to be negligible.

The default value is FALSE to keep default behavior consistent.

Decompression can be performed on the variable data using the standard 
UefiDecompressLib.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Isaac Oram 
Cc: Liming Gao 
Cc: Eric Dong 
Signed-off-by: Michael Kubacki 
---

Notes:
v2: Rebase onto 9769bf28d1fc

 Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig.c   
| 62 
 Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig.inf 
|  4 ++
 Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec   
|  6 ++
 Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc   
|  1 +
 4 files changed, 60 insertions(+), 13 deletions(-)

diff --git 
a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig.c 
b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig.c
index 0215e8eeddfb..95b8cef8b32b 100644
--- 
a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig.c
+++ b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemo
+++ ryConfig.c
@@ -3,6 +3,7 @@
   exists, and saves the data to nvRAM.
 
 Copyright (c) 2017 - 2022, Intel Corporation. All rights reserved.
+Copyright (c) Microsoft Corporation.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -10,6 +11,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include 
  #include   #include 
+#include 
 #include 
 #include 
 #include 
@@ -19,6 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include 
  #include   #include 

+#include 
 #include 
 #include 
 
@@ -38,20 +41,26 @@ SaveMemoryConfigEntryPoint (
   IN EFI_SYSTEM_TABLE   *SystemTable
   )
 {
-  EFI_STATUSStatus;
-  EFI_HOB_GUID_TYPE *GuidHob;
-  VOID  *HobData;
-  VOID  *VariableData;
-  UINTN DataSize;
-  UINTN BufferSize;
-  BOOLEAN   DataIsIdentical;
+  EFI_STATUS Status;
+  EFI_HOB_GUID_TYPE  *GuidHob;
+  VOID   *HobData;
+  VOID   *VariableData;
+  UINTN  DataSize;
+  UINTN  BufferSize;
+  BOOLEANDataIsIdentical;
+  VOID   *CompressedData;
+  UINT64 CompressedSize;
+  UINTN  CompressedAllocationPages;
 
-  DataSize= 0;

Re: [edk2-devel] [PATCH 2/2] Dynamic Tbl Mgr: MPAM: MPAM Generator and supporting files

2022-08-23 Thread Swatisri Kantamsetti via groups.io
Hello,
Just a reminder to provide feedback on this patch.

Thanks,
Swati

swatis...@nvidia.com

From: Name 
Sent: Tuesday, August 16, 2022 2:18 PM
To: devel@edk2.groups.io ; sami.muja...@arm.com 
; alexei.fedo...@arm.com ; 
michael.d.kin...@intel.com ; 
gaolim...@byosoft.com.cn ; zhiguang@intel.com 

Cc: Swatisri Kantamsetti 
Subject: [PATCH 2/2] Dynamic Tbl Mgr: MPAM: MPAM Generator and supporting files

From: Swatisri Kantamsetti 

ACPI header, MSC and Resource Nodes are populated
in the MPAM Table

Signed-off-by: Swatisri Kantamsetti 
---
 DynamicTablesPkg/DynamicTables.dsc.inc|   2 +
 DynamicTablesPkg/Include/AcpiTableGenerator.h |   1 +
 .../Include/ArmNameSpaceObjects.h |  68 ++
 .../Arm/AcpiMpamLibArm/AcpiMpamLibArm.inf |  30 +
 .../Acpi/Arm/AcpiMpamLibArm/MpamGenerator.c   | 649 ++
 .../Acpi/Arm/AcpiMpamLibArm/MpamGenerator.h   |  47 ++
 6 files changed, 797 insertions(+)
 create mode 100644 
DynamicTablesPkg/Library/Acpi/Arm/AcpiMpamLibArm/AcpiMpamLibArm.inf
 create mode 100644 
DynamicTablesPkg/Library/Acpi/Arm/AcpiMpamLibArm/MpamGenerator.c
 create mode 100644 
DynamicTablesPkg/Library/Acpi/Arm/AcpiMpamLibArm/MpamGenerator.h

diff --git a/DynamicTablesPkg/DynamicTables.dsc.inc 
b/DynamicTablesPkg/DynamicTables.dsc.inc
index 3d4fa0c4c4..745d5f0633 100644
--- a/DynamicTablesPkg/DynamicTables.dsc.inc
+++ b/DynamicTablesPkg/DynamicTables.dsc.inc
@@ -29,6 +29,7 @@
   DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/AcpiIortLibArm.inf
   DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/AcpiMadtLibArm.inf
   DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/AcpiMcfgLibArm.inf
+  DynamicTablesPkg/Library/Acpi/Arm/AcpiMpamLibArm/AcpiMpamLibArm.inf
   DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/AcpiPpttLibArm.inf
   DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/AcpiRawLibArm.inf
   DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/AcpiSpcrLibArm.inf
@@ -54,6 +55,7 @@
   NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/AcpiMadtLibArm.inf
   NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/AcpiMcfgLibArm.inf
   NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/AcpiPpttLibArm.inf
+  NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiMpamLibArm/AcpiMpamLibArm.inf
   NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/AcpiRawLibArm.inf
   NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/AcpiSpcrLibArm.inf
   NULL|DynamicTablesPkg/Library/Acpi/Arm/AcpiSratLibArm/AcpiSratLibArm.inf
diff --git a/DynamicTablesPkg/Include/AcpiTableGenerator.h 
b/DynamicTablesPkg/Include/AcpiTableGenerator.h
index f962dbff57..56d7375b4a 100644
--- a/DynamicTablesPkg/Include/AcpiTableGenerator.h
+++ b/DynamicTablesPkg/Include/AcpiTableGenerator.h
@@ -94,6 +94,7 @@ typedef enum StdAcpiTableId {
   EStdAcpiTableIdIort,  ///< IORT Generator
   EStdAcpiTableIdPptt,  ///< PPTT Generator
   EStdAcpiTableIdSrat,  ///< SRAT Generator
+  EStdAcpiTableIdMpam,  ///< MPAM Generator
   EStdAcpiTableIdSsdtSerialPort,///< SSDT Serial-Port Generator
   EStdAcpiTableIdSsdtCmn600,///< SSDT Cmn-600 Generator
   EStdAcpiTableIdSsdtCpuTopology,   ///< SSDT Cpu Topology
diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h 
b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
index 102e0f96be..39a14ed0b3 100644
--- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
@@ -63,6 +63,8 @@ typedef enum ArmObjectID {
   EArmObjPciInterruptMapInfo,  ///< 39 - Pci Interrupt Map Info
   EArmObjRmr,  ///< 40 - Reserved Memory Range Node
   EArmObjMemoryRangeDescriptor,///< 41 - Memory Range Descriptor
+  EArmObjMscNodeInfo,  ///< 40 - Msc Memory System Controller 
Node Info
+  EArmObjResNodeInfo,  ///< 41 - Res Resource Node Info
   EArmObjMax
 } EARM_OBJECT_ID;

@@ -1070,6 +1072,72 @@ typedef struct CmArmRmrDescriptor {
   UINT64Length;
 } CM_ARM_MEMORY_RANGE_DESCRIPTOR;

+/** A structure that describes Memory System Controller Node.
+
+MPAM Memory System Component Nodes are described by
+this object.
+
+  ID: EArmObjMscNodeInfo
+*/
+typedef struct CmArmMscNodeInfo {
+  /// An unique token used to identify this object
+  CM_OBJECT_TOKEN  Token;
+
+  /// MPAM Base Address
+  UINT64   BaseAddress;
+  /// MMIO Size
+  UINT32   MmioSize;
+  /// Overflow Interrupt
+  UINT32   OverflowInterrupt;
+  /// Overflow Interrupt Flags
+  UINT32   OverflowInterruptFlags;
+  /// Overflow Interrupt Affinity
+  UINT32   OverflowInterruptAff;
+  /// Error Interrupt
+  UINT32   ErrorInterrupt;
+  /// Error Interrupt Flags
+  UINT32   ErrorInterruptFlags;
+  /// Error Interrupt Affinity
+  UINT32  

Re: [edk2-devel] [PATCH 1/2] Mde Pkg: Support for MPAM ACPI Table

2022-08-23 Thread Swatisri Kantamsetti via groups.io
Just a reminder to provide feedback on this patch.

Thanks,
Swati

swatis...@nvidia.com

From: Name 
Sent: Tuesday, August 16, 2022 2:18 PM
To: devel@edk2.groups.io ; sami.muja...@arm.com 
; alexei.fedo...@arm.com ; 
michael.d.kin...@intel.com ; 
gaolim...@byosoft.com.cn ; zhiguang@intel.com 

Cc: Swatisri Kantamsetti 
Subject: [PATCH 1/2] Mde Pkg: Support for MPAM ACPI Table

From: Swatisri Kantamsetti 

Added MPAM table header, MSC and Resource Node
info structures

Signed-off-by: Swatisri Kantamsetti 
---
 MdePkg/Include/IndustryStandard/Acpi64.h |  5 ++
 MdePkg/Include/IndustryStandard/Mpam.h   | 69 
 2 files changed, 74 insertions(+)
 create mode 100644 MdePkg/Include/IndustryStandard/Mpam.h

diff --git a/MdePkg/Include/IndustryStandard/Acpi64.h 
b/MdePkg/Include/IndustryStandard/Acpi64.h
index fe5ebfac2b..e54f631186 100644
--- a/MdePkg/Include/IndustryStandard/Acpi64.h
+++ b/MdePkg/Include/IndustryStandard/Acpi64.h
@@ -2952,6 +2952,11 @@ typedef struct {
 ///
 #define EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE  
SIGNATURE_32('P', 'P', 'T', 'T')

+///
+/// "MPAM" Memory System Resource Partitioning And Monitoring Table
+///
+#define 
EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORING_TABLE_STRUCTURE_SIGNATURE
  SIGNATURE_32('M', 'P', 'A', 'M')
+
 ///
 /// "PSDT" Persistent System Description Table
 ///
diff --git a/MdePkg/Include/IndustryStandard/Mpam.h 
b/MdePkg/Include/IndustryStandard/Mpam.h
new file mode 100644
index 00..e0f75f0114
--- /dev/null
+++ b/MdePkg/Include/IndustryStandard/Mpam.h
@@ -0,0 +1,69 @@
+/** @file
+  ACPI Memory System Resource Partitioning And Monitoring (MPAM)
+  as specified in ARM spec DEN0065
+
+  Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
+  Copyright (c) 2022, ARM Limited. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef _MPAM_H_
+#define _MPAM_H_
+
+#pragma pack(1)
+
+///
+/// Memory System Resource Partitioning and Monitoring Table (MPAM)
+///
+typedef struct {
+  EFI_ACPI_DESCRIPTION_HEADERHeader;
+  UINT32 NumNodes;
+  UINT32 NodeOffset;
+  UINT32 Reserved;
+} EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORING_TABLE_HEADER;
+
+///
+/// MPAM Revision (as defined in ACPI 6.4 spec.)
+///
+#define 
EFI_ACPI_6_4_MEMORY_SYSTEM_RESOURCE_PARTITIONING_MONITORING_TABLE_REVISION  0x01
+
+///
+/// Memory System Controller Node Structure
+///
+
+typedef struct {
+  UINT16Length;
+  UINT16Reserved;
+  UINT32Identifier;
+  UINT64BaseAddress;
+  UINT32MmioSize;
+  UINT32OverflowInterrupt;
+  UINT32OverflowInterruptFlags;
+  UINT32Reserved1;
+  UINT32OverflowInterruptAff;
+  UINT32ErrorInterrupt;
+  UINT32ErrorInterruptFlags;
+  UINT32Reserved2;
+  UINT32ErrorInterruptAff;
+  UINT32MaxNRdyUsec;
+  UINT64LinkedDeviceHwId;
+  UINT32LinkedDeviceInstanceHwId;
+  UINT32NumResourceNodes;
+} EFI_ACPI_6_4_MPAM_MSC_NODE;
+
+///
+/// Resource Node Structure
+///
+
+typedef struct {
+  UINT32Identifier;
+  UINT8 RisIndex;
+  UINT16Reserved1;
+  UINT8 LocatorType;
+  UINT64Locator;
+  UINT32NumFuncDep;
+} EFI_ACPI_6_4_MPAM_RESOURCE_NODE;
+
+#pragma pack()
+
+#endif
--
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92726): https://edk2.groups.io/g/devel/message/92726
Mute This Topic: https://groups.io/mt/93069490/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] IntelSiliconPkg: Fix DEBUG macros having incorrect number of arguments

2022-08-23 Thread Oram, Isaac W
Pushed as 9769bf28d1..e12240390f

Note that I had to fixup your author and signed off messages.
Author can be configured in groups.io settings I believe.
Signed off indicates an issue with your git config settings for name and email.
Also, I now notice the patch email was missing "[edk2-devel]" and 
"[edk2-platforms]" prefix to allow people to filter the emails effectively.
Please correct these for future review emails.

Regards,
Isaac

-Original Message-
From: Oram, Isaac W 
Sent: Tuesday, August 23, 2022 11:48 AM
To: Singh, DeepakX ; devel@edk2.groups.io
Cc: Ni, Ray ; Chaganty, Rangasai V 
; S, Ashraf Ali ; Pir, 
Ovais F 
Subject: RE: [PATCH V2] IntelSiliconPkg: Fix DEBUG macros having incorrect 
number of arguments

Reviewed-by: Isaac Oram 

Note that comparing the two patches shows no delta other than timestamp and 
title.

-Original Message-
From: Singh, DeepakX  
Sent: Tuesday, August 23, 2022 1:44 AM
To: devel@edk2.groups.io
Cc: Singh, DeepakX ; Ni, Ray ; 
Chaganty, Rangasai V ; Oram, Isaac W 
; S, Ashraf Ali ; Pir, Ovais F 

Subject: [PATCH V2] IntelSiliconPkg: Fix DEBUG macros having incorrect number 
of arguments

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4027

Cc: Ray Ni 
Cc: Rangasai V Chaganty 
Cc: Isaac Oram 
Cc: Ashraf Ali S 
Cc: Ovais F Pir 

Signed-off-by: Singh Deepak5x 
---
 .../IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c   | 2 +-
 .../Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
 
b/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
index aa2bf14fa8..7a70dc7aea 100644
--- 
a/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
+++ 
b/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
@@ -488,7 +488,7 @@ DoMeasurementsFromDigestRegister (
   DEBUG((DEBUG_INFO, "\n"));
 }
 
-DEBUG((DEBUG_INFO, "ExtendDigestRegister...\n", ExtendDigestRegister));
+DEBUG((DEBUG_INFO, "ExtendDigestRegister...\n"));
 ExtendDigestRegister (PciIo, DeviceSecurityPolicy, TcgAlgId, DigestSel, 
Digest, DeviceSecurityState);
   }
 }
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c 
b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
index c7a56cf571..ef1737b1b6 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
@@ -642,7 +642,7 @@ DumpVtdVerRegs (
   IN VTD_VER_REG*VerReg
   )
 {
-  DEBUG ((DEBUG_INFO, "  VerReg:\n", VerReg->Uint32));
+  DEBUG ((DEBUG_INFO, "   VerReg - 0x%x\n", VerReg->Uint32));
   DEBUG ((DEBUG_INFO, "Major - 0x%x\n", VerReg->Bits.Major));
   DEBUG ((DEBUG_INFO, "Minor - 0x%x\n", VerReg->Bits.Minor));
 }
@@ -657,7 +657,7 @@ DumpVtdCapRegs (
   IN VTD_CAP_REG *CapReg
   )
 {
-  DEBUG((DEBUG_INFO, "  CapReg:\n", CapReg->Uint64));
+  DEBUG((DEBUG_INFO, "  CapReg   - 0x%x\n", CapReg->Uint64));
   DEBUG((DEBUG_INFO, "ND - 0x%x\n", CapReg->Bits.ND));
   DEBUG((DEBUG_INFO, "AFL- 0x%x\n", CapReg->Bits.AFL));
   DEBUG((DEBUG_INFO, "RWBF   - 0x%x\n", CapReg->Bits.RWBF));
@@ -688,7 +688,7 @@ DumpVtdECapRegs (
   IN VTD_ECAP_REG *ECapReg
   )
 {
-  DEBUG((DEBUG_INFO, "  ECapReg:\n", ECapReg->Uint64));
+  DEBUG((DEBUG_INFO, "  ECapReg  - 0x%x\n", ECapReg->Uint64));
   DEBUG((DEBUG_INFO, "C  - 0x%x\n", ECapReg->Bits.C));
   DEBUG((DEBUG_INFO, "QI - 0x%x\n", ECapReg->Bits.QI));
   DEBUG((DEBUG_INFO, "DT - 0x%x\n", ECapReg->Bits.DT));
-- 
2.30.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92724): https://edk2.groups.io/g/devel/message/92724
Mute This Topic: https://groups.io/mt/93211265/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] IntelSiliconPkg: Fix DEBUG macros having incorrect number of arguments

2022-08-23 Thread Oram, Isaac W
Reviewed-by: Isaac Oram 

Note that comparing the two patches shows no delta other than timestamp and 
title.

-Original Message-
From: Singh, DeepakX  
Sent: Tuesday, August 23, 2022 1:44 AM
To: devel@edk2.groups.io
Cc: Singh, DeepakX ; Ni, Ray ; 
Chaganty, Rangasai V ; Oram, Isaac W 
; S, Ashraf Ali ; Pir, Ovais F 

Subject: [PATCH V2] IntelSiliconPkg: Fix DEBUG macros having incorrect number 
of arguments

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4027

Cc: Ray Ni 
Cc: Rangasai V Chaganty 
Cc: Isaac Oram 
Cc: Ashraf Ali S 
Cc: Ovais F Pir 

Signed-off-by: Singh Deepak5x 
---
 .../IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c   | 2 +-
 .../Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
 
b/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
index aa2bf14fa8..7a70dc7aea 100644
--- 
a/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
+++ 
b/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
@@ -488,7 +488,7 @@ DoMeasurementsFromDigestRegister (
   DEBUG((DEBUG_INFO, "\n"));
 }
 
-DEBUG((DEBUG_INFO, "ExtendDigestRegister...\n", ExtendDigestRegister));
+DEBUG((DEBUG_INFO, "ExtendDigestRegister...\n"));
 ExtendDigestRegister (PciIo, DeviceSecurityPolicy, TcgAlgId, DigestSel, 
Digest, DeviceSecurityState);
   }
 }
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c 
b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
index c7a56cf571..ef1737b1b6 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
@@ -642,7 +642,7 @@ DumpVtdVerRegs (
   IN VTD_VER_REG*VerReg
   )
 {
-  DEBUG ((DEBUG_INFO, "  VerReg:\n", VerReg->Uint32));
+  DEBUG ((DEBUG_INFO, "   VerReg - 0x%x\n", VerReg->Uint32));
   DEBUG ((DEBUG_INFO, "Major - 0x%x\n", VerReg->Bits.Major));
   DEBUG ((DEBUG_INFO, "Minor - 0x%x\n", VerReg->Bits.Minor));
 }
@@ -657,7 +657,7 @@ DumpVtdCapRegs (
   IN VTD_CAP_REG *CapReg
   )
 {
-  DEBUG((DEBUG_INFO, "  CapReg:\n", CapReg->Uint64));
+  DEBUG((DEBUG_INFO, "  CapReg   - 0x%x\n", CapReg->Uint64));
   DEBUG((DEBUG_INFO, "ND - 0x%x\n", CapReg->Bits.ND));
   DEBUG((DEBUG_INFO, "AFL- 0x%x\n", CapReg->Bits.AFL));
   DEBUG((DEBUG_INFO, "RWBF   - 0x%x\n", CapReg->Bits.RWBF));
@@ -688,7 +688,7 @@ DumpVtdECapRegs (
   IN VTD_ECAP_REG *ECapReg
   )
 {
-  DEBUG((DEBUG_INFO, "  ECapReg:\n", ECapReg->Uint64));
+  DEBUG((DEBUG_INFO, "  ECapReg  - 0x%x\n", ECapReg->Uint64));
   DEBUG((DEBUG_INFO, "C  - 0x%x\n", ECapReg->Bits.C));
   DEBUG((DEBUG_INFO, "QI - 0x%x\n", ECapReg->Bits.QI));
   DEBUG((DEBUG_INFO, "DT - 0x%x\n", ECapReg->Bits.DT));
-- 
2.30.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92723): https://edk2.groups.io/g/devel/message/92723
Mute This Topic: https://groups.io/mt/93211265/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 v2 1/1] MinPlatformPkg: Add FspNvsBuffer compression option

2022-08-23 Thread Oram, Isaac W
Implementing this way will break the build for most of the open MinPlatform 
ports.  At minimum, please add the CompressLib to CoreCommonLib.dsc next to the 
UefiDecompressLib instantiation so that it is included automatically for most 
boards.

Regarding the design, I agree this is a good capability.  And it makes sense to 
me to be board controlled rather than FSP controlled.

I wonder if it might be better to modify the LargeVariableRead/Write such that 
it compresses/decompresses large variables automatically.  Could be controlled 
via library class instance or maybe via PatchablePerModule PCD.  Boards would 
still have a lot of control if they wanted.

Regards,
Isaac

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Michael Kubacki
Sent: Monday, August 22, 2022 8:23 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Oram, Isaac W ; Gao, 
Liming ; Dong, Eric 
Subject: [edk2-devel] [edk2-platforms][PATCH v2 1/1] MinPlatformPkg: Add 
FspNvsBuffer compression option

From: Michael Kubacki 

Adds a PCD called "PcdEnableCompressedFspNvsBuffer" that allows the 
"FspNvsBuffer" UEFI variable data to be saved as compressed data.

Especially due to the nature of the data saved in this variable, it compresses 
well. For example, it has been found to reduce ~63KB of data to ~13KB. Boot 
time impact has been found to be negligible.

The default value is FALSE to keep default behavior consistent.

Decompression can be performed on the variable data using the standard 
UefiDecompressLib.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Isaac Oram 
Cc: Liming Gao 
Cc: Eric Dong 
Signed-off-by: Michael Kubacki 
---

Notes:
v2: Rebase onto 9769bf28d1fc

 Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig.c   
| 62 
 Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig.inf 
|  4 ++
 Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec   
|  6 ++
 Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc   
|  1 +
 4 files changed, 60 insertions(+), 13 deletions(-)

diff --git 
a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig.c 
b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig.c
index 0215e8eeddfb..95b8cef8b32b 100644
--- 
a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig.c
+++ b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemo
+++ ryConfig.c
@@ -3,6 +3,7 @@
   exists, and saves the data to nvRAM.
 
 Copyright (c) 2017 - 2022, Intel Corporation. All rights reserved.
+Copyright (c) Microsoft Corporation.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -10,6 +11,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include 
  #include   #include 
+#include 
 #include 
 #include 
 #include 
@@ -19,6 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent  #include 
  #include   #include 

+#include 
 #include 
 #include 
 
@@ -38,20 +41,26 @@ SaveMemoryConfigEntryPoint (
   IN EFI_SYSTEM_TABLE   *SystemTable
   )
 {
-  EFI_STATUSStatus;
-  EFI_HOB_GUID_TYPE *GuidHob;
-  VOID  *HobData;
-  VOID  *VariableData;
-  UINTN DataSize;
-  UINTN BufferSize;
-  BOOLEAN   DataIsIdentical;
+  EFI_STATUS Status;
+  EFI_HOB_GUID_TYPE  *GuidHob;
+  VOID   *HobData;
+  VOID   *VariableData;
+  UINTN  DataSize;
+  UINTN  BufferSize;
+  BOOLEANDataIsIdentical;
+  VOID   *CompressedData;
+  UINT64 CompressedSize;
+  UINTN  CompressedAllocationPages;
 
-  DataSize= 0;
-  BufferSize  = 0;
-  VariableData= NULL;
-  GuidHob = NULL;
-  HobData = NULL;
-  DataIsIdentical = FALSE;
+  DataSize  = 0;
+  BufferSize= 0;
+  VariableData  = NULL;
+  GuidHob   = NULL;
+  HobData   = NULL;
+  DataIsIdentical   = FALSE;
+  CompressedData= NULL;
+  CompressedSize= 0;
+  CompressedAllocationPages = 0;
 
   //
   // Search for the Memory Configuration GUID HOB.  If it is not present, then 
@@ -73,6 +82,29 @@ SaveMemoryConfigEntryPoint (
 }
   }
 
+  if (PcdGetBool (PcdEnableCompressedFspNvsBuffer)) {
+if (DataSize > 0) {
+  CompressedAllocationPages = EFI_SIZE_TO_PAGES (DataSize);
+  CompressedData= AllocatePages (CompressedAllocationPages);
+  if (CompressedData == NULL) {
+DEBUG ((DEBUG_ERROR, "[%a] - Failed to allocate compressed data 
buffer.\n", __FUNCTION__));
+ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES);
+return EFI_OUT_OF_RESOURCES;
+  }
+
+  CompressedSize = EFI_PAGES_TO_SIZE (CompressedAllocationPages);
+  Status = Compress (HobData, DataSize, CompressedData, 
);
+  if (EFI_ERROR (Status)) {
+DEBUG ((DEBUG_ERROR, "[%a] - 

[edk2-devel] email issues resolved

2022-08-23 Thread Leif Lindholm
Hi everyone,

As some of you might have noticed, my email setup broke a little over
a month ago. At the time I was on leave, so did not notice for a
while. And upon my return, it turned out it had broken in New and
Exciting ways - so it took some time to restore.

This has now been achieved, and I am back on the list and able to
post. (And hopefully a bit more attentive than before my break.)

/
Leif


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




[edk2-devel] [GSoC 22] Rust std PR Update

2022-08-23 Thread Ayush Singh
Hello everyone. This is a quick update about the Google Summer of Code Rust
Std project. The Draft PR, which I opened a week ago, has now been marked
Ready for Review [1]. I have also started the API change proposal required
for adding new public APIs to Rust [2]. So feel free to chime in there to
give your feedback.

Yours Sincerely,
Ayush Singh

[1]: https://github.com/rust-lang/rust/pull/100316
[2]: https://github.com/rust-lang/libs-team/issues/87


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92720): https://edk2.groups.io/g/devel/message/92720
Mute This Topic: https://groups.io/mt/93209554/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] Maintainers.txt: Update reviewers for IntelSiliconPkg

2022-08-23 Thread Oram, Isaac W
Reviewed-by: Isaac Oram 

-Original Message-
From: S, Ashraf Ali  
Sent: Tuesday, August 23, 2022 12:27 AM
To: devel@edk2.groups.io
Cc: S, Ashraf Ali ; Ni, Ray ; 
Chaganty, Rangasai V ; Oram, Isaac W 

Subject: [PATCH V2] Maintainers.txt: Update reviewers for IntelSiliconPkg

Add Ashraf Ali S as IntelSiliconPkg reviewers

Signed-off-by: Ashraf Ali S 
Cc: Ray Ni 
Cc: Rangasai V Chaganty 
Cc: Isaac Oram 
---
 Maintainers.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Maintainers.txt b/Maintainers.txt index 5e403ce851..3fe5dc21a8 
100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -277,6 +277,7 @@ F: Silicon/Intel/IntelSiliconPkg/
 M: Ray Ni 
 M: Rangasai V Chaganty 
 M: Isaac Oram 
+R: Ashraf Ali S 
 
 Silicon/Intel/QuarkSocPkg
 F: Silicon/Intel/QuarkSocPkg/
--
2.30.2.windows.1



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




Re: [edk2-devel] [PATCH 02/24] ArmPkg: Remove duplicated words

2022-08-23 Thread Sami Mujawar

Hi Pierre,

Thank you for this patch.

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

On 23/08/2022 05:00 pm, PierreGondois via groups.io wrote:

From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Signed-off-by: Pierre Gondois 
---
  ArmPkg/Drivers/ArmScmiDxe/Scmi.c | 4 ++--
  ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c | 2 +-
  2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ArmPkg/Drivers/ArmScmiDxe/Scmi.c b/ArmPkg/Drivers/ArmScmiDxe/Scmi.c
index d5a1ff0be33c..fcf4ed496f26 100644
--- a/ArmPkg/Drivers/ArmScmiDxe/Scmi.c
+++ b/ArmPkg/Drivers/ArmScmiDxe/Scmi.c
@@ -145,8 +145,8 @@ ScmiCommandExecute (
  
  /** Internal common function useful for common protocol discovery messages.
  
-  @param[in] ProtocolIdProtocol Id of the the protocol.

-  @param[in] MesaageId Message Id of the message.
+  @param[in] ProtocolIdProtocol Id of the protocol.
+  @param[in] MessageId Message Id of the message.
  
@param[out] ReturnValues SCMI response return values.
  
diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c

index 4a0513392a75..e5ecc7375153 100644
--- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
+++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
@@ -613,7 +613,7 @@ ArmConfigureMmu (
// loss of coherency when using mismatched attributes, and given that memory
// is mapped cacheable except for extraordinary cases (such as non-coherent
// DMA), have the page table walker perform cached accesses as well, and
-  // assert below that that matches the attributes we use for CPU accesses to
+  // assert below that matches the attributes we use for CPU accesses to
// the region.
//
TCR |= TCR_SH_INNER_SHAREABLE |



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




Re: [edk2-devel] [PATCH 03/24] ArmPlatformPkg: Remove duplicated words

2022-08-23 Thread Sami Mujawar

Hi Pierre,

Thank you for this patch.

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

On 23/08/2022 05:00 pm, PierreGondois via groups.io wrote:

From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Signed-off-by: Pierre Gondois 
---
  .../Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c   | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c 
b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
index a203299c0637..ec7feaeedcf8 100644
--- a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
+++ b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
@@ -173,7 +173,7 @@ LibGetTime (
  
@retval EFI_SUCCESS   The operation completed successfully.

@retval EFI_INVALID_PARAMETER A time field is out of range.
-  @retval EFI_DEVICE_ERROR  The time could not be set due due to hardware 
error.
+  @retval EFI_DEVICE_ERROR  The time could not be set due to hardware 
error.
  
  **/

  EFI_STATUS



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




Re: [edk2-devel] [PATCH 04/24] ArmVirtPkg: Remove duplicated words

2022-08-23 Thread Sami Mujawar

Hi Pierre,

Thank you for this patch.

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

On 23/08/2022 05:00 pm, PierreGondois via groups.io wrote:

From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Ard Biesheuvel 
Signed-off-by: Pierre Gondois 
---
  .../Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c  | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c 
b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c
index 5c01a9997ead..fb1daf32769c 100644
--- 
a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c
+++ 
b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c
@@ -55,7 +55,7 @@ GetSerialConsolePortAddress (
  return EFI_INVALID_PARAMETER;
}
  
-  // The "chosen" node resides at the the root of the DT. Fetch it.

+  // The "chosen" node resides at the root of the DT. Fetch it.
ChosenNode = fdt_path_offset (Fdt, "/chosen");
if (ChosenNode < 0) {
  return EFI_NOT_FOUND;



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




Re: [edk2-devel] [PATCH 21/24] StandaloneMmPkg: Remove duplicated words

2022-08-23 Thread Sami Mujawar

Hi Pierre,

Thank you for this patch.

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

On 23/08/2022 05:00 pm, pierre.gond...@arm.com wrote:

From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Ard Biesheuvel 
Cc: Sami Mujawar 
Cc: Jiewen Yao 
Signed-off-by: Pierre Gondois 
---
  StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c | 2 +-
  .../Library/StandaloneMmMemLib/StandaloneMmMemLib.inf   | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c 
b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c
index e6393272514f..814352369ed3 100644
--- a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c
+++ b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c
@@ -1,7 +1,7 @@
  /** @file
Instance of MM memory check library.
  
-  MM memory check library library implementation. This library consumes MM_ACCESS_PROTOCOL

+  MM memory check library implementation. This library consumes 
MM_ACCESS_PROTOCOL
to get MMRAM information. In order to use this library instance, the 
platform should produce
all MMRAM range via MM_ACCESS_PROTOCOL, including the range for firmware 
(like MM Core
and MM driver) and/or specific dedicated hardware.
diff --git a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf 
b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
index b29d97a74607..ed3cdf199452 100644
--- a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
+++ b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
@@ -1,7 +1,7 @@
  ## @file
  #  Instance of MM memory check library.
  #
-#  MM memory check library library implementation. This library consumes 
MM_ACCESS_PROTOCOL
+#  MM memory check library implementation. This library consumes 
MM_ACCESS_PROTOCOL
  #  to get MMRAM information. In order to use this library instance, the 
platform should produce
  #  all MMRAM range via MM_ACCESS_PROTOCOL, including the range for firmware 
(like MM Core
  #  and MM driver) and/or specific dedicated hardware.



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




Re: [edk2-devel] [PATCH 07/24] DynamicTablesPkg: Remove duplicated words

2022-08-23 Thread Sami Mujawar

Hi Pierre,

Thank you for this patch.

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

On 23/08/2022 05:00 pm, pierre.gond...@arm.com wrote:

From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Sami Mujawar 
Cc: Alexei Fedorov 
Signed-off-by: Pierre Gondois 
---
  DynamicTablesPkg/Include/Library/HwInfoParserLib.h  | 2 +-
  .../Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c | 2 +-
  .../Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c | 2 +-
  DynamicTablesPkg/Library/Common/AmlLib/AmlNodeDefines.h | 2 +-
  DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.c   | 2 +-
  DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.h   | 2 +-
  DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c | 2 +-
  DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParser.c   | 2 +-
  .../Library/FdtHwInfoParserLib/Gic/ArmGicDispatcher.c   | 2 +-
  .../Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c | 2 +-
  10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/DynamicTablesPkg/Include/Library/HwInfoParserLib.h 
b/DynamicTablesPkg/Include/Library/HwInfoParserLib.h
index 05c21aeac00a..9710f7466170 100644
--- a/DynamicTablesPkg/Include/Library/HwInfoParserLib.h
+++ b/DynamicTablesPkg/Include/Library/HwInfoParserLib.h
@@ -83,7 +83,7 @@ HwInfoParse (
);
  
  /** Cleanup any internal state and resources that were allocated

-by the the HwInfoParser.
+by the HwInfoParser.
  
@param [in]  ParserHandleA handle to the parser instance.
  
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c

index 18c8b8d24525..b990686d40a3 100644
--- 
a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c
+++ 
b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c
@@ -587,7 +587,7 @@ BuildSsdtCmn600TableEx (
  return Status;
}
  
-  // Setup the table list early so that that appropriate cleanup

+  // Setup the table list early so that appropriate cleanup
// can be done in case of failure.
*Table = TableList;
  
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c

index 39cfbad95926..b850320eede7 100644
--- 
a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c
+++ 
b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c
@@ -239,7 +239,7 @@ BuildSsdtSerialPortTableEx (
  return Status;
}
  
-  // Setup the table list early so that that appropriate cleanup

+  // Setup the table list early so that appropriate cleanup
// can be done in case of failure.
*Table = TableList;
  
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/AmlNodeDefines.h b/DynamicTablesPkg/Library/Common/AmlLib/AmlNodeDefines.h

index 8ceb20ff415e..d199f06cc54d 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/AmlNodeDefines.h
+++ b/DynamicTablesPkg/Library/Common/AmlLib/AmlNodeDefines.h
@@ -34,7 +34,7 @@ typedef AML_NODE_HEADER *AML_NODE_HANDLE;
  
  /** AML root node.
  
-  The root node is unique and at the head of of tree. It is a fake node used

+  The root node is unique and at the head of tree. It is a fake node used
to maintain the list of AML statements (stored as object nodes) which are
at the first scope level.
  */
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.c 
b/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.c
index 391c72bd322e..8f460a972841 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.c
+++ b/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.c
@@ -27,7 +27,7 @@
of NameSegs that have less that 4 chars, like "DEV". "DEV" will be expanded
as "DEV_".
  
-  An AML NameString is not NULL terminated and is is only composed of

+  An AML NameString is not NULL terminated and is only composed of
4 chars long NameSegs.
  
@param  [in] NameOpNode   NameOp object node defining a variable.

diff --git a/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.h 
b/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.h
index 8bbf62bbcd24..2b4c60d3ee14 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.h
+++ b/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.h
@@ -19,7 +19,7 @@
of NameSegs that have less that 4 chars, like "DEV". "DEV" will be expanded
as "DEV_".
  
-  An AML NameString is not NULL terminated and is is only composed of

+  An AML NameString is not NULL terminated and is only composed of
4 chars long NameSegs.
  
@param  [in] NameOpNode   NameOp object node defining a variable.

diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c 

Re: [edk2-devel] [PATCH 6/6] ArmPkg/SmbiosMiscDxe: Get SMBIOS information from OemMiscLib

2022-08-23 Thread Sami Mujawar

Hi Nhi,

Thank you for this patch.

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

On 23/08/2022 11:59 am, Nhi Pham wrote:

From: Minh Nguyen 

In some scenarios, the information of Bios Version, Bios Release
and Embedded Controller Firmware Release are fetched during UEFI
booting. This patch supports updating those fields dynamically
when the PCDs are empty.

Signed-off-by: Nhi Pham 
---
  ArmPkg/Include/Library/OemMiscLib.h   | 21 
+
  ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c   | 28 
+
  ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c | 32 
+---
  3 files changed, 70 insertions(+), 11 deletions(-)

diff --git a/ArmPkg/Include/Library/OemMiscLib.h 
b/ArmPkg/Include/Library/OemMiscLib.h
index 1936619d9b5b..541274999e5c 100644
--- a/ArmPkg/Include/Library/OemMiscLib.h
+++ b/ArmPkg/Include/Library/OemMiscLib.h
@@ -37,6 +37,7 @@ typedef struct {
  } OEM_MISC_PROCESSOR_DATA;

  


  typedef enum {

+  BiosVersionType00,

ProductNameType01,

SerialNumType01,

UuidType01,

@@ -247,4 +248,24 @@ OemGetSystemUuid (
OUT GUID  *SystemUuid

);

  


+/** Fetches the BIOS release.

+

+  @return The BIOS release.

+**/

+UINT16

+EFIAPI

+OemGetBiosRelease (

+  VOID

+  );

+

+/** Fetches the embedded controller firmware release.

+

+  @return The embedded controller firmware release.

+**/

+UINT16

+EFIAPI

+OemGetEmbeddedControllerFirmwareRelease (

+  VOID

+  );

+

  #endif // OEM_MISC_LIB_H_

diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c 
b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
index 32f6d55c1a9a..788ccab9e8c1 100644
--- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
+++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
@@ -254,3 +254,31 @@ OemGetSystemUuid (
ASSERT (FALSE);

CopyGuid (SystemUuid, );

  }

+

+/** Fetches the BIOS release.

+

+  @return The BIOS release.

+**/

+UINT16

+EFIAPI

+OemGetBiosRelease (

+  VOID

+  )

+{

+  ASSERT (FALSE);

+  return 0x;

+}

+

+/** Fetches the embedded controller firmware release.

+

+  @return The embedded controller firmware release.

+**/

+UINT16

+EFIAPI

+OemGetEmbeddedControllerFirmwareRelease (

+  VOID

+  )

+{

+  ASSERT (FALSE);

+  return 0x;

+}

diff --git 
a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c 
b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
index b49c4b754cab..e9106a8a2fec 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
@@ -1,5 +1,6 @@
  /** @file

  


+  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.

Copyright (c) 2021, NUVIA Inc. All rights reserved.

Copyright (c) 2009, Intel Corporation. All rights reserved.

Copyright (c) 2015, Hisilicon Limited. All rights reserved.

@@ -13,6 +14,7 @@
  #include 

  #include 

  #include 

+#include 

  #include 

  #include 

  


@@ -191,11 +193,11 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor) {
  TokenToUpdate = STRING_TOKEN (STR_MISC_BIOS_VERSION);

  HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Version, NULL);

} else {

-Version = (CHAR16 *)PcdGetPtr (PcdFirmwareVersionString);

-if (StrLen (Version) > 0) {

-  TokenToUpdate = STRING_TOKEN (STR_MISC_BIOS_VERSION);

-  HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Version, NULL);

-}

+  OemUpdateSmbiosInfo (

+mSmbiosMiscHiiHandle,

+STRING_TOKEN (STR_MISC_BIOS_VERSION),

+BiosVersionType00

+);

}

  


Char16String = GetBiosReleaseDate ();

@@ -251,13 +253,21 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor) {
  }

}

  


-  SmbiosRecord->SystemBiosMajorRelease = (UINT8)(PcdGet16 (PcdSystemBiosRelease) 
>> 8);

-  SmbiosRecord->SystemBiosMinorRelease = (UINT8)(PcdGet16 (PcdSystemBiosRelease) 
& 0xFF);

+  if (PcdGet16 (PcdSystemBiosRelease) != 0x) {

+SmbiosRecord->SystemBiosMajorRelease = (UINT8)(PcdGet16 (PcdSystemBiosRelease) 
>> 8);

+SmbiosRecord->SystemBiosMinorRelease = (UINT8)(PcdGet16 (PcdSystemBiosRelease) 
& 0xFF);

+  } else {

+SmbiosRecord->SystemBiosMajorRelease = (UINT8)(OemGetBiosRelease () >> 8);

+SmbiosRecord->SystemBiosMinorRelease = (UINT8)(OemGetBiosRelease () & 
0xFF);

+  }

  


-  SmbiosRecord->EmbeddedControllerFirmwareMajorRelease = (UINT16)

- (PcdGet16 
(PcdEmbeddedControllerFirmwareRelease) >> 8);

-  SmbiosRecord->EmbeddedControllerFirmwareMinorRelease = (UINT16)

- (PcdGet16 
(PcdEmbeddedControllerFirmwareRelease) & 0xFF);

+  if (PcdGet16 (PcdEmbeddedControllerFirmwareRelease) != 0x) {

+SmbiosRecord->EmbeddedControllerFirmwareMajorRelease = (UINT16)(PcdGet16 

Re: [edk2-devel] [PATCH 11/24] IntelFsp2WrapperPkg: Remove duplicated words

2022-08-23 Thread Chiu, Chasel


Thanks for fixing the typo!
Reviewed-by: Chasel Chiu 


> -Original Message-
> From: pierre.gond...@arm.com 
> Sent: Tuesday, August 23, 2022 9:00 AM
> To: devel@edk2.groups.io
> Cc: Pierre Gondois ; Chiu, Chasel
> ; Desimone, Nathaniel L
> 
> Subject: [PATCH 11/24] IntelFsp2WrapperPkg: Remove duplicated words
> 
> From: Pierre Gondois 
> 
> In an effort to clean the documentation of the above package, remove
> duplicated words.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Signed-off-by: Pierre Gondois 
> ---
>  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> index c43b0c2267a7..08af6d814ad1 100644
> --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> @@ -87,7 +87,7 @@ [PcdsFixedAtBuild, PcdsPatchableInModule]
># We need a flag (PCD) to indicate if there is need to do such FSP
> measurement or NOT.
># 2) The FSP binary includes FSP code and FSP UPD region. The UPD region
> is considered
># as configuration block, and it may be updated by OEM by design.
> -  # This flag (PCD) is to indicate if we need isolate the the UPD region from
> the FSP code region.
> +  # This flag (PCD) is to indicate if we need isolate the UPD region from the
> FSP code region.
># BIT0: Need measure FSP. (for FSP1.x) - reserved in FSP2.
># BIT1: Need measure FSPT. (for FSP 2.x)
># BIT2: Need measure FSPM. (for FSP 2.x)
> --
> 2.25.1



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




Re: [edk2-devel] [PATCH 5/6] ArmPkg/SmbiosMiscDxe: Remove redundant updates in SMBIOS Type 2

2022-08-23 Thread Sami Mujawar

Hi Nhi,

Thank you for this patch.

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

On 23/08/2022 11:59 am, Nhi Pham wrote:

From: Minh Nguyen 

This patch removes redundant updates of "BoardManufacturerType02"
and "SerialNumberType02".

Signed-off-by: Nhi Pham 
---
  
ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
 | 10 --
  1 file changed, 10 deletions(-)

diff --git 
a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
 
b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
index f61546955f12..3441e7798860 100644
--- 
a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
+++ 
b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
@@ -120,16 +120,6 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBaseBoardManufacturer) {
  STRING_TOKEN (STR_MISC_BASE_BOARD_SERIAL_NUMBER),

  SerialNumberType02

  );

-  OemUpdateSmbiosInfo (

-mSmbiosMiscHiiHandle,

-STRING_TOKEN (STR_MISC_BASE_BOARD_MANUFACTURER),

-BoardManufacturerType02

-);

-  OemUpdateSmbiosInfo (

-mSmbiosMiscHiiHandle,

-STRING_TOKEN (STR_MISC_BASE_BOARD_SERIAL_NUMBER),

-SerialNumberType02

-);

OemUpdateSmbiosInfo (

  mSmbiosMiscHiiHandle,

  STRING_TOKEN (STR_MISC_BASE_BOARD_SKU_NUMBER),




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




Re: [edk2-devel] [PATCH 4/6] ArmPkg/SmbiosMiscDxe: Fix typo of "AssetTagType02"

2022-08-23 Thread Sami Mujawar

Hi Nhi,

Thank you for this fix.

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

On 23/08/2022 11:59 am, Nhi Pham wrote:

From: Minh Nguyen 

This patch fixes typo from "AssertTagType02"
to "AssetTagType02".

Signed-off-by: Nhi Pham 
---
  ArmPkg/Include/Library/OemMiscLib.h   
   | 2 +-
  
ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
 | 3 ++-
  2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ArmPkg/Include/Library/OemMiscLib.h 
b/ArmPkg/Include/Library/OemMiscLib.h
index d87737db9c2b..1936619d9b5b 100644
--- a/ArmPkg/Include/Library/OemMiscLib.h
+++ b/ArmPkg/Include/Library/OemMiscLib.h
@@ -44,7 +44,7 @@ typedef enum {
VersionType01,

SkuNumberType01,

FamilyType01,

-  AssertTagType02,

+  AssetTagType02,

SerialNumberType02,

BoardManufacturerType02,

ProductNameType02,

diff --git 
a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
 
b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
index 870610b17243..f61546955f12 100644
--- 
a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
+++ 
b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
@@ -4,6 +4,7 @@
  


Based on files under Nt32Pkg/MiscSubClassPlatformDxe/

  


+  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.

Copyright (c) 2021, NUVIA Inc. All rights reserved.

Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.

Copyright (c) 2015, Hisilicon Limited. All rights reserved.

@@ -112,7 +113,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBaseBoardManufacturer) {
OemUpdateSmbiosInfo (

  mSmbiosMiscHiiHandle,

  STRING_TOKEN (STR_MISC_BASE_BOARD_ASSET_TAG),

-AssertTagType02

+AssetTagType02

  );

OemUpdateSmbiosInfo (

  mSmbiosMiscHiiHandle,




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




Re: [edk2-devel] [PATCH 3/6] ArmPkg/SmbiosMiscDxe: Support fetching System UUID

2022-08-23 Thread Sami Mujawar

Hi Nhi,

These change look good to me.

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

On 23/08/2022 11:59 am, Nhi Pham wrote:

This adds an API to OemMiscLib for fetching the system UUID according to
the platform.

Signed-off-by: Nhi Pham 
---
  ArmPkg/Include/Library/OemMiscLib.h   
| 12 
  ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c   
| 18 ++
  ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c 
|  3 ++-
  3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/ArmPkg/Include/Library/OemMiscLib.h 
b/ArmPkg/Include/Library/OemMiscLib.h
index 330bb4b014de..d87737db9c2b 100644
--- a/ArmPkg/Include/Library/OemMiscLib.h
+++ b/ArmPkg/Include/Library/OemMiscLib.h
@@ -235,4 +235,16 @@ OemGetChassisNumPowerCords (
VOID

);

  


+/**

+  Fetches the system UUID.

+

+  @param[out] SystemUuid The pointer to the buffer to store the System 
UUID.

+

+**/

+VOID

+EFIAPI

+OemGetSystemUuid (

+  OUT GUID  *SystemUuid

+  );

+

  #endif // OEM_MISC_LIB_H_

diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c 
b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
index 98970407a65e..32f6d55c1a9a 100644
--- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
+++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
@@ -1,6 +1,7 @@
  /** @file

  *  OemMiscLib.c

  *

+*  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.

  *  Copyright (c) 2021, NUVIA Inc. All rights reserved.

  *  Copyright (c) 2018, Hisilicon Limited. All rights reserved.

  *  Copyright (c) 2018, Linaro Limited. All rights reserved.

@@ -10,6 +11,7 @@
  **/

  


  #include 

+#include 

  #include 

  #include 

  #include 

@@ -236,3 +238,19 @@ OemGetChassisNumPowerCords (
ASSERT (FALSE);

return 1;

  }

+

+/**

+  Fetches the system UUID.

+

+  @param[out] SystemUuid The pointer to the buffer to store the System 
UUID.

+

+**/

+VOID

+EFIAPI

+OemGetSystemUuid (

+  OUT GUID  *SystemUuid

+  )

+{

+  ASSERT (FALSE);

+  CopyGuid (SystemUuid, );

+}

diff --git 
a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c 
b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c
index 5cf72644d0b2..22fb5eccaa63 100644
--- 
a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c
+++ 
b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c
@@ -4,6 +4,7 @@
  


Based on files under Nt32Pkg/MiscSubClassPlatformDxe/

  


+  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.

Copyright (c) 2021, NUVIA Inc. All rights reserved.

Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.

Copyright (c) 2015, Hisilicon Limited. All rights reserved.

@@ -160,7 +161,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscSystemManufacturer) {
  


SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE1);

  


-  CopyGuid (>Uuid, >Uuid);

+  OemGetSystemUuid (>Uuid);

  


OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);

UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, ManuStrLen + 1);




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




Re: [edk2-devel] [PATCH 2/6] ArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID call

2022-08-23 Thread Sami Mujawar

Hi Nhi,

Thank you for this fix.

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

On 23/08/2022 11:59 am, Nhi Pham wrote:

From: Minh Nguyen 

According to "SMC Calling Convention" specification, section 7.4,
return value of Arm Architecture Calls is stored at first argument of
SMC aguments (ARM_SMC_ARGS). This value can be negative values indicating
error or positive values (including zero) indicating success. Positive
value would contain information of respective Function ID (Section 7.3.4
and 7.4.4).

For that reason, "SMCCC_VERSION" and "SMCCC_ARCH_FEATURES"
Function ID calls read return value from "SmcCallStatus" variable
(Args.Arg0 - first argument of SMC call). But "SMCCC_ARCH_SOC_ID"
Function ID call is reading return value from "SmcParam" variable
(Args.Arg1 - second argument of SMC call) so it leads to unexpected
results of "Jep106Code" and "SocRevision". This patch is to correct it.

Signed-off-by: Nhi Pham 
---
  ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c | 6 
+++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c 
b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c
index e0010a40e489..b961be213358 100644
--- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c
+++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c
@@ -2,7 +2,7 @@
Functions for processor information common to ARM and AARCH64.

  


Copyright (c) 2021, NUVIA Inc. All rights reserved.

-  Copyright (c) 2021, Ampere Computing LLC. All rights reserved.

+  Copyright (c) 2021 - 2022, Ampere Computing LLC. All rights reserved.

  


SPDX-License-Identifier: BSD-2-Clause-Patent

  


@@ -131,7 +131,7 @@ SmbiosGetSmcArm64SocId (
SmcCallStatus = ArmCallSmc1 (SMCCC_ARCH_SOC_ID, , NULL, NULL);

  


if (SmcCallStatus >= 0) {

-*Jep106Code = (INT32)SmcParam;

+*Jep106Code = SmcCallStatus;

} else {

  Status = EFI_UNSUPPORTED;

}

@@ -140,7 +140,7 @@ SmbiosGetSmcArm64SocId (
SmcCallStatus = ArmCallSmc1 (SMCCC_ARCH_SOC_ID, , NULL, NULL);

  


if (SmcCallStatus >= 0) {

-*SocRevision = (INT32)SmcParam;

+*SocRevision = SmcCallStatus;

} else {

  Status = EFI_UNSUPPORTED;

}




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




Re: [edk2-devel] [PATCH 1/6] ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib

2022-08-23 Thread Sami Mujawar

Hi Nhi,

Thank you for this patch.

Please find my response inline marked [SAMI].

Regards,

Sami Mujawar

On 23/08/2022 11:59 am, Nhi Pham wrote:

From: Minh Nguyen 

In some scenarios, the processor version may be updated dynamically
from pre-UEFI firmware during booting. But the processor version is
fixed with PCD (PcdProcessorVersion), so it can not be updated it
dynamically. This patch will support setting that value both
statically and dynamically.

Signed-off-by: Nhi Pham 
---
  ArmPkg/Include/Library/OemMiscLib.h  | 2 ++
  ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c | 8 +++-
  2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ArmPkg/Include/Library/OemMiscLib.h 
b/ArmPkg/Include/Library/OemMiscLib.h
index 47cb30d84a62..330bb4b014de 100644
--- a/ArmPkg/Include/Library/OemMiscLib.h
+++ b/ArmPkg/Include/Library/OemMiscLib.h
@@ -1,5 +1,6 @@
  /** @file

  *

+*  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.

  *  Copyright (c) 2021, NUVIA Inc. All rights reserved.

  *  Copyright (c) 2015, Hisilicon Limited. All rights reserved.

  *  Copyright (c) 2015, Linaro Limited. All rights reserved.

@@ -58,6 +59,7 @@ typedef enum {
SkuNumberType03,

ProcessorPartNumType04,

ProcessorSerialNumType04,

+  ProcessorVersionType04,

SmbiosHiiStringFieldMax

  } OEM_MISC_SMBIOS_HII_STRING_FIELD;

  


diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c 
b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
index 0b9af9bd7e1c..524b37b10479 100644
--- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
+++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
@@ -1,6 +1,7 @@
  /** @file

ProcessorSubClass.c

  


+  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.

Copyright (c) 2021, NUVIA Inc. All rights reserved.

Copyright (c) 2015, Hisilicon Limited. All rights reserved.

Copyright (c) 2015, Linaro Limited. All rights reserved.

@@ -512,7 +513,6 @@ AllocateType4AndSetProcessorInformationStrings (
PartNumber   = STRING_TOKEN (STR_PROCESSOR_PART_NUMBER);

  


SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorManufacturer, ProcessorManu);

-  SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorVersion, ProcessorVersion);

SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorAssetTag, AssetTag);

  


if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorSerialNumber)) > 0) {

@@ -527,6 +527,12 @@ AllocateType4AndSetProcessorInformationStrings (
  OemUpdateSmbiosInfo (mHiiHandle, PartNumber, ProcessorPartNumType04);

}

  


+  if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorVersion)) > 0) {

+HiiSetString (mHiiHandle, PartNumber, (CHAR16 *)FixedPcdGetPtr 
(PcdProcessorVersion), NULL);

[SAMI] Should the second parameter be ProcessorVersion?


+  } else {

+OemUpdateSmbiosInfo (mHiiHandle, ProcessorVersion, ProcessorVersionType04);

+  }

+

// Processor Designation

StringBufferSize = sizeof (CHAR16) * SMBIOS_STRING_MAX_LENGTH;

ProcessorStr = AllocateZeroPool (StringBufferSize);




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




[edk2-devel] [PATCH 24/24] UnitTestFrameworkPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Also change in/out tag to pass the EccCheck.

Cc: Michael D Kinney 
Cc: Michael Kubacki 
Signed-off-by: Pierre Gondois 
---
 .../Library/Posix/DebugLibPosix/DebugLibPosix.c | 2 +-
 UnitTestFrameworkPkg/Library/UnitTestLib/Assert.c   | 2 +-
 UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c | 2 +-
 .../UnitTestPersistenceLibNull/UnitTestPersistenceLibNull.c | 2 +-
 .../UnitTestPersistenceLibSimpleFileSystem.c| 2 +-
 .../PrivateInclude/Library/UnitTestPersistenceLib.h | 2 +-
 UnitTestFrameworkPkg/ReadMe.md  | 6 +++---
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/UnitTestFrameworkPkg/Library/Posix/DebugLibPosix/DebugLibPosix.c 
b/UnitTestFrameworkPkg/Library/Posix/DebugLibPosix/DebugLibPosix.c
index 694f4beb8bf5..cfee36d2ac7f 100644
--- a/UnitTestFrameworkPkg/Library/Posix/DebugLibPosix/DebugLibPosix.c
+++ b/UnitTestFrameworkPkg/Library/Posix/DebugLibPosix/DebugLibPosix.c
@@ -179,7 +179,7 @@ DebugClearMemory (
   ASSERT (Buffer != NULL);
 
   //
-  // SetMem() checks for the the ASSERT() condition on Length and returns 
Buffer
+  // SetMem() checks for the ASSERT() condition on Length and returns Buffer
   //
   return SetMem (Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue));
 }
diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/Assert.c 
b/UnitTestFrameworkPkg/Library/UnitTestLib/Assert.c
index 35636565b783..9bb0798dd801 100644
--- a/UnitTestFrameworkPkg/Library/UnitTestLib/Assert.c
+++ b/UnitTestFrameworkPkg/Library/UnitTestLib/Assert.c
@@ -516,7 +516,7 @@ UnitTestAssertNotNull (
   is either pass, skipped, or failed.
   @param[in]  FunctionNameNull-terminated ASCII string of the function
   executing the UT_EXPECT_ASSERT_FAILURE() macro.
-  @param[in]  LineNumber  The source file line number of the the function
+  @param[in]  LineNumber  The source file line number of the function
   executing the UT_EXPECT_ASSERT_FAILURE() macro.
   @param[in]  FileNameNull-terminated ASCII string of the filename
   executing the UT_EXPECT_ASSERT_FAILURE() macro.
diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c 
b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
index dc05bbd4384c..0b1f6b197a35 100644
--- a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
+++ b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
@@ -349,7 +349,7 @@ UnitTestAssertNotNull (
   is either pass, skipped, or failed.
   @param[in]  FunctionNameNull-terminated ASCII string of the function
   executing the UT_EXPECT_ASSERT_FAILURE() macro.
-  @param[in]  LineNumber  The source file line number of the the function
+  @param[in]  LineNumber  The source file line number of the function
   executing the UT_EXPECT_ASSERT_FAILURE() macro.
   @param[in]  FileNameNull-terminated ASCII string of the filename
   executing the UT_EXPECT_ASSERT_FAILURE() macro.
diff --git 
a/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibNull/UnitTestPersistenceLibNull.c
 
b/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibNull/UnitTestPersistenceLibNull.c
index e28327652eaf..6cd8e4150465 100644
--- 
a/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibNull/UnitTestPersistenceLibNull.c
+++ 
b/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibNull/UnitTestPersistenceLibNull.c
@@ -55,7 +55,7 @@ SaveUnitTestCache (
   Will allocate a buffer to hold the loaded data.
 
   @param[in]  FrameworkHandle  A pointer to the framework that is being 
persisted.
-  @param[in]  SaveData A pointer pointer that will be updated with the 
address
+  @param[out]  SaveData A pointer that will be updated with the address
of the loaded data buffer.
 
   @retval  EFI_SUCCESS  Data has been loaded successfully and SaveData is 
updated
diff --git 
a/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.c
 
b/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.c
index ed4a7d161524..4e2fb785be78 100644
--- 
a/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.c
+++ 
b/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.c
@@ -312,7 +312,7 @@ Exit:
   Will allocate a buffer to hold the loaded data.
 
   @param[in]  FrameworkHandle  A pointer to the framework that is being 
persisted.
-  @param[in]  SaveData A pointer pointer that will be updated with the 
address
+  @param[out]  SaveData A pointer that will be 

[edk2-devel] [PATCH 23/24] UefiPayloadPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Guo Dong 
Cc: Ray Ni 
Cc: Sean Rhodes 
Signed-off-by: Pierre Gondois 
---
 UefiPayloadPkg/Include/Library/SpiFlashLib.h| 2 +-
 UefiPayloadPkg/Library/SpiFlashLib/SpiFlashLib.c| 2 +-
 UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c  | 2 +-
 UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c  | 2 +-
 UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c  | 2 +-
 UefiPayloadPkg/UefiPayloadEntry/X64/VirtualMemory.c | 6 +++---
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/UefiPayloadPkg/Include/Library/SpiFlashLib.h 
b/UefiPayloadPkg/Include/Library/SpiFlashLib.h
index 07f40502f251..8906dad043b0 100644
--- a/UefiPayloadPkg/Include/Library/SpiFlashLib.h
+++ b/UefiPayloadPkg/Include/Library/SpiFlashLib.h
@@ -194,7 +194,7 @@ SpiConstructor (
 /**
   Get the SPI region base and size, based on the enum type
 
-  @param[in] FlashRegionType  The Flash Region type for for the base 
address which is listed in the Descriptor.
+  @param[in] FlashRegionType  The Flash Region type for the base address 
which is listed in the Descriptor.
   @param[out] BaseAddress The Flash Linear Address for the Region 'n' 
Base
   @param[out] RegionSize  The size for the Region 'n'
 
diff --git a/UefiPayloadPkg/Library/SpiFlashLib/SpiFlashLib.c 
b/UefiPayloadPkg/Library/SpiFlashLib/SpiFlashLib.c
index 22639a748c04..58c86ade8997 100644
--- a/UefiPayloadPkg/Library/SpiFlashLib/SpiFlashLib.c
+++ b/UefiPayloadPkg/Library/SpiFlashLib/SpiFlashLib.c
@@ -807,7 +807,7 @@ WaitForSpiCycleComplete (
 /**
   Get the SPI region base and size, based on the enum type
 
-  @param[in] FlashRegionType  The Flash Region type for for the base 
address which is listed in the Descriptor.
+  @param[in] FlashRegionType  The Flash Region type for the base address 
which is listed in the Descriptor.
   @param[out] BaseAddress The Flash Linear Address for the Region 'n' 
Base
   @param[out] RegionSize  The size for the Region 'n'
 
diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c 
b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c
index cb915e7142eb..6df421bcf99e 100644
--- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c
+++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c
@@ -467,7 +467,7 @@ LoadElf32Image (
   }
 
   //
-  // Relocate when new new image base is not the preferred image base.
+  // Relocate when new image base is not the preferred image base.
   //
   if (ElfCt->ImageAddress != ElfCt->PreferredImageAddress) {
 RelocateElf32Sections (ElfCt);
diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c 
b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c
index c8dbb887340b..e95b31d82671 100644
--- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c
+++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c
@@ -476,7 +476,7 @@ LoadElf64Image (
   }
 
   //
-  // Relocate when new new image base is not the preferred image base.
+  // Relocate when new image base is not the preferred image base.
   //
   if (ElfCt->ImageAddress != ElfCt->PreferredImageAddress) {
 RelocateElf64Sections (ElfCt);
diff --git a/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c 
b/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c
index c66e56aee15a..43f53d4cfae9 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c
+++ b/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c
@@ -131,7 +131,7 @@ Create4GPageTablesIa32Pae (
   for (IndexOfPdpEntries = 0; IndexOfPdpEntries < NumberOfPdpEntriesNeeded; 
IndexOfPdpEntries++, PageDirectoryPointerEntry++) {
 //
 // Each Directory Pointer entries points to a page of Page Directory 
entires.
-// So allocate space for them and fill them in in the 
IndexOfPageDirectoryEntries loop.
+// So allocate space for them and fill them in the 
IndexOfPageDirectoryEntries loop.
 //
 PageDirectoryEntry = (VOID *)PageAddress;
 PageAddress   += SIZE_4KB;
diff --git a/UefiPayloadPkg/UefiPayloadEntry/X64/VirtualMemory.c 
b/UefiPayloadPkg/UefiPayloadEntry/X64/VirtualMemory.c
index a5869413529f..57301e23da81 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/X64/VirtualMemory.c
+++ b/UefiPayloadPkg/UefiPayloadEntry/X64/VirtualMemory.c
@@ -822,7 +822,7 @@ CreateIdentityMappingPageTables (
   {
 //
 // Each PML5 entry points to a page of PML4 entires.
-// So lets allocate space for them and fill them in in the 
IndexOfPml4Entries loop.
+// So lets allocate space for them and fill them in the IndexOfPml4Entries 
loop.
 // When 5-Level Paging is disabled, below allocation happens only once.
 //
 PageMapLevel4Entry = (VOID *)BigPageAddress;
@@ -844,7 +844,7 @@ CreateIdentityMappingPageTables (
 {
   //
   // Each PML4 entry points to a page of Page Directory Pointer entires.
-  // So lets allocate space for them and fill them in in the 
IndexOfPdpEntries 

[edk2-devel] [PATCH 22/24] UefiCpuPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Eric Dong 
Cc: Ray Ni 
Signed-off-by: Pierre Gondois 
---
 .../Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h  | 2 +-
 .../Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c   | 4 ++--
 UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c | 2 +-
 UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c   | 4 ++--
 UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h 
b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h
index 4a84954cac9d..7024533ea430 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h
@@ -176,7 +176,7 @@ SwitchNewBsp (
   );
 
 /**
-  Function that uses DEBUG() macros to display the contents of a a CPU feature 
bit mask.
+  Function that uses DEBUG() macros to display the contents of a CPU feature 
bit mask.
 
   @param[in]  FeatureMask  A pointer to the CPU feature bit mask.
   @param[in]  BitMaskSize  CPU feature bits mask buffer size.
diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c 
b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c
index 0285aaf5c91a..a43d8b0aa0e8 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c
@@ -9,7 +9,7 @@
 #include "RegisterCpuFeatures.h"
 
 /**
-  Function that uses DEBUG() macros to display the contents of a a CPU feature 
bit mask.
+  Function that uses DEBUG() macros to display the contents of a CPU feature 
bit mask.
 
   @param[in]  FeatureMask  A pointer to the CPU feature bit mask.
   @param[in]  BitMaskSize  CPU feature bits mask buffer size.
@@ -370,7 +370,7 @@ AdjustEntry (
   // than core type dependence. So driver will adjust the feature order to B 
-> A -> C. and driver
   // will remove the feature dependence in feature B.
   // Driver just needs to make sure before feature C been executed, feature A 
has finished its task
-  // in all all thread. Feature A finished in all threads also means feature B 
have finshed in all
+  // in all thread. Feature A finished in all threads also means feature B 
have finshed in all
   // threads.
   //
   if (Before) {
diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c 
b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c
index 4e8f897f5e9c..17c221407215 100644
--- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c
+++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c
@@ -1074,7 +1074,7 @@ GetVmcsSize (
   MSR_IA32_VMX_BASIC_REGISTER  VmxBasic;
 
   //
-  // Read VMCS size and and align to 4KB
+  // Read VMCS size and align to 4KB
   //
   VmxBasic.Uint64 = AsmReadMsr64 (MSR_IA32_VMX_BASIC);
   return ALIGN_VALUE (VmxBasic.Bits.VmcsSize, SIZE_4KB);
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c 
b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
index 6587212f4e37..0456d96a0c48 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
@@ -260,7 +260,7 @@ SetStaticPageTable (
   {
 //
 // Each PML5 entry points to a page of PML4 entires.
-// So lets allocate space for them and fill them in in the 
IndexOfPml4Entries loop.
+// So lets allocate space for them and fill them in the IndexOfPml4Entries 
loop.
 // When 5-Level Paging is disabled, below allocation happens only once.
 //
 if (m5LevelPagingNeeded) {
@@ -314,7 +314,7 @@ SetStaticPageTable (
 
   //
   // Each Directory Pointer entries points to a page of Page Directory 
entires.
-  // So allocate space for them and fill them in in the 
IndexOfPageDirectoryEntries loop.
+  // So allocate space for them and fill them in the 
IndexOfPageDirectoryEntries loop.
   //
   PageDirectoryEntry = (UINT64 *)((*PageDirectoryPointerEntry) & 
~mAddressEncMask & gPhyMask);
   if (PageDirectoryEntry == NULL) {
diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c 
b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
index 8419a4e32acb..3ff739339c79 100644
--- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
+++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
@@ -688,7 +688,7 @@ RestoreS3PageTables (
 for (IndexOfPml4Entries = 0; IndexOfPml4Entries < 
NumberOfPml4EntriesNeeded; IndexOfPml4Entries++, PageMapLevel4Entry++) {
   //
   // Each PML4 entry points to a page of Page Directory Pointer entires.
-  // So lets allocate space for them and fill them in in the 
IndexOfPdpEntries loop.
+  // So lets allocate space for them and fill them in the 
IndexOfPdpEntries loop.
   //
   PageDirectoryPointerEntry = (PAGE_MAP_AND_DIRECTORY_POINTER 
*)S3NvsPageTableAddress;
   

[edk2-devel] [PATCH 21/24] StandaloneMmPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Ard Biesheuvel 
Cc: Sami Mujawar 
Cc: Jiewen Yao 
Signed-off-by: Pierre Gondois 
---
 StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c | 2 +-
 .../Library/StandaloneMmMemLib/StandaloneMmMemLib.inf   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c 
b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c
index e6393272514f..814352369ed3 100644
--- a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c
+++ b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c
@@ -1,7 +1,7 @@
 /** @file
   Instance of MM memory check library.
 
-  MM memory check library library implementation. This library consumes 
MM_ACCESS_PROTOCOL
+  MM memory check library implementation. This library consumes 
MM_ACCESS_PROTOCOL
   to get MMRAM information. In order to use this library instance, the 
platform should produce
   all MMRAM range via MM_ACCESS_PROTOCOL, including the range for firmware 
(like MM Core
   and MM driver) and/or specific dedicated hardware.
diff --git a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf 
b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
index b29d97a74607..ed3cdf199452 100644
--- a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
+++ b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf
@@ -1,7 +1,7 @@
 ## @file
 #  Instance of MM memory check library.
 #
-#  MM memory check library library implementation. This library consumes 
MM_ACCESS_PROTOCOL
+#  MM memory check library implementation. This library consumes 
MM_ACCESS_PROTOCOL
 #  to get MMRAM information. In order to use this library instance, the 
platform should produce
 #  all MMRAM range via MM_ACCESS_PROTOCOL, including the range for firmware 
(like MM Core
 #  and MM driver) and/or specific dedicated hardware.
-- 
2.25.1



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




[edk2-devel] [PATCH 20/24] SourceLevelDebugPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Hao A Wu 
Signed-off-by: Pierre Gondois 
---
 .../Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c 
b/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c
index f49a592d2762..619f466c68b1 100644
--- a/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c
+++ b/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c
@@ -158,7 +158,7 @@ RestoreDebugRegister (
 
   If InitFlag is DEBUG_AGENT_INIT_SMM, it will override IDT table entries
   and initialize debug port. It will get debug agent Mailbox from GUIDed HOB,
-  it it exists, debug agent wiil copied it into the local Mailbox in SMM space.
+  if it exists, debug agent wiil copied it into the local Mailbox in SMM space.
   it will override IDT table entries and initialize debug port. Context will be
   NULL.
   If InitFlag is DEBUG_AGENT_INIT_ENTER_SMI, debug agent will save Debug
-- 
2.25.1



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




[edk2-devel] [PATCH 18/24] SecurityPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Jiewen Yao 
Cc: Jian J Wang 
Signed-off-by: Pierre Gondois 
---
 SecurityPkg/Include/Library/Tpm2CommandLib.h  | 2 +-
 .../Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.uni | 4 ++--
 .../Library/PeiTpmMeasurementLib/PeiTpmMeasurementLib.uni | 4 ++--
 .../SecureBootVariableProvisionLib.c  | 2 +-
 SecurityPkg/Library/Tpm2CommandLib/Tpm2Hierarchy.c| 2 +-
 SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.c   | 2 +-
 SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c   | 2 +-
 SecurityPkg/Tcg/TcgDxe/TcgDxe.c   | 4 ++--
 8 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/SecurityPkg/Include/Library/Tpm2CommandLib.h 
b/SecurityPkg/Include/Library/Tpm2CommandLib.h
index a2fb97f18dfe..1912f54c8416 100644
--- a/SecurityPkg/Include/Library/Tpm2CommandLib.h
+++ b/SecurityPkg/Include/Library/Tpm2CommandLib.h
@@ -136,7 +136,7 @@ Tpm2SelfTest (
 
 /**
   This command allows setting of the authorization policy for the platform 
hierarchy (platformPolicy), the
-  storage hierarchy (ownerPolicy), and and the endorsement hierarchy 
(endorsementPolicy).
+  storage hierarchy (ownerPolicy), and the endorsement hierarchy 
(endorsementPolicy).
 
   @param[in]  AuthHandleTPM_RH_ENDORSEMENT, TPM_RH_OWNER or 
TPM_RH_PLATFORM+{PP} parameters to be validated
   @param[in]  AuthSession   Auth Session context
diff --git a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.uni 
b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.uni
index a1139810b1cb..ab043e8f5a1c 100644
--- a/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.uni
+++ b/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.uni
@@ -1,7 +1,7 @@
 // /** @file
 // Provides TPM measurement functions for TPM1.2 and TPM 2.0
 //
-// This library provides TpmMeasureAndLogData() to to measure and log data, and
+// This library provides TpmMeasureAndLogData() to measure and log data, and
 // extend the measurement result into a specific PCR.
 //
 // Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.
@@ -13,5 +13,5 @@
 
 #string STR_MODULE_ABSTRACT #language en-US "Provides TPM 
measurement functions for TPM1.2 and TPM 2.0"
 
-#string STR_MODULE_DESCRIPTION  #language en-US "This library provides 
TpmMeasureAndLogData() to to measure and log data, and extend the measurement 
result into a specific PCR."
+#string STR_MODULE_DESCRIPTION  #language en-US "This library provides 
TpmMeasureAndLogData() to measure and log data, and extend the measurement 
result into a specific PCR."
 
diff --git a/SecurityPkg/Library/PeiTpmMeasurementLib/PeiTpmMeasurementLib.uni 
b/SecurityPkg/Library/PeiTpmMeasurementLib/PeiTpmMeasurementLib.uni
index 7b4341b449f4..4d0159d18ce3 100644
--- a/SecurityPkg/Library/PeiTpmMeasurementLib/PeiTpmMeasurementLib.uni
+++ b/SecurityPkg/Library/PeiTpmMeasurementLib/PeiTpmMeasurementLib.uni
@@ -1,7 +1,7 @@
 // /** @file
 // Provides TPM measurement functions for TPM1.2 and TPM 2.0
 //
-// This library provides TpmMeasureAndLogData() to to measure and log data, and
+// This library provides TpmMeasureAndLogData() to measure and log data, and
 // extend the measurement result into a specific PCR.
 //
 // Copyright (c) 2020, Intel Corporation. All rights reserved.
@@ -13,5 +13,5 @@
 
 #string STR_MODULE_ABSTRACT #language en-US "Provides TPM 
measurement functions for TPM1.2 and TPM 2.0"
 
-#string STR_MODULE_DESCRIPTION  #language en-US "This library provides 
TpmMeasureAndLogData() to to measure and log data, and extend the measurement 
result into a specific PCR."
+#string STR_MODULE_DESCRIPTION  #language en-US "This library provides 
TpmMeasureAndLogData() to measure and log data, and extend the measurement 
result into a specific PCR."
 
diff --git 
a/SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.c
 
b/SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.c
index bed1fe86205d..9e7b8946274d 100644
--- 
a/SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.c
+++ 
b/SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.c
@@ -28,7 +28,7 @@
   Create a EFI Signature List with data fetched from section specified as a 
argument.
   Found keys are verified using RsaGetPublicKeyFromX509().
 
-  @param[in]KeyFileGuidA pointer to to the FFS filename GUID
+  @param[in]KeyFileGuidA pointer to the FFS filename GUID
   @param[out]   SigListsSize   A pointer to size of signature list
   @param[out]   SigListOuta pointer to a callee-allocated buffer with 
signature lists
 
diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Hierarchy.c 

[edk2-devel] [PATCH 19/24] ShellPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Ray Ni 
Cc: Zhichao Gao 
Signed-off-by: Pierre Gondois 
---
 ShellPkg/Include/Library/ShellCommandLib.h| 2 +-
 ShellPkg/Include/Library/ShellLib.h   | 4 ++--
 ShellPkg/Include/Protocol/EfiShellEnvironment2.h  | 2 +-
 .../Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c | 2 +-
 ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c| 2 +-
 .../UefiShellDriver1CommandsLib.uni   | 2 +-
 ShellPkg/Library/UefiShellLevel2CommandsLib/Load.c| 2 +-
 ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c | 2 +-
 ShellPkg/Library/UefiShellLib/UefiShellLib.c  | 4 ++--
 9 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/ShellPkg/Include/Library/ShellCommandLib.h 
b/ShellPkg/Include/Library/ShellCommandLib.h
index 7a97b203f1ff..de7db40a1525 100644
--- a/ShellPkg/Include/Library/ShellCommandLib.h
+++ b/ShellPkg/Include/Library/ShellCommandLib.h
@@ -87,7 +87,7 @@ SHELL_STATUS
   If the ShellSupportLevel is greater than the value of
   PcdShellSupportLevel, then return RETURN_UNSUPPORTED.
 
-  Registers the the handlers specified by GetHelpInfoHandler and CommandHandler
+  Registers the handlers specified by GetHelpInfoHandler and CommandHandler
   with the command specified by CommandString. If the command named by
   CommandString has already been registered, then return
   RETURN_ALREADY_STARTED.
diff --git a/ShellPkg/Include/Library/ShellLib.h 
b/ShellPkg/Include/Library/ShellLib.h
index 10cf7f4fefe0..cd0c3bccc89f 100644
--- a/ShellPkg/Include/Library/ShellLib.h
+++ b/ShellPkg/Include/Library/ShellLib.h
@@ -1354,9 +1354,9 @@ ShellFileHandleReturnLine (
   @param[in, out]  BufferThe pointer to buffer to read into.
   @param[in, out]  Size  The pointer to number of bytes in Buffer.
   @param[in]   Truncate  If the buffer is large enough, this has no 
effect.
- If the buffer is is too small and Truncate is 
TRUE,
+ If the buffer is too small and Truncate is 
TRUE,
  the line will be truncated.
- If the buffer is is too small and Truncate is 
FALSE,
+ If the buffer is too small and Truncate is 
FALSE,
  then no read will occur.
 
   @param[in, out]  Ascii Boolean value for indicating whether the file 
is
diff --git a/ShellPkg/Include/Protocol/EfiShellEnvironment2.h 
b/ShellPkg/Include/Protocol/EfiShellEnvironment2.h
index 8b7c86dc24fc..59714c1b589b 100644
--- a/ShellPkg/Include/Protocol/EfiShellEnvironment2.h
+++ b/ShellPkg/Include/Protocol/EfiShellEnvironment2.h
@@ -541,7 +541,7 @@ EFI_STATUS
 /**
   This is an internal shell function to enumerate the handle database.
 
-  This function resets the the handle database so that NEXT_HANDLE and 
SKIP_HANDLE
+  This function resets the handle database so that NEXT_HANDLE and SKIP_HANDLE
   will start from EnumIndex on the next call.
 
   This must be called after INIT_HANDLE_ENUMERATOR and before 
CLOSE_HANDLE_ENUMERATOR.
diff --git a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c 
b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
index 4a19794b9fe0..0f33d52a67cc 100644
--- a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
+++ b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
@@ -1252,7 +1252,7 @@ BcfgAddOpt (
   }
 
   //
-  // Shouldn't be possible to have have both. Neither is ok though.
+  // Shouldn't be possible to have both. Neither is ok though.
   //
   ASSERT (FileName == NULL || Data == NULL);
 
diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c 
b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
index 36cf46fb2c38..75fa81f7e448 100644
--- a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
+++ b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
@@ -119,7 +119,7 @@ CommandInit (
   }
 
   //
-  // Find the best matching matching language from the supported languages
+  // Find the best matching language from the supported languages
   // of Unicode Collation2 protocol.
   //
   BestLanguage = GetBestLanguage (
diff --git 
a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni 
b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
index fc4986c8c62f..ba4dbc4e8b48 100644
--- 
a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
+++ 
b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
@@ -171,7 +171,7 @@
 "   1 - Manufacturing Defaults.\r\n"
 "   2 - Safe Defaults.\r\n"
 "   

[edk2-devel] [PATCH 17/24] RedfishPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Abner Chang 
Signed-off-by: Pierre Gondois 
---
 RedfishPkg/RedfishDiscoverDxe/ComponentName.c  | 4 ++--
 RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 2 +-
 RedfishPkg/RedfishRestExDxe/ComponentName.c| 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/RedfishPkg/RedfishDiscoverDxe/ComponentName.c 
b/RedfishPkg/RedfishDiscoverDxe/ComponentName.c
index f34d7ab5d953..886f0b97b0de 100644
--- a/RedfishPkg/RedfishDiscoverDxe/ComponentName.c
+++ b/RedfishPkg/RedfishDiscoverDxe/ComponentName.c
@@ -19,7 +19,7 @@
 
   @param[in]  This   A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
   @param[in]  Language   A pointer to a three-character ISO 639-2 language 
identifier.
- This is the language of the driver name that that the 
caller
+ This is the language of the driver name that the 
caller
  is requesting, and it must match one of the languages 
specified
  in SupportedLanguages.  The number of languages 
supported by a
  driver is up to the driver writer.
@@ -130,7 +130,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE  
*gRedfishDiscoverControl
 
   @param[in]  ThisA pointer to the EFI_COMPONENT_NAME_PROTOCOL 
instance.
   @param[in]  LanguageA pointer to a three-character ISO 639-2 language 
identifier.
-  This is the language of the driver name that that 
the caller
+  This is the language of the driver name that the 
caller
   is requesting, and it must match one of the 
languages specified
   in SupportedLanguages.  The number of languages 
supported by a
   driver is up to the driver writer.
diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c 
b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
index bf50c78c9280..a542d97fe09e 100644
--- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
+++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
@@ -1325,7 +1325,7 @@ EFI_REDFISH_DISCOVER_PROTOCOL  mRedfishDiscover = {
   @param[in]  ControllerHandleMAC address of this network interface.
   @param[in]  NetworkProtocolType Network protocol type.
   @param[out] IsNewInstance   BOOLEAN means new instance or not.
-  @param[out] NetworkInterfacePointer to to 
EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL.
+  @param[out] NetworkInterfacePointer to 
EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL.
 
   @retval EFI_STATUS
 **/
diff --git a/RedfishPkg/RedfishRestExDxe/ComponentName.c 
b/RedfishPkg/RedfishRestExDxe/ComponentName.c
index de4828369083..a1b61162a3f5 100644
--- a/RedfishPkg/RedfishRestExDxe/ComponentName.c
+++ b/RedfishPkg/RedfishRestExDxe/ComponentName.c
@@ -24,7 +24,7 @@
 
   @param[in]   This   A pointer to the EFI_COMPONENT_NAME_PROTOCOL 
instance.
   @param[in]   Language   A pointer to a three-character ISO 639-2 language 
identifier.
-  This is the language of the driver name that that 
the caller
+  This is the language of the driver name that the 
caller
   is requesting, and it must match one of the 
languages specified
   in SupportedLanguages.  The number of languages 
supported by a
   driver is up to the driver writer.
@@ -135,7 +135,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE  
*gRedfishRestExControlle
 
   @param[in]   This  A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
   @param[in]   Language  A pointer to a three-character ISO 639-2 language 
identifier.
- This is the language of the driver name that that the 
caller
+ This is the language of the driver name that the 
caller
  is requesting, and it must match one of the languages 
specified
  in SupportedLanguages.  The number of languages 
supported by a
  driver is up to the driver writer.
-- 
2.25.1



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




[edk2-devel] [PATCH 16/24] PcAtChipsetPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Ray Ni 
Signed-off-by: Pierre Gondois 
---
 .../Bus/Pci/IdeControllerDxe/ComponentName.c   |  4 ++--
 .../Bus/Pci/IdeControllerDxe/IdeController.h   |  4 ++--
 PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c | 10 +-
 PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.h |  2 +-
 .../PcatRealTimeClockRuntimeDxe/PcRtcEntry.c   |  2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/ComponentName.c 
b/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/ComponentName.c
index e5231a59146d..b2d98d641f35 100644
--- a/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/ComponentName.c
+++ b/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/ComponentName.c
@@ -60,7 +60,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE  
mIdeControllerController
 
   @param This   A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
   @param Language   A pointer to a three character ISO 639-2 language 
identifier.
-This is the language of the driver name that that the 
caller
+This is the language of the driver name that the caller
 is requesting, and it must match one of the languages 
specified
 in SupportedLanguages.  The number of languages 
supported by a
 driver is up to the driver writer.
@@ -109,7 +109,7 @@ IdeControllerComponentNameGetDriverName (
 that wishes to retrieve the name of a child 
controller.
   @param Language   A pointer to a three character ISO 639-2 
language
 identifier.  This is the language of the 
controller name
-that that the caller is requesting, and it 
must match one
+that the caller is requesting, and it must 
match one
 of the languages specified in 
SupportedLanguages.  The
 number of languages supported by a driver is 
up to the
 driver writer.
diff --git a/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeController.h 
b/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeController.h
index 978a8f709c7b..48b45e0e67c9 100644
--- a/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeController.h
+++ b/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeController.h
@@ -396,7 +396,7 @@ IdeInitSetTiming (
 
   @param This   A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
   @param Language   A pointer to a three character ISO 639-2 language 
identifier.
-This is the language of the driver name that that the 
caller
+This is the language of the driver name that the caller
 is requesting, and it must match one of the languages 
specified
 in SupportedLanguages.  The number of languages 
supported by a
 driver is up to the driver writer.
@@ -437,7 +437,7 @@ IdeControllerComponentNameGetDriverName (
 that wishes to retrieve the name of a child 
controller.
   @param Language   A pointer to a three character ISO 639-2 
language
 identifier.  This is the language of the 
controller name
-that that the caller is requesting, and it 
must match one
+that the caller is requesting, and it must 
match one
 of the languages specified in 
SupportedLanguages.  The
 number of languages supported by a driver is 
up to the
 driver writer.
diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c 
b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
index 9242a2e82600..e248ff0b1432 100644
--- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
+++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
@@ -48,8 +48,8 @@ CompareHMS (
   @param  From   the first date
   @param  To the second date
 
-  @retval TRUE   From is previous to To within 24 hours.
-  @retval FALSE  From is later, or it is previous to To more than 24 hours.
+  @retval TRUE   From is previous to within 24 hours.
+  @retval FALSE  From is later, or it is previous to more than 24 hours.
 **/
 BOOLEAN
 IsWithinOneDay (
@@ -546,7 +546,7 @@ PcRtcGetTime (
 
   @retval EFI_SUCCESS   The operation completed successfully.
   @retval EFI_INVALID_PARAMETER A time field is out of range.
-  @retval EFI_DEVICE_ERROR  The time could not be set due due to hardware 
error.
+  @retval EFI_DEVICE_ERROR  The time could not be set due to hardware 
error.
 
 **/
 EFI_STATUS
@@ -1277,8 +1277,8 @@ CompareHMS (
   @param  From   the first date
   @param  To 

[edk2-devel] [PATCH 15/24] OvmfPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Ard Biesheuvel 
Cc: Jiewen Yao 
Signed-off-by: Pierre Gondois 
---
 OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c | 6 +++---
 OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c | 2 +-
 OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c | 2 +-
 OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c | 2 +-
 OvmfPkg/SataControllerDxe/ComponentName.c | 4 ++--
 OvmfPkg/SataControllerDxe/SataController.h| 4 ++--
 OvmfPkg/XenBusDxe/ComponentName.c | 2 +-
 OvmfPkg/XenBusDxe/ComponentName.h | 2 +-
 OvmfPkg/XenPvBlkDxe/BlockFront.c  | 2 +-
 OvmfPkg/XenPvBlkDxe/ComponentName.c   | 2 +-
 OvmfPkg/XenPvBlkDxe/ComponentName.h   | 2 +-
 11 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c 
b/OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c
index 8da06da74ef5..6877e521e485 100644
--- a/OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c
+++ b/OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c
@@ -813,7 +813,7 @@ CreateIdentityMappingPageTables (
   {
 //
 // Each PML5 entry points to a page of PML4 entires.
-// So lets allocate space for them and fill them in in the 
IndexOfPml4Entries loop.
+// So lets allocate space for them and fill them in the IndexOfPml4Entries 
loop.
 // When 5-Level Paging is disabled, below allocation happens only once.
 //
 PageMapLevel4Entry = (VOID *)BigPageAddress;
@@ -835,7 +835,7 @@ CreateIdentityMappingPageTables (
 {
   //
   // Each PML4 entry points to a page of Page Directory Pointer entires.
-  // So lets allocate space for them and fill them in in the 
IndexOfPdpEntries loop.
+  // So lets allocate space for them and fill them in the 
IndexOfPdpEntries loop.
   //
   PageDirectoryPointerEntry = (VOID *)BigPageAddress;
   BigPageAddress   += SIZE_4KB;
@@ -875,7 +875,7 @@ CreateIdentityMappingPageTables (
 {
   //
   // Each Directory Pointer entries points to a page of Page Directory 
entires.
-  // So allocate space for them and fill them in in the 
IndexOfPageDirectoryEntries loop.
+  // So allocate space for them and fill them in the 
IndexOfPageDirectoryEntries loop.
   //
   PageDirectoryEntry = (VOID *)BigPageAddress;
   BigPageAddress+= SIZE_4KB;
diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c 
b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c
index 4e25f198aa76..a4c12b9057e5 100644
--- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c
+++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c
@@ -259,7 +259,7 @@ DebugClearMemory (
   ASSERT (Buffer != NULL);
 
   //
-  // SetMem() checks for the the ASSERT() condition on Length and returns 
Buffer
+  // SetMem() checks for the ASSERT() condition on Length and returns Buffer
   //
   return SetMem (Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue));
 }
diff --git a/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c 
b/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c
index 7f37710b964f..30c258313135 100644
--- a/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c
+++ b/OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.c
@@ -108,7 +108,7 @@ LibGetTime (
 
   @retval EFI_SUCCESS   The operation completed successfully.
   @retval EFI_INVALID_PARAMETER A time field is out of range.
-  @retval EFI_DEVICE_ERROR  The time could not be set due due to hardware 
error.
+  @retval EFI_DEVICE_ERROR  The time could not be set due to hardware 
error.
 
 **/
 EFI_STATUS
diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c 
b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c
index 9e074c29bb2b..172d6a4267f8 100644
--- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c
+++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c
@@ -79,7 +79,7 @@ QemuFlashPtrWrite (
 // Writing to flash is emulated by the hypervisor through the use of write
 // protection. This won't work for an SEV-ES guest because the write won't
 // be recognized as a true MMIO write, which would result in the required
-// #VC exception. Instead, use the the VMGEXIT MMIO write support directly
+// #VC exception. Instead, use the VMGEXIT MMIO write support directly
 // to perform the update.
 //
 VmgInit (Ghcb, );
diff --git a/OvmfPkg/SataControllerDxe/ComponentName.c 
b/OvmfPkg/SataControllerDxe/ComponentName.c
index d45803f95f6e..7b5912bab822 100644
--- a/OvmfPkg/SataControllerDxe/ComponentName.c
+++ b/OvmfPkg/SataControllerDxe/ComponentName.c
@@ -59,7 +59,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE  
mSataControllerControlle
 
   @param This   A 

[edk2-devel] [PATCH 11/24] IntelFsp2WrapperPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Signed-off-by: Pierre Gondois 
---
 IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec 
b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
index c43b0c2267a7..08af6d814ad1 100644
--- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
+++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
@@ -87,7 +87,7 @@ [PcdsFixedAtBuild, PcdsPatchableInModule]
   # We need a flag (PCD) to indicate if there is need to do such FSP 
measurement or NOT.
   # 2) The FSP binary includes FSP code and FSP UPD region. The UPD region is 
considered
   # as configuration block, and it may be updated by OEM by design.
-  # This flag (PCD) is to indicate if we need isolate the the UPD region from 
the FSP code region.
+  # This flag (PCD) is to indicate if we need isolate the UPD region from the 
FSP code region.
   # BIT0: Need measure FSP. (for FSP1.x) - reserved in FSP2.
   # BIT1: Need measure FSPT. (for FSP 2.x)
   # BIT2: Need measure FSPM. (for FSP 2.x)
-- 
2.25.1



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




[edk2-devel] [PATCH 14/24] NetworkPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Maciej Rabeda 
Signed-off-by: Pierre Gondois 
---
 NetworkPkg/DnsDxe/ComponentName.c | 4 ++--
 NetworkPkg/HttpBootDxe/HttpBootComponentName.c| 2 +-
 NetworkPkg/HttpBootDxe/HttpBootComponentName.h| 2 +-
 NetworkPkg/HttpDxe/ComponentName.c| 2 +-
 NetworkPkg/HttpDxe/ComponentName.h| 2 +-
 NetworkPkg/Library/DxeNetLib/DxeNetLib.c  | 2 +-
 .../WifiConnectionManagerDxe/WifiConnectionMgrComponentName.c | 2 +-
 .../WifiConnectionManagerDxe/WifiConnectionMgrComponentName.h | 2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/NetworkPkg/DnsDxe/ComponentName.c 
b/NetworkPkg/DnsDxe/ComponentName.c
index 32adb93f4130..cf17779aa550 100644
--- a/NetworkPkg/DnsDxe/ComponentName.c
+++ b/NetworkPkg/DnsDxe/ComponentName.c
@@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
   @param  This   A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
   @param  Language   A pointer to a three-character ISO 639-2 language 
identifier.
- This is the language of the driver name that that the 
caller
+ This is the language of the driver name that the caller
  is requesting, and it must match one of the languages 
specified
  in SupportedLanguages.  The number of languages supported 
by a
  driver is up to the driver writer.
@@ -128,7 +128,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE  
*gDnsControllerNameTable
 
   @param  This   A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
   @param  Language   A pointer to a three-character ISO 639-2 language 
identifier.
- This is the language of the driver name that that the 
caller
+ This is the language of the driver name that the caller
  is requesting, and it must match one of the languages 
specified
  in SupportedLanguages.  The number of languages supported 
by a
  driver is up to the driver writer.
diff --git a/NetworkPkg/HttpBootDxe/HttpBootComponentName.c 
b/NetworkPkg/HttpBootDxe/HttpBootComponentName.c
index bc1993df431b..3fdc22b551fd 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootComponentName.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootComponentName.c
@@ -51,7 +51,7 @@ EFI_UNICODE_STRING_TABLE  mHttpBootDxeControllerNameTable[] = 
{
 
   @param  This   A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
   @param  Language   A pointer to a three-character ISO 639-2 language 
identifier.
- This is the language of the driver name that that the 
caller
+ This is the language of the driver name that the caller
  is requesting, and it must match one of the languages 
specified
  in SupportedLanguages.  The number of languages supported 
by a
  driver is up to the driver writer.
diff --git a/NetworkPkg/HttpBootDxe/HttpBootComponentName.h 
b/NetworkPkg/HttpBootDxe/HttpBootComponentName.h
index f53af8762c0c..59415989c507 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootComponentName.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootComponentName.h
@@ -15,7 +15,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
   @param  This   A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
   @param  Language   A pointer to a three-character ISO 639-2 language 
identifier.
- This is the language of the driver name that that the 
caller
+ This is the language of the driver name that the caller
  is requesting, and it must match one of the languages 
specified
  in SupportedLanguages.  The number of languages supported 
by a
  driver is up to the driver writer.
diff --git a/NetworkPkg/HttpDxe/ComponentName.c 
b/NetworkPkg/HttpDxe/ComponentName.c
index db41d582c3b2..29cbae6b57b2 100644
--- a/NetworkPkg/HttpDxe/ComponentName.c
+++ b/NetworkPkg/HttpDxe/ComponentName.c
@@ -44,7 +44,7 @@ EFI_UNICODE_STRING_TABLE  mHttpDxeDriverNameTable[] = {
 
   @param  This   A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
   @param  Language   A pointer to a three-character ISO 639-2 language 
identifier.
- This is the language of the driver name that that the 
caller
+ This is the language of the driver name that the caller
  is requesting, and it must match one of the languages 
specified
  in SupportedLanguages.  The number of languages supported 
by a
  driver is up to the driver writer.
diff --git a/NetworkPkg/HttpDxe/ComponentName.h 
b/NetworkPkg/HttpDxe/ComponentName.h
index 3dc7c4f66fdc..9d39db3d6a9f 100644
--- 

[edk2-devel] [PATCH 13/24] MdePkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Pierre Gondois 
---
 MdePkg/Include/Guid/GraphicsInfoHob.h   | 2 +-
 MdePkg/Include/Library/DevicePathLib.h  | 2 +-
 MdePkg/Include/Library/DxeServicesLib.h | 6 +++---
 MdePkg/Include/Library/ExtractGuidedSectionLib.h| 6 +++---
 MdePkg/Include/Library/FileHandleLib.h  | 4 ++--
 MdePkg/Include/Library/PeCoffLib.h  | 2 +-
 MdePkg/Include/Library/UefiLib.h| 2 +-
 MdePkg/Include/Library/UnitTestLib.h| 2 +-
 MdePkg/Include/Pi/PiMmCis.h | 2 +-
 MdePkg/Include/Pi/PiSmmCis.h| 2 +-
 MdePkg/Include/Protocol/ComponentName.h | 2 +-
 MdePkg/Include/Protocol/Smbios.h| 2 +-
 MdePkg/Include/Uefi/UefiMultiPhase.h| 2 +-
 MdePkg/Include/Uefi/UefiSpec.h  | 2 +-
 MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c| 2 +-
 .../BaseExtractGuidedSectionLib.c   | 6 +++---
 MdePkg/Library/BaseS3StallLib/S3StallLib.c  | 2 +-
 MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c  | 2 +-
 MdePkg/Library/DxeServicesLib/DxeServicesLib.c  | 6 +++---
 .../PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c | 6 +++---
 MdePkg/Library/SmmIoLib/SmmIoLib.c  | 2 +-
 MdePkg/Library/SmmIoLib/SmmIoLib.inf| 2 +-
 MdePkg/Library/SmmIoLib/SmmIoLib.uni| 4 ++--
 MdePkg/Library/SmmMemLib/SmmMemLib.c| 2 +-
 MdePkg/Library/SmmMemLib/SmmMemLib.inf  | 2 +-
 MdePkg/Library/SmmMemLib/SmmMemLib.uni  | 4 ++--
 MdePkg/Library/SmmPeriodicSmiLib/SmmPeriodicSmiLib.c| 4 ++--
 .../StandaloneMmDriverEntryPoint.c  | 4 ++--
 MdePkg/Library/UefiDebugLibConOut/DebugLib.c| 2 +-
 MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c | 2 +-
 MdePkg/Library/UefiDebugLibStdErr/DebugLib.c| 2 +-
 MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf| 2 +-
 MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.uni| 2 +-
 MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c  | 2 +-
 .../UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c | 2 +-
 MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c| 4 ++--
 MdePkg/Library/UefiLib/Console.c| 2 +-
 MdePkg/Library/UefiLib/UefiLib.c| 2 +-
 MdePkg/Test/UnitTest/Library/BaseLib/Base64UnitTest.c   | 4 ++--
 39 files changed, 56 insertions(+), 56 deletions(-)

diff --git a/MdePkg/Include/Guid/GraphicsInfoHob.h 
b/MdePkg/Include/Guid/GraphicsInfoHob.h
index 237911e63aa0..ecfa283f924e 100644
--- a/MdePkg/Include/Guid/GraphicsInfoHob.h
+++ b/MdePkg/Include/Guid/GraphicsInfoHob.h
@@ -5,7 +5,7 @@
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
   @par Revision Reference:
-  This HOB is introduced in in PI Version 1.4.
+  This HOB is introduced in PI Version 1.4.
 
 **/
 
diff --git a/MdePkg/Include/Library/DevicePathLib.h 
b/MdePkg/Include/Library/DevicePathLib.h
index 7a077e4217d2..039427d5b648 100644
--- a/MdePkg/Include/Library/DevicePathLib.h
+++ b/MdePkg/Include/Library/DevicePathLib.h
@@ -23,7 +23,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
   @retval TRUEDevicePath is valid.
   @retval FALSE   DevicePath is NULL.
   @retval FALSE   Maxsize is less than sizeof(EFI_DEVICE_PATH_PROTOCOL).
-  @retval FALSE   The length of any node node in the DevicePath is less
+  @retval FALSE   The length of any node in the DevicePath is less
   than sizeof (EFI_DEVICE_PATH_PROTOCOL).
   @retval FALSE   If MaxSize is not zero, the size of the DevicePath
   exceeds MaxSize.
diff --git a/MdePkg/Include/Library/DxeServicesLib.h 
b/MdePkg/Include/Library/DxeServicesLib.h
index b5c5c4dbdf27..d3304f65a5fd 100644
--- a/MdePkg/Include/Library/DxeServicesLib.h
+++ b/MdePkg/Include/Library/DxeServicesLib.h
@@ -82,7 +82,7 @@ GetSectionFromAnyFvByFileType  (
   If Size is NULL, then ASSERT().
 
 
-  @param  NameGuid A pointer to to the FFS filename GUID to search 
for
+  @param  NameGuid A pointer to the FFS filename GUID to search for
within any of the firmware volumes in the 
platform.
   @param  SectionType  Indicates the FFS section type to search for 
within
the FFS file specified by NameGuid.
@@ -135,7 +135,7 @@ GetSectionFromAnyFv  (
   If Buffer is NULL, then ASSERT().
   If Size is NULL, then ASSERT().
 
-  @param  NameGuid A pointer 

[edk2-devel] [PATCH 12/24] MdeModulePkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Jian J Wang 
Cc: Liming Gao 
Signed-off-by: Pierre Gondois 
---
 MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c  |  2 +-
 MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c   |  2 +-
 .../Pci/NonDiscoverablePciDeviceDxe/ComponentName.c  |  4 ++--
 .../Bus/Pci/PciBusDxe/PciEnumeratorSupport.c |  2 +-
 MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c   | 12 ++--
 MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.h   | 12 ++--
 .../Bus/Pci/SataControllerDxe/ComponentName.c|  4 ++--
 .../Bus/Pci/SataControllerDxe/SataController.h   |  4 ++--
 MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c   |  2 +-
 MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.h   |  2 +-
 MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c  |  4 ++--
 MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h  |  2 +-
 MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c |  8 
 MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c   |  2 +-
 MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c |  6 +++---
 MdeModulePkg/Core/Dxe/DxeMain.h  |  2 +-
 MdeModulePkg/Core/Dxe/Mem/Page.c |  4 ++--
 MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c|  2 +-
 MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c  |  2 +-
 MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c |  6 +++---
 MdeModulePkg/Include/Guid/MdeModuleHii.h |  2 +-
 .../Include/Library/DisplayUpdateProgressLib.h   |  2 +-
 MdeModulePkg/Include/Library/UefiBootManagerLib.h|  2 +-
 .../DisplayUpdateProgressLibGraphics.c   |  4 ++--
 .../DisplayUpdateProgressLibText.c   |  2 +-
 .../Library/PiDxeS3BootScriptLib/BootScriptSave.c|  4 ++--
 MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c |  2 +-
 MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c  |  2 +-
 MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c |  2 +-
 MdeModulePkg/Library/UefiHiiLib/HiiLib.c |  2 +-
 MdeModulePkg/Library/UefiHiiLib/HiiString.c  |  2 +-
 MdeModulePkg/Universal/BdsDxe/BdsEntry.c |  2 +-
 MdeModulePkg/Universal/BdsDxe/Language.c |  2 +-
 MdeModulePkg/Universal/CapsulePei/UefiCapsule.c  |  4 ++--
 .../Universal/Console/ConSplitterDxe/ComponentName.c |  2 +-
 .../Universal/Console/ConSplitterDxe/ConSplitter.h   |  2 +-
 .../Universal/DebugSupportDxe/Ia32/AsmFuncs.nasm |  2 +-
 .../Universal/DebugSupportDxe/X64/AsmFuncs.nasm  |  2 +-
 MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c   |  2 +-
 .../Universal/DisplayEngineDxe/FormDisplay.c |  2 +-
 MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c  |  2 +-
 .../FvSimpleFileSystemDxe/FvSimpleFileSystem.c   |  2 +-
 .../FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf  |  2 +-
 .../FvSimpleFileSystemEntryPoint.c   |  4 ++--
 .../Universal/HiiDatabaseDxe/ConfigRouting.c |  2 +-
 .../PlatformDriOverrideDxe/PlatDriOverrideLib.c  |  2 +-
 MdeModulePkg/Universal/SerialDxe/SerialIo.c  |  4 ++--
 .../Universal/SetupBrowserDxe/Presentation.c |  2 +-
 48 files changed, 75 insertions(+), 75 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c 
b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
index 0b7270f4e930..a872dd833fd1 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
@@ -812,7 +812,7 @@ ON_EXIT:
 from or receive into.
   @param  DataLengthThe lenght of the data buffer.
   @param  DataToggleOn input, the initial data toggle for the 
transfer;
-On output, it is updated to to next data 
toggle to
+On output, it is updated to next data toggle to
 use of the subsequent bulk transfer.
   @param  TimeOut   Indicates the maximum time, in millisecond, 
which
 the transfer is allowed to complete.
diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c 
b/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c
index 37dd9012e277..3ead647ed1a1 100644
--- a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c
+++ b/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c
@@ -529,7 +529,7 @@ EhcInitHC (
 from or receive into.
   @param  DataLengthThe lenght of the data buffer.
   @param  DataToggleOn input, the initial data toggle for the 
transfer;
-On output, it is updated to to next data 
toggle to use of
+On output, it is updated to next data toggle 
to use of
 the subsequent bulk transfer.
   @param  TimeOut   Indicates the maximum time, in millisecond, 
which the
 transfer is allowed to complete.
diff --git 

[edk2-devel] [PATCH 08/24] EmbeddedPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Cc: Abner Chang 
Signed-off-by: Pierre Gondois 
---
 EmbeddedPkg/GdbStub/SerialIo.c  | 2 +-
 EmbeddedPkg/Include/Library/GdbSerialLib.h  | 2 +-
 EmbeddedPkg/Include/Library/RealTimeClockLib.h  | 2 +-
 .../Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c   | 2 +-
 EmbeddedPkg/Library/GdbSerialLib/GdbSerialLib.c | 2 +-
 EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c | 2 +-
 .../Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c   | 2 +-
 EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/EmbeddedPkg/GdbStub/SerialIo.c b/EmbeddedPkg/GdbStub/SerialIo.c
index 9970ab687e4b..98ea611e8b04 100644
--- a/EmbeddedPkg/GdbStub/SerialIo.c
+++ b/EmbeddedPkg/GdbStub/SerialIo.c
@@ -283,7 +283,7 @@ GdbSerialReset (
   data buts, and stop bits on a serial device.
 
   @param  This Protocol instance pointer.
-  @param  BaudRate The requested baud rate. A BaudRate value of 0 will 
use the the
+  @param  BaudRate The requested baud rate. A BaudRate value of 0 will 
use the
device's default interface speed.
   @param  ReceiveFifoDepth The requested depth of the FIFO on the receive side 
of the
serial interface. A ReceiveFifoDepth value of 0 
will use
diff --git a/EmbeddedPkg/Include/Library/GdbSerialLib.h 
b/EmbeddedPkg/Include/Library/GdbSerialLib.h
index 4845d6018cfe..58c3a5643c92 100644
--- a/EmbeddedPkg/Include/Library/GdbSerialLib.h
+++ b/EmbeddedPkg/Include/Library/GdbSerialLib.h
@@ -15,7 +15,7 @@
   data buts, and stop bits on a serial device. This call is optional as the 
serial
   port will be set up with defaults base on PCD values.
 
-  @param  BaudRate The requested baud rate. A BaudRate value of 0 will 
use the the
+  @param  BaudRate The requested baud rate. A BaudRate value of 0 will 
use the
device's default interface speed.
   @param  Parity   The type of parity to use on this serial device. A 
Parity value of
DefaultParity will use the device's default parity 
value.
diff --git a/EmbeddedPkg/Include/Library/RealTimeClockLib.h 
b/EmbeddedPkg/Include/Library/RealTimeClockLib.h
index 9cc26c40a89d..ff45e26d6cfc 100644
--- a/EmbeddedPkg/Include/Library/RealTimeClockLib.h
+++ b/EmbeddedPkg/Include/Library/RealTimeClockLib.h
@@ -39,7 +39,7 @@ LibGetTime (
 
   @retval EFI_SUCCESS   The operation completed successfully.
   @retval EFI_INVALID_PARAMETER A time field is out of range.
-  @retval EFI_DEVICE_ERROR  The time could not be set due due to hardware 
error.
+  @retval EFI_DEVICE_ERROR  The time could not be set due to hardware 
error.
 
 **/
 EFI_STATUS
diff --git a/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c 
b/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c
index d53a5fe47f18..334eb77607dd 100644
--- a/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c
+++ b/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c
@@ -51,7 +51,7 @@ GdbSerialLibDebugPortConstructor (
   data buts, and stop bits on a serial device. This call is optional as the 
serial
   port will be set up with defaults base on PCD values.
 
-  @param  BaudRate The requested baud rate. A BaudRate value of 0 will 
use the the
+  @param  BaudRate The requested baud rate. A BaudRate value of 0 will 
use the
device's default interface speed.
   @param  Parity   The type of parity to use on this serial device. A 
Parity value of
DefaultParity will use the device's default parity 
value.
diff --git a/EmbeddedPkg/Library/GdbSerialLib/GdbSerialLib.c 
b/EmbeddedPkg/Library/GdbSerialLib/GdbSerialLib.c
index 75e00773ec7d..dea05c344042 100644
--- a/EmbeddedPkg/Library/GdbSerialLib/GdbSerialLib.c
+++ b/EmbeddedPkg/Library/GdbSerialLib/GdbSerialLib.c
@@ -78,7 +78,7 @@ GdbSerialLibConstructor (
   data buts, and stop bits on a serial device. This call is optional as the 
serial
   port will be set up with defaults base on PCD values.
 
-  @param  BaudRate The requested baud rate. A BaudRate value of 0 will 
use the the
+  @param  BaudRate The requested baud rate. A BaudRate value of 0 will 
use the
device's default interface speed.
   @param  Parity   The type of parity to use on this serial device. A 
Parity value of
DefaultParity will use the device's default parity 
value.
diff --git a/EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c 
b/EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c

[edk2-devel] [PATCH 10/24] FatPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Ray Ni 
Signed-off-by: Pierre Gondois 
---
 FatPkg/EnhancedFatDxe/UnicodeCollation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/FatPkg/EnhancedFatDxe/UnicodeCollation.c 
b/FatPkg/EnhancedFatDxe/UnicodeCollation.c
index 813f153617ec..aac81bc09611 100644
--- a/FatPkg/EnhancedFatDxe/UnicodeCollation.c
+++ b/FatPkg/EnhancedFatDxe/UnicodeCollation.c
@@ -76,7 +76,7 @@ InitializeUnicodeCollationSupportWorker (
 }
 
 //
-// Find the best matching matching language from the supported languages
+// Find the best matching language from the supported languages
 // of Unicode Collation (2) protocol.
 //
 BestLanguage = GetBestLanguage (
-- 
2.25.1



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




[edk2-devel] [PATCH 09/24] EmulatorPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Andrew Fish 
Cc: Ray Ni 
Signed-off-by: Pierre Gondois 
---
 EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c | 2 +-
 EmulatorPkg/Win/Host/WinThunk.c| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c 
b/EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c
index 1c4d8120c1c9..29fdaeafc223 100644
--- a/EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c
+++ b/EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c
@@ -1212,7 +1212,7 @@ Returns:
   //
   // Only need to allocate once. There is only one copy of physical memory for
   // the private data of each FV instance. But in virtual mode or in physical
-  // mode, the address of the the physical memory may be different.
+  // mode, the address of the physical memory may be different.
   //
   Status = gBS->AllocatePool (
   EfiRuntimeServicesData,
diff --git a/EmulatorPkg/Win/Host/WinThunk.c b/EmulatorPkg/Win/Host/WinThunk.c
index 008e5755dbde..5d5799deefef 100644
--- a/EmulatorPkg/Win/Host/WinThunk.c
+++ b/EmulatorPkg/Win/Host/WinThunk.c
@@ -23,7 +23,7 @@ Abstract:
   API calls, so please reference Microsoft documentation.
 
 
-  gWinNt is a a public exported global that contains the initialized
+  gWinNt is a public exported global that contains the initialized
   data.
 
 **/
-- 
2.25.1



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




[edk2-devel] [PATCH 06/24] CryptoPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Jiewen Yao 
Cc: Jian J Wang 
Signed-off-by: Pierre Gondois 
---
 CryptoPkg/Library/BaseCryptLib/Hash/CryptCShake256.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/Hash/CryptCShake256.c 
b/CryptoPkg/Library/BaseCryptLib/Hash/CryptCShake256.c
index 2a9eaf9eec40..76ed211083c2 100644
--- a/CryptoPkg/Library/BaseCryptLib/Hash/CryptCShake256.c
+++ b/CryptoPkg/Library/BaseCryptLib/Hash/CryptCShake256.c
@@ -83,7 +83,7 @@ CShake256Init (
 
 AbsorbLen = 0;
 //
-// Absorb Absorb bytepad(.., rate).
+// Absorb bytepad(.., rate).
 //
 EncLen = LeftEncode (EncBuf, CSHAKE256_RATE_IN_BYTES);
 Status = (BOOLEAN)Sha3Update ((Keccak1600_Ctx *)CShake256Context, EncBuf, 
EncLen);
-- 
2.25.1



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




[edk2-devel] [PATCH 07/24] DynamicTablesPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Sami Mujawar 
Cc: Alexei Fedorov 
Signed-off-by: Pierre Gondois 
---
 DynamicTablesPkg/Include/Library/HwInfoParserLib.h  | 2 +-
 .../Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c | 2 +-
 .../Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c | 2 +-
 DynamicTablesPkg/Library/Common/AmlLib/AmlNodeDefines.h | 2 +-
 DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.c   | 2 +-
 DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.h   | 2 +-
 DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c | 2 +-
 DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParser.c   | 2 +-
 .../Library/FdtHwInfoParserLib/Gic/ArmGicDispatcher.c   | 2 +-
 .../Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/DynamicTablesPkg/Include/Library/HwInfoParserLib.h 
b/DynamicTablesPkg/Include/Library/HwInfoParserLib.h
index 05c21aeac00a..9710f7466170 100644
--- a/DynamicTablesPkg/Include/Library/HwInfoParserLib.h
+++ b/DynamicTablesPkg/Include/Library/HwInfoParserLib.h
@@ -83,7 +83,7 @@ HwInfoParse (
   );
 
 /** Cleanup any internal state and resources that were allocated
-by the the HwInfoParser.
+by the HwInfoParser.
 
   @param [in]  ParserHandleA handle to the parser instance.
 
diff --git 
a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c 
b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c
index 18c8b8d24525..b990686d40a3 100644
--- 
a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c
+++ 
b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c
@@ -587,7 +587,7 @@ BuildSsdtCmn600TableEx (
 return Status;
   }
 
-  // Setup the table list early so that that appropriate cleanup
+  // Setup the table list early so that appropriate cleanup
   // can be done in case of failure.
   *Table = TableList;
 
diff --git 
a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c
 
b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c
index 39cfbad95926..b850320eede7 100644
--- 
a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c
+++ 
b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c
@@ -239,7 +239,7 @@ BuildSsdtSerialPortTableEx (
 return Status;
   }
 
-  // Setup the table list early so that that appropriate cleanup
+  // Setup the table list early so that appropriate cleanup
   // can be done in case of failure.
   *Table = TableList;
 
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/AmlNodeDefines.h 
b/DynamicTablesPkg/Library/Common/AmlLib/AmlNodeDefines.h
index 8ceb20ff415e..d199f06cc54d 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/AmlNodeDefines.h
+++ b/DynamicTablesPkg/Library/Common/AmlLib/AmlNodeDefines.h
@@ -34,7 +34,7 @@ typedef AML_NODE_HEADER *AML_NODE_HANDLE;
 
 /** AML root node.
 
-  The root node is unique and at the head of of tree. It is a fake node used
+  The root node is unique and at the head of tree. It is a fake node used
   to maintain the list of AML statements (stored as object nodes) which are
   at the first scope level.
 */
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.c 
b/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.c
index 391c72bd322e..8f460a972841 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.c
+++ b/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.c
@@ -27,7 +27,7 @@
   of NameSegs that have less that 4 chars, like "DEV". "DEV" will be expanded
   as "DEV_".
 
-  An AML NameString is not NULL terminated and is is only composed of
+  An AML NameString is not NULL terminated and is only composed of
   4 chars long NameSegs.
 
   @param  [in] NameOpNode   NameOp object node defining a variable.
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.h 
b/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.h
index 8bbf62bbcd24..2b4c60d3ee14 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.h
+++ b/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApiHelper.h
@@ -19,7 +19,7 @@
   of NameSegs that have less that 4 chars, like "DEV". "DEV" will be expanded
   as "DEV_".
 
-  An AML NameString is not NULL terminated and is is only composed of
+  An AML NameString is not NULL terminated and is only composed of
   4 chars long NameSegs.
 
   @param  [in] NameOpNode   NameOp object node defining a variable.
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c 
b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
index e51d2dd7f083..12b6ef62f5cd 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
+++ 

[edk2-devel] [PATCH 02/24] ArmPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Signed-off-by: Pierre Gondois 
---
 ArmPkg/Drivers/ArmScmiDxe/Scmi.c | 4 ++--
 ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ArmPkg/Drivers/ArmScmiDxe/Scmi.c b/ArmPkg/Drivers/ArmScmiDxe/Scmi.c
index d5a1ff0be33c..fcf4ed496f26 100644
--- a/ArmPkg/Drivers/ArmScmiDxe/Scmi.c
+++ b/ArmPkg/Drivers/ArmScmiDxe/Scmi.c
@@ -145,8 +145,8 @@ ScmiCommandExecute (
 
 /** Internal common function useful for common protocol discovery messages.
 
-  @param[in] ProtocolIdProtocol Id of the the protocol.
-  @param[in] MesaageId Message Id of the message.
+  @param[in] ProtocolIdProtocol Id of the protocol.
+  @param[in] MessageId Message Id of the message.
 
   @param[out] ReturnValues SCMI response return values.
 
diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c 
b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
index 4a0513392a75..e5ecc7375153 100644
--- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
+++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
@@ -613,7 +613,7 @@ ArmConfigureMmu (
   // loss of coherency when using mismatched attributes, and given that memory
   // is mapped cacheable except for extraordinary cases (such as non-coherent
   // DMA), have the page table walker perform cached accesses as well, and
-  // assert below that that matches the attributes we use for CPU accesses to
+  // assert below that matches the attributes we use for CPU accesses to
   // the region.
   //
   TCR |= TCR_SH_INNER_SHAREABLE |
-- 
2.25.1



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




[edk2-devel] [PATCH 05/24] BaseTools: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Bob Feng 
Cc: Liming Gao 
Signed-off-by: Pierre Gondois 
---
 BaseTools/Source/C/Common/FirmwareVolumeBuffer.c| 6 +++---
 BaseTools/Source/C/DevicePath/DevicePathUtilities.c | 2 +-
 BaseTools/Source/C/GenFv/GenFv.c| 2 +-
 BaseTools/Source/C/VfrCompile/Pccts/antlr/mrhoist.c | 4 ++--
 BaseTools/Source/Python/Ecc/EccToolError.py | 2 +-
 BaseTools/Source/Python/build/build.py  | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/BaseTools/Source/C/Common/FirmwareVolumeBuffer.c 
b/BaseTools/Source/C/Common/FirmwareVolumeBuffer.c
index 70741c8afcb5..ace26eb71c6b 100644
--- a/BaseTools/Source/C/Common/FirmwareVolumeBuffer.c
+++ b/BaseTools/Source/C/Common/FirmwareVolumeBuffer.c
@@ -91,7 +91,7 @@ Routine Description:
 
 Arguments:
 
-  SourceFv - Address of the Fv in memory, this firmware volume volume will
+  SourceFv - Address of the Fv in memory, this firmware volume will
  be modified, if SourceFfsFile exists
   SourceFfsFile - Input FFS file to replace
 
@@ -141,7 +141,7 @@ Routine Description:
 
 Arguments:
 
-  SourceFv - Address of the Fv in memory, this firmware volume volume will
+  SourceFv - Address of the Fv in memory, this firmware volume will
  be modified, if SourceFfsFile exists
   SourceFfsFile - Input FFS file to replace
 
@@ -285,7 +285,7 @@ Routine Description:
 
 Arguments:
 
-  SourceFv - Address of the Fv in memory, this firmware volume volume will
+  SourceFv - Address of the Fv in memory, this firmware volume will
  be modified, if SourceFfsFile exists
   SourceFfsFile - Input FFS file to replace
 
diff --git a/BaseTools/Source/C/DevicePath/DevicePathUtilities.c 
b/BaseTools/Source/C/DevicePath/DevicePathUtilities.c
index 2ffefa8ceeef..49078aac8caf 100644
--- a/BaseTools/Source/C/DevicePath/DevicePathUtilities.c
+++ b/BaseTools/Source/C/DevicePath/DevicePathUtilities.c
@@ -37,7 +37,7 @@ CONST EFI_DEVICE_PATH_PROTOCOL  
mUefiDevicePathLibEndDevicePath = {
   @retval TRUEDevicePath is valid.
   @retval FALSE   DevicePath is NULL.
   @retval FALSE   Maxsize is less than sizeof(EFI_DEVICE_PATH_PROTOCOL).
-  @retval FALSE   The length of any node node in the DevicePath is less
+  @retval FALSE   The length of any node in the DevicePath is less
   than sizeof (EFI_DEVICE_PATH_PROTOCOL).
   @retval FALSE   If MaxSize is not zero, the size of the DevicePath
   exceeds MaxSize.
diff --git a/BaseTools/Source/C/GenFv/GenFv.c b/BaseTools/Source/C/GenFv/GenFv.c
index 43cc5cd3fe82..a742d55e5270 100644
--- a/BaseTools/Source/C/GenFv/GenFv.c
+++ b/BaseTools/Source/C/GenFv/GenFv.c
@@ -299,7 +299,7 @@ Returns:
 return STATUS_ERROR;
   }
   if (TempNumber == 0) {
-Error (NULL, 0, 1003, "Invalid option value", "Fv block size can't be 
be set to zero");
+Error (NULL, 0, 1003, "Invalid option value", "Fv block size can't be 
set to zero");
 return STATUS_ERROR;
   }
   mFvDataInfo.FvBlocks[0].Length = (UINT32) TempNumber;
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/mrhoist.c 
b/BaseTools/Source/C/VfrCompile/Pccts/antlr/mrhoist.c
index b57f5ded846c..bf3dd18eaf6f 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/mrhoist.c
+++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/mrhoist.c
@@ -714,7 +714,7 @@ Tree *MR_compute_pred_tree_ctxXX(p)
 if (p == NULL) return NULL;
 
 /* this appears strange: why do we OR the context
-   of and AND predicate ?  It is because of the way
+   of an AND predicate ?  It is because of the way
that predicates are evaluated: if the context is
wrong then it's the same as if the predicate was
true.  That means that even when one leg of an
@@ -1531,7 +1531,7 @@ Predicate * MR_find_in_aSubBlk(alt)
  *  1.  if lookahead for alt i is contained in the lookahead for any
  *  alt j then ignore semantic predicate of alt i
  *  2.  if lookahead for alt i is not contained in the lookahead for
- *  any alt j then add add predicate i to the OR list to be hoisted
+ *  any alt j then add predicate i to the OR list to be hoisted
  *  3.  if lookahead for alt i overlaps the lookahead for some alt j then
  *  add a dummy semantic predicate for alt j
  *
diff --git a/BaseTools/Source/Python/Ecc/EccToolError.py 
b/BaseTools/Source/Python/Ecc/EccToolError.py
index d97bf7948ce8..2ff36c8329cc 100644
--- a/BaseTools/Source/Python/Ecc/EccToolError.py
+++ b/BaseTools/Source/Python/Ecc/EccToolError.py
@@ -186,7 +186,7 @@ gEccErrorMessage = {
 ERROR_META_DATA_FILE_CHECK_BINARY_INF_IN_FDF : "An INF file is specified 
in the FDF file, but not in the DSC file, therefore the INF file must be for a 
Binary module only",
 ERROR_META_DATA_FILE_CHECK_PCD_DUPLICATE : "Duplicate PCDs found",
 

[edk2-devel] [PATCH 04/24] ArmVirtPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Ard Biesheuvel 
Signed-off-by: Pierre Gondois 
---
 .../Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c 
b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c
index 5c01a9997ead..fb1daf32769c 100644
--- 
a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c
+++ 
b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c
@@ -55,7 +55,7 @@ GetSerialConsolePortAddress (
 return EFI_INVALID_PARAMETER;
   }
 
-  // The "chosen" node resides at the the root of the DT. Fetch it.
+  // The "chosen" node resides at the root of the DT. Fetch it.
   ChosenNode = fdt_path_offset (Fdt, "/chosen");
   if (ChosenNode < 0) {
 return EFI_NOT_FOUND;
-- 
2.25.1



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




[edk2-devel] [PATCH 00/24] Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the below
packages, remove duplicated words.

The following command was used to find the occurrence of
duplicated words:
  egrep "(\b[a-zA-Z]+) \1\b"

The patches can be seen at:
https://github.com/PierreARM/edk2/tree/pg/duplicated_words
CI results at:
https://github.com/tianocore/edk2/pull/3234

Pierre Gondois (24):
  .pytool: Remove duplicated words
  ArmPkg: Remove duplicated words
  ArmPlatformPkg: Remove duplicated words
  ArmVirtPkg: Remove duplicated words
  BaseTools: Remove duplicated words
  CryptoPkg: Remove duplicated words
  DynamicTablesPkg: Remove duplicated words
  EmbeddedPkg: Remove duplicated words
  EmulatorPkg: Remove duplicated words
  FatPkg: Remove duplicated words
  IntelFsp2WrapperPkg: Remove duplicated words
  MdeModulePkg: Remove duplicated words
  MdePkg: Remove duplicated words
  NetworkPkg: Remove duplicated words
  OvmfPkg: Remove duplicated words
  PcAtChipsetPkg: Remove duplicated words
  RedfishPkg: Remove duplicated words
  SecurityPkg: Remove duplicated words
  ShellPkg: Remove duplicated words
  SourceLevelDebugPkg: Remove duplicated words
  StandaloneMmPkg: Remove duplicated words
  UefiCpuPkg: Remove duplicated words
  UefiPayloadPkg: Remove duplicated words
  UnitTestFrameworkPkg: Remove duplicated words

 .pytool/Plugin/UncrustifyCheck/Readme.md |  2 +-
 .pytool/Plugin/UncrustifyCheck/uncrustify.cfg|  2 +-
 ArmPkg/Drivers/ArmScmiDxe/Scmi.c |  4 ++--
 ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c |  2 +-
 .../PL031RealTimeClockLib/PL031RealTimeClockLib.c|  2 +-
 .../EarlyFdt16550SerialPortHookLib.c |  2 +-
 BaseTools/Source/C/Common/FirmwareVolumeBuffer.c |  6 +++---
 BaseTools/Source/C/DevicePath/DevicePathUtilities.c  |  2 +-
 BaseTools/Source/C/GenFv/GenFv.c |  2 +-
 BaseTools/Source/C/VfrCompile/Pccts/antlr/mrhoist.c  |  4 ++--
 BaseTools/Source/Python/Ecc/EccToolError.py  |  2 +-
 BaseTools/Source/Python/build/build.py   |  2 +-
 CryptoPkg/Library/BaseCryptLib/Hash/CryptCShake256.c |  2 +-
 DynamicTablesPkg/Include/Library/HwInfoParserLib.h   |  2 +-
 .../Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c   |  2 +-
 .../SsdtSerialPortGenerator.c|  2 +-
 .../Library/Common/AmlLib/AmlNodeDefines.h   |  2 +-
 .../Library/Common/AmlLib/Api/AmlApiHelper.c |  2 +-
 .../Library/Common/AmlLib/Api/AmlApiHelper.h |  2 +-
 .../Library/Common/AmlLib/CodeGen/AmlCodeGen.c   |  2 +-
 .../Library/FdtHwInfoParserLib/FdtHwInfoParser.c |  2 +-
 .../FdtHwInfoParserLib/Gic/ArmGicDispatcher.c|  2 +-
 .../FdtHwInfoParserLib/Serial/ArmSerialPortParser.c  |  2 +-
 EmbeddedPkg/GdbStub/SerialIo.c   |  2 +-
 EmbeddedPkg/Include/Library/GdbSerialLib.h   |  2 +-
 EmbeddedPkg/Include/Library/RealTimeClockLib.h   |  2 +-
 .../GdbSerialDebugPortLib/GdbSerialDebugPortLib.c|  2 +-
 EmbeddedPkg/Library/GdbSerialLib/GdbSerialLib.c  |  2 +-
 .../TemplateRealTimeClockLib/RealTimeClockLib.c  |  2 +-
 .../VirtualRealTimeClockLib.c|  2 +-
 EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c  |  2 +-
 EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c   |  2 +-
 EmulatorPkg/Win/Host/WinThunk.c  |  2 +-
 FatPkg/EnhancedFatDxe/UnicodeCollation.c |  2 +-
 IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec  |  2 +-
 MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c  |  2 +-
 MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c   |  2 +-
 .../Pci/NonDiscoverablePciDeviceDxe/ComponentName.c  |  4 ++--
 .../Bus/Pci/PciBusDxe/PciEnumeratorSupport.c |  2 +-
 MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c   | 12 ++--
 MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.h   | 12 ++--
 .../Bus/Pci/SataControllerDxe/ComponentName.c|  4 ++--
 .../Bus/Pci/SataControllerDxe/SataController.h   |  4 ++--
 MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c   |  2 +-
 MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.h   |  2 +-
 MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c  |  4 ++--
 MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h  |  2 +-
 MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c |  8 
 MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c   |  2 +-
 MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c |  6 +++---
 MdeModulePkg/Core/Dxe/DxeMain.h  |  2 +-
 MdeModulePkg/Core/Dxe/Mem/Page.c |  4 ++--
 MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c|  2 +-
 MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c  |  2 +-
 MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c |  6 +++---
 MdeModulePkg/Include/Guid/MdeModuleHii.h |  2 +-
 .../Include/Library/DisplayUpdateProgressLib.h   |  2 +-
 MdeModulePkg/Include/Library/UefiBootManagerLib.h|  2 +-
 

[edk2-devel] [PATCH 01/24] .pytool: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Sean Brogan 
Cc: Bret Barkelew 
Signed-off-by: Pierre Gondois 
---
 .pytool/Plugin/UncrustifyCheck/Readme.md  | 2 +-
 .pytool/Plugin/UncrustifyCheck/uncrustify.cfg | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pytool/Plugin/UncrustifyCheck/Readme.md 
b/.pytool/Plugin/UncrustifyCheck/Readme.md
index efe7a573e4fa..51f99565f72a 100644
--- a/.pytool/Plugin/UncrustifyCheck/Readme.md
+++ b/.pytool/Plugin/UncrustifyCheck/Readme.md
@@ -94,7 +94,7 @@ to be ignored.
 If `True`, output diffs of formatting changes into the test case log. This is 
helpful to exactly understand what changes
 need to be made to the source code in order to fix a coding standard 
compliance issue.
 
-Note that calculating the file diffs on a very large set of of results (e.g. 
>100 files) can significantly slow down
+Note that calculating the file diffs on a very large set of results (e.g. >100 
files) can significantly slow down
 plugin execution.
 
 ### `SkipGitExclusions`
diff --git a/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg 
b/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg
index 8506c715..2b8f2e539e5f 100644
--- a/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg
+++ b/.pytool/Plugin/UncrustifyCheck/uncrustify.cfg
@@ -119,7 +119,7 @@ sp_square_fparen= remove# Add or remove 
space between ']' an
 # 5.2.2.7 Put a space before an open brace if it is not on its own line
 sp_do_brace_open= force # Add or remove space between 'do' 
and '{'.
 sp_paren_brace  = force # Add or remove space between ')' 
and '{'.
-sp_sparen_brace = force # Add or remove space between ')' 
and '{' of of control statements.
+sp_sparen_brace = force # Add or remove space between ')' 
and '{' of control statements.
 
 # 5.2.2.8 Do not put spaces around structure member and pointer operators
 sp_after_byref  = remove# Add or remove space after 
reference sign '&', if followed by a word.
-- 
2.25.1



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




[edk2-devel] [PATCH 03/24] ArmPlatformPkg: Remove duplicated words

2022-08-23 Thread PierreGondois
From: Pierre Gondois 

In an effort to clean the documentation of the above
package, remove duplicated words.

Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Signed-off-by: Pierre Gondois 
---
 .../Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c 
b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
index a203299c0637..ec7feaeedcf8 100644
--- a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
+++ b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c
@@ -173,7 +173,7 @@ LibGetTime (
 
   @retval EFI_SUCCESS   The operation completed successfully.
   @retval EFI_INVALID_PARAMETER A time field is out of range.
-  @retval EFI_DEVICE_ERROR  The time could not be set due due to hardware 
error.
+  @retval EFI_DEVICE_ERROR  The time could not be set due to hardware 
error.
 
 **/
 EFI_STATUS
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92685): https://edk2.groups.io/g/devel/message/92685
Mute This Topic: https://groups.io/mt/93207386/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/6] ArmPkg/SMBIOS fixes and improvements

2022-08-23 Thread PierreGondois

Hello,
Some of the patches are modifying:
  ArmPkg/Universal/Smbios/SmbiosMiscDxe/

This folder has been ignored by the EccCheck done in the CI in order to
enable uncrustify:
  https://edk2.groups.io/g/devel/topic/87268735#83984
Indeed, the EccCheck is only run on the code which is modified, and a lot
of code was modified to enable uncrustify, ignoring this folder was the
easiest solution.

The EccCheck doesn't support the declaration of functions with macros.
For intance at:
  
https://github.com/tianocore/edk2/blob/dfdba857a6b6a708e754ddb1a04086a3402acdef/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c#L38
the following errors should normally be triggered:
- "The body of a function should be contained by open and close braces that must be 
in the first column"
- "Function name does not follow the rules: 1. First character should be upper case 
2. Must contain lower case characters 3. No white space characters"
- "Any optional functional modifiers should exist and next to the return type"

This is just to be sure everyone is aware of the situation,
Regards,
Pierre


On 8/23/22 12:59, Nhi Pham via groups.io wrote:

This patchset is to update the ArmPkg/SMBIOS for fixes and improvements.

Minh Nguyen (5):
   ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib
   ArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID call
   ArmPkg/SmbiosMiscDxe: Fix typo of "AssetTagType02"
   ArmPkg/SmbiosMiscDxe: Remove redundant updates in SMBIOS Type 2
   ArmPkg/SmbiosMiscDxe: Get SMBIOS information from OemMiscLib

Nhi Pham (1):
   ArmPkg/SmbiosMiscDxe: Support fetching System UUID

  ArmPkg/Include/Library/OemMiscLib.h   
   | 37 +++-
  ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c   
   | 46 
  ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c  
   |  8 +++-
  ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c   
   |  6 +--
  ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c 
   | 32 +-
  ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c 
   |  3 +-
  
ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
 | 13 +-
  7 files changed, 117 insertions(+), 28 deletions(-)




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92681): https://edk2.groups.io/g/devel/message/92681
Mute This Topic: https://groups.io/mt/93201501/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] Maintainers.txt: Update reviewers for IntelSiliconPkg

2022-08-23 Thread Chaganty, Rangasai V
Reviewed-by: Sai Chaganty 

-Original Message-
From: S, Ashraf Ali  
Sent: Tuesday, August 23, 2022 12:27 AM
To: devel@edk2.groups.io
Cc: S, Ashraf Ali ; Ni, Ray ; 
Chaganty, Rangasai V ; Oram, Isaac W 

Subject: [PATCH V2] Maintainers.txt: Update reviewers for IntelSiliconPkg

Add Ashraf Ali S as IntelSiliconPkg reviewers

Signed-off-by: Ashraf Ali S 
Cc: Ray Ni 
Cc: Rangasai V Chaganty 
Cc: Isaac Oram 
---
 Maintainers.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Maintainers.txt b/Maintainers.txt index 5e403ce851..3fe5dc21a8 
100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -277,6 +277,7 @@ F: Silicon/Intel/IntelSiliconPkg/
 M: Ray Ni 
 M: Rangasai V Chaganty 
 M: Isaac Oram 
+R: Ashraf Ali S 
 
 Silicon/Intel/QuarkSocPkg
 F: Silicon/Intel/QuarkSocPkg/
--
2.30.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92680): https://edk2.groups.io/g/devel/message/92680
Mute This Topic: https://groups.io/mt/93199674/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/6] ArmPkg/SMBIOS fixes and improvements

2022-08-23 Thread Rebecca Cran

Thanks. For the series:

Reviewed-by: Rebecca Cran 

On 8/23/22 04:59, Nhi Pham via groups.io wrote:

This patchset is to update the ArmPkg/SMBIOS for fixes and improvements.

Minh Nguyen (5):
   ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib
   ArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID call
   ArmPkg/SmbiosMiscDxe: Fix typo of "AssetTagType02"
   ArmPkg/SmbiosMiscDxe: Remove redundant updates in SMBIOS Type 2
   ArmPkg/SmbiosMiscDxe: Get SMBIOS information from OemMiscLib

Nhi Pham (1):
   ArmPkg/SmbiosMiscDxe: Support fetching System UUID

  ArmPkg/Include/Library/OemMiscLib.h   
   | 37 +++-
  ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c   
   | 46 
  ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c  
   |  8 +++-
  ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c   
   |  6 +--
  ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c 
   | 32 +-
  ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c 
   |  3 +-
  
ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
 | 13 +-
  7 files changed, 117 insertions(+), 28 deletions(-)





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




Re: [edk2-devel] [PATCH 1/1] OvmfPkg: Reserve the Ovmf work area as RT_DATA

2022-08-23 Thread Lendacky, Thomas via groups.io

On 8/23/22 03:40, Xu, Min M wrote:

On August 23, 2022 3:38 PM, Gerd Hoffmann wrote:

   Hi,


Ah, I forget to reserve the work-area as RT_Data in below code:
   BuildMemoryAllocationHob (
 (EFI_PHYSICAL_ADDRESS)(UINTN)FixedPcdGet32

(PcdOvmfWorkAreaBase),

 (UINT64)(UINTN)FixedPcdGet32 (PcdOvmfWorkAreaSize),
 PlatformInfoHob->S3Supported ? EfiACPIMemoryNVS :

EfiRuntimeServicesData  <-- ACPI_NVS is not accessible either in OS-Runtime.

 );


https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/Platform

InitLib/MemDetect.c#L1022-L1026


With that changed to use EfiRuntimeServicesData unconditionally the page
fault is gone.


Gerd, do you think we can reserve Ovmf WorkArea as RT_Data even when

S3 is supported?

Hmm, not fully sure how the various memory types are handled when the
VM is suspended.


Tom suggested that the work area should not  be kept around. In stead a PCD 
should be used.
https://edk2.groups.io/g/devel/message/92617

But the dynamic PCD is not thread-safe and it cannot be accessed by APs.

Now we have 2 solutions to fix this issue.
1. Reserve the Ovmf work area as RT_DATA.
2. Split the CcProbeLib into 2 instances. See 
https://edk2.groups.io/g/devel/message/91132

Gerd & Tom, what's your thought?


Runtime service call are restricted so that you don't have concurrent 
threads executing (see section 8.1 of the specification). Without that you 
would have problems with runtime services today.


Thanks,
Tom



Thanks
Min




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




Re: [edk2-devel] [PATCH] IntelSiliconPkg: Fix DEBUG macros having incorrect number of arguments

2022-08-23 Thread Ashraf Ali S
Reviewed-by: Ashraf Ali S 


Regards,
Ashraf Ali S
Intel Technology India Pvt. Ltd. 

-Original Message-
From: Singh, DeepakX  
Sent: Tuesday, August 23, 2022 3:42 PM
To: devel@edk2.groups.io
Cc: Singh, DeepakX ; Ni, Ray ; 
Chaganty, Rangasai V ; Oram, Isaac W 
; S, Ashraf Ali ; Pir, Ovais F 

Subject: [PATCH] IntelSiliconPkg: Fix DEBUG macros having incorrect number of 
arguments

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4027

Signed-off-by: Deepak Singh 
Cc: Ray Ni 
Cc: Rangasai V Chaganty 
Cc: Isaac Oram 
Cc: Ashraf Ali S 
Cc: Ovais F Pir 
---
 .../IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c   | 2 +-
 .../Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
 
b/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
index aa2bf14fa8..7a70dc7aea 100644
--- 
a/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
+++ 
b/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
@@ -488,7 +488,7 @@ DoMeasurementsFromDigestRegister (
   DEBUG((DEBUG_INFO, "\n"));
 }
 
-DEBUG((DEBUG_INFO, "ExtendDigestRegister...\n", ExtendDigestRegister));
+DEBUG((DEBUG_INFO, "ExtendDigestRegister...\n"));
 ExtendDigestRegister (PciIo, DeviceSecurityPolicy, TcgAlgId, DigestSel, 
Digest, DeviceSecurityState);
   }
 }
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c 
b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
index c7a56cf571..ef1737b1b6 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
@@ -642,7 +642,7 @@ DumpVtdVerRegs (
   IN VTD_VER_REG*VerReg
   )
 {
-  DEBUG ((DEBUG_INFO, "  VerReg:\n", VerReg->Uint32));
+  DEBUG ((DEBUG_INFO, "   VerReg - 0x%x\n", VerReg->Uint32));
   DEBUG ((DEBUG_INFO, "Major - 0x%x\n", VerReg->Bits.Major));
   DEBUG ((DEBUG_INFO, "Minor - 0x%x\n", VerReg->Bits.Minor));
 }
@@ -657,7 +657,7 @@ DumpVtdCapRegs (
   IN VTD_CAP_REG *CapReg
   )
 {
-  DEBUG((DEBUG_INFO, "  CapReg:\n", CapReg->Uint64));
+  DEBUG((DEBUG_INFO, "  CapReg   - 0x%x\n", CapReg->Uint64));
   DEBUG((DEBUG_INFO, "ND - 0x%x\n", CapReg->Bits.ND));
   DEBUG((DEBUG_INFO, "AFL- 0x%x\n", CapReg->Bits.AFL));
   DEBUG((DEBUG_INFO, "RWBF   - 0x%x\n", CapReg->Bits.RWBF));
@@ -688,7 +688,7 @@ DumpVtdECapRegs (
   IN VTD_ECAP_REG *ECapReg
   )
 {
-  DEBUG((DEBUG_INFO, "  ECapReg:\n", ECapReg->Uint64));
+  DEBUG((DEBUG_INFO, "  ECapReg  - 0x%x\n", ECapReg->Uint64));
   DEBUG((DEBUG_INFO, "C  - 0x%x\n", ECapReg->Bits.C));
   DEBUG((DEBUG_INFO, "QI - 0x%x\n", ECapReg->Bits.QI));
   DEBUG((DEBUG_INFO, "DT - 0x%x\n", ECapReg->Bits.DT));
-- 
2.30.2.windows.1



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




Re: [edk2-devel] [PATCH] Maintainers.txt: Update maintainers list

2022-08-23 Thread NickleLa
Reviewed-by: Nickle Wang

Thanks,
Nickle

Sunil V L  於 2022年8月23日 週二 中午12:21寫道:

> On Mon, Aug 22, 2022 at 11:13:00AM +0800, abner.ch...@amd.com wrote:
> > From: Abner Chang 
> >
> > Update package maintainers for below package/arch,
> >
> > 1. RISCV64 Architecture:
> >Abner is stepping out from RISC-V stuff for now and hand over edk2
> RISC-V
> >responsibilities to Sunil.
> >Daniel Schaefer is no longer with HPE. Update his email address for
> >RISCV64 arch. He will keep helping on RISC-V stuff with his personal
> >email.
> >
> > 2. EmbeddedPkg:
> >Daniel Schaefer is no longer with HPE. Update his email address for
> >EmbeddedPkg.
> >
> > 3. EmulatorPkg and RedfishPkg:
> >Nickle Wang is no longer with HPE. Update his email address for
> >EmulatorPkg and RedfishPkg packages. He will use the personal email
> for
> >the time being until he gets ready with his next journey.
> >
> > Cc: Andrew Fish 
> > Cc: Leif Lindholm 
> > Cc: Michael D Kinney 
> > Cc: Daniel Schaefer 
> > Cc: Sunil V L 
> > Cc: Nickle Wang 
> > Signed-off-by: Abner Chang 
> > ---
> >  Maintainers.txt | 10 +-
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/Maintainers.txt b/Maintainers.txt
> > index a0d8b696850..23f775c0eae 100644
> > --- a/Maintainers.txt
> > +++ b/Maintainers.txt
> > @@ -99,8 +99,8 @@ M: Ard Biesheuvel 
> [ardbiesheuvel]
> >
> >  RISCV64
> >  F: */RiscV64/
> > -M: Abner Chang  [changab]
> > -R: Daniel Schaefer  [JohnAZoidberg]
> > +M: Sunil V L  [vlsunil]
> > +R: Daniel Schaefer  [JohnAZoidberg]
> >
> >  EDK II Continuous Integration:
> >  --
> > @@ -185,7 +185,7 @@ W:
> https://github.com/tianocore/tianocore.github.io/wiki/EmbeddedPkg
> >  M: Leif Lindholm  [leiflindholm]
> >  M: Ard Biesheuvel  [ardbiesheuvel]
> >  M: Abner Chang  [changab]
> > -R: Daniel Schaefer  [JohnAZoidberg]
> > +R: Daniel Schaefer  [JohnAZoidberg]
> >
> >  EmulatorPkg
> >  F: EmulatorPkg/
> > @@ -197,7 +197,7 @@ S: Maintained
> >  EmulatorPkg: Redfish-related modules
> >  F: EmulatorPkg/*Redfish*
> >  M: Abner Chang  [changab]
> > -R: Nickle Wang  [nicklela]
> > +R: Nickle Wang  [nicklela]
> >
> >  FatPkg
> >  F: FatPkg/
> > @@ -543,7 +543,7 @@ R: Ankit Sinha  [ankit13s]
> >  RedfishPkg: Redfish related modules
> >  F: RedfishPkg/
> >  M: Abner Chang  [changab]
> > -R: Nickle Wang  [nicklela]
> > +R: Nickle Wang  [nicklela]
> >
> >  SecurityPkg
> >  F: SecurityPkg/
>
> Reviewed-by: Sunil V L 
>
> Thanks
> Sunil
> > --
> > 2.37.1.windows.1
> >
>


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




[edk2-devel] [PATCH] IntelSiliconPkg: Fix DEBUG macros having incorrect number of arguments

2022-08-23 Thread Singh Deepak5x
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4027

Cc: Ray Ni 
Cc: Rangasai V Chaganty 
Cc: Isaac Oram 
Cc: Ashraf Ali S 
Cc: Ovais F Pir 

Signed-off-by: Singh Deepak5x 
---
 .../IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c   | 2 +-
 .../Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
 
b/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
index aa2bf14fa8..7a70dc7aea 100644
--- 
a/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
+++ 
b/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
@@ -488,7 +488,7 @@ DoMeasurementsFromDigestRegister (
   DEBUG((DEBUG_INFO, "\n"));
 }
 
-DEBUG((DEBUG_INFO, "ExtendDigestRegister...\n", ExtendDigestRegister));
+DEBUG((DEBUG_INFO, "ExtendDigestRegister...\n"));
 ExtendDigestRegister (PciIo, DeviceSecurityPolicy, TcgAlgId, DigestSel, 
Digest, DeviceSecurityState);
   }
 }
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c 
b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
index c7a56cf571..ef1737b1b6 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
@@ -642,7 +642,7 @@ DumpVtdVerRegs (
   IN VTD_VER_REG*VerReg
   )
 {
-  DEBUG ((DEBUG_INFO, "  VerReg:\n", VerReg->Uint32));
+  DEBUG ((DEBUG_INFO, "   VerReg - 0x%x\n", VerReg->Uint32));
   DEBUG ((DEBUG_INFO, "Major - 0x%x\n", VerReg->Bits.Major));
   DEBUG ((DEBUG_INFO, "Minor - 0x%x\n", VerReg->Bits.Minor));
 }
@@ -657,7 +657,7 @@ DumpVtdCapRegs (
   IN VTD_CAP_REG *CapReg
   )
 {
-  DEBUG((DEBUG_INFO, "  CapReg:\n", CapReg->Uint64));
+  DEBUG((DEBUG_INFO, "  CapReg   - 0x%x\n", CapReg->Uint64));
   DEBUG((DEBUG_INFO, "ND - 0x%x\n", CapReg->Bits.ND));
   DEBUG((DEBUG_INFO, "AFL- 0x%x\n", CapReg->Bits.AFL));
   DEBUG((DEBUG_INFO, "RWBF   - 0x%x\n", CapReg->Bits.RWBF));
@@ -688,7 +688,7 @@ DumpVtdECapRegs (
   IN VTD_ECAP_REG *ECapReg
   )
 {
-  DEBUG((DEBUG_INFO, "  ECapReg:\n", ECapReg->Uint64));
+  DEBUG((DEBUG_INFO, "  ECapReg  - 0x%x\n", ECapReg->Uint64));
   DEBUG((DEBUG_INFO, "C  - 0x%x\n", ECapReg->Bits.C));
   DEBUG((DEBUG_INFO, "QI - 0x%x\n", ECapReg->Bits.QI));
   DEBUG((DEBUG_INFO, "DT - 0x%x\n", ECapReg->Bits.DT));
-- 
2.30.2.windows.1



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




[edk2-devel] [PATCH] IntelSiliconPkg: Fix DEBUG macros having incorrect number of arguments

2022-08-23 Thread Singh Deepak5x
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4027

Cc: Ray Ni 
Cc: Rangasai V Chaganty 
Cc: Isaac Oram 
Cc: S, Ashraf Ali 
Cc: Pir, Ovais F 

Signed-off-by: Singh Deepak5x 

diff --git 
a/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
 
b/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
index aa2bf14fa8..7a70dc7aea 100644
--- 
a/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
+++ 
b/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
@@ -488,7 +488,7 @@ DoMeasurementsFromDigestRegister (
   DEBUG((DEBUG_INFO, "\n"));
 }
 
-DEBUG((DEBUG_INFO, "ExtendDigestRegister...\n", ExtendDigestRegister));
+DEBUG((DEBUG_INFO, "ExtendDigestRegister...\n"));
 ExtendDigestRegister (PciIo, DeviceSecurityPolicy, TcgAlgId, DigestSel, 
Digest, DeviceSecurityState);
   }
 }
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c 
b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
index c7a56cf571..ef1737b1b6 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
@@ -642,7 +642,7 @@ DumpVtdVerRegs (
   IN VTD_VER_REG*VerReg
   )
 {
-  DEBUG ((DEBUG_INFO, "  VerReg:\n", VerReg->Uint32));
+  DEBUG ((DEBUG_INFO, "   VerReg - 0x%x\n", VerReg->Uint32));
   DEBUG ((DEBUG_INFO, "Major - 0x%x\n", VerReg->Bits.Major));
   DEBUG ((DEBUG_INFO, "Minor - 0x%x\n", VerReg->Bits.Minor));
 }
@@ -657,7 +657,7 @@ DumpVtdCapRegs (
   IN VTD_CAP_REG *CapReg
   )
 {
-  DEBUG((DEBUG_INFO, "  CapReg:\n", CapReg->Uint64));
+  DEBUG((DEBUG_INFO, "  CapReg   - 0x%x\n", CapReg->Uint64));
   DEBUG((DEBUG_INFO, "ND - 0x%x\n", CapReg->Bits.ND));
   DEBUG((DEBUG_INFO, "AFL- 0x%x\n", CapReg->Bits.AFL));
   DEBUG((DEBUG_INFO, "RWBF   - 0x%x\n", CapReg->Bits.RWBF));
@@ -688,7 +688,7 @@ DumpVtdECapRegs (
   IN VTD_ECAP_REG *ECapReg
   )
 {
-  DEBUG((DEBUG_INFO, "  ECapReg:\n", ECapReg->Uint64));
+  DEBUG((DEBUG_INFO, "  ECapReg  - 0x%x\n", ECapReg->Uint64));
   DEBUG((DEBUG_INFO, "C  - 0x%x\n", ECapReg->Bits.C));
   DEBUG((DEBUG_INFO, "QI - 0x%x\n", ECapReg->Bits.QI));
   DEBUG((DEBUG_INFO, "DT - 0x%x\n", ECapReg->Bits.DT));
-- 
2.26.2.windows.1



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




[edk2-devel] [PATCH] IntelSiliconPkg: Fix DEBUG macros having incorrect number of arguments

2022-08-23 Thread Deepak Singh
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4027

Signed-off-by: Deepak Singh 
Cc: Ray Ni 
Cc: Rangasai V Chaganty 
Cc: Isaac Oram 
Cc: Ashraf Ali S 
Cc: Ovais F Pir 
---
 .../IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c   | 2 +-
 .../Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
 
b/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
index aa2bf14fa8..7a70dc7aea 100644
--- 
a/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
+++ 
b/Silicon/Intel/IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.c
@@ -488,7 +488,7 @@ DoMeasurementsFromDigestRegister (
   DEBUG((DEBUG_INFO, "\n"));
 }
 
-DEBUG((DEBUG_INFO, "ExtendDigestRegister...\n", ExtendDigestRegister));
+DEBUG((DEBUG_INFO, "ExtendDigestRegister...\n"));
 ExtendDigestRegister (PciIo, DeviceSecurityPolicy, TcgAlgId, DigestSel, 
Digest, DeviceSecurityState);
   }
 }
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c 
b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
index c7a56cf571..ef1737b1b6 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
@@ -642,7 +642,7 @@ DumpVtdVerRegs (
   IN VTD_VER_REG*VerReg
   )
 {
-  DEBUG ((DEBUG_INFO, "  VerReg:\n", VerReg->Uint32));
+  DEBUG ((DEBUG_INFO, "   VerReg - 0x%x\n", VerReg->Uint32));
   DEBUG ((DEBUG_INFO, "Major - 0x%x\n", VerReg->Bits.Major));
   DEBUG ((DEBUG_INFO, "Minor - 0x%x\n", VerReg->Bits.Minor));
 }
@@ -657,7 +657,7 @@ DumpVtdCapRegs (
   IN VTD_CAP_REG *CapReg
   )
 {
-  DEBUG((DEBUG_INFO, "  CapReg:\n", CapReg->Uint64));
+  DEBUG((DEBUG_INFO, "  CapReg   - 0x%x\n", CapReg->Uint64));
   DEBUG((DEBUG_INFO, "ND - 0x%x\n", CapReg->Bits.ND));
   DEBUG((DEBUG_INFO, "AFL- 0x%x\n", CapReg->Bits.AFL));
   DEBUG((DEBUG_INFO, "RWBF   - 0x%x\n", CapReg->Bits.RWBF));
@@ -688,7 +688,7 @@ DumpVtdECapRegs (
   IN VTD_ECAP_REG *ECapReg
   )
 {
-  DEBUG((DEBUG_INFO, "  ECapReg:\n", ECapReg->Uint64));
+  DEBUG((DEBUG_INFO, "  ECapReg  - 0x%x\n", ECapReg->Uint64));
   DEBUG((DEBUG_INFO, "C  - 0x%x\n", ECapReg->Bits.C));
   DEBUG((DEBUG_INFO, "QI - 0x%x\n", ECapReg->Bits.QI));
   DEBUG((DEBUG_INFO, "DT - 0x%x\n", ECapReg->Bits.DT));
-- 
2.30.2.windows.1



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




[edk2-devel] [PATCH 6/6] ArmPkg/SmbiosMiscDxe: Get SMBIOS information from OemMiscLib

2022-08-23 Thread Nhi Pham via groups.io
From: Minh Nguyen 

In some scenarios, the information of Bios Version, Bios Release
and Embedded Controller Firmware Release are fetched during UEFI
booting. This patch supports updating those fields dynamically
when the PCDs are empty.

Signed-off-by: Nhi Pham 
---
 ArmPkg/Include/Library/OemMiscLib.h   | 21 
+
 ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c   | 28 
+
 ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c | 32 
+---
 3 files changed, 70 insertions(+), 11 deletions(-)

diff --git a/ArmPkg/Include/Library/OemMiscLib.h 
b/ArmPkg/Include/Library/OemMiscLib.h
index 1936619d9b5b..541274999e5c 100644
--- a/ArmPkg/Include/Library/OemMiscLib.h
+++ b/ArmPkg/Include/Library/OemMiscLib.h
@@ -37,6 +37,7 @@ typedef struct {
 } OEM_MISC_PROCESSOR_DATA;

 

 typedef enum {

+  BiosVersionType00,

   ProductNameType01,

   SerialNumType01,

   UuidType01,

@@ -247,4 +248,24 @@ OemGetSystemUuid (
   OUT GUID  *SystemUuid

   );

 

+/** Fetches the BIOS release.

+

+  @return The BIOS release.

+**/

+UINT16

+EFIAPI

+OemGetBiosRelease (

+  VOID

+  );

+

+/** Fetches the embedded controller firmware release.

+

+  @return The embedded controller firmware release.

+**/

+UINT16

+EFIAPI

+OemGetEmbeddedControllerFirmwareRelease (

+  VOID

+  );

+

 #endif // OEM_MISC_LIB_H_

diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c 
b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
index 32f6d55c1a9a..788ccab9e8c1 100644
--- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
+++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
@@ -254,3 +254,31 @@ OemGetSystemUuid (
   ASSERT (FALSE);

   CopyGuid (SystemUuid, );

 }

+

+/** Fetches the BIOS release.

+

+  @return The BIOS release.

+**/

+UINT16

+EFIAPI

+OemGetBiosRelease (

+  VOID

+  )

+{

+  ASSERT (FALSE);

+  return 0x;

+}

+

+/** Fetches the embedded controller firmware release.

+

+  @return The embedded controller firmware release.

+**/

+UINT16

+EFIAPI

+OemGetEmbeddedControllerFirmwareRelease (

+  VOID

+  )

+{

+  ASSERT (FALSE);

+  return 0x;

+}

diff --git 
a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c 
b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
index b49c4b754cab..e9106a8a2fec 100644
--- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
+++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c
@@ -1,5 +1,6 @@
 /** @file

 

+  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.

   Copyright (c) 2021, NUVIA Inc. All rights reserved.

   Copyright (c) 2009, Intel Corporation. All rights reserved.

   Copyright (c) 2015, Hisilicon Limited. All rights reserved.

@@ -13,6 +14,7 @@
 #include 

 #include 

 #include 

+#include 

 #include 

 #include 

 

@@ -191,11 +193,11 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor) {
 TokenToUpdate = STRING_TOKEN (STR_MISC_BIOS_VERSION);

 HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Version, NULL);

   } else {

-Version = (CHAR16 *)PcdGetPtr (PcdFirmwareVersionString);

-if (StrLen (Version) > 0) {

-  TokenToUpdate = STRING_TOKEN (STR_MISC_BIOS_VERSION);

-  HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Version, NULL);

-}

+  OemUpdateSmbiosInfo (

+mSmbiosMiscHiiHandle,

+STRING_TOKEN (STR_MISC_BIOS_VERSION),

+BiosVersionType00

+);

   }

 

   Char16String = GetBiosReleaseDate ();

@@ -251,13 +253,21 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor) {
 }

   }

 

-  SmbiosRecord->SystemBiosMajorRelease = (UINT8)(PcdGet16 
(PcdSystemBiosRelease) >> 8);

-  SmbiosRecord->SystemBiosMinorRelease = (UINT8)(PcdGet16 
(PcdSystemBiosRelease) & 0xFF);

+  if (PcdGet16 (PcdSystemBiosRelease) != 0x) {

+SmbiosRecord->SystemBiosMajorRelease = (UINT8)(PcdGet16 
(PcdSystemBiosRelease) >> 8);

+SmbiosRecord->SystemBiosMinorRelease = (UINT8)(PcdGet16 
(PcdSystemBiosRelease) & 0xFF);

+  } else {

+SmbiosRecord->SystemBiosMajorRelease = (UINT8)(OemGetBiosRelease () >> 8);

+SmbiosRecord->SystemBiosMinorRelease = (UINT8)(OemGetBiosRelease () & 
0xFF);

+  }

 

-  SmbiosRecord->EmbeddedControllerFirmwareMajorRelease = (UINT16)

- (PcdGet16 
(PcdEmbeddedControllerFirmwareRelease) >> 8);

-  SmbiosRecord->EmbeddedControllerFirmwareMinorRelease = (UINT16)

- (PcdGet16 
(PcdEmbeddedControllerFirmwareRelease) & 0xFF);

+  if (PcdGet16 (PcdEmbeddedControllerFirmwareRelease) != 0x) {

+SmbiosRecord->EmbeddedControllerFirmwareMajorRelease = (UINT16)(PcdGet16 
(PcdEmbeddedControllerFirmwareRelease) >> 8);

+SmbiosRecord->EmbeddedControllerFirmwareMinorRelease = (UINT16)(PcdGet16 
(PcdEmbeddedControllerFirmwareRelease) & 0xFF);

+  } else {

+   

[edk2-devel] [PATCH 3/6] ArmPkg/SmbiosMiscDxe: Support fetching System UUID

2022-08-23 Thread Nhi Pham via groups.io
This adds an API to OemMiscLib for fetching the system UUID according to
the platform.

Signed-off-by: Nhi Pham 
---
 ArmPkg/Include/Library/OemMiscLib.h   
| 12 
 ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c   
| 18 ++
 ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c 
|  3 ++-
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/ArmPkg/Include/Library/OemMiscLib.h 
b/ArmPkg/Include/Library/OemMiscLib.h
index 330bb4b014de..d87737db9c2b 100644
--- a/ArmPkg/Include/Library/OemMiscLib.h
+++ b/ArmPkg/Include/Library/OemMiscLib.h
@@ -235,4 +235,16 @@ OemGetChassisNumPowerCords (
   VOID

   );

 

+/**

+  Fetches the system UUID.

+

+  @param[out] SystemUuid The pointer to the buffer to store the System 
UUID.

+

+**/

+VOID

+EFIAPI

+OemGetSystemUuid (

+  OUT GUID  *SystemUuid

+  );

+

 #endif // OEM_MISC_LIB_H_

diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c 
b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
index 98970407a65e..32f6d55c1a9a 100644
--- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
+++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
@@ -1,6 +1,7 @@
 /** @file

 *  OemMiscLib.c

 *

+*  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.

 *  Copyright (c) 2021, NUVIA Inc. All rights reserved.

 *  Copyright (c) 2018, Hisilicon Limited. All rights reserved.

 *  Copyright (c) 2018, Linaro Limited. All rights reserved.

@@ -10,6 +11,7 @@
 **/

 

 #include 

+#include 

 #include 

 #include 

 #include 

@@ -236,3 +238,19 @@ OemGetChassisNumPowerCords (
   ASSERT (FALSE);

   return 1;

 }

+

+/**

+  Fetches the system UUID.

+

+  @param[out] SystemUuid The pointer to the buffer to store the System 
UUID.

+

+**/

+VOID

+EFIAPI

+OemGetSystemUuid (

+  OUT GUID  *SystemUuid

+  )

+{

+  ASSERT (FALSE);

+  CopyGuid (SystemUuid, );

+}

diff --git 
a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c 
b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c
index 5cf72644d0b2..22fb5eccaa63 100644
--- 
a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c
+++ 
b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c
@@ -4,6 +4,7 @@
 

   Based on files under Nt32Pkg/MiscSubClassPlatformDxe/

 

+  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.

   Copyright (c) 2021, NUVIA Inc. All rights reserved.

   Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.

   Copyright (c) 2015, Hisilicon Limited. All rights reserved.

@@ -160,7 +161,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscSystemManufacturer) {
 

   SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE1);

 

-  CopyGuid (>Uuid, >Uuid);

+  OemGetSystemUuid (>Uuid);

 

   OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);

   UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, ManuStrLen + 1);

-- 
2.25.1



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




[edk2-devel] [PATCH 5/6] ArmPkg/SmbiosMiscDxe: Remove redundant updates in SMBIOS Type 2

2022-08-23 Thread Nhi Pham via groups.io
From: Minh Nguyen 

This patch removes redundant updates of "BoardManufacturerType02"
and "SerialNumberType02".

Signed-off-by: Nhi Pham 
---
 
ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
 | 10 --
 1 file changed, 10 deletions(-)

diff --git 
a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
 
b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
index f61546955f12..3441e7798860 100644
--- 
a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
+++ 
b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
@@ -120,16 +120,6 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBaseBoardManufacturer) {
 STRING_TOKEN (STR_MISC_BASE_BOARD_SERIAL_NUMBER),

 SerialNumberType02

 );

-  OemUpdateSmbiosInfo (

-mSmbiosMiscHiiHandle,

-STRING_TOKEN (STR_MISC_BASE_BOARD_MANUFACTURER),

-BoardManufacturerType02

-);

-  OemUpdateSmbiosInfo (

-mSmbiosMiscHiiHandle,

-STRING_TOKEN (STR_MISC_BASE_BOARD_SERIAL_NUMBER),

-SerialNumberType02

-);

   OemUpdateSmbiosInfo (

 mSmbiosMiscHiiHandle,

 STRING_TOKEN (STR_MISC_BASE_BOARD_SKU_NUMBER),

-- 
2.25.1



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




[edk2-devel] [PATCH 4/6] ArmPkg/SmbiosMiscDxe: Fix typo of "AssetTagType02"

2022-08-23 Thread Nhi Pham via groups.io
From: Minh Nguyen 

This patch fixes typo from "AssertTagType02"
to "AssetTagType02".

Signed-off-by: Nhi Pham 
---
 ArmPkg/Include/Library/OemMiscLib.h
  | 2 +-
 
ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
 | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ArmPkg/Include/Library/OemMiscLib.h 
b/ArmPkg/Include/Library/OemMiscLib.h
index d87737db9c2b..1936619d9b5b 100644
--- a/ArmPkg/Include/Library/OemMiscLib.h
+++ b/ArmPkg/Include/Library/OemMiscLib.h
@@ -44,7 +44,7 @@ typedef enum {
   VersionType01,

   SkuNumberType01,

   FamilyType01,

-  AssertTagType02,

+  AssetTagType02,

   SerialNumberType02,

   BoardManufacturerType02,

   ProductNameType02,

diff --git 
a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
 
b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
index 870610b17243..f61546955f12 100644
--- 
a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
+++ 
b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
@@ -4,6 +4,7 @@
 

   Based on files under Nt32Pkg/MiscSubClassPlatformDxe/

 

+  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.

   Copyright (c) 2021, NUVIA Inc. All rights reserved.

   Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.

   Copyright (c) 2015, Hisilicon Limited. All rights reserved.

@@ -112,7 +113,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBaseBoardManufacturer) {
   OemUpdateSmbiosInfo (

 mSmbiosMiscHiiHandle,

 STRING_TOKEN (STR_MISC_BASE_BOARD_ASSET_TAG),

-AssertTagType02

+AssetTagType02

 );

   OemUpdateSmbiosInfo (

 mSmbiosMiscHiiHandle,

-- 
2.25.1



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




[edk2-devel] [PATCH 2/6] ArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID call

2022-08-23 Thread Nhi Pham via groups.io
From: Minh Nguyen 

According to "SMC Calling Convention" specification, section 7.4,
return value of Arm Architecture Calls is stored at first argument of
SMC aguments (ARM_SMC_ARGS). This value can be negative values indicating
error or positive values (including zero) indicating success. Positive
value would contain information of respective Function ID (Section 7.3.4
and 7.4.4).

For that reason, "SMCCC_VERSION" and "SMCCC_ARCH_FEATURES"
Function ID calls read return value from "SmcCallStatus" variable
(Args.Arg0 - first argument of SMC call). But "SMCCC_ARCH_SOC_ID"
Function ID call is reading return value from "SmcParam" variable
(Args.Arg1 - second argument of SMC call) so it leads to unexpected
results of "Jep106Code" and "SocRevision". This patch is to correct it.

Signed-off-by: Nhi Pham 
---
 ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c | 6 
+++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c 
b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c
index e0010a40e489..b961be213358 100644
--- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c
+++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c
@@ -2,7 +2,7 @@
   Functions for processor information common to ARM and AARCH64.

 

   Copyright (c) 2021, NUVIA Inc. All rights reserved.

-  Copyright (c) 2021, Ampere Computing LLC. All rights reserved.

+  Copyright (c) 2021 - 2022, Ampere Computing LLC. All rights reserved.

 

   SPDX-License-Identifier: BSD-2-Clause-Patent

 

@@ -131,7 +131,7 @@ SmbiosGetSmcArm64SocId (
   SmcCallStatus = ArmCallSmc1 (SMCCC_ARCH_SOC_ID, , NULL, NULL);

 

   if (SmcCallStatus >= 0) {

-*Jep106Code = (INT32)SmcParam;

+*Jep106Code = SmcCallStatus;

   } else {

 Status = EFI_UNSUPPORTED;

   }

@@ -140,7 +140,7 @@ SmbiosGetSmcArm64SocId (
   SmcCallStatus = ArmCallSmc1 (SMCCC_ARCH_SOC_ID, , NULL, NULL);

 

   if (SmcCallStatus >= 0) {

-*SocRevision = (INT32)SmcParam;

+*SocRevision = SmcCallStatus;

   } else {

 Status = EFI_UNSUPPORTED;

   }

-- 
2.25.1



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




[edk2-devel] [PATCH 0/6] ArmPkg/SMBIOS fixes and improvements

2022-08-23 Thread Nhi Pham via groups.io
This patchset is to update the ArmPkg/SMBIOS for fixes and improvements.

Minh Nguyen (5):
  ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib
  ArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID call
  ArmPkg/SmbiosMiscDxe: Fix typo of "AssetTagType02"
  ArmPkg/SmbiosMiscDxe: Remove redundant updates in SMBIOS Type 2
  ArmPkg/SmbiosMiscDxe: Get SMBIOS information from OemMiscLib

Nhi Pham (1):
  ArmPkg/SmbiosMiscDxe: Support fetching System UUID

 ArmPkg/Include/Library/OemMiscLib.h
  | 37 +++-
 ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
  | 46 
 ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c   
  |  8 +++-
 ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c
  |  6 +--
 ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c  
  | 32 +-
 ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c  
  |  3 +-
 
ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunction.c
 | 13 +-
 7 files changed, 117 insertions(+), 28 deletions(-)

-- 
2.25.1



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




[edk2-devel] [PATCH 1/6] ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib

2022-08-23 Thread Nhi Pham via groups.io
From: Minh Nguyen 

In some scenarios, the processor version may be updated dynamically
from pre-UEFI firmware during booting. But the processor version is
fixed with PCD (PcdProcessorVersion), so it can not be updated it
dynamically. This patch will support setting that value both
statically and dynamically.

Signed-off-by: Nhi Pham 
---
 ArmPkg/Include/Library/OemMiscLib.h  | 2 ++
 ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c | 8 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ArmPkg/Include/Library/OemMiscLib.h 
b/ArmPkg/Include/Library/OemMiscLib.h
index 47cb30d84a62..330bb4b014de 100644
--- a/ArmPkg/Include/Library/OemMiscLib.h
+++ b/ArmPkg/Include/Library/OemMiscLib.h
@@ -1,5 +1,6 @@
 /** @file

 *

+*  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.

 *  Copyright (c) 2021, NUVIA Inc. All rights reserved.

 *  Copyright (c) 2015, Hisilicon Limited. All rights reserved.

 *  Copyright (c) 2015, Linaro Limited. All rights reserved.

@@ -58,6 +59,7 @@ typedef enum {
   SkuNumberType03,

   ProcessorPartNumType04,

   ProcessorSerialNumType04,

+  ProcessorVersionType04,

   SmbiosHiiStringFieldMax

 } OEM_MISC_SMBIOS_HII_STRING_FIELD;

 

diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c 
b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
index 0b9af9bd7e1c..524b37b10479 100644
--- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
+++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c
@@ -1,6 +1,7 @@
 /** @file

   ProcessorSubClass.c

 

+  Copyright (c) 2022, Ampere Computing LLC. All rights reserved.

   Copyright (c) 2021, NUVIA Inc. All rights reserved.

   Copyright (c) 2015, Hisilicon Limited. All rights reserved.

   Copyright (c) 2015, Linaro Limited. All rights reserved.

@@ -512,7 +513,6 @@ AllocateType4AndSetProcessorInformationStrings (
   PartNumber   = STRING_TOKEN (STR_PROCESSOR_PART_NUMBER);

 

   SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorManufacturer, ProcessorManu);

-  SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorVersion, ProcessorVersion);

   SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorAssetTag, AssetTag);

 

   if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorSerialNumber)) > 0) {

@@ -527,6 +527,12 @@ AllocateType4AndSetProcessorInformationStrings (
 OemUpdateSmbiosInfo (mHiiHandle, PartNumber, ProcessorPartNumType04);

   }

 

+  if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorVersion)) > 0) {

+HiiSetString (mHiiHandle, PartNumber, (CHAR16 *)FixedPcdGetPtr 
(PcdProcessorVersion), NULL);

+  } else {

+OemUpdateSmbiosInfo (mHiiHandle, ProcessorVersion, ProcessorVersionType04);

+  }

+

   // Processor Designation

   StringBufferSize = sizeof (CHAR16) * SMBIOS_STRING_MAX_LENGTH;

   ProcessorStr = AllocateZeroPool (StringBufferSize);

-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92667): https://edk2.groups.io/g/devel/message/92667
Mute This Topic: https://groups.io/mt/93201502/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-resend 1/1] ShellPkg: Add revision check for DSDT Header on Arm

2022-08-23 Thread Edward Pickup

Hi Zhichao,

Would it be possible to get some feedback on this patch?

Regards,

Edward

On 20/07/2022 09:59, Edward Pickup via groups.io wrote:

Bugzilla: 3995 (https://bugzilla.tianocore.org/show_bug.cgi?id=3995)

ACPI 6.4 spec states that if the revision field in the DSDT header is less
than 2, then all integers are restricted in width to 32 bits, including in
SSDTs.

Arm Base boot requirements state that platforms must conform to ACPI 6.3
or later, and that legacy tables are not supported.

Adds a check for this field and raise warning if revision is less
than 2 on arm.

Signed-off-by: Edward Pickup 
---

The changes can be seen at 
https://github.com/edpickup/edk2/tree/2073_add_DSDT_revision_check_v1_resend

Notes:
 v1:
   - Resending with rebase and bugzilla id
   - No code changes since previous submit.
 Ref: https://edk2.groups.io/g/devel/message/89378

  ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dsdt/DsdtParser.c | 18 
+-
  1 file changed, 17 insertions(+), 1 deletion(-)

diff --git 
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dsdt/DsdtParser.c 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dsdt/DsdtParser.c
index 
e75e4622239ed03b171adc92d32b5eeb75a8edef..7f30a8409bb711d4edf77ed04319c628ef8aea73
 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dsdt/DsdtParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dsdt/DsdtParser.c
@@ -1,7 +1,7 @@
  /** @file

DSDT table parser

  


-  Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.

+  Copyright (c) 2016 - 2022, ARM Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

  


@par Reference(s):

@@ -39,4 +39,20 @@ ParseAcpiDsdt (
}

  


DumpAcpiHeader (Ptr);

+

+  // As per 19.6.29 in the version 6.4 of the ACPI spec, a revision less than 2

+  // restricts integers to 32 bit width. This may not be intended, raise a

+  // warning

+ #if defined (MDE_CPU_AARCH64) || defined (MDE_CPU_ARM)

+  if (AcpiTableRevision < 2) {

+IncrementWarningCount ();

+Print (

+  L"WARNING: DSDT Table Revision less than 2. Integer width restricted to "

+  L"32 bits. Table Revision = %d.\n",

+  AcpiTableRevision

+  );

+return;

+  }

+

+ #endif

  }




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




Re: [edk2-devel] [PATCH 1/1] OvmfPkg: Reserve the Ovmf work area as RT_DATA

2022-08-23 Thread Min Xu
On August 23, 2022 3:38 PM, Gerd Hoffmann wrote:
>   Hi,
> 
> > Ah, I forget to reserve the work-area as RT_Data in below code:
> >   BuildMemoryAllocationHob (
> > (EFI_PHYSICAL_ADDRESS)(UINTN)FixedPcdGet32
> (PcdOvmfWorkAreaBase),
> > (UINT64)(UINTN)FixedPcdGet32 (PcdOvmfWorkAreaSize),
> > PlatformInfoHob->S3Supported ? EfiACPIMemoryNVS :
> EfiRuntimeServicesData  <-- ACPI_NVS is not accessible either in OS-Runtime.
> > );
> >
> https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/Platform
> > InitLib/MemDetect.c#L1022-L1026
> 
> With that changed to use EfiRuntimeServicesData unconditionally the page
> fault is gone.
> 
> > Gerd, do you think we can reserve Ovmf WorkArea as RT_Data even when
> S3 is supported?
> 
> Hmm, not fully sure how the various memory types are handled when the
> VM is suspended.
> 
Tom suggested that the work area should not  be kept around. In stead a PCD 
should be used.
https://edk2.groups.io/g/devel/message/92617

But the dynamic PCD is not thread-safe and it cannot be accessed by APs. 

Now we have 2 solutions to fix this issue.
1. Reserve the Ovmf work area as RT_DATA.
2. Split the CcProbeLib into 2 instances. See 
https://edk2.groups.io/g/devel/message/91132

Gerd & Tom, what's your thought?

Thanks
Min



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




Re: [edk2-devel] [PATCH] DynamicTablesPkg: AcpiSsdtPcieLibArm : Add UID to slot creation

2022-08-23 Thread PierreGondois

Hello Jeff,

On 8/22/22 18:21, Jeff Brasen wrote:

Expose the UID value to GeneratePciSlots().
This is needed for some cases for example:
https://docs.microsoft.com/en-us/windows-hardware/drivers/pci/dsd-for-pcie-root-ports#identifying-externally-exposed-pcie-root-ports


I guess the UID would be used in the Nvidia library and not in:
  DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c
If the external link breaks one day, there would remain no
example of how the UID is be used. Would it be possible to
add one of the examples from the guide you linked, or one made up
example like:

Name (_DSD, Package () {
  ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
  Package () {
Package (2) {"UID", 0},
  }
}

in the commit message ? Other than this:
Reviewed-by: Pierre Gondois 

Regards,
Pierre



Signed-off-by: Jeff Brasen 
---
  DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h | 8 +---
  .../Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c   | 5 -
  .../Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c| 8 +---
  3 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h 
b/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h
index 85e283a994..4171dabc33 100644
--- a/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h
+++ b/DynamicTablesPkg/Include/Library/SsdtPcieSupportLib.h
@@ -54,9 +54,10 @@ AddOscMethod (
used. It should be possible to enumerate them, but this is additional
information.
  
-  @param [in]   PciInfo Pci device information.

-  @param [in]  MappingTable The mapping table structure.
-  @param [in, out]  PciNode Pci node to amend.
+  @param [in]   PciInfo   Pci device information.
+  @param [in]   MappingTable  The mapping table structure.
+  @param [in]   Uid   Unique Id of the Pci device.
+  @param [in, out]  PciNode   Pci node to amend.
  
@retval EFI_SUCCESSSuccess.

@retval EFI_INVALID_PARAMETER  Invalid parameter.
@@ -67,6 +68,7 @@ EFIAPI
  GeneratePciSlots (
IN  CONST CM_ARM_PCI_CONFIG_SPACE_INFO  *PciInfo,
IN  CONST MAPPING_TABLE *MappingTable,
+  INUINT32Uid,
IN  OUT   AML_OBJECT_NODE_HANDLEPciNode
);
  
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c

index ceffe2838c..24e074ea90 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c
@@ -295,6 +295,7 @@ GeneratePciDeviceInfo (
@param [in]   CfgMgrProtocol  Pointer to the Configuration Manager
  Protocol interface.
@param [in]   PciInfo Pci device information.
+  @param [in]   Uid Unique Id of the Pci device.
@param [in, out]  PciNode Pci node to amend.
  
@retval EFI_SUCCESS The function completed successfully.

@@ -308,6 +309,7 @@ GeneratePrt (
INACPI_PCI_GENERATOR*Generator,
IN  CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL  *CONST  CfgMgrProtocol,
IN  CONST CM_ARM_PCI_CONFIG_SPACE_INFO  *PciInfo,
+  INUINT32Uid,
IN  OUT   AML_OBJECT_NODE_HANDLEPciNode
)
  {
@@ -416,7 +418,7 @@ GeneratePrt (
PrtNode = NULL;
  
// Generate the Pci slots once all the device have been added.

-  Status = GeneratePciSlots (PciInfo, >DeviceTable, PciNode);
+  Status = GeneratePciSlots (PciInfo, >DeviceTable, Uid, PciNode);
if (EFI_ERROR (Status)) {
  ASSERT (0);
  goto exit_handler;
@@ -687,6 +689,7 @@ GeneratePciDevice (
 Generator,
 CfgMgrProtocol,
 PciInfo,
+   Uid,
 PciNode
 );
  if (EFI_ERROR (Status)) {
diff --git 
a/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c 
b/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c
index e5ab3a3ca8..b35fb6a7dd 100644
--- a/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c
+++ b/DynamicTablesPkg/Library/Common/SsdtPcieSupportLib/SsdtPcieSupportLib.c
@@ -41,9 +41,10 @@
used. It should be possible to enumerate them, but this is additional
information.
  
-  @param [in]   PciInfo Pci device information.

-  @param [in]  MappingTable The mapping table structure.
-  @param [in, out]  PciNode Pci node to amend.
+  @param [in]   PciInfo   Pci device information.
+  @param [in]   MappingTable  The mapping table structure.
+  @param [in]   Uid   Unique Id of the Pci device.
+  @param [in, out]  PciNode   Pci node to amend.
  
@retval 

Re: [edk2-devel] MdeModulePkg build fails for AARCH64 on Ubuntu 22.04

2022-08-23 Thread Bob Feng
Hi Liming,

Reverting patch may not a good idea, some platforms have done the 
implementation based on the DSC spec, if revert, those platforms build will 
break.
This commit 039bdb4d3e96f9c9264abf135b8a0eef2e2b4860 make the Basetools 
behavior be consistent with DSC spec so I don't think it's a regression bug. 

Thanks,
Bob

-Original Message-
From: devel@edk2.groups.io  On Behalf Of gaoliming via 
groups.io
Sent: Tuesday, August 23, 2022 9:55 AM
To: 'Ard Biesheuvel' ; devel@edk2.groups.io; 
rebe...@bsdio.com; Feng, Bob C ; Chen, Christine 

Cc: 'Andrew Fish' ; 'Leif Lindholm' 
; Kinney, Michael D ; 
Wang, Jian J 
Subject: 回复: [edk2-devel] MdeModulePkg build fails for AARCH64 on Ubuntu 22.04
Importance: High

Yuwei:
  The commit 039bdb4d3e96f9c9264abf135b8a0eef2e2b4860 (BaseTools: Fix DSC 
LibraryClass precedence rule) introduces this issue. I agree with Ard 
suggestion to revert this change first for this stable tag 202208. Then, we can 
discuss this change in the detail. 

Thanks
Liming
> -邮件原件-
> 发件人: Ard Biesheuvel 
> 发送时间: 2022年8月22日 17:34
> 收件人: devel@edk2.groups.io; rebe...@bsdio.com; Feng, Bob C 
> ; Liming Gao 
> 抄送: Andrew Fish ; Leif Lindholm 
> ; Michael D Kinney 
> ; Jian J Wang 
> 主题: Re: [edk2-devel] MdeModulePkg build fails for AARCH64 on Ubuntu
> 22.04
> 
> On Mon, 22 Aug 2022 at 11:30, Ard Biesheuvel  wrote:
> >
> > On Mon, 22 Aug 2022 at 11:11, Ard Biesheuvel  wrote:
> > >
> > > (cc Bob)
> > >
> > > NOTE this affects the stable tag - please see below
> > >
> > >
> > > On Sun, 21 Aug 2022 at 06:34, Rebecca Cran 
> wrote:
> > > >
> > > > I noticed that MdeModulePkg fails to build on my Ubuntu 22.04 
> > > > system (and previously on the Ubuntu 20.04 installation). Is this a 
> > > > known bug?
> > > >
> > > > It shouldn't be relevant, but I'm using gcc version 11.2.0 
> > > > (Ubuntu 11.2.0-17ubuntu1). But perhaps more relevant, I'm using Python 
> > > > 3.10.4.
> > > >
> > > > I'm trying to build commit
> e2ac68a23b4954d5c0399913a1df3dd9fd90315d.
> > > >
> > > >
> > > > bcran@photon:~/src/tmp/edk2$ build -p
> MdeModulePkg/MdeModulePkg.dsc -a
> > > > AARCH64 -t GCC5 -b RELEASE
> > > > Build environment: Linux-5.15.0-46-generic-x86_64-with-glibc2.35
> > > > Build start time: 22:29:18, Aug.20 2022
> > > >
> > > > WORKSPACE= /home/bcran/src/tmp/edk2
> > > > EDK_TOOLS_PATH   = /home/bcran/src/tmp/edk2/BaseTools
> > > > CONF_PATH= /home/bcran/src/tmp/edk2/Conf
> > > > PYTHON_COMMAND   = /usr/bin/python3
> > > >
> > > >
> > > > Processing meta-data
> > > > .Architecture(s)  = AARCH64
> > > > Build target = RELEASE
> > > > Toolchain= GCC5
> > > >
> > > > Active Platform  =
> > > > /home/bcran/src/tmp/edk2/MdeModulePkg/MdeModulePkg.dsc
> > > >
> > > >
> > > > build.py...
> > > >
> /home/bcran/src/tmp/edk2/MdeModulePkg/Library/SmmLockBoxLib/SmmL
> ockBoxPeiLib.inf(42):
> > > > error 3000: PCD
> > > > [gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode] in
> > > >
> [/home/bcran/src/tmp/edk2/MdeModulePkg/Library/SmmLockBoxLib/SmmL
> ockBoxPeiLib.inf]
> > > > is not found in dependent packages:
> > > >  /home/bcran/src/tmp/edk2/MdePkg/MdePkg.dec
> > > >
> /home/bcran/src/tmp/edk2/MdeModulePkg/MdeModulePkg.dec
> > > >
> > > >
> > >
> > > This looks like a BaseTools regression to me - afaik, these 
> > > packages all used to build for AARCH64 in the past.
> > >
> > > The following LockBoxLib resolutions appear in MdeModulePkg.dsc 
> > > (with line numbers)
> > >
> > > 115-[LibraryClasses.common.PEIM]
> > > 119:
> LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf
> > >
> > > 178-[LibraryClasses.ARM, LibraryClasses.AARCH64]
> > > 181:
> LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
> > >
> > > No other [LlibraryClasses] references to SmmLockBoxPeiLib.inf 
> > > exist in that file, and the [Components] reference does not apply to 
> > > AARCH64.
> > >
> > > This means the DSC parser ends up using the earlier definition, 
> > > which I think is a bug, or at least a change in behavior. Note 
> > > that doing this silently could potentially break many platforms in 
> > > subtle ways so I think this should be root caused and preferably 
> > > fixed before creating the stable tag.
> >
> > Seems to be deliberate:
> >
> > commit 039bdb4d3e96f9c9264abf135b8a0eef2e2b4860
> > Author: Chen, Christine 
> > Date:   Thu Jun 30 17:04:05 2022 +0800
> >
> > BaseTools: Fix DSC LibraryClass precedence rule
> >
> > but I don't think the impact on other platforms and drivers has been 
> > taken into account here. Also, the document [0] seems ambiguous to me:
> >
> > """
> > The first globally defined library instance, defined in a DSC file, 
> > that satisfies a module's requirement for a Library Class, unless 
> > specifically overridden by the module in the [Components] section, 
> > will be used.
> > """
> >
> > This says that the first occurrence of a library instance definition 
> > that satisfies a INF 

Re: [edk2-devel] [PATCH 1/1] OvmfPkg: Reserve the Ovmf work area as RT_DATA

2022-08-23 Thread Gerd Hoffmann
  Hi,

> Ah, I forget to reserve the work-area as RT_Data in below code:
>   BuildMemoryAllocationHob (
> (EFI_PHYSICAL_ADDRESS)(UINTN)FixedPcdGet32 (PcdOvmfWorkAreaBase),
> (UINT64)(UINTN)FixedPcdGet32 (PcdOvmfWorkAreaSize),
> PlatformInfoHob->S3Supported ? EfiACPIMemoryNVS : 
> EfiRuntimeServicesData  <-- ACPI_NVS is not accessible either in OS-Runtime.
> );
> https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/PlatformInitLib/MemDetect.c#L1022-L1026

With that changed to use EfiRuntimeServicesData unconditionally the page
fault is gone.

> Gerd, do you think we can reserve Ovmf WorkArea as RT_Data even when S3 is 
> supported?

Hmm, not fully sure how the various memory types are handled when the
VM is suspended.

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92661): https://edk2.groups.io/g/devel/message/92661
Mute This Topic: https://groups.io/mt/93173995/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] Maintainers.txt: Update reviewers for IntelSiliconPkg

2022-08-23 Thread Ni, Ray
Reviewed-by: Ray Ni 

> -Original Message-
> From: S, Ashraf Ali 
> Sent: Tuesday, August 23, 2022 3:27 PM
> To: devel@edk2.groups.io
> Cc: S, Ashraf Ali ; Ni, Ray ;
> Chaganty, Rangasai V ; Oram, Isaac W
> 
> Subject: [PATCH V2] Maintainers.txt: Update reviewers for IntelSiliconPkg
> 
> Add Ashraf Ali S as IntelSiliconPkg reviewers
> 
> Signed-off-by: Ashraf Ali S 
> Cc: Ray Ni 
> Cc: Rangasai V Chaganty 
> Cc: Isaac Oram 
> ---
>  Maintainers.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index 5e403ce851..3fe5dc21a8 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -277,6 +277,7 @@ F: Silicon/Intel/IntelSiliconPkg/
>  M: Ray Ni 
>  M: Rangasai V Chaganty 
>  M: Isaac Oram 
> +R: Ashraf Ali S 
> 
>  Silicon/Intel/QuarkSocPkg
>  F: Silicon/Intel/QuarkSocPkg/
> --
> 2.30.2.windows.1



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




[edk2-devel] [PATCH V2] Maintainers.txt: Update reviewers for IntelSiliconPkg

2022-08-23 Thread Ashraf Ali S
Add Ashraf Ali S as IntelSiliconPkg reviewers

Signed-off-by: Ashraf Ali S 
Cc: Ray Ni 
Cc: Rangasai V Chaganty 
Cc: Isaac Oram 
---
 Maintainers.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Maintainers.txt b/Maintainers.txt
index 5e403ce851..3fe5dc21a8 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -277,6 +277,7 @@ F: Silicon/Intel/IntelSiliconPkg/
 M: Ray Ni 
 M: Rangasai V Chaganty 
 M: Isaac Oram 
+R: Ashraf Ali S 
 
 Silicon/Intel/QuarkSocPkg
 F: Silicon/Intel/QuarkSocPkg/
-- 
2.30.2.windows.1



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




[edk2-devel] [PATCH] Maintainers.txt: Update reviewers for IntelSiliconPkg

2022-08-23 Thread Ashraf Ali S
Add Ashraf Ali S as IntelSiliconPkg reviewers

Signed-off-by: Ashraf Ali S 
Cc: Ray Ni 
Cc: Rangasai V Chaganty 
Cc: Isaac Oram 
---
 Maintainers.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Maintainers.txt b/Maintainers.txt
index 5e403ce851..e2ca67a0f2 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -277,6 +277,7 @@ F: Silicon/Intel/IntelSiliconPkg/
 M: Ray Ni 
 M: Rangasai V Chaganty 
 M: Isaac Oram 
+M: Ashraf Ali S 
 
 Silicon/Intel/QuarkSocPkg
 F: Silicon/Intel/QuarkSocPkg/
-- 
2.30.2.windows.1



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




[edk2-devel] [PATCH 5/5] CryptoPkg: add Hmac Sha384 to host UnitTest.

2022-08-23 Thread Qi Zhang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4025

Signed-off-by: Qi Zhang 
Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Xiaoyu Lu 
Cc: Guomin Jiang 
---
 .../BaseCryptLib/UnitTestHostBaseCryptLib.inf |  2 +-
 .../UnitTest/Library/BaseCryptLib/HmacTests.c | 19 +++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf
index 11ff1c6931..63282dc5ab 100644
--- a/CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf
@@ -28,7 +28,7 @@
   Hash/CryptSha256.c
   Hash/CryptSha512.c
   Hash/CryptSm3.c
-  Hmac/CryptHmacSha256.c
+  Hmac/CryptHmac.c
   Kdf/CryptHkdf.c
   Cipher/CryptAes.c
   Pk/CryptRsaBasic.c
diff --git a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HmacTests.c 
b/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HmacTests.c
index 595729424b..9c5b39410d 100644
--- a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HmacTests.c
+++ b/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/HmacTests.c
@@ -64,6 +64,23 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8  
HmacSha256Digest[] = {
   0x88, 0x1d, 0xc2, 0x00, 0xc9, 0x83, 0x3d, 0xa7, 0x26, 0xe9, 0x37, 0x6c, 
0x2e, 0x32, 0xcf, 0xf7
 };
 
+//
+// Key value for HMAC-SHA-384 validation. (From "4. Test Vectors" of IETF 
RFC4231)
+//
+GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8  HmacSha384Key[20] = {
+  0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 
0x0b, 0x0b, 0x0b, 0x0b,
+  0x0b, 0x0b, 0x0b, 0x0b
+};
+
+//
+// Result for HMAC-SHA-384 ("Hi There"). (From "4. Test Vectors" of IETF 
RFC4231)
+//
+GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8  HmacSha384Digest[] = {
+  0xaf, 0xd0, 0x39, 0x44, 0xd8, 0x48, 0x95, 0x62, 0x6b, 0x08, 0x25, 0xf4, 
0xab, 0x46, 0x90, 0x7f,
+  0x15, 0xf9, 0xda, 0xdb, 0xe4, 0x10, 0x1e, 0xc6, 0x82, 0xaa, 0x03, 0x4c, 
0x7c, 0xeb, 0xc5, 0x9c,
+  0xfa, 0xea, 0x9e, 0xa9, 0x07, 0x6e, 0xde, 0x7f, 0x4a, 0xf1, 0x52, 0xe8, 
0xb2, 0xfa, 0x9c, 0xb6
+};
+
 typedef
 VOID *
 (EFIAPI *EFI_HMAC_NEW)(
@@ -109,6 +126,7 @@ typedef struct {
 // HMAC_TEST_CONTEXT   mHmacMd5TestCtx= {MD5_DIGEST_SIZE,
HmacMd5New,HmacMd5SetKey,HmacMd5Update,HmacMd5Final,HmacMd5Key, 
   sizeof(HmacMd5Key),HmacMd5Digest};
 // HMAC_TEST_CONTEXT   mHmacSha1TestCtx   = {SHA1_DIGEST_SIZE,   
HmacSha1New,   HmacSha1SetKey,   HmacSha1Update,   HmacSha1Final,   
HmacSha1Key,   sizeof(HmacSha1Key),   HmacSha1Digest};
 HMAC_TEST_CONTEXT  mHmacSha256TestCtx = { SHA256_DIGEST_SIZE, HmacSha256New, 
HmacSha256SetKey, HmacSha256Update, HmacSha256Final, HmacSha256Key, sizeof 
(HmacSha256Key), HmacSha256Digest };
+HMAC_TEST_CONTEXT  mHmacSha384TestCtx = { SHA384_DIGEST_SIZE, HmacSha384New, 
HmacSha384SetKey, HmacSha384Update, HmacSha384Final, HmacSha384Key, sizeof 
(HmacSha384Key), HmacSha384Digest };
 
 UNIT_TEST_STATUS
 EFIAPI
@@ -174,6 +192,7 @@ TEST_DESC  mHmacTest[] = {
   // 
-Description-Class-Function---Pre--PostContext
   //
   { "TestVerifyHmacSha256()", "CryptoPkg.BaseCryptLib.Hmac", TestVerifyHmac, 
TestVerifyHmacPreReq, TestVerifyHmacCleanUp,  },
+  { "TestVerifyHmacSha384()", "CryptoPkg.BaseCryptLib.Hmac", TestVerifyHmac, 
TestVerifyHmacPreReq, TestVerifyHmacCleanUp,  },
   // These functions have been deprecated but they've been left commented out 
for future reference
   // {"TestVerifyHmacMd5()","CryptoPkg.BaseCryptLib.Hmac",   
TestVerifyHmac, TestVerifyHmacPreReq, TestVerifyHmacCleanUp, },
   // {"TestVerifyHmacSha1()",   "CryptoPkg.BaseCryptLib.Hmac",   
TestVerifyHmac, TestVerifyHmacPreReq, TestVerifyHmacCleanUp, },
-- 
2.26.2.windows.1



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




[edk2-devel] [PATCH 4/5] CryptoPkg: Add new hmac SHA api to Crypto Service.

2022-08-23 Thread Qi Zhang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4025

Signed-off-by: Qi Zhang 
Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Xiaoyu Lu 
Cc: Guomin Jiang 
---
 CryptoPkg/CryptoPkg.dsc   |   3 +
 CryptoPkg/Driver/Crypto.c | 221 ++
 .../BaseCryptLibOnProtocolPpi/CryptLib.c  | 212 +
 3 files changed, 436 insertions(+)

diff --git a/CryptoPkg/CryptoPkg.dsc b/CryptoPkg/CryptoPkg.dsc
index 50e7721f25..417804f64f 100644
--- a/CryptoPkg/CryptoPkg.dsc
+++ b/CryptoPkg/CryptoPkg.dsc
@@ -147,6 +147,7 @@
 
 !if $(CRYPTO_SERVICES) IN "PACKAGE ALL"
   gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.HmacSha256.Family   
 | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+  gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.HmacSha384.Family   
 | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
   gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Md5.Family  
 | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
   gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Family 
 | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
   gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Dh.Family   
 | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
@@ -172,6 +173,7 @@
 
 !if $(CRYPTO_SERVICES) == MIN_PEI
   gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.HmacSha256.Family   
| PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+  gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.HmacSha384.Family   
| PCD_CRYPTO_SERVICE_ENABLE_FAMILY
   gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha1.Family 
| PCD_CRYPTO_SERVICE_ENABLE_FAMILY
   gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha256.Family   
| PCD_CRYPTO_SERVICE_ENABLE_FAMILY
   gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Sha384.Family   
| PCD_CRYPTO_SERVICE_ENABLE_FAMILY
@@ -186,6 +188,7 @@
 
 !if $(CRYPTO_SERVICES) == MIN_DXE_MIN_SMM
   gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.HmacSha256.Family   
 | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
+  gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.HmacSha384.Family   
 | PCD_CRYPTO_SERVICE_ENABLE_FAMILY
   
gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Services.Pkcs1v2Encrypt
 | TRUE
   
gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Services.Pkcs5HashPassword
  | TRUE
   
gEfiCryptoPkgTokenSpaceGuid.PcdCryptoServiceFamilyEnable.Pkcs.Services.Pkcs7Verify
| TRUE
diff --git a/CryptoPkg/Driver/Crypto.c b/CryptoPkg/Driver/Crypto.c
index 76cb9f4da0..cdbba2b811 100644
--- a/CryptoPkg/Driver/Crypto.c
+++ b/CryptoPkg/Driver/Crypto.c
@@ -1847,6 +1847,218 @@ CryptoServiceHmacSha256Final (
   return CALL_BASECRYPTLIB (HmacSha256.Services.Final, HmacSha256Final, 
(HmacSha256Context, HmacValue), FALSE);
 }
 
+/**
+  Computes the HMAC-SHA256 digest of a input data buffer.
+
+  This function performs the HMAC-SHA256 digest of a given data buffer, and 
places
+  the digest value into the specified memory.
+
+  If this interface is not supported, then return FALSE.
+
+  @param[in]   DataPointer to the buffer containing the data to be 
digested.
+  @param[in]   DataSizeSize of Data buffer in bytes.
+  @param[in]   Key Pointer to the user-supplied key.
+  @param[in]   KeySize Key size in bytes.
+  @param[out]  HmacValue   Pointer to a buffer that receives the HMAC-SHA256 
digest
+   value (32 bytes).
+
+  @retval TRUE   HMAC-SHA256 digest computation succeeded.
+  @retval FALSE  HMAC-SHA256 digest computation failed.
+  @retval FALSE  This interface is not supported.
+
+**/
+BOOLEAN
+EFIAPI
+CryptoServiceHmacSha256All (
+  IN   CONST VOID   *Data,
+  IN   UINTNDataSize,
+  IN   CONST UINT8  *Key,
+  IN   UINTNKeySize,
+  OUT  UINT8*HmacValue
+  )
+{
+  return CALL_BASECRYPTLIB (HmacSha256.Services.All, HmacSha256All, (Data, 
DataSize, Key, KeySize, HmacValue), FALSE);
+}
+
+/**
+  Allocates and initializes one HMAC_CTX context for subsequent HMAC-SHA384 
use.
+
+  @return  Pointer to the HMAC_CTX context that has been initialized.
+   If the allocations fails, HmacSha384New() returns NULL.
+
+**/
+VOID *
+EFIAPI
+CryptoServiceHmacSha384New (
+  VOID
+  )
+{
+  return CALL_BASECRYPTLIB (HmacSha384.Services.New, HmacSha384New, (), NULL);
+}
+
+/**
+  Release the specified HMAC_CTX context.
+
+  @param[in]  HmacSha384Ctx  Pointer to the HMAC_CTX context to be released.
+
+**/
+VOID
+EFIAPI
+CryptoServiceHmacSha384Free (
+  IN  VOID  *HmacSha384Ctx
+  )
+{
+  CALL_VOID_BASECRYPTLIB (HmacSha384.Services.Free, HmacSha384Free, 
(HmacSha384Ctx));
+}
+
+/**
+  Set user-supplied key for subsequent use. It must be done before any
+  calling to HmacSha384Update().
+
+  If HmacSha384Context is NULL, then 

[edk2-devel] [PATCH 3/5] CryptoPkg: Update CryptLib inf as the file name changed.

2022-08-23 Thread Qi Zhang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4025

Signed-off-by: Qi Zhang 
Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Xiaoyu Lu 
Cc: Guomin Jiang 
---
 CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf | 2 +-
 CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf  | 2 +-
 CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf  | 2 +-
 CryptoPkg/Library/BaseCryptLib/SecCryptLib.inf  | 2 +-
 CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf  | 2 +-
 CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
index 3d7b917103..2a9664ad3e 100644
--- a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
@@ -35,7 +35,7 @@
   Hash/CryptSha512.c
   Hash/CryptSm3.c
   Hash/CryptParallelHashNull.c
-  Hmac/CryptHmacSha256.c
+  Hmac/CryptHmac.c
   Kdf/CryptHkdf.c
   Cipher/CryptAes.c
   Pk/CryptRsaBasic.c
diff --git a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
index 01de27e037..f88f8312f6 100644
--- a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
@@ -41,7 +41,7 @@
   Hash/CryptSm3.c
   Hash/CryptSha512.c
   Hash/CryptParallelHashNull.c
-  Hmac/CryptHmacSha256.c
+  Hmac/CryptHmac.c
   Kdf/CryptHkdf.c
   Cipher/CryptAesNull.c
   Pk/CryptRsaBasic.c
diff --git a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
index d28fb98b66..9213952701 100644
--- a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
@@ -41,7 +41,7 @@
   Hash/CryptSm3.c
   Hash/CryptSha512.c
   Hash/CryptParallelHashNull.c
-  Hmac/CryptHmacSha256.c
+  Hmac/CryptHmac.c
   Kdf/CryptHkdf.c
   Cipher/CryptAes.c
   Pk/CryptRsaBasic.c
diff --git a/CryptoPkg/Library/BaseCryptLib/SecCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/SecCryptLib.inf
index 070b7e..0b1dd31c41 100644
--- a/CryptoPkg/Library/BaseCryptLib/SecCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/SecCryptLib.inf
@@ -34,7 +34,7 @@
   Hash/CryptSha256Null.c
   Hash/CryptSm3Null.c
   Hash/CryptParallelHashNull.c
-  Hmac/CryptHmacSha256Null.c
+  Hmac/CryptHmacNull.c
   Kdf/CryptHkdfNull.c
   Cipher/CryptAesNull.c
   Pk/CryptRsaBasicNull.c
diff --git a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf 
b/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
index 91a1715095..ed76520fcc 100644
--- a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
@@ -42,7 +42,7 @@
   Hash/CryptXkcp.c
   Hash/CryptCShake256.c
   Hash/CryptParallelHash.c
-  Hmac/CryptHmacSha256.c
+  Hmac/CryptHmac.c
   Kdf/CryptHkdfNull.c
   Cipher/CryptAes.c
   Pk/CryptRsaBasic.c
diff --git a/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf 
b/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
index 63d1d82d19..728e0793ac 100644
--- a/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
+++ b/CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
@@ -35,7 +35,7 @@
   Hash/CryptSha512Null.c
   Hash/CryptSm3Null.c
   Hash/CryptParallelHashNull.c
-  Hmac/CryptHmacSha256Null.c
+  Hmac/CryptHmacNull.c
   Kdf/CryptHkdfNull.c
   Cipher/CryptAesNull.c
   Pk/CryptRsaBasicNull.c
-- 
2.26.2.windows.1



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




[edk2-devel] [PATCH 2/5] CryptoPkg: Add HMAC-SHA384 cipher support.

2022-08-23 Thread Qi Zhang
Rename file from CryptHmacSha256 to CryptHmac and
add HmacSha384 and HmacSha256All funcitons.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4025

Signed-off-by: Qi Zhang 
Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Xiaoyu Lu 
Cc: Guomin Jiang 
---
 .../Library/BaseCryptLib/Hmac/CryptHmac.c | 629 ++
 .../Library/BaseCryptLib/Hmac/CryptHmacNull.c | 359 ++
 .../BaseCryptLib/Hmac/CryptHmacSha256.c   | 217 --
 .../BaseCryptLib/Hmac/CryptHmacSha256Null.c   | 139 
 .../BaseCryptLibNull/Hmac/CryptHmacNull.c | 359 ++
 .../Hmac/CryptHmacSha256Null.c| 139 
 6 files changed, 1347 insertions(+), 495 deletions(-)
 create mode 100644 CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmac.c
 create mode 100644 CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacNull.c
 delete mode 100644 CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256.c
 delete mode 100644 CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256Null.c
 create mode 100644 CryptoPkg/Library/BaseCryptLibNull/Hmac/CryptHmacNull.c
 delete mode 100644 
CryptoPkg/Library/BaseCryptLibNull/Hmac/CryptHmacSha256Null.c

diff --git a/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmac.c 
b/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmac.c
new file mode 100644
index 00..2786267a0b
--- /dev/null
+++ b/CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmac.c
@@ -0,0 +1,629 @@
+/** @file
+  HMAC-SHA256/SHA384 Wrapper Implementation over OpenSSL.
+
+Copyright (c) 2016 - 2022, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "InternalCryptLib.h"
+#include 
+
+/**
+  Allocates and initializes one HMAC_CTX context for subsequent HMAC-MD use.
+
+  @return  Pointer to the HMAC_CTX context that has been initialized.
+   If the allocations fails, HmacMdNew() returns NULL.
+
+**/
+VOID *
+HmacMdNew (
+  VOID
+  )
+{
+  //
+  // Allocates & Initializes HMAC_CTX Context by OpenSSL HMAC_CTX_new()
+  //
+  return (VOID *)HMAC_CTX_new ();
+}
+
+/**
+  Release the specified HMAC_CTX context.
+
+  @param[in]  HmacMdCtx  Pointer to the HMAC_CTX context to be released.
+
+**/
+VOID
+HmacMdFree (
+  IN  VOID  *HmacMdCtx
+  )
+{
+  //
+  // Free OpenSSL HMAC_CTX Context
+  //
+  HMAC_CTX_free ((HMAC_CTX *)HmacMdCtx);
+}
+
+/**
+  Set user-supplied key for subsequent use. It must be done before any
+  calling to HmacMdUpdate().
+
+  If HmacMdContext is NULL, then return FALSE.
+
+  @param[in]   Md Message Digest.
+  @param[out]  HmacMdContext  Pointer to HMAC-MD context.
+  @param[in]   KeyPointer to the user-supplied key.
+  @param[in]   KeySizeKey size in bytes.
+
+  @retval TRUE   The Key is set successfully.
+  @retval FALSE  The Key is set unsuccessfully.
+
+**/
+BOOLEAN
+HmacMdSetKey (
+  IN   CONST EVP_MD  *Md,
+  OUT  VOID  *HmacMdContext,
+  IN   CONST UINT8   *Key,
+  IN   UINTN KeySize
+  )
+{
+  //
+  // Check input parameters.
+  //
+  if ((HmacMdContext == NULL) || (KeySize > INT_MAX)) {
+return FALSE;
+  }
+
+  if (HMAC_Init_ex ((HMAC_CTX *)HmacMdContext, Key, (UINT32)KeySize, Md, NULL) 
!= 1) {
+return FALSE;
+  }
+
+  return TRUE;
+}
+
+/**
+  Makes a copy of an existing HMAC-MD context.
+
+  If HmacMdContext is NULL, then return FALSE.
+  If NewHmacMdContext is NULL, then return FALSE.
+
+  @param[in]  HmacMdContext Pointer to HMAC-MD context being copied.
+  @param[out] NewHmacMdContext  Pointer to new HMAC-MD context.
+
+  @retval TRUE   HMAC-MD context copy succeeded.
+  @retval FALSE  HMAC-MD context copy failed.
+
+**/
+BOOLEAN
+HmacMdDuplicate (
+  IN   CONST VOID  *HmacMdContext,
+  OUT  VOID*NewHmacMdContext
+  )
+{
+  //
+  // Check input parameters.
+  //
+  if ((HmacMdContext == NULL) || (NewHmacMdContext == NULL)) {
+return FALSE;
+  }
+
+  if (HMAC_CTX_copy ((HMAC_CTX *)NewHmacMdContext, (HMAC_CTX *)HmacMdContext) 
!= 1) {
+return FALSE;
+  }
+
+  return TRUE;
+}
+
+/**
+  Digests the input data and updates HMAC-MD context.
+
+  This function performs HMAC-MD digest on a data buffer of the specified size.
+  It can be called multiple times to compute the digest of long or 
discontinuous data streams.
+  HMAC-MD context should be initialized by HmacMdNew(), and should not be 
finalized
+  by HmacMdFinal(). Behavior with invalid context is undefined.
+
+  If HmacMdContext is NULL, then return FALSE.
+
+  @param[in, out]  HmacMdContext Pointer to the HMAC-MD context.
+  @param[in]   Data  Pointer to the buffer containing the data 
to be digested.
+  @param[in]   DataSize  Size of Data buffer in bytes.
+
+  @retval TRUE   HMAC-MD data digest succeeded.
+  @retval FALSE  HMAC-MD data digest failed.
+
+**/
+BOOLEAN
+HmacMdUpdate (
+  IN OUT  VOID*HmacMdContext,
+  IN  CONST VOID  *Data,
+  IN  UINTN   DataSize
+  )
+{
+  //
+  // Check input parameters.
+  //
+  if (HmacMdContext == NULL) {
+return FALSE;
+  }
+
+ 

[edk2-devel] [PATCH 0/5] CryptoPkg: Add HMAC-SHA384 cipher support.

2022-08-23 Thread Qi Zhang
HmacSha256 is already supported on Edk2. This patchset is to add
HmacSha384 support.

With this change, the size increase of BaseCyrptLib is about 7K bytes.
HmacSha384 function is verifed by the Host UnitTest.
And also it has been integratd in
https://github.com/tianocore/edk2-staging/tree/DeviceSecurity and been
verified.

All the code change is on the PR https://github.com/tianocore/edk2/pull/3224.


REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4025

Signed-off-by: Qi Zhang 
Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Xiaoyu Lu 
Cc: Guomin Jiang 

Qi Zhang (5):
  CryptoPkg: Add new hmac definition to cryptlib
  CryptoPkg: Add HMAC-SHA384 cipher support.
  CryptoPkg: Update CryptLib inf as the file name changed.
  CryptoPkg: Add new hmac SHA api to Crypto Service.
  CryptoPkg: add Hmac Sha384 to host UnitTest.

 CryptoPkg/CryptoPkg.dsc   |   3 +
 CryptoPkg/Driver/Crypto.c | 221 ++
 CryptoPkg/Include/Library/BaseCryptLib.h  | 188 ++
 .../Pcd/PcdCryptoServiceFamilyEnable.h|  13 +
 .../Library/BaseCryptLib/BaseCryptLib.inf |   2 +-
 .../Library/BaseCryptLib/Hmac/CryptHmac.c | 629 ++
 .../Library/BaseCryptLib/Hmac/CryptHmacNull.c | 359 ++
 .../BaseCryptLib/Hmac/CryptHmacSha256.c   | 217 --
 .../BaseCryptLib/Hmac/CryptHmacSha256Null.c   | 139 
 .../Library/BaseCryptLib/PeiCryptLib.inf  |   2 +-
 .../Library/BaseCryptLib/RuntimeCryptLib.inf  |   2 +-
 .../Library/BaseCryptLib/SecCryptLib.inf  |   2 +-
 .../Library/BaseCryptLib/SmmCryptLib.inf  |   2 +-
 .../BaseCryptLib/UnitTestHostBaseCryptLib.inf |   2 +-
 .../BaseCryptLibNull/BaseCryptLibNull.inf |   2 +-
 .../BaseCryptLibNull/Hmac/CryptHmacNull.c | 359 ++
 .../Hmac/CryptHmacSha256Null.c| 139 
 .../BaseCryptLibOnProtocolPpi/CryptLib.c  | 212 ++
 CryptoPkg/Private/Protocol/Crypto.h   | 197 ++
 .../UnitTest/Library/BaseCryptLib/HmacTests.c |  19 +
 20 files changed, 2207 insertions(+), 502 deletions(-)
 create mode 100644 CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmac.c
 create mode 100644 CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacNull.c
 delete mode 100644 CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256.c
 delete mode 100644 CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256Null.c
 create mode 100644 CryptoPkg/Library/BaseCryptLibNull/Hmac/CryptHmacNull.c
 delete mode 100644 
CryptoPkg/Library/BaseCryptLibNull/Hmac/CryptHmacSha256Null.c

-- 
2.26.2.windows.1



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




[edk2-devel] [PATCH 1/5] CryptoPkg: Add new hmac definition to cryptlib

2022-08-23 Thread Qi Zhang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4025

Signed-off-by: Qi Zhang 
Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Xiaoyu Lu 
Cc: Guomin Jiang 
---
 CryptoPkg/Include/Library/BaseCryptLib.h  | 188 +
 .../Pcd/PcdCryptoServiceFamilyEnable.h|  13 ++
 CryptoPkg/Private/Protocol/Crypto.h   | 197 ++
 3 files changed, 398 insertions(+)

diff --git a/CryptoPkg/Include/Library/BaseCryptLib.h 
b/CryptoPkg/Include/Library/BaseCryptLib.h
index 7d1499350a..3a42e3494f 100644
--- a/CryptoPkg/Include/Library/BaseCryptLib.h
+++ b/CryptoPkg/Include/Library/BaseCryptLib.h
@@ -1045,6 +1045,194 @@ HmacSha256Final (
   OUT UINT8  *HmacValue
   );
 
+/**
+  Computes the HMAC-SHA256 digest of a input data buffer.
+
+  This function performs the HMAC-SHA256 digest of a given data buffer, and 
places
+  the digest value into the specified memory.
+
+  If this interface is not supported, then return FALSE.
+
+  @param[in]   DataPointer to the buffer containing the data to be 
digested.
+  @param[in]   DataSizeSize of Data buffer in bytes.
+  @param[in]   Key Pointer to the user-supplied key.
+  @param[in]   KeySize Key size in bytes.
+  @param[out]  HashValue   Pointer to a buffer that receives the HMAC-SHA256 
digest
+   value (32 bytes).
+
+  @retval TRUE   HMAC-SHA256 digest computation succeeded.
+  @retval FALSE  HMAC-SHA256 digest computation failed.
+  @retval FALSE  This interface is not supported.
+
+**/
+BOOLEAN
+EFIAPI
+HmacSha256All (
+  IN   CONST VOID   *Data,
+  IN   UINTNDataSize,
+  IN   CONST UINT8  *Key,
+  IN   UINTNKeySize,
+  OUT  UINT8*HmacValue
+  );
+
+/**
+  Allocates and initializes one HMAC_CTX context for subsequent HMAC-SHA384 
use.
+
+  @return  Pointer to the HMAC_CTX context that has been initialized.
+   If the allocations fails, HmacSha384New() returns NULL.
+
+**/
+VOID *
+EFIAPI
+HmacSha384New (
+  VOID
+  );
+
+/**
+  Release the specified HMAC_CTX context.
+
+  @param[in]  HmacSha384Ctx  Pointer to the HMAC_CTX context to be released.
+
+**/
+VOID
+EFIAPI
+HmacSha384Free (
+  IN  VOID  *HmacSha384Ctx
+  );
+
+/**
+  Set user-supplied key for subsequent use. It must be done before any
+  calling to HmacSha384Update().
+
+  If HmacSha384Context is NULL, then return FALSE.
+  If this interface is not supported, then return FALSE.
+
+  @param[out]  HmacSha384Context  Pointer to HMAC-SHA384 context.
+  @param[in]   KeyPointer to the user-supplied key.
+  @param[in]   KeySizeKey size in bytes.
+
+  @retval TRUE   The Key is set successfully.
+  @retval FALSE  The Key is set unsuccessfully.
+  @retval FALSE  This interface is not supported.
+
+**/
+BOOLEAN
+EFIAPI
+HmacSha384SetKey (
+  OUT  VOID *HmacSha384Context,
+  IN   CONST UINT8  *Key,
+  IN   UINTNKeySize
+  );
+
+/**
+  Makes a copy of an existing HMAC-SHA384 context.
+
+  If HmacSha384Context is NULL, then return FALSE.
+  If NewHmacSha384Context is NULL, then return FALSE.
+  If this interface is not supported, then return FALSE.
+
+  @param[in]  HmacSha384Context Pointer to HMAC-SHA384 context being 
copied.
+  @param[out] NewHmacSha384Context  Pointer to new HMAC-SHA384 context.
+
+  @retval TRUE   HMAC-SHA384 context copy succeeded.
+  @retval FALSE  HMAC-SHA384 context copy failed.
+  @retval FALSE  This interface is not supported.
+
+**/
+BOOLEAN
+EFIAPI
+HmacSha384Duplicate (
+  IN   CONST VOID  *HmacSha384Context,
+  OUT  VOID*NewHmacSha384Context
+  );
+
+/**
+  Digests the input data and updates HMAC-SHA384 context.
+
+  This function performs HMAC-SHA384 digest on a data buffer of the specified 
size.
+  It can be called multiple times to compute the digest of long or 
discontinuous data streams.
+  HMAC-SHA384 context should be initialized by HmacSha384New(), and should not 
be finalized
+  by HmacSha384Final(). Behavior with invalid context is undefined.
+
+  If HmacSha384Context is NULL, then return FALSE.
+  If this interface is not supported, then return FALSE.
+
+  @param[in, out]  HmacSha384Context Pointer to the HMAC-SHA384 context.
+  @param[in]   Data  Pointer to the buffer containing the data 
to be digested.
+  @param[in]   DataSize  Size of Data buffer in bytes.
+
+  @retval TRUE   HMAC-SHA384 data digest succeeded.
+  @retval FALSE  HMAC-SHA384 data digest failed.
+  @retval FALSE  This interface is not supported.
+
+**/
+BOOLEAN
+EFIAPI
+HmacSha384Update (
+  IN OUT  VOID*HmacSha384Context,
+  IN  CONST VOID  *Data,
+  IN  UINTN   DataSize
+  );
+
+/**
+  Completes computation of the HMAC-SHA384 digest value.
+
+  This function completes HMAC-SHA384 hash computation and retrieves the 
digest value into
+  the specified memory. After this function has been called, the HMAC-SHA384 
context cannot
+  be used again.
+  HMAC-SHA384 context should be initialized by 

Re: [edk2-devel] [PATCH v2 2/2] OvmfPkg/OvmfPkgX64: Allow runtime control of IPv4 and IPv6 support

2022-08-23 Thread Gerd Hoffmann
  Hi,

> > Looks good to me, but should be reflected to the other DSC files, and
> > perhaps (see Gerd's comments) factored out to some common include snippet.
> 
> Fair enough, although I'm not sure where to look for Gerd's comments?
> Did they make it to the list?

Was a reply to v1 series.

Summary: We have alot of duplication in the Ovmf*.{dsc,fdf} files, I think
moving stuff to include files make sense (similar to OvmfTpm*.inc already in
tree) to reduce duplication, simplify maintainance and keep the build
configs in sync.

With more and more include snippets it possibly makes sense to move them
all into a subdirectory.

take care,
  Gerd



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