[edk2-devel] Topics for March TianoCore Community Meeting

2024-03-05 Thread Michael D Kinney
Please let me know if you have any topics for the TianoCore Community Meeting 
this month.

Mike



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




[edk2-devel] [PATCH] MdePkg: Add devAuthBoot GlobalVariable

2024-03-05 Thread Wenxing Hou
According to UEFI 2.10 spec 3.3 Globally Defined Variables section,
add devAuthBoot GlobalVariable.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Jiewen Yao 
Signed-off-by: Wenxing Hou 
---
 MdePkg/Include/Guid/GlobalVariable.h  | 8 +++-
 MdePkg/Include/Guid/ImageAuthentication.h | 5 -
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/MdePkg/Include/Guid/GlobalVariable.h 
b/MdePkg/Include/Guid/GlobalVariable.h
index eb2ce6aaf2..eb6e5a043e 100644
--- a/MdePkg/Include/Guid/GlobalVariable.h
+++ b/MdePkg/Include/Guid/GlobalVariable.h
@@ -1,7 +1,7 @@
 /** @file
   GUID for EFI (NVRAM) Variables.
 
-  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+  Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
   @par Revision Reference:
@@ -183,4 +183,10 @@ extern EFI_GUID  gEfiGlobalVariableGuid;
 ///
 #define EFI_VENDOR_KEYS_VARIABLE_NAME  L"VendorKeys"
 
+///
+/// Whether the platform firmware is operating in device authentication boot 
mode (1) or not (0).
+/// The content is UINT8.
+///
+#define EFI_DEVICE_AUTH_BOOT_MODE_NAME  L"devAuthBoot"
+
 #endif
diff --git a/MdePkg/Include/Guid/ImageAuthentication.h 
b/MdePkg/Include/Guid/ImageAuthentication.h
index fe83596571..f95255c0fb 100644
--- a/MdePkg/Include/Guid/ImageAuthentication.h
+++ b/MdePkg/Include/Guid/ImageAuthentication.h
@@ -1,7 +1,7 @@
 /** @file
   Image signature database are defined for the signed image validation.
 
-  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+  Copyright (c) 2009 - 2024, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
   @par Revision Reference:
@@ -41,6 +41,9 @@
 #define SETUP_MODE  1
 #define USER_MODE   0
 
+#define DEVICE_AUTH_BOOT_MODE_ENABLE   1
+#define DEVICE_AUTH_BOOT_MODE_DISABLE  0
+
 // ***
 // Signature Database
 // ***
-- 
2.26.2.windows.1



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




Re: [edk2-devel] [edk2-redfish-client][PATCH 3/3] RedfishClientPkg/Features: support config2 protocol

2024-03-05 Thread Nickle Wang via groups.io
Yes that is correct.

Regards,
Nickle

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Chang, Abner
> via groups.io
> Sent: Wednesday, March 6, 2024 1:51 PM
> To: Nickle Wang ; devel@edk2.groups.io
> Cc: Igor Kulchytskyy ; Nick Ramirez 
> Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH 3/3]
> RedfishClientPkg/Features: support config2 protocol
> 
> External email: Use caution opening links or attachments
> 
> 
> [AMD Official Use Only - General]
> 
> Hi Nickle, I think we have to merge this patch with 2/3. Otherwise, the build 
> will
> be failed on the commit of 2/3, right?
> 
> Thanks
> Abner
> 
> > -Original Message-
> > From: Nickle Wang 
> > Sent: Monday, March 4, 2024 9:27 PM
> > To: devel@edk2.groups.io
> > Cc: Chang, Abner ; Igor Kulchytskyy
> > ; Nick Ramirez 
> > Subject: [edk2-redfish-client][PATCH 3/3] RedfishClientPkg/Features:
> > support
> > config2 protocol
> >
> > Caution: This message originated from an External Source. Use proper
> > caution when opening attachments, clicking links, or responding.
> >
> >
> > Because EdkIIRedfishResourceConfigLib is updated to support Redfish
> > resource config2 protocol, update corresponding functions in feature
> > drivers.
> >
> > Signed-off-by: Nickle Wang 
> > Cc: Abner Chang 
> > Cc: Igor Kulchytskyy 
> > Cc: Nick Ramirez 
> > ---
> >  .../Features/Bios/v1_0_9/Common/BiosCommon.c | 14 +++---
> >  .../BootOptionCollectionDxe.c| 14 +++---
> >  .../ComputerSystemCollectionDxe.c| 16 
> >  .../MemoryCollectionDxe/MemoryCollectionDxe.c| 16 
> >  4 files changed, 30 insertions(+), 30 deletions(-)
> >
> > diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> > b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> > index 1f3c30147..1eb269a84 100644
> > --- a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> > +++ b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> > @@ -782,7 +782,7 @@ HandleResource (
> >
> >DEBUG ((REDFISH_DEBUG_TRACE, "%a, process resource for: %s\n",
> > __func__, Uri));
> >
> > -  Status = GetRedfishSchemaInfo (Private->RedfishService, Private-
> > >JsonStructProtocol, Uri, );
> > +  Status = GetRedfishSchemaInfo (Private->RedfishService, Private-
> > >JsonStructProtocol, Uri, NULL, );
> >if (EFI_ERROR (Status)) {
> >  DEBUG ((DEBUG_ERROR, "%a, failed to get schema information from:
> > %s %r\n", __func__, Uri, Status));
> >  return Status;
> > @@ -795,7 +795,7 @@ HandleResource (
> >DEBUG ((REDFISH_DEBUG_TRACE, "%a Identify for %s\n", __func__, Uri));
> >ConfigLang = RedfishGetConfigLanguage (Uri);
> >if (ConfigLang == NULL) {
> > -Status = EdkIIRedfishResourceConfigIdentify (, Uri, Private-
> > >InformationExchange);
> > +Status = EdkIIRedfishResourceConfigIdentify (, Uri,
> > + NULL,
> > Private->InformationExchange);
> >  if (EFI_ERROR (Status)) {
> >if (Status == EFI_UNSUPPORTED) {
> >  DEBUG ((DEBUG_MANAGEABILITY, "%a, \"%s\" is not handled by
> > us\n", __func__, Uri)); @@ -811,17 +811,17 @@ HandleResource (
> >}
> >
> >//
> > -  // Check and see if target property exist or not even when
> > collection memeber exists.
> > +  // Check and see if target property exist or not even when
> > + collection
> > member exists.
> >// If not, we sill do provision.
> >//
> >DEBUG ((REDFISH_DEBUG_TRACE, "%a Check for %s\n", __func__, Uri));
> > -  Status = EdkIIRedfishResourceConfigCheck (, Uri);
> > +  Status = EdkIIRedfishResourceConfigCheck (, Uri, NULL);
> >if (EFI_ERROR (Status)) {
> >  //
> >  // The target property does not exist, do the provision to create 
> > property.
> >  //
> >  DEBUG ((REDFISH_DEBUG_TRACE, "%a provision for %s\n", __func__, Uri));
> > -Status = EdkIIRedfishResourceConfigProvisioning (, Uri,
> > Private->InformationExchange, FALSE);
> > +Status = EdkIIRedfishResourceConfigProvisioning (,
> > + Uri, NULL,
> > Private->InformationExchange, FALSE);
> >  if (EFI_ERROR (Status)) {
> >DEBUG ((DEBUG_ERROR, "%a, failed to provision with GET mode:
> > %r\n", __func__, Status));
> >  }
> > @@ -833,7 +833,7 @@ HandleResource (
> >// Consume first.
> >//
> >DEBUG ((REDFISH_DEBUG_TRACE, "%a consume for %s\n", __func__,
> > Uri));
> > -  Status = EdkIIRedfishResourceConfigConsume (, Uri);
> > +  Status = EdkIIRedfishResourceConfigConsume (, Uri,
> > + NULL);
> >if (EFI_ERROR (Status)) {
> >  DEBUG ((DEBUG_ERROR, "%a, failed to consume resource for: %s:
> > %r\n", __func__, Uri, Status));
> >}
> > @@ -842,7 +842,7 @@ HandleResource (
> >// Patch.
> >//
> >DEBUG ((REDFISH_DEBUG_TRACE, "%a update for %s\n", __func__, Uri));
> > -  Status = EdkIIRedfishResourceConfigUpdate (, Uri);
> > +  Status = EdkIIRedfishResourceConfigUpdate (, Uri, NULL);
> >if (EFI_ERROR (Status)) {
> >  DEBUG 

Re: [edk2-devel] [edk2-redfish-client][PATCH 00/13] use Redfish HTTP protocol

2024-03-05 Thread Nickle Wang via groups.io
Thanks for your feedback, Igor!

I will create a patch and remove RedfishLib in RedfishClientPkg.

Regards,
Nickle

From: Igor Kulchytskyy 
Sent: Wednesday, March 6, 2024 1:50 AM
To: Nickle Wang ; Mike Maslenkin 
; devel@edk2.groups.io
Cc: Abner Chang 
Subject: RE: [EXTERNAL] RE: [edk2-devel] [edk2-redfish-client][PATCH 00/13] use 
Redfish HTTP protocol

External email: Use caution opening links or attachments

Hi Nickle,
Sorry, for late response.
AMI does not use RedfishLib in RedfishClientPkg, but library in RedfishPkg used.
Thank you,
Igor


From: Nickle Wang mailto:nick...@nvidia.com>>
Sent: Thursday, February 29, 2024 8:24 PM
To: Mike Maslenkin mailto:mike.maslen...@gmail.com>>; 
devel@edk2.groups.io; Igor Kulchytskyy 
mailto:ig...@ami.com>>
Cc: Abner Chang mailto:abner.ch...@amd.com>>
Subject: [EXTERNAL] RE: [edk2-devel] [edk2-redfish-client][PATCH 00/13] use 
Redfish HTTP protocol


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

Hi Mike,



> May I know why didn't you remove

> RedfishClientPkg/PrivateLibrary/RedfishLib completely?



Yes, Abner and I had discussed this before. RedfishLib brings some difficulty 
to maintain because it is private library in two separated repositories.



Before we go and remove it, we like to make sure that no one is using it. @Igor 
Kulchytskyy, if my memory serves me well, you mentioned 
that AMI is using RedfishLib. Is it ok for us to remove RedfishLib in 
RedfishCientPkg (not RedfishPkg)?



Thanks,

Nickle



> -Original Message-

> From: Mike Maslenkin 
> mailto:mike.maslen...@gmail.com>>

> Sent: Friday, March 1, 2024 8:08 AM

> To: devel@edk2.groups.io; Nickle Wang 
> mailto:nick...@nvidia.com>>

> Cc: Abner Chang mailto:abner.ch...@amd.com>>; Igor 
> Kulchytskyy mailto:ig...@ami.com>>

> Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH 00/13] use Redfish HTTP

> protocol

>

> External email: Use caution opening links or attachments

>

>

> Good work, Nickle!

>

> On Thu, Feb 29, 2024 at 11:53 AM Nickle Wang via groups.io

> mailto:nicklew=nvidia@groups.io>> wrote:

> >

> > Redfish HTTP protocol is introduced to edk2 RedfishPkg. Update

> > RedfishClientPkg to use RedfishHttpLib. And remove the use of

> > RedfishHttpCacheLib.

> >

> > I also replace several functions from RedfishLib with the function

> > provided in RedfishHttpLib. In this way, there is no dependency on

> > RedfishLib in RedfishClientPkg.

>

> May I know why didn't you remove

> RedfishClientPkg/PrivateLibrary/RedfishLib completely?

> I've been looking at this library for a long time and started improving it 
> with this

> set.

> Eventually I realized that the improved functions are not used in 
> RedfishClientPkg.

> Then I just deleted RedfishClientPkg/PrivateLibrary and

> RedfishClientPkg/PrivateInclude/Library/RedfishLib.h,

> tuned the dec and dsc files, and I successfully built the package.

> Removing this library is a big improvement since it duplicates RedfishLib from

> RedfishPkg.

> and their headers no longer conflict.

>

> Regards,

> Mike.

>

>

> >

> > I noticed that there is false alarm in uncrustify check. When there

> > are deleted files, uncrustiry cannot check them and trigger uncrustify

> > failure.

> >

> > Pull request is created here for testing CI:

> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith

> > ub.com%2Ftianocore%2Fedk2-redfish-

> client%2Fpull%2F79=05%7C02%7Cni

> >

> cklew%40nvidia.com%7C44d7d139b40b4acff94508dc3983b3df%7C43083d1572

> 7340

> >

> c1b7db39efd9ccc17a%7C0%7C0%7C638448485034820142%7CUnknown%7CTW

> FpbGZsb3

> >

> d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D

> %7

> >

> C0%7C%7C%7C=ocqaIR0%2BtKvx8ETphWlWFX2uZIQbQvDKWkn7D36c2z

> 0%3D

> > erved=0

> >

> > Signed-off-by: Nickle Wang mailto:nick...@nvidia.com>>

> > Cc: Abner Chang mailto:abner.ch...@amd.com>>

> > Cc: Igor Kulchytskyy mailto:ig...@ami.com>>

> >

> > Nickle Wang (13):

> >   RedfishClientPkg/.github: do not run uncrustify to deleted file.

> >   RedfishClientPkg: remove RedfishHttpCacheLib

> >   RedfishClientPkg: ues RedfishHttpLib

> >   RedfishClientPkg/RedfishResourceConfigLib: ues RedfishHttpLib

> >   RedfishClientPkg/RedfishFeatureUtilityLib: ues RedfishHttpLib

> >   RedfishClientPkg/RedfishVersionLib: ues RedfishHttpLib

> >   RedfishClientPkg/BiosDxe: ues RedfishHttpLib

> >   RedfishClientPkg/BootOptionDxe: ues RedfishHttpLib

> >   

Re: [edk2-devel] [edk2-redfish-client][PATCH 2/3] RedfishClientPkg/Edk2RedfishResourceConfigLib: support config2 protocol

2024-03-05 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

Looks good to me.
Reviewed-by: Abner Chang 


> -Original Message-
> From: Nickle Wang 
> Sent: Monday, March 4, 2024 9:27 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner ; Igor Kulchytskyy
> ; Nick Ramirez 
> Subject: [edk2-redfish-client][PATCH 2/3]
> RedfishClientPkg/Edk2RedfishResourceConfigLib: support config2 protocol
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> Support Redfish resource config2 protocol in Edk2RedfishResourceConfigLib.
> This library will try Redfish resource config2 protocol first. And if
> there is no matching protocol found, Redfish resource config protocol will
> be used.
>
> Signed-off-by: Nickle Wang 
> Cc: Abner Chang 
> Cc: Igor Kulchytskyy 
> Cc: Nick Ramirez 
> ---
>  .../EdkIIRedfishResourceConfigLib.inf |   4 +-
>  .../Library/EdkIIRedfishResourceConfigLib.h   |  33 +-
>  .../EdkIIRedfishResourceConfigInternal.h  |  44 ++
>  .../EdkIIRedfishResourceConfigLib.c   | 391 ++
>  4 files changed, 385 insertions(+), 87 deletions(-)
>  create mode 100644
> RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourc
> eConfigInternal.h
>
> diff --git
> a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishReso
> urceConfigLib.inf
> b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishReso
> urceConfigLib.inf
> index 2d10445f0..998a05c80 100644
> ---
> a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishReso
> urceConfigLib.inf
> +++
> b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishReso
> urceConfigLib.inf
> @@ -22,6 +22,7 @@
>  #
>
>  [Sources]
> +  EdkIIRedfishResourceConfigInternal.h
>EdkIIRedfishResourceConfigLib.c
>
>  [Packages]
> @@ -42,8 +43,9 @@
>RedfishHttpLib
>
>  [Protocols]
> -  gEdkIIRedfishResourceConfigProtocolGuid   ## CONSUMES ##
> +  gEdkIIRedfishResourceConfigProtocolGuid ## CONSUMES ##
>gEdkIIRedfishFeatureInterchangeDataProtocolGuid ## CONSUMES ##
> +  gEdkIIRedfishResourceConfig2ProtocolGuid## CONSUEMS ##
>
>  [Pcd]
>gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize
> diff --git a/RedfishClientPkg/Include/Library/EdkIIRedfishResourceConfigLib.h
> b/RedfishClientPkg/Include/Library/EdkIIRedfishResourceConfigLib.h
> index 3aa953cec..57c7f2b80 100644
> --- a/RedfishClientPkg/Include/Library/EdkIIRedfishResourceConfigLib.h
> +++ b/RedfishClientPkg/Include/Library/EdkIIRedfishResourceConfigLib.h
> @@ -16,6 +16,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>
>  /**
> @@ -23,6 +24,7 @@
>
>@param[in]   Schema  Redfish schema information.
>@param[in]   Uri Target URI to create resource.
> +  @param[in]   JsonTextThe JSON data in ASCII string format. 
> This is
> optional.
>@param[in]   InformationExchange Pointer to
> RESOURCE_INFORMATION_EXCHANGE.
>@param[in]   HttpPostModeTRUE if resource does not exist, HTTP POST
> method is used.
> FALSE if the resource exist but some of 
> properties are
> missing,
> @@ -33,9 +35,11 @@
>
>  **/
>  EFI_STATUS
> +EFIAPI
>  EdkIIRedfishResourceConfigProvisioning (
>IN REDFISH_SCHEMA_INFO*Schema,
>IN EFI_STRING Uri,
> +  IN CHAR8  *JsonText OPTIONAL,
>IN RESOURCE_INFORMATION_EXCHANGE  *InformationExchange,
>IN BOOLEANHttpPostMode
>);
> @@ -45,15 +49,18 @@ EdkIIRedfishResourceConfigProvisioning (
>
>@param[in]   Schema  Redfish schema information.
>@param[in]   Uri The target URI to consume.
> +  @param[in]   JsonTextThe JSON data in ASCII string format. 
> This is
> optional.
>
>@retval EFI_SUCCESS  Value is returned successfully.
>@retval Others   Some error happened.
>
>  **/
>  EFI_STATUS
> +EFIAPI
>  EdkIIRedfishResourceConfigConsume (
>IN REDFISH_SCHEMA_INFO  *Schema,
> -  IN EFI_STRING   Uri
> +  IN EFI_STRING   Uri,
> +  IN CHAR8*JsonText OPTIONAL
>);
>
>  /**
> @@ -61,21 +68,25 @@ EdkIIRedfishResourceConfigConsume (
>
>@param[in]   Schema  Redfish schema information.
>@param[in]   Uri The target URI to consume.
> +  @param[in]   JsonTextThe JSON data in ASCII string format. 
> This is
> optional.
>
>@retval EFI_SUCCESS  Value is returned successfully.
>@retval Others   Some error happened.
>
>  **/
>  EFI_STATUS
> +EFIAPI
>  EdkIIRedfishResourceConfigUpdate (
>IN REDFISH_SCHEMA_INFO  *Schema,
> -  IN EFI_STRING   Uri
> +  IN EFI_STRING   Uri,
> +  IN CHAR8*JsonText OPTIONAL
>);
>
>  /**
>Check 

Re: [edk2-devel] [edk2-redfish-client][PATCH 3/3] RedfishClientPkg/Features: support config2 protocol

2024-03-05 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

Hi Nickle, I think we have to merge this patch with 2/3. Otherwise, the build 
will be failed on the commit of 2/3, right?

Thanks
Abner

> -Original Message-
> From: Nickle Wang 
> Sent: Monday, March 4, 2024 9:27 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner ; Igor Kulchytskyy
> ; Nick Ramirez 
> Subject: [edk2-redfish-client][PATCH 3/3] RedfishClientPkg/Features: support
> config2 protocol
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> Because EdkIIRedfishResourceConfigLib is updated to support
> Redfish resource config2 protocol, update corresponding
> functions in feature drivers.
>
> Signed-off-by: Nickle Wang 
> Cc: Abner Chang 
> Cc: Igor Kulchytskyy 
> Cc: Nick Ramirez 
> ---
>  .../Features/Bios/v1_0_9/Common/BiosCommon.c | 14 +++---
>  .../BootOptionCollectionDxe.c| 14 +++---
>  .../ComputerSystemCollectionDxe.c| 16 
>  .../MemoryCollectionDxe/MemoryCollectionDxe.c| 16 
>  4 files changed, 30 insertions(+), 30 deletions(-)
>
> diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> index 1f3c30147..1eb269a84 100644
> --- a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> +++ b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> @@ -782,7 +782,7 @@ HandleResource (
>
>DEBUG ((REDFISH_DEBUG_TRACE, "%a, process resource for: %s\n",
> __func__, Uri));
>
> -  Status = GetRedfishSchemaInfo (Private->RedfishService, Private-
> >JsonStructProtocol, Uri, );
> +  Status = GetRedfishSchemaInfo (Private->RedfishService, Private-
> >JsonStructProtocol, Uri, NULL, );
>if (EFI_ERROR (Status)) {
>  DEBUG ((DEBUG_ERROR, "%a, failed to get schema information from: %s
> %r\n", __func__, Uri, Status));
>  return Status;
> @@ -795,7 +795,7 @@ HandleResource (
>DEBUG ((REDFISH_DEBUG_TRACE, "%a Identify for %s\n", __func__, Uri));
>ConfigLang = RedfishGetConfigLanguage (Uri);
>if (ConfigLang == NULL) {
> -Status = EdkIIRedfishResourceConfigIdentify (, Uri, Private-
> >InformationExchange);
> +Status = EdkIIRedfishResourceConfigIdentify (, Uri, NULL,
> Private->InformationExchange);
>  if (EFI_ERROR (Status)) {
>if (Status == EFI_UNSUPPORTED) {
>  DEBUG ((DEBUG_MANAGEABILITY, "%a, \"%s\" is not handled by us\n",
> __func__, Uri));
> @@ -811,17 +811,17 @@ HandleResource (
>}
>
>//
> -  // Check and see if target property exist or not even when collection
> memeber exists.
> +  // Check and see if target property exist or not even when collection
> member exists.
>// If not, we sill do provision.
>//
>DEBUG ((REDFISH_DEBUG_TRACE, "%a Check for %s\n", __func__, Uri));
> -  Status = EdkIIRedfishResourceConfigCheck (, Uri);
> +  Status = EdkIIRedfishResourceConfigCheck (, Uri, NULL);
>if (EFI_ERROR (Status)) {
>  //
>  // The target property does not exist, do the provision to create 
> property.
>  //
>  DEBUG ((REDFISH_DEBUG_TRACE, "%a provision for %s\n", __func__, Uri));
> -Status = EdkIIRedfishResourceConfigProvisioning (, Uri,
> Private->InformationExchange, FALSE);
> +Status = EdkIIRedfishResourceConfigProvisioning (, Uri, NULL,
> Private->InformationExchange, FALSE);
>  if (EFI_ERROR (Status)) {
>DEBUG ((DEBUG_ERROR, "%a, failed to provision with GET mode: %r\n",
> __func__, Status));
>  }
> @@ -833,7 +833,7 @@ HandleResource (
>// Consume first.
>//
>DEBUG ((REDFISH_DEBUG_TRACE, "%a consume for %s\n", __func__, Uri));
> -  Status = EdkIIRedfishResourceConfigConsume (, Uri);
> +  Status = EdkIIRedfishResourceConfigConsume (, Uri, NULL);
>if (EFI_ERROR (Status)) {
>  DEBUG ((DEBUG_ERROR, "%a, failed to consume resource for: %s: %r\n",
> __func__, Uri, Status));
>}
> @@ -842,7 +842,7 @@ HandleResource (
>// Patch.
>//
>DEBUG ((REDFISH_DEBUG_TRACE, "%a update for %s\n", __func__, Uri));
> -  Status = EdkIIRedfishResourceConfigUpdate (, Uri);
> +  Status = EdkIIRedfishResourceConfigUpdate (, Uri, NULL);
>if (EFI_ERROR (Status)) {
>  DEBUG ((DEBUG_ERROR, "%a, failed to update resource for: %s: %r\n",
> __func__, Uri, Status));
>}
> diff --git
> a/RedfishClientPkg/Features/BootOptionCollection/BootOptionCollectionDxe
> .c
> b/RedfishClientPkg/Features/BootOptionCollection/BootOptionCollectionDxe
> .c
> index 4f94a4495..cd1437f54 100644
> ---
> a/RedfishClientPkg/Features/BootOptionCollection/BootOptionCollectionDxe
> .c
> +++
> b/RedfishClientPkg/Features/BootOptionCollection/BootOptionCollectionDxe
> .c
> @@ -44,7 +44,7 @@ HandleResource (
>
>DEBUG ((REDFISH_BOOT_OPTION_COLLECTION_DEBUG_TRACE, "%a:
> process resource for: %s\n", __func__, Uri));
>
> -  Status = GetRedfishSchemaInfo (Private->RedfishService, Private-
> 

Re: [edk2-devel] [edk2-redfish-client][PATCH 1/3] RedfishClientPkg: introduce Redfish resource config2 protocol.

2024-03-05 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

> -Original Message-
> From: Nickle Wang 
> Sent: Monday, March 4, 2024 9:27 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner ; Igor Kulchytskyy
> ; Nick Ramirez 
> Subject: [edk2-redfish-client][PATCH 1/3] RedfishClientPkg: introduce Redfish
> resource config2 protocol.
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> Introduce EDKII Redfish Resource Config2 Protocol. Comparing to
> Redfish Resource Config Protocol, this protocol adds new parameter
> called "JsonText". This allows Redfish caller driver to pass JSON
> context to callee. Callee save the effort of getting same data from
> Redfish service again. This is useful when Redfish service supports
> "expand" query parameter. "Version" is added to this protocol too so
> we don't create new protocol to add new parameter in the future.
>
> Signed-off-by: Nickle Wang 
> Cc: Abner Chang 
> Cc: Igor Kulchytskyy 
> Cc: Nick Ramirez 
> ---
>  RedfishClientPkg/RedfishClientPkg.dec |   2 +
>  .../EdkIIRedfishResourceConfig2Protocol.h | 148 ++
>  2 files changed, 150 insertions(+)
>  create mode 100644
> RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfig2Protocol.h
>
> diff --git a/RedfishClientPkg/RedfishClientPkg.dec
> b/RedfishClientPkg/RedfishClientPkg.dec
> index aa018d714..f894f30ab 100644
> --- a/RedfishClientPkg/RedfishClientPkg.dec
> +++ b/RedfishClientPkg/RedfishClientPkg.dec
> @@ -48,6 +48,8 @@
>gEdkIIRedfishResourceAddendumProtocolGuid = { 0xda36b12b, 0xaad4,
> 0x4e90, { 0xba, 0xcb, 0xe3, 0xb5, 0x3b, 0x08, 0xbc, 0x54 } }
>## Include/Protocol/EdkIIRedfishOverrideProtocol.h
>gEdkiiRedfishOverrideProtocolGuid = { 0xb55bef20, 0xf7c8, 0x4ae9,
> { 0xa7, 0xca, 0x8b, 0xba, 0x9f, 0x7b, 0xbf, 0x9c } }
> +  ## Include/Protocol/EdkIIRedfishResourceConfig2Protocol.h
> +  gEdkIIRedfishResourceConfig2ProtocolGuid  = { 0xe9bef87f, 0xbff4,
> 0x4872, { 0xa9, 0xa4, 0x16, 0x59, 0xbe, 0xd9, 0x1c, 0xf4 } }
>
>  [Guids]
>## Include/Guid/RedfishClientPkgTokenSpace.h
> diff --git
> a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfig2Protocol.h
> b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfig2Protocol.h
> new file mode 100644
> index 0..96384e265
> --- /dev/null
> +++
> b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfig2Protocol.h
> @@ -0,0 +1,148 @@
> +/** @file
> +  This file defines the EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL
> interface.
> +
> +  Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights
> reserved.
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef EDKII_REDFISH_RESOURCE_CONFIG2_H_
> +#define EDKII_REDFISH_RESOURCE_CONFIG2_H_
> +
> +#include 
> +
> +typedef struct _EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL
> EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL;
> +
> +/**
> +  Provision redfish resource by given URI.
> +
> +  @param[in]   ThisPointer to
> EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL instance.
> +  @param[in]   Uri Target URI to create resource.
> +  @param[in]   JsonTextThe JSON data in ASCII string format. 
> This is
> optional.
Can we say "The additional JSON data in ASCII string format passed to callee. 
The usage is defined between the Redfish feature driver and subordinate Redfish 
resource feature driver."? Seems to me more clear about the usage.
Also apply this description to the following functions.

Thanks
Abner

> +  @param[in]   HttpPostModeTRUE if resource does not exist, HTTP POST
> method is used.
> +   FALSE if the resource exist but some of 
> properties are
> missing,
> +   HTTP PUT method is used.
> +
> +  @retval EFI_SUCCESS  Value is returned successfully.
> +  @retval Others   Some error happened.
> +
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL_PROVISIONING)(
> +  IN EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL  *This,
> +  IN EFI_STRING   Uri,
> +  IN CHAR8*JsonText OPTIONAL,
> +  IN BOOLEAN  HttpPostMode
> +  );
> +
> +/**
> +  Consume resource from given URI.
> +
> +  @param[in]   ThisPointer to
> EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL instance.
> +  @param[in]   Uri The target URI to consume.
> +  @param[in]   JsonTextThe JSON data in ASCII string format. 
> This is
> optional.
> +
> +  @retval EFI_SUCCESS  Value is returned successfully.
> +  @retval Others   Some error happened.
> +
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL_CONSUME)(
> +  IN EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL  *This,
> +  IN EFI_STRING   Uri,
> + 

[edk2-devel] [PATCH v2] MdePkg: Add TCG PFP 1.06 support.

2024-03-05 Thread Wenxing Hou
Add support for
TCG PC Client Platform Firmware Profile Specification 1.06.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Jiewen Yao 
Signed-off-by: Wenxing Hou 

---
 MdePkg/Include/IndustryStandard/Spdm.h|   4 +-
 .../IndustryStandard/UefiTcgPlatform.h| 186 +-
 2 files changed, 187 insertions(+), 3 deletions(-)

diff --git a/MdePkg/Include/IndustryStandard/Spdm.h 
b/MdePkg/Include/IndustryStandard/Spdm.h
index 7940caa95e..3d511b4768 100644
--- a/MdePkg/Include/IndustryStandard/Spdm.h
+++ b/MdePkg/Include/IndustryStandard/Spdm.h
@@ -1302,7 +1302,9 @@ typedef struct {
 #define SPDM_ST1_VALUE_US  10
 
 ///
-/// id-DMTF 1.3.6.1.4.1.412
+/// id-DMTF 1.3.6.1.4.1.412.
+/// These OID are defiend in ANNEX C (informative) OID reference section from 
the DMTF SPDM spec.
+/// 
https://www.dmtf.org/sites/default/files/standards/documents/DSP0274_1.2.2.pdf
 ///
 #define SPDM_OID_DMTF \
 {0x2B, 0x06, 0x01, 0x04, 0x01, 0x83, 0x1C }
diff --git a/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h 
b/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h
index e07840c9dd..61bd4e4667 100644
--- a/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h
+++ b/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h
@@ -1,8 +1,8 @@
 /** @file
   TCG EFI Platform Definition in TCG_EFI_Platform_1_20_Final and
-  TCG PC Client Platform Firmware Profile Specification, Revision 1.05
+  TCG PC Client Platform Firmware Profile Specification, Revision 1.06
 
-  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+  Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -53,6 +53,18 @@
 #define EV_EFI_VARIABLE_AUTHORITY (EV_EFI_EVENT_BASE + 0xE0)
 #define EV_EFI_SPDM_FIRMWARE_BLOB (EV_EFI_EVENT_BASE + 0xE1)
 #define EV_EFI_SPDM_FIRMWARE_CONFIG   (EV_EFI_EVENT_BASE + 0xE2)
+#define EV_EFI_SPDM_DEVICE_BLOB   EV_EFI_SPDM_FIRMWARE_BLOB
+#define EV_EFI_SPDM_DEVICE_CONFIG EV_EFI_SPDM_FIRMWARE_CONFIG
+//
+// The SPDM policy database for SPDM verification.
+// It goes to PCR7
+//
+#define EV_EFI_SPDM_DEVICE_POLICY  (EV_EFI_EVENT_BASE + 0xE3)
+//
+// The SPDM policy authority for SPDM verification for the signature
+// of GET_MEASUREMENT or CHALLENGE_AUTH. It goes to PCR7.
+//
+#define EV_EFI_SPDM_DEVICE_AUTHORITY  (EV_EFI_EVENT_BASE + 0xE4)
 
 #define EFI_CALLING_EFI_APPLICATION \
   "Calling EFI Application from Boot Option"
@@ -374,6 +386,7 @@ typedef struct {
 #define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM2   0
 #define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2  0
 #define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2_REV_105  105
+#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2_REV_106  106
 
 typedef struct {
   UINT8 signature[16];
@@ -492,4 +505,173 @@ typedef struct tdTCG_EfiStartupLocalityEvent {
 //
 #pragma pack ()
 
+//
+// 
==
+// Event TypePCR  Event Log
   Usage
+// 
==
+// EV_EFI_SPDM_DEVICE_BLOB   2SPDM_MEASUREMENT_BLOCK (subtype) 
   MEASUREMENT from device
+// EV_EFI_SPDM_DEVICE_CONFIG 3SPDM_MEASUREMENT_BLOCK (subtype) 
   MEASUREMENT from device
+// EV_EFI_SPDM_DEVICE_BLOB   2SPDM_MEASUREMENT_SUMMARY_HASH.TCB 
(subtype) SUMMARY_HASH from device
+
+// EV_EFI_SPDM_DEVICE_POLICY 7UEFI_VARIABLE_DATA with 
EFI_SIGNATURE_LIST  Provisioned device public cert.
+// EV_EFI_SPDM_DEVICE_AUTHORITY  7UEFI_VARIABLE_DATA with 
EFI_SIGNATURE_DATA  CHALLENGE_AUTH signature verification
+// 
==
+//
+
+#define PCR_INDEX_FOR_SIGNATURE_DB  7
+
+#pragma pack(1)
+
+#define TCG_DEVICE_SECURITY_EVENT_DATA_VERSION_11
+#define TCG_DEVICE_SECURITY_EVENT_DATA_VERSION_22
+#define TCG_DEVICE_SECURITY_EVENT_DATA_SIGNATURE_2  "SPDM Device Sec2"
+
+typedef struct {
+  UINT8 Signature[16];
+  UINT16Version;
+  UINT8 AuthState;
+  UINT8 Reserved;
+  UINT32Length;  // Length in bytes for all following 
structures.
+  UINT32DeviceType;
+  UINT32SubHeaderType;
+  UINT32SubHeaderLength;  // Length in bytes of the 
sub header followed by.
+  UINT64SubHeaderUID; // Universal identifier 
assigned by the event log creator. It can be used to bind two sub header 
structure together.
+  // UINT64 DevicePathLength;
+  // UINT8  DevicePath[DevicePathLength];
+} TCG_DEVICE_SECURITY_EVENT_DATA_HEADER2;
+
+#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_AUTH_STATE_SUCCESS   0
+#define 

[edk2-devel] [PATCH v2 2/2] MdePkg: Add gEfiDeviceSignatureDatabaseGuid to dec

2024-03-05 Thread Wenxing Hou
According to UEFI 2.10 spec
32.8.2 UEFI Device Signature Variable GUID and Variable Name section,
add gEfiDeviceSignatureDatabaseGuid to dec.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Jiewen Yao 
Signed-off-by: Wenxing Hou 
---
 MdePkg/MdePkg.dec | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 0459418906..0c18e1decd 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -4,7 +4,7 @@
 # It also provides the definitions(including PPIs/PROTOCOLs/GUIDs) of
 # EFI1.10/UEFI2.7/PI1.7 and some Industry Standards.
 #
-# Copyright (c) 2007 - 2022, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2024, Intel Corporation. All rights reserved.
 # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
 # (C) Copyright 2016 - 2021 Hewlett Packard Enterprise Development LP
 # Copyright (c) 2022, Loongson Technology Corporation Limited. All rights 
reserved.
@@ -740,6 +740,12 @@
   ## Include/Protocol/SerilaIo.h
   gEfiSerialTerminalDeviceTypeGuid = { 0x6AD9A60F, 0x5815, 0x4C7C, { 0x8A, 
0x10, 0x50, 0x53, 0xD2, 0xBF, 0x7A, 0x1B }}
 
+  # GUIDs defined in UEFI2.10
+  #
+  ## GUID used to specify section with devdb content
+  ## Include/Guid/DeviceAuthentication.h
+  gEfiDeviceSignatureDatabaseGuid  = { 0xb9c2b4f4, 0xbf5f, 0x462d, {0x8a, 
0xdf, 0xc5, 0xc7, 0xa, 0xc3, 0x5d, 0xad }}
+
   #
   # GUID defined in PI1.0
   #
-- 
2.26.2.windows.1



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




[edk2-devel] [PATCH v2 1/2] MdePkg: Add UEFI 2.10 DeviceAuthentication

2024-03-05 Thread Wenxing Hou
According to UEFI 2.10 spec
32.8.2 UEFI Device Signature Variable GUID and Variable Name section,
add signature database for device authentication.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Jiewen Yao 
Signed-off-by: Wenxing Hou 
---
 MdePkg/Include/Guid/DeviceAuthentication.h | 61 ++
 1 file changed, 61 insertions(+)
 create mode 100644 MdePkg/Include/Guid/DeviceAuthentication.h

diff --git a/MdePkg/Include/Guid/DeviceAuthentication.h 
b/MdePkg/Include/Guid/DeviceAuthentication.h
new file mode 100644
index 00..65dea4273d
--- /dev/null
+++ b/MdePkg/Include/Guid/DeviceAuthentication.h
@@ -0,0 +1,61 @@
+/** @file
+  Guid & data structure used for Device Security.
+
+  Copyright (c) 2024, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef EDKII_DEVICE_AUTHENTICATION_GUID_H_
+#define EDKII_DEVICE_AUTHENTICATION_GUID_H_
+
+/**
+  This is a signature database for device authentication, instead of image 
authentication.
+
+  The content of the signature database is same as the one in db/dbx. (a list 
of EFI_SIGNATURE_LIST)
+**/
+#define EFI_DEVICE_SIGNATURE_DATABASE_GUID \
+  {0xb9c2b4f4, 0xbf5f, 0x462d, 0x8a, 0xdf, 0xc5, 0xc7, 0xa, 0xc3, 0x5d, 0xad}
+#define EFI_DEVICE_SECURITY_DATABASE  L"devdb"
+
+extern EFI_GUID  gEfiDeviceSignatureDatabaseGuid;
+
+/**
+  Signature Database:
+
+  +---+ <-
+  | SignatureType (GUID)  |  |
+  +---+  |
+  | SignatureListSize (UINT32)|  |
+  +---+  |
+  | SignatureHeaderSize (UINT32)  |  |
+  +---+  |
+  | SignatureSize (UINT32)|  
|-EFI_SIGNATURE_LIST (1)
+  +---+  |
+  | SignatureHeader (SignatureHeaderSize) |  |
+  +---+ <--  |
+  | SignatureOwner (GUID) |   |  |
+  +---+   |-EFI_SIGNATURE_DATA (1)
+  | SignatureData (SignatureSize - 16)|   |  |
+  +---+ <--  |
+  | SignatureOwner (GUID) |   |  |
+  +---+   |-EFI_SIGNATURE_DATA (n)
+  | SignatureData (SignatureSize - 16)|   |  |
+  +---+ <-
+  | SignatureType (GUID)  |  |
+  +---+  |
+  | SignatureListSize (UINT32)|  
|-EFI_SIGNATURE_LIST (n)
+  +---+  |
+  | ...   |  |
+  +---+ <-
+
+  SignatureType := EFI_CERT_SHAxxx_GUID |
+   EFI_CERT_RSA2048_GUID |
+   EFI_CERT_RSA2048_SHAxxx_GUID |
+   EFI_CERT_X509_GUID |
+   EFI_CERT_X509_SHAxxx_GUID
+  (xxx = 256, 384, 512)
+
+**/
+
+#endif
-- 
2.26.2.windows.1



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




[edk2-devel] [PATCH v2 0/2] MdePkg: Add UEFI 2.10 DeviceAuthentication

2024-03-05 Thread Wenxing Hou
According to UEFI 2.10 spec
32.8.2 UEFI Device Signature Variable GUID and Variable Name section,
add signature database for device authentication and
add add gEfiDeviceSignatureDatabaseGuid to dec.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Jiewen Yao 
Signed-off-by: Wenxing Hou 

Wenxing Hou (2):
  MdePkg: Add UEFI 2.10 DeviceAuthentication
  MdePkg: Add gEfiDeviceSignatureDatabaseGuid to dec

 MdePkg/Include/Guid/DeviceAuthentication.h | 61 ++
 MdePkg/MdePkg.dec  |  8 ++-
 2 files changed, 68 insertions(+), 1 deletion(-)
 create mode 100644 MdePkg/Include/Guid/DeviceAuthentication.h

-- 
2.26.2.windows.1



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




[edk2-devel] Event: TianoCore Bug Triage - APAC / NAMO - Tuesday, March 5, 2024 #cal-reminder

2024-03-05 Thread Group Notification
*Reminder: TianoCore Bug Triage - APAC / NAMO*

*When:*
Tuesday, March 5, 2024
6:30pm to 7:30pm
(UTC-08:00) America/Los Angeles

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

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

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

*Description:*

TianoCore Bug Triage - APAC / NAMO

Hosted by Liming Gao



Microsoft Teams meeting

*Join on your computer or mobile app*

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

*Join with a video conferencing device*

te...@conf.intel.com

Video Conference ID: 116 062 094 0

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

*Or call in (audio only)*

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

Phone Conference ID: 774 638 21#

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

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


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




[edk2-devel] [PATCH v4 6/6] uefi-sct/SctPkg: TCG MORLOCK Locked with Key State Test

2024-03-05 Thread Abhimanyu Singh
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419

-Implement MemoryOverwriteRequestControlLock Locked with
 Key State test cases
 -Add remaining Assertions 32 - 49 from SCT spec
 -Add Test Case to MemoryOverwriteRequestFunctionTest

Cc: G Edhaya Chandran 
Cc: Barton Gao 
Cc: Carolyn Gjertsen 

Signed-off-by: Abhi Singh 

Reviewed-by: Stuart Yoder 
---
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
|  96 ++-
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 |  11 +-
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
|  39 +-
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 | 669 
 4 files changed, 805 insertions(+), 10 deletions(-)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
index 612e6ee436e0..cf7f3e180f54 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
@@ -85,8 +85,6 @@ Abstract:
 #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_020_GUID \
 { 0x2eba284a, 0xf701, 0x4c19, {0xbe, 0x5c, 0x39, 0x27, 0xb0, 0x68, 0x4f, 0xd7 
}}
 
-<<< HEAD
-===
 #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_021_GUID \
 { 0x9a1b44ae, 0x08ce, 0x474c, {0xa5, 0x8e, 0xa6, 0xe2, 0xcf, 0xaf, 0x91, 0x2c 
}}
 
@@ -120,7 +118,60 @@ Abstract:
 #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_031_GUID \
 { 0xe88b22ce, 0x3de6, 0x49b0, {0xb2, 0x46, 0x9e, 0x35, 0x98, 0x2b, 0x9b, 0x1c 
}}
 
->>> 3542bef7c1d2 (uefi-sct/SctPkg: TCG MORLOCK Locked No Key State Test)
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_032_GUID \
+{ 0xc8894201, 0x7a3a, 0x47d4, {0xa8, 0x8d, 0xdf, 0x4b, 0x03, 0xff, 0xde, 0x4f 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_033_GUID \
+{ 0x38a813ac, 0x8eb9, 0x46ce, {0xa8, 0x6b, 0x40, 0x8c, 0x07, 0x5f, 0xc7, 0xed 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_034_GUID \
+{ 0x919b8392, 0xcb78, 0x49ff, {0xa3, 0x18, 0x49, 0x78, 0x76, 0xe0, 0xf8, 0xf8 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_035_GUID \
+{ 0x219abaf2, 0x04a9, 0x407c, {0xb5, 0xde, 0xa0, 0x03, 0x6e, 0x65, 0xb0, 0xb9 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_036_GUID \
+{ 0x9a51640a, 0xff14, 0x402b, {0xb0, 0x57, 0xa0, 0xc4, 0xf7, 0x20, 0x8e, 0x44 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_037_GUID \
+{ 0x8ccd0dbb, 0x9b0a, 0x4bfb, {0xa0, 0x7e, 0xc6, 0x06, 0x8b, 0x91, 0x0d, 0xfb 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_038_GUID \
+{ 0xde6f4e17, 0xe375, 0x4dcb, {0x8f, 0x07, 0x77, 0x7e, 0x62, 0x49, 0xea, 0x2c 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_039_GUID \
+{ 0x4ab6927b, 0x5ee4, 0x4748, {0xa4, 0x9d, 0x2d, 0xf3, 0x70, 0x01, 0x41, 0xd5 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_040_GUID \
+{ 0x33142ecf, 0x0f92, 0x4625, {0xb7, 0xf6, 0x7f, 0x15, 0x25, 0x74, 0xd3, 0x03 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_041_GUID \
+{ 0xf73c04df, 0x2e42, 0x4174, {0x82, 0x18, 0x0f, 0x25, 0x46, 0x4a, 0x55, 0xe9 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_042_GUID \
+{ 0xd4eacf82, 0x55d1, 0x4ba1, {0xbe, 0x89, 0x6a, 0x2e, 0x44, 0x0f, 0xc7, 0xc0 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_043_GUID \
+{ 0xfd88fe63, 0x5ed4, 0x482a, {0x98, 0x44, 0x23, 0x90, 0xf9, 0x09, 0x1c, 0x20 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_044_GUID \
+{ 0x176f16cb, 0xf3a4, 0x4f12, {0x8f, 0x96, 0x4a, 0xc1, 0x8b, 0xdd, 0x6e, 0x3c 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_045_GUID \
+{ 0xf0d5e7b3, 0xdc0f, 0x4a18, {0xb9, 0x78, 0x09, 0x3b, 0x15, 0x55, 0x66, 0xbf 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_046_GUID \
+{ 0x9bf14c4b, 0x2950, 0x4c4e, {0x8b, 0xa3, 0x06, 0x46, 0xf1, 0x27, 0x8c, 0x05 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_047_GUID \
+{ 0xb0468dee, 0xb1d0, 0x4795, {0x9f, 0xbf, 0xbe, 0x3f, 0x40, 0x2f, 0x3d, 0x6f 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_048_GUID \
+{ 0x1f7dd903, 0xcd58, 0x4d6f, {0x80, 0xd6, 0x4f, 0x6d, 0xcb, 0x4a, 0xd6, 0xc9 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_049_GUID \
+{ 0x439179c2, 0x744d, 0x43bc, {0xb0, 0x67, 0x7b, 0x65, 0x60, 0x62, 0x6f, 0x5e 
}}
+
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002;
@@ -160,8 +211,6 @@ extern EFI_GUID 
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid018;
 extern EFI_GUID 

[edk2-devel] [PATCH v4 5/6] uefi-sct/SctPkg: TCG MORLOCK Locked No Key State Test

2024-03-05 Thread Abhimanyu Singh
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419

-Implement MemoryOverwriteRequestControlLock Locked No Key
 State test cases
 -Add Assertions 21 - 31 from SCT spec
 -Add Test Case to MemoryOverwriteRequestFunctionTest

Cc: G Edhaya Chandran 
Cc: Barton Gao 
Cc: Carolyn Gjertsen 

Signed-off-by: Abhi Singh 

Reviewed-by: Stuart Yoder 
---
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
|  61 +++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 |  11 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
|  25 ++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 | 472 
 4 files changed, 569 insertions(+)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
index 1ca43a393f29..612e6ee436e0 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
@@ -85,6 +85,42 @@ Abstract:
 #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_020_GUID \
 { 0x2eba284a, 0xf701, 0x4c19, {0xbe, 0x5c, 0x39, 0x27, 0xb0, 0x68, 0x4f, 0xd7 
}}
 
+<<< HEAD
+===
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_021_GUID \
+{ 0x9a1b44ae, 0x08ce, 0x474c, {0xa5, 0x8e, 0xa6, 0xe2, 0xcf, 0xaf, 0x91, 0x2c 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_022_GUID \
+{ 0x490d7b39, 0xcad4, 0x4e8c, {0xb1, 0x5d, 0x63, 0xd2, 0x0c, 0xb3, 0xe9, 0x45 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_023_GUID \
+{ 0x397394ae, 0xce01, 0x4350, {0xa2, 0x0c, 0xe1, 0xb3, 0xe8, 0x74, 0xdc, 0x01 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_024_GUID \
+{ 0x9cf27a60, 0x94b5, 0x4e2e, {0xb3, 0x2b, 0x51, 0x0f, 0x24, 0x7a, 0x80, 0xd7 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_025_GUID \
+{ 0x766dc008, 0x2a88, 0x4eed, {0x91, 0x95, 0x46, 0x92, 0xdc, 0xcc, 0x1d, 0xf6 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_026_GUID \
+{ 0x5f66c8e5, 0x1bf8, 0x4af4, {0x86, 0x45, 0xf4, 0x93, 0xa0, 0xee, 0x26, 0x88 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_027_GUID \
+{ 0x1064f6ce, 0xb307, 0x4981, {0xac, 0x8f, 0xe5, 0xca, 0x20, 0x6c, 0x1b, 0x8b 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_028_GUID \
+{ 0x40f2c4e9, 0xe937, 0x426e, {0x98, 0xc5, 0x62, 0xca, 0x23, 0x68, 0x52, 0xd0 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_029_GUID \
+{ 0x6d5dcb4d, 0xe008, 0x41cc, {0x98, 0x32, 0xdf, 0xa8, 0x38, 0xb1, 0xb6, 0x02 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_030_GUID \
+{ 0x29b81ee0, 0x368d, 0x447c, {0x9e, 0xd0, 0xa5, 0xfe, 0xd7, 0x02, 0x65, 0x7b 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_031_GUID \
+{ 0xe88b22ce, 0x3de6, 0x49b0, {0xb2, 0x46, 0x9e, 0x35, 0x98, 0x2b, 0x9b, 0x1c 
}}
+
+>>> 3542bef7c1d2 (uefi-sct/SctPkg: TCG MORLOCK Locked No Key State Test)
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002;
@@ -124,3 +160,28 @@ extern EFI_GUID 
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid018;
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid019;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid020;
+<<< HEAD
+===
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid021;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid022;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid023;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid024;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid025;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid026;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid027;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid028;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid029;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid030;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid031;
+>>> 3542bef7c1d2 (uefi-sct/SctPkg: TCG MORLOCK Locked No Key State Test)
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
index 15eedc60f19d..94ed476f86ad 100644
--- 

[edk2-devel] [PATCH v4 3/6] uefi-sct/SctPkg: TCG MORLOCK SetVariable Test

2024-03-05 Thread Abhimanyu Singh
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419

-Implement MemoryOverwriteRequestControlLockSetVariable test
 cases
 -Add Assertions 7 through 16 from SCT spec
 -Add Test Case to MemoryOverwriteRequestFunctionTest

Cc: G Edhaya Chandran 
Cc: Barton Gao 
Cc: Carolyn Gjertsen 

Signed-off-by: Abhi Singh 

Reviewed-by: Stuart Yoder 
---
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
|  50 +++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 |   8 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
|  20 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 | 418 
 4 files changed, 496 insertions(+)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
index 1d6d86ebed07..891f494dbc70 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
@@ -43,6 +43,36 @@ Abstract:
 #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_006_GUID \
 { 0x94811e97, 0x7513, 0x4099, {0xae, 0xb8, 0x5a, 0x7e, 0x7d, 0x50, 0xb4, 0x99 
}}
 
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_007_GUID \
+{ 0x15378290, 0x17dd, 0x4cbf, {0x8e, 0x8f, 0xc2, 0x4b, 0xc9, 0x09, 0xb4, 0x14 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_008_GUID \
+{ 0x5f0b42ef, 0x3cec, 0x46ad, {0xbc, 0x5b, 0xc3, 0x7a, 0x1d, 0x45, 0x41, 0x29 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_009_GUID \
+{ 0x9665c8d9, 0x267c, 0x4393, {0xa4, 0x72, 0x10, 0x54, 0x43, 0x56, 0x20, 0x21 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_010_GUID \
+{ 0xce655812, 0xcc40, 0x42b0, {0x80, 0xd1, 0xa7, 0x26, 0xdb, 0x14, 0x9e, 0xa8 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_011_GUID \
+{ 0xd34348ad, 0x5d46, 0x4961, {0x91, 0x3e, 0xb1, 0xf2, 0xc5, 0xe7, 0x0f, 0x7d 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_012_GUID \
+{ 0x838311e0, 0x419a, 0x4c92, {0x90, 0x60, 0xbf, 0x94, 0x59, 0xd3, 0xc3, 0x59 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_013_GUID \
+{ 0x12998a9c, 0xc863, 0x4572, {0x80, 0x6c, 0xb6, 0x40, 0x97, 0x91, 0x89, 0x7f 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_014_GUID \
+{ 0xebd4ba26, 0x44c3, 0x464a, {0x88, 0xe3, 0x3b, 0x44, 0x94, 0x88, 0xbb, 0xb8 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_015_GUID \
+{ 0x00920c8e, 0x241d, 0x4da0, {0x8b, 0x59, 0xc3, 0xad, 0xe0, 0xd6, 0x4e, 0xc9 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_016_GUID \
+{ 0x169a43cc, 0x23fa, 0x4887, {0x8b, 0x4f, 0x11, 0xb2, 0xa0, 0x88, 0x4f, 0x63 
}}
+
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002;
@@ -54,3 +84,23 @@ extern EFI_GUID 
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid004;
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid005;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid006;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid007;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid008;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid009;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid010;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid011;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid012;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid013;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid014;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid015;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid016;
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
index 46c2c2faa388..553959762be8 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
@@ -49,6 +49,7 @@ typedef struct _RESET_DATA {
 #define MOR_BIT_HIGH  0x1
 
 #define MOR_LOCK_DATA_UNLOCKED0x0
+#define MOR_LOCK_DATA_LOCKED_WITHOUT_KEY  

[edk2-devel] [PATCH v4 4/6] uefi-sct/SctPkg: TCG MORLOCK Unlocked State Test

2024-03-05 Thread Abhimanyu Singh
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419

-Implement MemoryOverwriteRequestControlLock Unlocked State
 test cases
 -Add Assertions 17, 18, 19, and 20 from SCT spec
 -Add Test Case to MemoryOverwriteRequestFunctionTest

Cc: G Edhaya Chandran 
Cc: Barton Gao 
Cc: Carolyn Gjertsen 

Signed-off-by: Abhi Singh 

Reviewed-by: Stuart Yoder 
---
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
|  20 ++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 |   7 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
|   8 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 | 241 +++-
 4 files changed, 275 insertions(+), 1 deletion(-)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
index 891f494dbc70..1ca43a393f29 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
@@ -73,6 +73,18 @@ Abstract:
 #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_016_GUID \
 { 0x169a43cc, 0x23fa, 0x4887, {0x8b, 0x4f, 0x11, 0xb2, 0xa0, 0x88, 0x4f, 0x63 
}}
 
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_017_GUID \
+{ 0x7c11d0ab, 0x7a84, 0x482b, {0xb7, 0x5a, 0xd7, 0x72, 0x6c, 0x3e, 0xae, 0x0e 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_018_GUID \
+{ 0xbbaa52b6, 0x5576, 0x4acd, {0xb9, 0x5f, 0x86, 0x22, 0x5e, 0xfc, 0xb0, 0x31 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_019_GUID \
+{ 0x60b227e0, 0x9f5c, 0x412c, {0x88, 0x79, 0xd3, 0x59, 0xfc, 0xd0, 0xdd, 0x3f 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_020_GUID \
+{ 0x2eba284a, 0xf701, 0x4c19, {0xbe, 0x5c, 0x39, 0x27, 0xb0, 0x68, 0x4f, 0xd7 
}}
+
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002;
@@ -104,3 +116,11 @@ extern EFI_GUID 
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid014;
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid015;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid016;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid017;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid018;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid019;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid020;
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
index 553959762be8..15eedc60f19d 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
@@ -100,6 +100,13 @@ TCGMemoryOverwriteRequestControlLockSetVariable (
   IN RESET_DATA   *ResetData
   );
 
+EFI_STATUS
+TCGMemoryOverwriteRequestControlLockUnlockedState (
+  IN EFI_STANDARD_TEST_LIBRARY_PROTOCOL   *StandardLib,
+  IN EFI_TEST_RECOVERY_LIBRARY_PROTOCOL   *RecoveryLib,
+  IN RESET_DATA   *ResetData
+);
+
 // 
 //   Entry GUIDs for Test
 // 
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
index d861c44e3960..fe8853452979 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
@@ -59,3 +59,11 @@ EFI_GUID 
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid014 = EFI_TEST_TCGMO
 EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid015 = 
EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_015_GUID;
 
 EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid016 = 
EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_016_GUID;
+
+EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid017 = 

[edk2-devel] [PATCH v4 2/6] uefi-sct/SctPkg: TCG MOR SetVariable Test

2024-03-05 Thread Abhimanyu Singh
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419

-Implement MemoryOverwriteRequestControlSetVariable test cases
 -Add Assertions 5 and 6 from SCT spec
 -Add Test Case to MemoryOverwriteRequestFunctionTest

Cc: G Edhaya Chandran 
Cc: Barton Gao 
Cc: Carolyn Gjertsen 

Signed-off-by: Abhi Singh 

Reviewed-by: Stuart Yoder 
---
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
|  10 ++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 |   7 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
|   4 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 | 141 
 4 files changed, 162 insertions(+)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
index a3d87a3eb764..1d6d86ebed07 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
@@ -37,6 +37,12 @@ Abstract:
 #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_004_GUID \
 { 0x002519c6, 0x859f, 0x4d25, {0xb1, 0x36, 0xb2, 0xef, 0x61, 0xe5, 0xd9, 0x6f 
}}
 
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_005_GUID \
+{ 0x13e97668, 0xe905, 0x452d, {0xa0, 0x72, 0x03, 0xde, 0xbf, 0x53, 0xdf, 0xa2 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_006_GUID \
+{ 0x94811e97, 0x7513, 0x4099, {0xae, 0xb8, 0x5a, 0x7e, 0x7d, 0x50, 0xb4, 0x99 
}}
+
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002;
@@ -44,3 +50,7 @@ extern EFI_GUID 
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002;
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid003;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid004;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid005;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid006;
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
index 45bd921ecca4..46c2c2faa388 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
@@ -85,6 +85,13 @@ TCGMemoryOverwriteRequestPlatformResetCheck (
   IN RESET_DATA   *ResetData
   );
 
+EFI_STATUS
+TCGMemoryOverwriteRequestControlSetVariable (
+  IN EFI_STANDARD_TEST_LIBRARY_PROTOCOL   *StandardLib,
+  IN EFI_TEST_RECOVERY_LIBRARY_PROTOCOL   *RecoveryLib,
+  IN RESET_DATA   *ResetData
+  );
+
 // 
 //   Entry GUIDs for Test
 // 
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
index 59c798a710f1..649de8196990 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
@@ -35,3 +35,7 @@ EFI_GUID 
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002 = EFI_TEST_TCGMO
 EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid003 = 
EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_003_GUID;
 
 EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid004 = 
EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_004_GUID;
+
+EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid005 = 
EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_005_GUID;
+
+EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid006 = 
EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_006_GUID;
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
index 8acad88b2365..2b9f5dd93a32 100644
--- 

[edk2-devel] [PATCH v4 1/6] uefi-sct/SctPkg: TCG Platform Reset Check Test

2024-03-05 Thread Abhimanyu Singh
From: "Abhi.Singh" 

SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419

-Implement initial test infrastructure for all test cases
 including updates to: CommonGenFramework.sh, UEFI_SCT.dsc,
 and Category.ini.
-Add Guid.c and Guid.h files to cover the assertions 4/49
 assertions defined in the SCT spec
-Add TCGMemoryOverwriteRequestBBTestMain.h alongside used
 define/global variables
-Add Platform Reset Check Test
 -check if the platform creates the MOR & MORLOCK
  EFI variables as defined in the TCG Spec
 -sets MOR bit 0 and validate if the platform
  clears the MOR bit 0 upon reset.

Cc: G Edhaya Chandran 
Cc: Barton Gao 
Cc: Carolyn Gjertsen 

Signed-off-by: Abhi Singh 

Reviewed-by: Stuart Yoder 
---
 uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc  
|   1 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf
   |  53 +++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
|  46 ++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 |  95 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
|  37 ++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 | 451 
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.c
 | 115 +
 uefi-sct/SctPkg/CommonGenFramework.sh  
|   1 +
 uefi-sct/SctPkg/Config/Data/Category.ini   
|   7 +
 9 files changed, 806 insertions(+)

diff --git a/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc 
b/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc
index 155490fa39d3..536d5f2ed37a 100644
--- a/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc
+++ b/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc
@@ -235,6 +235,7 @@ [Components]
 
SctPkg/TestCase/UEFI/EFI/RuntimeServices/MiscRuntimeServices/BlackBoxTest/MiscRuntimeServicesBBTest.inf
 
SctPkg/TestCase/UEFI/EFI/RuntimeServices/TimeServices/BlackBoxTest/TimeServicesBBTest.inf
 
SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTest/VariableServicesBBTest.inf
+SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf
 
 
SctPkg/TestCase/UEFI/EFI/Protocol/GraphicsOutput/BlackBoxTest/GraphicsOutputBBTest.inf
 SctPkg/TestCase/UEFI/EFI/Protocol/Bis/BlackBoxTest/BisBBTest.inf
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf
new file mode 100644
index ..35d82043e2e7
--- /dev/null
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf
@@ -0,0 +1,53 @@
+## @file
+#
+#  Copyright 2006 - 2015 Unified EFI, Inc.
+#  Copyright (c) 2013, Intel Corporation. All rights reserved.
+#  Copyright (c) 2023, Arm Inc. All rights reserved.
+#
+#  This program and the accompanying materials
+#  are licensed and made available under the terms and conditions of the BSD 
License
+#  which accompanies this distribution.  The full text of the license may be 
found at
+#  http://opensource.org/licenses/bsd-license.php
+#
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+#
+##
+#/*++
+#
+# Module Name:
+#
+#   TCGMemoryOverwriteRequestBBTest.inf
+#
+# Abstract:
+#
+#   Component description file for TCG MemoryOverwriteRequest UEFI variables 
Test.
+#
+#--*/
+
+[defines]
+  INF_VERSION  = 0x00010005
+  BASE_NAME= TCGMemoryOverwriteRequestBBTest
+  FILE_GUID= ACA989CD-4AEE-45A3-B80F-E9A523BB7164
+  MODULE_TYPE  = UEFI_DRIVER
+  VERSION_STRING   = 1.0
+  ENTRY_POINT  = InitializeTestTCGMemoryOverwriteRequest
+
+[sources.common]
+  TCGMemoryOverwriteRequestBBTestMain.c
+  TCGMemoryOverwriteRequestBBTestMain.h
+  TCGMemoryOverwriteRequestBBTestFunction.c
+  Guid.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  SctPkg/SctPkg.dec
+  SctPkg/UEFI/UEFI.dec
+
+[LibraryClasses]
+  UefiDriverEntryPoint
+  SctLib
+  EfiTestLib
+
+[Protocols]
+  gEfiTestRecoveryLibraryGuid
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
 

[edk2-devel] [PATCH v4 0/6] EDK2-TEST TCG MOR Tests

2024-03-05 Thread Abhimanyu Singh
Updates after feedback from Heinrich 

-updated deprecated useage of HandleProtocol() to OpenProtocol().
-added checks for unexpected values for Step and CheckpointStep values.
-added check if system fails to cold reset, returns EFI_DEVICE_ERROR.
-cast Attributes to (UINTN) when passing to RecordAssertion.
-ack test is still missing a pattern write to memory and then check
 for clear upon reset.

Patch series:
These tests support platform firmware that implement
MemoryOverwriteRequestControl & MemoryOverwriteRequestControlLock
UEFI variables in accordance with TCG PC Platform Reset Attack
Mitigation Specification.

The patches are split according to the six sections
documented in the SCT spec document referenced below.

SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419

PR: https://github.com/tianocore/edk2-test/pull/90

Cc: G Edhaya Chandran 
Cc: Barton Gao 
Cc: Carolyn Gjertsen 
Cc: Stuart Yoder 
Cc: Heinrich Schuchardt 

Abhi Singh (5):
  uefi-sct/SctPkg: TCG MOR SetVariable Test
  uefi-sct/SctPkg: TCG MORLOCK SetVariable Test
  uefi-sct/SctPkg: TCG MORLOCK Unlocked State Test
  uefi-sct/SctPkg: TCG MORLOCK Locked No Key State Test
  uefi-sct/SctPkg: TCG MORLOCK Locked with Key State Test

Abhi.Singh (1):
  uefi-sct/SctPkg: TCG Platform Reset Check Test

 uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc  
|1 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf
   |   53 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
|  271 +++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 |  137 ++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
|  127 ++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 | 2390 
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.c
 |  115 +
 uefi-sct/SctPkg/CommonGenFramework.sh  
|1 +
 uefi-sct/SctPkg/Config/Data/Category.ini   
|7 +
 9 files changed, 3102 insertions(+)
 create mode 100644 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf
 create mode 100644 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
 create mode 100644 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 create mode 100644 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
 create mode 100644 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 create mode 100644 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.c

-- 
2.34.1



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




Re: [edk2-devel] [edk2-redfish-client][PATCH 00/13] use Redfish HTTP protocol

2024-03-05 Thread Igor Kulchytskyy via groups.io
Reviewed-by: Igor Kulchytskyy 
Whole patch reviewed
Regards,
Igor

-Original Message-
From: Nickle Wang 
Sent: Thursday, February 29, 2024 3:53 AM
To: devel@edk2.groups.io
Cc: Abner Chang ; Igor Kulchytskyy 
Subject: [EXTERNAL] [edk2-redfish-client][PATCH 00/13] use Redfish HTTP protocol


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

Redfish HTTP protocol is introduced to edk2 RedfishPkg. Update
RedfishClientPkg to use RedfishHttpLib. And remove the use of
RedfishHttpCacheLib.

I also replace several functions from RedfishLib with the function
provided in RedfishHttpLib. In this way, there is no dependency on
RedfishLib in RedfishClientPkg.

I noticed that there is false alarm in uncrustify check. When there
are deleted files, uncrustiry cannot check them and trigger uncrustify
failure.

Pull request is created here for testing CI:
https://github.com/tianocore/edk2-redfish-client/pull/79

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 

Nickle Wang (13):
  RedfishClientPkg/.github: do not run uncrustify to deleted file.
  RedfishClientPkg: remove RedfishHttpCacheLib
  RedfishClientPkg: ues RedfishHttpLib
  RedfishClientPkg/RedfishResourceConfigLib: ues RedfishHttpLib
  RedfishClientPkg/RedfishFeatureUtilityLib: ues RedfishHttpLib
  RedfishClientPkg/RedfishVersionLib: ues RedfishHttpLib
  RedfishClientPkg/BiosDxe: ues RedfishHttpLib
  RedfishClientPkg/BootOptionDxe: ues RedfishHttpLib
  RedfishClientPkg/BootOptionCollectionDxe: ues RedfishHttpLib
  RedfishClientPkg/ComputerSystemDxe: ues RedfishHttpLib
  RedfishClientPkg/ComputerSystemCollectionDxe: ues RedfishHttpLib
  RedfishClientPkg/MemoryDxe: ues RedfishHttpLib
  RedfishClientPkg/MemoryCollectionDxe: ues RedfishHttpLib

 RedfishClientPkg/RedfishClientPkg.dec |   1 -
 RedfishClientPkg/RedfishClientLibs.dsc.inc|   2 +-
 RedfishClientPkg/RedfishClientPkg.dsc |   1 -
 .../Features/Bios/v1_0_9/Dxe/BiosDxe.inf  |   3 +-
 .../BootOption/v1_0_4/Dxe/BootOptionDxe.inf   |   5 +-
 .../BootOptionCollectionDxe.inf   |   5 +-
 .../v1_13_0/Dxe/ComputerSystemDxe.inf |   3 +-
 .../v1_5_0/Dxe/ComputerSystemDxe.inf  |   3 +-
 .../ComputerSystemCollectionDxe.inf   |   3 +-
 .../Features/Memory/V1_7_1/Dxe/MemoryDxe.inf  |   3 +-
 .../MemoryCollectionDxe.inf   |   3 +-
 .../EdkIIRedfishResourceConfigLib.inf |   2 +-
 .../RedfishFeatureUtilityLib.inf  |   3 +-
 .../RedfishHttpCacheLib.inf   |  48 --
 .../RedfishVersionLib/RedfishVersionLib.inf   |   3 +-
 .../Library/EdkIIRedfishResourceConfigLib.h   |   4 +-
 .../Library/RedfishFeatureUtilityLib.h|  46 +-
 .../Include/Library/RedfishHttpCacheLib.h |  59 --
 .../Include/RedfishCollectionCommon.h |   3 +-
 .../Include/RedfishResourceCommon.h   |   3 +-
 .../RedfishFeatureUtilityInternal.h   |   3 +-
 .../RedfishHttpCacheLibInternal.h |  63 --
 .../Features/Bios/v1_0_9/Common/BiosCommon.c  |  92 +--
 .../Features/Bios/v1_0_9/Dxe/BiosDxe.c| 113 +--
 .../v1_0_4/Common/BootOptionCommon.c  |  45 +-
 .../BootOption/v1_0_4/Dxe/BootOptionDxe.c |  86 +-
 .../BootOptionCollectionDxe.c |  26 +-
 .../v1_13_0/Common/ComputerSystemCommon.c |  68 +-
 .../v1_13_0/Dxe/ComputerSystemDxe.c   |  85 +-
 .../v1_5_0/Common/ComputerSystemCommon.c  |  68 +-
 .../v1_5_0/Dxe/ComputerSystemDxe.c|  84 +-
 .../ComputerSystemCollectionDxe.c |  15 +-
 .../Memory/V1_7_1/Common/MemoryCommon.c   |  86 +-
 .../Features/Memory/V1_7_1/Dxe/MemoryDxe.c| 111 +--
 .../MemoryCollectionDxe/MemoryCollectionDxe.c |  15 +-
 .../EdkIIRedfishResourceConfigLib.c   |   6 +-
 .../RedfishFeatureUtilityLib.c| 182 +---
 .../RedfishHttpCacheLib/RedfishHttpCacheLib.c | 774 --
 .../RedfishVersionLib/RedfishVersionLib.c |  24 +-
 .github/workflows/uncrustify-check.sh |  17 +-
 40 files changed, 328 insertions(+), 1838 deletions(-)
 delete mode 100644 
RedfishClientPkg/Library/RedfishHttpCacheLib/RedfishHttpCacheLib.inf
 delete mode 100644 RedfishClientPkg/Include/Library/RedfishHttpCacheLib.h
 delete mode 100644 
RedfishClientPkg/Library/RedfishHttpCacheLib/RedfishHttpCacheLibInternal.h
 delete mode 100644 
RedfishClientPkg/Library/RedfishHttpCacheLib/RedfishHttpCacheLib.c

--
2.34.1

-The information contained in this message may be confidential and proprietary 
to American Megatrends (AMI). This communication is intended to be read only by 
the individual or entity to whom it is addressed or by their designee. If the 
reader of this message is not the intended recipient, you are on notice that 
any distribution of this message, in any form, is strictly prohibited. Please 
promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and 
then 

Re: [edk2-devel] [edk2-redfish-client][PATCH 00/13] use Redfish HTTP protocol

2024-03-05 Thread Igor Kulchytskyy via groups.io
Hi Nickle,
Sorry, for late response.
AMI does not use RedfishLib in RedfishClientPkg, but library in RedfishPkg used.
Thank you,
Igor


From: Nickle Wang 
Sent: Thursday, February 29, 2024 8:24 PM
To: Mike Maslenkin ; devel@edk2.groups.io; Igor 
Kulchytskyy 
Cc: Abner Chang 
Subject: [EXTERNAL] RE: [edk2-devel] [edk2-redfish-client][PATCH 00/13] use 
Redfish HTTP protocol


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

Hi Mike,



> May I know why didn't you remove

> RedfishClientPkg/PrivateLibrary/RedfishLib completely?



Yes, Abner and I had discussed this before. RedfishLib brings some difficulty 
to maintain because it is private library in two separated repositories.



Before we go and remove it, we like to make sure that no one is using it. @Igor 
Kulchytskyy, if my memory serves me well, you mentioned 
that AMI is using RedfishLib. Is it ok for us to remove RedfishLib in 
RedfishCientPkg (not RedfishPkg)?



Thanks,

Nickle



> -Original Message-

> From: Mike Maslenkin 
> mailto:mike.maslen...@gmail.com>>

> Sent: Friday, March 1, 2024 8:08 AM

> To: devel@edk2.groups.io; Nickle Wang 
> mailto:nick...@nvidia.com>>

> Cc: Abner Chang mailto:abner.ch...@amd.com>>; Igor 
> Kulchytskyy mailto:ig...@ami.com>>

> Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH 00/13] use Redfish HTTP

> protocol

>

> External email: Use caution opening links or attachments

>

>

> Good work, Nickle!

>

> On Thu, Feb 29, 2024 at 11:53 AM Nickle Wang via groups.io

> mailto:nicklew=nvidia@groups.io>> wrote:

> >

> > Redfish HTTP protocol is introduced to edk2 RedfishPkg. Update

> > RedfishClientPkg to use RedfishHttpLib. And remove the use of

> > RedfishHttpCacheLib.

> >

> > I also replace several functions from RedfishLib with the function

> > provided in RedfishHttpLib. In this way, there is no dependency on

> > RedfishLib in RedfishClientPkg.

>

> May I know why didn't you remove

> RedfishClientPkg/PrivateLibrary/RedfishLib completely?

> I've been looking at this library for a long time and started improving it 
> with this

> set.

> Eventually I realized that the improved functions are not used in 
> RedfishClientPkg.

> Then I just deleted RedfishClientPkg/PrivateLibrary and

> RedfishClientPkg/PrivateInclude/Library/RedfishLib.h,

> tuned the dec and dsc files, and I successfully built the package.

> Removing this library is a big improvement since it duplicates RedfishLib from

> RedfishPkg.

> and their headers no longer conflict.

>

> Regards,

> Mike.

>

>

> >

> > I noticed that there is false alarm in uncrustify check. When there

> > are deleted files, uncrustiry cannot check them and trigger uncrustify

> > failure.

> >

> > Pull request is created here for testing CI:

> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith

> > ub.com%2Ftianocore%2Fedk2-redfish-

> client%2Fpull%2F79=05%7C02%7Cni

> >

> cklew%40nvidia.com%7C44d7d139b40b4acff94508dc3983b3df%7C43083d1572

> 7340

> >

> c1b7db39efd9ccc17a%7C0%7C0%7C638448485034820142%7CUnknown%7CTW

> FpbGZsb3

> >

> d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D

> %7

> >

> C0%7C%7C%7C=ocqaIR0%2BtKvx8ETphWlWFX2uZIQbQvDKWkn7D36c2z

> 0%3D

> > erved=0

> >

> > Signed-off-by: Nickle Wang mailto:nick...@nvidia.com>>

> > Cc: Abner Chang mailto:abner.ch...@amd.com>>

> > Cc: Igor Kulchytskyy mailto:ig...@ami.com>>

> >

> > Nickle Wang (13):

> >   RedfishClientPkg/.github: do not run uncrustify to deleted file.

> >   RedfishClientPkg: remove RedfishHttpCacheLib

> >   RedfishClientPkg: ues RedfishHttpLib

> >   RedfishClientPkg/RedfishResourceConfigLib: ues RedfishHttpLib

> >   RedfishClientPkg/RedfishFeatureUtilityLib: ues RedfishHttpLib

> >   RedfishClientPkg/RedfishVersionLib: ues RedfishHttpLib

> >   RedfishClientPkg/BiosDxe: ues RedfishHttpLib

> >   RedfishClientPkg/BootOptionDxe: ues RedfishHttpLib

> >   RedfishClientPkg/BootOptionCollectionDxe: ues RedfishHttpLib

> >   RedfishClientPkg/ComputerSystemDxe: ues RedfishHttpLib

> >   RedfishClientPkg/ComputerSystemCollectionDxe: ues RedfishHttpLib

> >   RedfishClientPkg/MemoryDxe: ues RedfishHttpLib

> >   RedfishClientPkg/MemoryCollectionDxe: ues RedfishHttpLib

> >

> >  RedfishClientPkg/RedfishClientPkg.dec |   1 -

> >  RedfishClientPkg/RedfishClientLibs.dsc.inc|   2 +-

> >  RedfishClientPkg/RedfishClientPkg.dsc |   1 -

> >  .../Features/Bios/v1_0_9/Dxe/BiosDxe.inf  |   3 +-

> 

Re: [edk2-devel] [PATCH v2 6/6] uefi-sct/SctPkg: TCG2 Protocol: add SubmitCommand test

2024-03-05 Thread G Edhaya Chandran
Reviewed-by: G Edhaya Chandran 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116403): https://edk2.groups.io/g/devel/message/116403
Mute This Topic: https://groups.io/mt/103625307/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 5/6] uefi-sct/SctPkg: TCG2 Protocol: add GetEventLog test

2024-03-05 Thread G Edhaya Chandran
Reviewed-by: G Edhaya Chandran 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116402): https://edk2.groups.io/g/devel/message/116402
Mute This Topic: https://groups.io/mt/103625306/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 4/6] uefi-sct/SctPkg: TCG2 Protocol: add HashLogExtendEvent test

2024-03-05 Thread G Edhaya Chandran
Reviewed-by: G Edhaya Chandran 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116401): https://edk2.groups.io/g/devel/message/116401
Mute This Topic: https://groups.io/mt/103625303/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 3/6] uefi-sct/SctPkg: TCG2 Protocol: add GetActivePcrBanks test

2024-03-05 Thread G Edhaya Chandran
Reviewed-by: G Edhaya Chandran 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116400): https://edk2.groups.io/g/devel/message/116400
Mute This Topic: https://groups.io/mt/103625301/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 2/6] uefi-sct/SctPkg: TCG2 Protocol: add test infrastructure and GetCapability Test

2024-03-05 Thread G Edhaya Chandran
Reviewed-by: G Edhaya Chandran 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116399): https://edk2.groups.io/g/devel/message/116399
Mute This Topic: https://groups.io/mt/103625304/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 1/6] uefi-sct/SctPkg: TCG2 Protocol: add header with TCG2 protocol definitions

2024-03-05 Thread G Edhaya Chandran
Reviewed-by: G Edhaya Chandran 


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




Re: [edk2-devel] [PATCH v2 0/6] Tests for TCG2 Protocol

2024-03-05 Thread G Edhaya Chandran
Hi Stuart,
Thank you for the contribution on TCG2 protocol. They significantly improve the 
coverage of edk2-test.

Reviewed-by: G Edhaya Chandran 


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




Re: [edk2-devel] [PATCH v1 1/6] uefi-sct/SctPkg: TCG2 Protocol: add header with TCG2 protocol definitions

2024-03-05 Thread Stuart Yoder




On 12/15/23 8:30 AM, Heinrich Schuchardt wrote:

On 12/15/23 00:39, Stuart Yoder wrote:

From: Joseph Hemann 


Please, provide commit messages.


This is fixed in v2 of the patch series. (Sent Jan 9)

Thanks,
Stuart


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




Re: 回复: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Warn if out of flash space when writing variables

2024-03-05 Thread Laszlo Ersek
On 3/5/24 13:44, Oliver Steffen wrote:

> The root cause is of course not addressed by this, but it might also be
> hard to solve. One would have to identify obsolete network/hardware
> settings somehow, but there is no way to tell if a certain NIC/MAC
> might come back at a later point or not.

Tricky because, even if you could identify a non-volatile variable named
after a MAC that matched *no* NIC in the system, you still might not
want to remove that variable. What if the user unplugged the NIC only
temporarily, and "wanted their settings back" upon re-plugging the NIC?

Laszlo



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




Re: [edk2-devel] [staging/dynamictables-reorg PATCH v1 0/2] DynamicTablesPkg: Arch Common Namespace

2024-03-05 Thread Abdul Lateef Attar via groups.io

Hi Pierre,

    Thanks for reaching out, my patches are non-disruptive (wont impact 
existing ARM code base).


I think lets review and integrate to main branch.

Thanks

AbduL


On 05-03-2024 19:33, Pierre Gondois wrote:
Caution: This message originated from an External Source. Use proper 
caution when opening attachments, clicking links, or responding.



Hello Adblu,
Thanks for the patches.

As the staging branch will see a lot of code changes,
it would be not integrate new objects in the next weeks.
Would it be possible to delay a bit the integration of your patches ?

Regards,
Pierre

On 3/5/24 12:09, Attar, AbdulLateef (Abdul Lateef) wrote:

Hi Sami, Sunil,

  Yesterday I submitted few patches on main branch; I'll port those
changes to this staging branch.

Currently from AMD X64 perspective I'm working on ACPI tables, once that
is done, then will move to smbios tables.

Thanks

AbduL


On 05-03-2024 16:22, Sunil V L wrote:
Caution: This message originated from an External Source. Use proper 
caution when opening attachments, clicking links, or responding.



Hi Sami,

On Mon, Mar 04, 2024 at 04:46:15PM +, Sami Mujawar wrote:

This series is an initial proposal for introducing an Arch Common
namespace. Based on the mailing list discussions, further patch
series to move the configuration manager objects to the Arch
Common namespace and the corresponding platform support patches
shall be submitted for review.

The changes can be seen at:
https://github.com/samimujawar/edk2/tree/3007_dynamictables_reorg_arch_namespace_v1 




Looks good to me.

Reviewed-by: Sunil V L 

How do we plan creating further patches? I am fine with any approach 
you

suggest but don't want to duplicate effort. I think it would be helpful
to know whether someone is already working on it.

Thanks!
Sunil



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116394): https://edk2.groups.io/g/devel/message/116394
Mute This Topic: https://groups.io/mt/104726066/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 4/4] SG2042Pkg/Sec: clean up ProcessLibraryConstructorList() decl

2024-03-05 Thread Sunil V L
On Tue, Mar 05, 2024 at 01:01:26PM +0100, Laszlo Ersek wrote:
>  declares a bogus
> ProcessLibraryConstructorList() for the SG2042Pkg SEC module. Rely on
> AutoGen for (properly) declaring ProcessLibraryConstructorList(). Remove
> the correct, but superfluous, declaration as well.
> 
> Build-tested with:
> 
>   build -a RISCV64 -b DEBUG -m Silicon/Sophgo/SG2042Pkg/Sec/SecMain.inf \
> -p Platform/Sophgo/SG2042_EVB_Board/SG2042.dsc -t GCC5
> 
> Cc: Sunil V L 
> Cc: USER0FISH 
> Cc: caiyuqing379 
> Cc: dahogn 
> Cc: meng-cz 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
> Signed-off-by: Laszlo Ersek 
> ---
>  Silicon/Sophgo/SG2042Pkg/Sec/SecMain.inf |  2 +-
>  Silicon/Sophgo/SG2042Pkg/Sec/SecMain.h   | 12 
>  Silicon/Sophgo/SG2042Pkg/Sec/Memory.c|  1 -
>  3 files changed, 1 insertion(+), 14 deletions(-)
> 
Reviewed-by: Sunil V L 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116393): https://edk2.groups.io/g/devel/message/116393
Mute This Topic: https://groups.io/mt/104742763/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 04/10] OvmfPkg/RiscVVirt/Sec: clean up ProcessLibraryConstructorList() decl

2024-03-05 Thread Sunil V L
On Tue, Mar 05, 2024 at 12:38:37PM +0100, Laszlo Ersek wrote:
>  declares a bogus
> ProcessLibraryConstructorList() for the OvmfPkg/RiscVVirt SEC module. Rely
> on AutoGen for (properly) declaring ProcessLibraryConstructorList().
> Remove the correct, but superfluous, declaration as well.
> 
> Build-tested with:
> 
>   build -a RISCV64 -b DEBUG -m OvmfPkg/RiscVVirt/Sec/SecMain.inf \
> -p OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc -t GCC5
> 
> Cc: Andrei Warkentin 
> Cc: Ard Biesheuvel 
> Cc: Gerd Hoffmann 
> Cc: Jiewen Yao 
> Cc: Sunil V L 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
> Signed-off-by: Laszlo Ersek 
> ---
>  OvmfPkg/RiscVVirt/Sec/SecMain.inf |  2 +-
>  OvmfPkg/RiscVVirt/Sec/SecMain.h   | 12 
>  OvmfPkg/RiscVVirt/Sec/Memory.c|  1 -
>  3 files changed, 1 insertion(+), 14 deletions(-)
> 
Reviewed-by: Sunil V L 


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




Re: [edk2-devel] [staging/dynamictables-reorg PATCH v1 0/2] DynamicTablesPkg: Arch Common Namespace

2024-03-05 Thread PierreGondois

Hello Adblu,
Thanks for the patches.

As the staging branch will see a lot of code changes,
it would be not integrate new objects in the next weeks.
Would it be possible to delay a bit the integration of your patches ?

Regards,
Pierre

On 3/5/24 12:09, Attar, AbdulLateef (Abdul Lateef) wrote:

Hi Sami, Sunil,

      Yesterday I submitted few patches on main branch; I'll port those
changes to this staging branch.

Currently from AMD X64 perspective I'm working on ACPI tables, once that
is done, then will move to smbios tables.

Thanks

AbduL


On 05-03-2024 16:22, Sunil V L wrote:

Caution: This message originated from an External Source. Use proper caution 
when opening attachments, clicking links, or responding.


Hi Sami,

On Mon, Mar 04, 2024 at 04:46:15PM +, Sami Mujawar wrote:

This series is an initial proposal for introducing an Arch Common
namespace. Based on the mailing list discussions, further patch
series to move the configuration manager objects to the Arch
Common namespace and the corresponding platform support patches
shall be submitted for review.

The changes can be seen at:
https://github.com/samimujawar/edk2/tree/3007_dynamictables_reorg_arch_namespace_v1


Looks good to me.

Reviewed-by: Sunil V L 

How do we plan creating further patches? I am fine with any approach you
suggest but don't want to duplicate effort. I think it would be helpful
to know whether someone is already working on it.

Thanks!
Sunil



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116391): https://edk2.groups.io/g/devel/message/116391
Mute This Topic: https://groups.io/mt/104726066/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 3/4] LoongArchQemuPkg: auto-gen & fix SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Chao Li

Hi Laszlo,

If the SPEC and BaseTools are ready, then then that's fine with me.

Reviewed-by: Chao Li 


Thanks,
Chao
On 2024/3/5 20:01, Laszlo Ersek wrote:

 declares a bogus
ProcessLibraryConstructorList() for LoongArchQemuPkg's SEC module. Rely on
AutoGen for (properly) declaring ProcessLibraryConstructorList(). Update
the call.

Build-tested with:

   build -a LOONGARCH64 -b DEBUG \
 -m Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf \
 -p Platform/Loongson/LoongArchQemuPkg/Loongson.dsc -t GCC5

Cc: Bibo Mao
Cc: Chao Li
Cc: Xianglai li
Ref:https://bugzilla.tianocore.org/show_bug.cgi?id=990
Signed-off-by: Laszlo Ersek
---
  Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf | 2 +-
  Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.c   | 3 +--
  2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf 
b/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf
index c0d5439d5379..bb86c7c77471 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf
+++ b/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf
@@ -8,7 +8,7 @@
  ##
  
  [Defines]

-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
BASE_NAME  = SecMain
FILE_GUID  = 57d02d4f-5a5d-4bfa-b7d6-ba0a4d2c72ce
MODULE_TYPE= SEC
diff --git a/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.c 
b/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.c
index 3f1998c48c12..50d898859a99 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.c
+++ b/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.c
@@ -9,7 +9,6 @@
  
  #include 
  
-#include 

  #include 
  #include 
  #include 
@@ -378,7 +377,7 @@ SecCoreStartupWithStack (
  
DEBUG ((DEBUG_INFO, "Entering C environment\n"));
  
-  ProcessLibraryConstructorList (NULL, NULL);

+  ProcessLibraryConstructorList ();
  
DEBUG ((DEBUG_INFO,

  "SecCoreStartupWithStack (0x%lx, 0x%lx)\n",









-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116390): https://edk2.groups.io/g/devel/message/116390
Mute This Topic: https://groups.io/mt/104742760/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 05/10] ArmPlatformPkg: auto-generate SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Ard Biesheuvel
On Tue, 5 Mar 2024 at 12:39, Laszlo Ersek  wrote:
>
> Rely on AutoGen for declaring ProcessLibraryConstructorList().
>
> Build-tested with:
>
>   build -a AARCH64 -b DEBUG \
> -m ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf \
> -p ArmPlatformPkg/ArmPlatformPkg.dsc -t GCC5
>
>   build -a AARCH64 -b DEBUG \
> -m ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf \
> -p ArmPlatformPkg/ArmPlatformPkg.dsc -t GCC5
>
>   build -a AARCH64 -b DEBUG \
> -m ArmPlatformPkg/PrePi/PeiMPCore.inf \
> -p ArmPlatformPkg/ArmPlatformPkg.dsc -t GCC5
>
>   build -a AARCH64 -b DEBUG \
> -m ArmPlatformPkg/PrePi/PeiUniCore.inf \
> -p ArmPlatformPkg/ArmPlatformPkg.dsc -t GCC5
>
> Cc: Ard Biesheuvel 
> Cc: Leif Lindholm 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
> Signed-off-by: Laszlo Ersek 
> ---
>  ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf  |  2 +-
>  ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf |  2 +-
>  ArmPlatformPkg/PrePi/PeiMPCore.inf  |  2 +-
>  ArmPlatformPkg/PrePi/PeiUniCore.inf |  2 +-
>  ArmPlatformPkg/PrePeiCore/PrePeiCore.h  | 10 --
>  ArmPlatformPkg/PrePi/PrePi.h|  6 --
>  6 files changed, 4 insertions(+), 20 deletions(-)
>

Reviewed-by: Ard Biesheuvel 

> diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf 
> b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
> index 4a3112b58dcb..c5cad7e37fbd 100644
> --- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
> +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
> @@ -8,7 +8,7 @@
>  #**/
>
>  [Defines]
> -  INF_VERSION= 0x00010005
> +  INF_VERSION= 1.30
>BASE_NAME  = ArmPlatformPrePeiCore
>FILE_GUID  = b78d02bb-d0b5-4389-bc7f-b39ee846c784
>MODULE_TYPE= SEC
> diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf 
> b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
> index ab5bf1dac2d8..1d50b4d0b5f2 100644
> --- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
> +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
> @@ -8,7 +8,7 @@
>  #**/
>
>  [Defines]
> -  INF_VERSION= 0x00010005
> +  INF_VERSION= 1.30
>BASE_NAME  = ArmPlatformPrePeiCore
>FILE_GUID  = 469fc080-aec1-11df-927c-0002a5d5c51b
>MODULE_TYPE= SEC
> diff --git a/ArmPlatformPkg/PrePi/PeiMPCore.inf 
> b/ArmPlatformPkg/PrePi/PeiMPCore.inf
> index a613b24c340e..0b13b723539c 100644
> --- a/ArmPlatformPkg/PrePi/PeiMPCore.inf
> +++ b/ArmPlatformPkg/PrePi/PeiMPCore.inf
> @@ -8,7 +8,7 @@
>  #**/
>
>  [Defines]
> -  INF_VERSION= 0x00010005
> +  INF_VERSION= 1.30
>BASE_NAME  = ArmPlatformPrePiMPCore
>FILE_GUID  = d959e387-7b91-452c-90e0-a1dbac90ddb8
>MODULE_TYPE= SEC
> diff --git a/ArmPlatformPkg/PrePi/PeiUniCore.inf 
> b/ArmPlatformPkg/PrePi/PeiUniCore.inf
> index b62ea3c485bd..2e237172d571 100644
> --- a/ArmPlatformPkg/PrePi/PeiUniCore.inf
> +++ b/ArmPlatformPkg/PrePi/PeiUniCore.inf
> @@ -9,7 +9,7 @@
>  #**/
>
>  [Defines]
> -  INF_VERSION= 0x00010005
> +  INF_VERSION= 1.30
>BASE_NAME  = ArmPlatformPrePiUniCore
>FILE_GUID  = 3e401783-cc94-4fcd-97bc-bd35ac369d2f
>MODULE_TYPE= SEC
> diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h 
> b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
> index c1e13e23e11e..fbf6207db816 100644
> --- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
> +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
> @@ -73,14 +73,4 @@ PeiCommonExceptionEntry (
>IN UINTN   LR
>);
>
> -/*
> - * Autogenerated function that calls the library constructors for all of the
> - * module's dependent libraries.
> - */
> -VOID
> -EFIAPI
> -ProcessLibraryConstructorList (
> -  VOID
> -  );
> -
>  #endif
> diff --git a/ArmPlatformPkg/PrePi/PrePi.h b/ArmPlatformPkg/PrePi/PrePi.h
> index 6074a22108d2..1d47ba26be3a 100644
> --- a/ArmPlatformPkg/PrePi/PrePi.h
> +++ b/ArmPlatformPkg/PrePi/PrePi.h
> @@ -79,10 +79,4 @@ ArchInitialize (
>VOID
>);
>
> -VOID
> -EFIAPI
> -ProcessLibraryConstructorList (
> -  VOID
> -  );
> -
>  #endif /* _PREPI_H_ */
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116389): https://edk2.groups.io/g/devel/message/116389
Mute This Topic: https://groups.io/mt/104742525/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 06/10] ArmVirtPkg: auto-generate SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Ard Biesheuvel
On Tue, 5 Mar 2024 at 12:39, Laszlo Ersek  wrote:
>
> Rely on AutoGen for declaring ProcessLibraryConstructorList().
>
> Build-tested with:
>
>   build -a AARCH64 -b DEBUG \
> -m ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf \
> -p ArmVirtPkg/ArmVirtKvmTool.dsc -t GCC5
>
> Cc: Ard Biesheuvel 
> Cc: Gerd Hoffmann 
> Cc: Leif Lindholm 
> Cc: Sami Mujawar 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
> Signed-off-by: Laszlo Ersek 
> ---
>  ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf | 2 +-
>  ArmVirtPkg/PrePi/PrePi.c| 6 --
>  2 files changed, 1 insertion(+), 7 deletions(-)
>

Reviewed-by: Ard Biesheuvel 


> diff --git a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf 
> b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
> index 6b9244bd1a6b..578ee37e7467 100755
> --- a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
> +++ b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
> @@ -8,7 +8,7 @@
>  #**/
>
>  [Defines]
> -  INF_VERSION= 0x00010005
> +  INF_VERSION= 1.30
>BASE_NAME  = ArmVirtPrePiUniCoreRelocatable
>FILE_GUID  = f7d9fd14-9335-4389-80c5-334d6abfcced
>MODULE_TYPE= SEC
> diff --git a/ArmVirtPkg/PrePi/PrePi.c b/ArmVirtPkg/PrePi/PrePi.c
> index ff51a757a21a..f27e0ad3d223 100755
> --- a/ArmVirtPkg/PrePi/PrePi.c
> +++ b/ArmVirtPkg/PrePi/PrePi.c
> @@ -22,12 +22,6 @@
>
>  #include "PrePi.h"
>
> -VOID
> -EFIAPI
> -ProcessLibraryConstructorList (
> -  VOID
> -  );
> -
>  VOID
>  PrePiMain (
>IN  UINTN   UefiMemoryBase,
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116388): https://edk2.groups.io/g/devel/message/116388
Mute This Topic: https://groups.io/mt/104742526/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/4] BeagleBoardPkg: auto-generate SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Ard Biesheuvel
On Tue, 5 Mar 2024 at 13:01, Laszlo Ersek  wrote:
>
> Rely on AutoGen for declaring ProcessLibraryConstructorList().
>
> Build-tested with:
>
>   build -a ARM -b DEBUG \
> -m Platform/BeagleBoard/BeagleBoardPkg/PrePi/PeiUniCore.inf \
> -p Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc -t GCC5
>
> Cc: Ard Biesheuvel 
> Cc: Leif Lindholm 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
> Signed-off-by: Laszlo Ersek 

Reviewed-by: Ard Biesheuvel 

> ---
>  Platform/BeagleBoard/BeagleBoardPkg/PrePi/PeiUniCore.inf | 2 +-
>  Platform/BeagleBoard/BeagleBoardPkg/PrePi/PrePi.h| 6 --
>  2 files changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PeiUniCore.inf 
> b/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PeiUniCore.inf
> index 414091957cb2..03d8f4daab48 100644
> --- a/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PeiUniCore.inf
> +++ b/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PeiUniCore.inf
> @@ -9,7 +9,7 @@
>  #**/
>
>  [Defines]
> -  INF_VERSION= 0x0001001A
> +  INF_VERSION= 1.30
>BASE_NAME  = BeagleBoardPrePiUniCore
>FILE_GUID  = 8a5dc3de-fe31-4ad9-9c93-dd73626932e7
>MODULE_TYPE= SEC
> diff --git a/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PrePi.h 
> b/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PrePi.h
> index b64dd764a435..a2932f0f5116 100644
> --- a/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PrePi.h
> +++ b/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PrePi.h
> @@ -81,10 +81,4 @@ ArchInitialize (
>VOID
>);
>
> -VOID
> -EFIAPI
> -ProcessLibraryConstructorList (
> -  VOID
> -  );
> -
>  #endif /* _PREPI_H_ */
>


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




Re: 回复: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Warn if out of flash space when writing variables

2024-03-05 Thread Oliver Steffen
Quoting Laszlo Ersek (2024-03-05 08:33:57)
> On 3/5/24 01:40, gaoliming via groups.io wrote:
> > Oliver:
> >   If there is no enough space, Variable driver will reclaim flash and
> > reserve the enough space at boot time.
>
> What if the flash is genuinely fully occupied by *live* non-volatile
> variables?
>
> Laszlo
>
> >   At the runtime, reclaim will not be trigged. The space may be out of
> > resource. The warning message may be reported. Is this your case?
> >

Not exactly. It is like Laszlo describes in his question above.

Background:
We had the case where an OVMF based VM ran out of flash space after a
large number of reboots and hardware configuration changes. The MAC
address of the NIC was changing a lot over the life time of the VM. The
variable store was consumed entirely by networking related non-volatile
variables, written for each network card/MAC address present during
boot. Almost all of those were obsolete, of course, but the error that
presented itself at first was a VM that failed to boot the firmware and
ended up in an rather cryptic ASSERT message.

The hope is that this new message makes it easier for non-experts to
diagnose the situation.

The root cause is of course not addressed by this, but it might also be
hard to solve. One would have to identify obsolete network/hardware
settings somehow, but there is no way to tell if a certain NIC/MAC
might come back at a later point or not.

Thanks,
  Oliver

> > Thanks
> > Liming
> >> -\u90ae\u4ef6\u539f\u4ef6-
> >> \u53d1\u4ef6\u4eba: devel@edk2.groups.io  
> >> \u4ee3\u8868 Oliver Steffen
> >> \u53d1\u9001\u65f6\u95f4: 2024\u5e743\u67084\u65e5 23:18
> >> \u6536\u4ef6\u4eba: devel@edk2.groups.io
> >> \u6284\u9001: Oliver Steffen ; Bob Feng
> >> ; Liming Gao ; Rebecca
> >> Cran ; Yuwei Chen ; Gerd
> >> Hoffmann ; Laszlo Ersek 
> >> \u4e3b\u9898: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Warn if out of 
> >> flash space
> >> when writing variables
> >>
> >> Emit a DEBUG_WARN message if there is not enough flash space left to
> >> write/update a variable. This condition is currently not logged
> >> appropriately in all cases, given that full variable store can easily
> >> render the system unbootable.
> >> This new message helps identifying this condition.
> >>
> >> Cc: Bob Feng 
> >> Cc: Gerd Hoffmann 
> >> Cc: Laszlo Ersek 
> >> Cc: Liming Gao 
> >> Cc: Rebecca Cran 
> >> Cc: Yuwei Chen 
> >>
> >> Signed-off-by: Oliver Steffen 
> >> ---
> >>  MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 2 ++
> >>  1 file changed, 2 insertions(+)
> >>
> >> diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> >> b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> >> index d394d237a53f..1c7659031dc5 100644
> >> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> >> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> >> @@ -2364,6 +2364,8 @@ UpdateVariable (
> >>);
> >>
> >>ASSERT_EFI_ERROR (Status);
> >>
> >>  }
> >>
> >> +  } else if (Status == EFI_OUT_OF_RESOURCES) {
> >>
> >> +DEBUG ((DEBUG_WARN, "UpdateVariable failed: Out of flash
> >> space\n"));
> >>
> >>}
> >>
> >>
> >>
> >>return Status;
> >>
> >> --
> >> 2.44.0
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> >
> > 
> >
> >
>

--
Oliver Steffen (he/him) - Software Engineer, Virtualization
Red Hat GmbH ,
Registered seat: Werner-von-Siemens-Ring 12, D-85630 Grasbrunn, Germany
Commercial register: Amtsgericht München/Munich, HRB 153243,
Managing Directors: Ryan Barnhart, Charles Cachera, Michael O'Neill,
Amy Ross

Everyone has different working hours… Please do not feel obligated to
reply outside of your normal work schedule.



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116386): https://edk2.groups.io/g/devel/message/116386
Mute This Topic: https://groups.io/mt/104735640/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 00/10] clean up ProcessLibraryConstructorList() declarations in SEC modules

2024-03-05 Thread Yao, Jiewen
For OvmfPkg, reviewed-by: Jiewen Yao 

> -Original Message-
> From: Laszlo Ersek 
> Sent: Tuesday, March 5, 2024 7:39 PM
> To: edk2-devel-groups-io 
> Cc: Warkentin, Andrei ; Andrew Fish
> ; Ard Biesheuvel ; S, Ashraf Ali
> ; Feng, Bob C ; West, Catharine
> ; Chiu, Chasel ; Duggapu,
> Chinni B ; Aktas, Erdem
> ; Gerd Hoffmann ; Guo, Gua
> ; Dong, Guo ; Lu, James
> ; Yao, Jiewen ; Joey Vagedes
> ; Leif Lindholm ; Liming
> Gao ; Kinney, Michael D
> ; Michael Roth ; Xu, Min
> M ; Desimone, Nathaniel L
> ; Kumar, Rahul R ;
> Ni, Ray ; Rebecca Cran ; Sami Mujawar
> ; Sean Brogan ;
> Rhodes, Sean ; Zeng, Star ; Sunil
> V L ; Mohapatra, Susovan
> ; Kuo, Ted ; Tom Lendacky
> ; Chen, Christine 
> Subject: [PATCH v2 00/10] clean up ProcessLibraryConstructorList() 
> declarations
> in SEC modules
> 
> Bugzillas:
> - https://bugzilla.tianocore.org/show_bug.cgi?id=990
> - https://bugzilla.tianocore.org/show_bug.cgi?id=991
> - https://bugzilla.tianocore.org/show_bug.cgi?id=4643
> 
> CI:
> - https://github.com/tianocore/edk2/pull/5442
> 
> Branch:
> - https://github.com/lersek/edk2/tree/ProcessLibraryConstructorList-SEC-990-
> 991-v2
> 
> This patch series puts the recent BaseTools feature to use in which
> AutoGen generates the ProcessLibraryConstructorList() declaration in
> "AutoGen.h" for such non-library SEC modules whose INF_VERSION is at
> least 1.30. The BaseTools feature is present in both edk2 [1] and
> edk2-basetools [2], and has been documented in the Build spec [3] and
> the Inf spec [4]. Kudos to Rebecca for tagging a new edk2-basetools
> release [5] [6] with the new feature.
> 
> [1] edk2 commit bac9c74080cf
> [2] edk2-basetools commit 5b7161de22ee
> [3] edk2-BuildSpecification commit range db69f5661cae..7a7165a7d199
> [4] edk2-InfSpecification commit range a31e3c842bee..1ea6546578fe
> [5] https://github.com/tianocore/edk2-basetools/releases/tag/v0.1.51
> [6] https://pypi.org/project/edk2-basetools/0.1.51/
> 
> The edk2-basetools part is adopted in the first patch (for
> "pip-requirements.txt").
> 
> The rest of the patches clean up -- superfluous, or even incorrect --
> ProcessLibraryConstructorList() declarations (and, in some cases,
> incorrect calls), together with raising the INF_VERSIONs in the related
> SEC module INF files to 1.30.
> 
> Comparing this version to v1 is not useful, as the compatibility
> approach is different, and so this version is structured differently.
> Please review any patches for your subsystem from scratch (they are not
> difficult or large).
> 
> Cc: Andrei Warkentin 
> Cc: Andrew Fish 
> Cc: Ard Biesheuvel 
> Cc: Ashraf Ali S 
> Cc: Bob Feng 
> Cc: Catharine West 
> Cc: Chasel Chiu 
> Cc: Duggapu Chinni B 
> Cc: Erdem Aktas 
> Cc: Gerd Hoffmann 
> Cc: Gua Guo 
> Cc: Guo Dong 
> Cc: James Lu 
> Cc: Jiewen Yao 
> Cc: Joey Vagedes 
> Cc: Leif Lindholm 
> Cc: Liming Gao 
> Cc: Michael D Kinney 
> Cc: Michael Roth 
> Cc: Min Xu 
> Cc: Nate DeSimone 
> Cc: Rahul Kumar 
> Cc: Ray Ni 
> Cc: Rebecca Cran 
> Cc: Sami Mujawar 
> Cc: Sean Brogan 
> Cc: Sean Rhodes 
> Cc: Star Zeng 
> Cc: Sunil V L 
> Cc: Susovan Mohapatra 
> Cc: Ted Kuo 
> Cc: Tom Lendacky 
> Cc: Yuwei Chen 
> 
> Thanks,
> Laszlo
> 
> Laszlo Ersek (10):
>   pip-requirements.txt: require edk2-basetools version 0.1.51
>   OvmfPkg: auto-generate (and fix) SEC ProcessLibraryConstructorList()
> decl
>   OvmfPkg/IntelTdx: auto-gen & fix SEC ProcessLibraryConstructorList()
> decl
>   OvmfPkg/RiscVVirt/Sec: clean up ProcessLibraryConstructorList() decl
>   ArmPlatformPkg: auto-generate SEC ProcessLibraryConstructorList() decl
>   ArmVirtPkg: auto-generate SEC ProcessLibraryConstructorList() decl
>   EmulatorPkg: auto-generate SEC ProcessLibraryConstructorList() decl
>   IntelFsp2Pkg: auto-generate SEC ProcessLibraryConstructorList() decl
>   UefiCpuPkg: auto-generate SEC ProcessLibraryConstructorList() decl
>   UefiPayloadPkg: auto-generate SEC ProcessLibraryConstructorList() decl
> 
>  ArmPlatformPkg/PrePeiCore/PrePeiCore.h   | 10 --
>  ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf   |  2 +-
>  ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf  |  2 +-
>  ArmPlatformPkg/PrePi/PeiMPCore.inf   |  2 +-
>  ArmPlatformPkg/PrePi/PeiUniCore.inf  |  2 +-
>  ArmPlatformPkg/PrePi/PrePi.h |  6 --
>  ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf  |  2 +-
>  ArmVirtPkg/PrePi/PrePi.c |  6 --
>  EmulatorPkg/Sec/Sec.h|  9 -
>  EmulatorPkg/Sec/Sec.inf  |  2 +-
>  IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf|  2 +-
>  IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf  |  2 +-
>  IntelFsp2Pkg/FspSecCore/SecMain.h| 12 
> 
>  OvmfPkg/IntelTdx/Sec/SecMain.c   |  3 +--

Re: [edk2-devel] [PATCH v8 14/37] UefiCpuPkg: Add CpuMmuLib to UefiCpuPkg

2024-03-05 Thread Chao Li

OK, I'll give it a try.


Thanks,
Chao
On 2024/3/5 20:09, Laszlo Ersek wrote:

On 3/5/24 12:50, Chao Li wrote:

Hi Laszlo,

OK, I see, let's me try. And I have another question:

Where should the low-level library be placed? Under the
UefiCpuPkg/Library and as the same folder as CpuMmuLib?

In my opinion:

Under UefiCpuPkg/Library -- yes.

In the same folder as CpuMmuLib -- no. Instances of different library
classes are never placed in the same folder.

Laszlo



Thanks,
Chao
On 2024/3/5 17:26, Laszlo Ersek wrote:

Hello Chao,

On 3/4/24 04:39, Chao Li wrote:

Hi Laszlo,

OK.

When I discussed the CpuMmuLib API as a public API with Ray in the early
days, the API recommended by Ray should be the patch 13 in this series,
which only contains set/get memory region attribute, but in the first
version in this series, it contains more API, one is ConfigureMmu API,
which is included in ARM and RISCV versions. This API provides a
interface called in PEI or DXE stage, it will configures the MMU and
enables it, such as creating the page tables, filling the static page
tables, cofniguring the MMU registers, enbale MMU, etc.

The paths for ARM and RISCV version APIs:

ARM: ArmPkg/Include/Library/ArmMmuLib.h

RISCV: UefiCpuPkg/Include/Library/BaseRiscVMmuLib.h

I have now re-read this subthread in its entirey, and I think I
understand what's up.

What confused me recently was your expression "so should we open
configure API?"

I think what you meant by "opening" was "publicly declaring".

Anyway, here's my recommendation (consistently with what I said earlier
in this thread):

- I think you need a new (lower-level) library class and instance for
exposing ConfigureMemoryManagementUnit().

Please see:  (msgid
<2a91f2f0-df4c-e106-65cd-79be16722...@redhat.com>).

- I do not recommend trying to unify the new LoongArch library classes
(low level and high level) with "ArmMmuLib.h" or "BaseRiscVMmuLib.h".

Each of "ArmMmuLib.h" and "BaseRiscVMmuLib.h" seems to declare both
low-level and high-level interfaces. For LoongArch, we apparently don't
want that; hence the idea to introduce two library classes for LoongArch
-- that may be considered an improved design.

At the same time, I don't believe that this requires us to unify
"ArmMmuLib.h" and "BaseRiscVMmuLib.h" with the new, LoongArch-motivated
library class design.

Laszlo








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




Re: [edk2-devel] [PATCH v8 14/37] UefiCpuPkg: Add CpuMmuLib to UefiCpuPkg

2024-03-05 Thread Laszlo Ersek
On 3/5/24 12:50, Chao Li wrote:
> Hi Laszlo,
> 
> OK, I see, let's me try. And I have another question:
> 
> Where should the low-level library be placed? Under the
> UefiCpuPkg/Library and as the same folder as CpuMmuLib?

In my opinion:

Under UefiCpuPkg/Library -- yes.

In the same folder as CpuMmuLib -- no. Instances of different library
classes are never placed in the same folder.

Laszlo

> 
> 
> Thanks,
> Chao
> On 2024/3/5 17:26, Laszlo Ersek wrote:
>> Hello Chao,
>>
>> On 3/4/24 04:39, Chao Li wrote:
>>> Hi Laszlo,
>>>
>>> OK.
>>>
>>> When I discussed the CpuMmuLib API as a public API with Ray in the early
>>> days, the API recommended by Ray should be the patch 13 in this series,
>>> which only contains set/get memory region attribute, but in the first
>>> version in this series, it contains more API, one is ConfigureMmu API,
>>> which is included in ARM and RISCV versions. This API provides a
>>> interface called in PEI or DXE stage, it will configures the MMU and
>>> enables it, such as creating the page tables, filling the static page
>>> tables, cofniguring the MMU registers, enbale MMU, etc.
>>>
>>> The paths for ARM and RISCV version APIs:
>>>
>>> ARM: ArmPkg/Include/Library/ArmMmuLib.h
>>>
>>> RISCV: UefiCpuPkg/Include/Library/BaseRiscVMmuLib.h
>> I have now re-read this subthread in its entirey, and I think I
>> understand what's up.
>>
>> What confused me recently was your expression "so should we open
>> configure API?"
>>
>> I think what you meant by "opening" was "publicly declaring".
>>
>> Anyway, here's my recommendation (consistently with what I said earlier
>> in this thread):
>>
>> - I think you need a new (lower-level) library class and instance for
>> exposing ConfigureMemoryManagementUnit().
>>
>> Please see:  (msgid
>> <2a91f2f0-df4c-e106-65cd-79be16722...@redhat.com>).
>>
>> - I do not recommend trying to unify the new LoongArch library classes
>> (low level and high level) with "ArmMmuLib.h" or "BaseRiscVMmuLib.h".
>>
>> Each of "ArmMmuLib.h" and "BaseRiscVMmuLib.h" seems to declare both
>> low-level and high-level interfaces. For LoongArch, we apparently don't
>> want that; hence the idea to introduce two library classes for LoongArch
>> -- that may be considered an improved design.
>>
>> At the same time, I don't believe that this requires us to unify
>> "ArmMmuLib.h" and "BaseRiscVMmuLib.h" with the new, LoongArch-motivated
>> library class design.
>>
>> Laszlo



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




[edk2-devel] [edk2-platforms PATCH v2 4/4] SG2042Pkg/Sec: clean up ProcessLibraryConstructorList() decl

2024-03-05 Thread Laszlo Ersek
 declares a bogus
ProcessLibraryConstructorList() for the SG2042Pkg SEC module. Rely on
AutoGen for (properly) declaring ProcessLibraryConstructorList(). Remove
the correct, but superfluous, declaration as well.

Build-tested with:

  build -a RISCV64 -b DEBUG -m Silicon/Sophgo/SG2042Pkg/Sec/SecMain.inf \
-p Platform/Sophgo/SG2042_EVB_Board/SG2042.dsc -t GCC5

Cc: Sunil V L 
Cc: USER0FISH 
Cc: caiyuqing379 
Cc: dahogn 
Cc: meng-cz 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
Signed-off-by: Laszlo Ersek 
---
 Silicon/Sophgo/SG2042Pkg/Sec/SecMain.inf |  2 +-
 Silicon/Sophgo/SG2042Pkg/Sec/SecMain.h   | 12 
 Silicon/Sophgo/SG2042Pkg/Sec/Memory.c|  1 -
 3 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/Silicon/Sophgo/SG2042Pkg/Sec/SecMain.inf 
b/Silicon/Sophgo/SG2042Pkg/Sec/SecMain.inf
index a9f631193b8b..fd52dccfacac 100644
--- a/Silicon/Sophgo/SG2042Pkg/Sec/SecMain.inf
+++ b/Silicon/Sophgo/SG2042Pkg/Sec/SecMain.inf
@@ -9,7 +9,7 @@
 ##
 
 [Defines]
-  INF_VERSION= 0x0001001B
+  INF_VERSION= 1.30
   BASE_NAME  = SecMainRiscV64
   FILE_GUID  = 125E1236-9D4F-457B-BF7E-6311C88A1621
   MODULE_TYPE= SEC
diff --git a/Silicon/Sophgo/SG2042Pkg/Sec/SecMain.h 
b/Silicon/Sophgo/SG2042Pkg/Sec/SecMain.h
index 8d2c4a4c25e0..daab7c78b409 100644
--- a/Silicon/Sophgo/SG2042Pkg/Sec/SecMain.h
+++ b/Silicon/Sophgo/SG2042Pkg/Sec/SecMain.h
@@ -49,18 +49,6 @@ SecStartup (
   IN  VOID   *DeviceTreeAddress
   );
 
-/**
-  Auto-generated function that calls the library constructors for all of the 
module's
-  dependent libraries.  This function must be called by the SEC Core once a 
stack has
-  been established.
-
-**/
-VOID
-EFIAPI
-ProcessLibraryConstructorList (
-  VOID
-  );
-
 /**
   Perform Platform PEIM initialization.
 
diff --git a/Silicon/Sophgo/SG2042Pkg/Sec/Memory.c 
b/Silicon/Sophgo/SG2042Pkg/Sec/Memory.c
index 51974cf2dc28..df49a17695d1 100644
--- a/Silicon/Sophgo/SG2042Pkg/Sec/Memory.c
+++ b/Silicon/Sophgo/SG2042Pkg/Sec/Memory.c
@@ -19,7 +19,6 @@ Module Name:
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 


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




[edk2-devel] [edk2-platforms PATCH v2 2/4] SimicsOpenBoardPkg: auto-gen & fix SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Laszlo Ersek
 declares a bogus
ProcessLibraryConstructorList() for SimicsOpenBoardPkg's SEC module. Rely
on AutoGen for (properly) declaring ProcessLibraryConstructorList().
Update the call.

Build-tested with:

- appending the following directories to PACKAGES_PATH:

  Drivers
  Features/Intel
  Features/Intel/Debugging
  Features/Intel/Network
  Features/Intel/OutOfBandManagement
  Features/Intel/PowerManagement
  Features/Intel/SystemInformation
  Features/Intel/UserInterface
  Platform/Intel
  Silicon/Intel

- commenting out "SimicsIch10BinPkg/UndiBinary/UndiDxe.inf" in
  "Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc" and
  "Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf"

- running the command

  build -a IA32 -a X64 -b DEBUG \
-m Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.inf \
-p Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc \
-t GCC5

Cc: Nate DeSimone 
Cc: Sai Chaganty 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
Signed-off-by: Laszlo Ersek 
---
 Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.inf | 2 +-
 Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c   | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.inf 
b/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.inf
index af1c0f2b55d1..fcf34c0def4e 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.inf
+++ b/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.inf
@@ -8,7 +8,7 @@
 ##
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = SecMain
   FILE_GUID  = e67f156f-54c5-47f3-a35d-07c045881e14
   MODULE_TYPE= SEC
diff --git a/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c 
b/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c
index 39e879e9223e..09d43c6bf63b 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c
+++ b/Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c
@@ -9,7 +9,6 @@
 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -738,7 +737,7 @@ SecCoreStartupWithStack (
 Table[Index] = 0;
   }
 
-  ProcessLibraryConstructorList (NULL, NULL);
+  ProcessLibraryConstructorList ();
 
   DEBUG ((EFI_D_INFO,
 "SecCoreStartupWithStack(0x%x, 0x%x)\n",



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




[edk2-devel] [edk2-platforms PATCH v2 3/4] LoongArchQemuPkg: auto-gen & fix SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Laszlo Ersek
 declares a bogus
ProcessLibraryConstructorList() for LoongArchQemuPkg's SEC module. Rely on
AutoGen for (properly) declaring ProcessLibraryConstructorList(). Update
the call.

Build-tested with:

  build -a LOONGARCH64 -b DEBUG \
-m Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf \
-p Platform/Loongson/LoongArchQemuPkg/Loongson.dsc -t GCC5

Cc: Bibo Mao 
Cc: Chao Li 
Cc: Xianglai li 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
Signed-off-by: Laszlo Ersek 
---
 Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf | 2 +-
 Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.c   | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf 
b/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf
index c0d5439d5379..bb86c7c77471 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf
+++ b/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf
@@ -8,7 +8,7 @@
 ##
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = SecMain
   FILE_GUID  = 57d02d4f-5a5d-4bfa-b7d6-ba0a4d2c72ce
   MODULE_TYPE= SEC
diff --git a/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.c 
b/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.c
index 3f1998c48c12..50d898859a99 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.c
+++ b/Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.c
@@ -9,7 +9,6 @@
 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -378,7 +377,7 @@ SecCoreStartupWithStack (
 
   DEBUG ((DEBUG_INFO, "Entering C environment\n"));
 
-  ProcessLibraryConstructorList (NULL, NULL);
+  ProcessLibraryConstructorList ();
 
   DEBUG ((DEBUG_INFO,
 "SecCoreStartupWithStack (0x%lx, 0x%lx)\n",



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




[edk2-devel] [edk2-platforms PATCH v2 1/4] BeagleBoardPkg: auto-generate SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Laszlo Ersek
Rely on AutoGen for declaring ProcessLibraryConstructorList().

Build-tested with:

  build -a ARM -b DEBUG \
-m Platform/BeagleBoard/BeagleBoardPkg/PrePi/PeiUniCore.inf \
-p Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc -t GCC5

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
Signed-off-by: Laszlo Ersek 
---
 Platform/BeagleBoard/BeagleBoardPkg/PrePi/PeiUniCore.inf | 2 +-
 Platform/BeagleBoard/BeagleBoardPkg/PrePi/PrePi.h| 6 --
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PeiUniCore.inf 
b/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PeiUniCore.inf
index 414091957cb2..03d8f4daab48 100644
--- a/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PeiUniCore.inf
+++ b/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PeiUniCore.inf
@@ -9,7 +9,7 @@
 #**/
 
 [Defines]
-  INF_VERSION= 0x0001001A
+  INF_VERSION= 1.30
   BASE_NAME  = BeagleBoardPrePiUniCore
   FILE_GUID  = 8a5dc3de-fe31-4ad9-9c93-dd73626932e7
   MODULE_TYPE= SEC
diff --git a/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PrePi.h 
b/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PrePi.h
index b64dd764a435..a2932f0f5116 100644
--- a/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PrePi.h
+++ b/Platform/BeagleBoard/BeagleBoardPkg/PrePi/PrePi.h
@@ -81,10 +81,4 @@ ArchInitialize (
   VOID
   );
 
-VOID
-EFIAPI
-ProcessLibraryConstructorList (
-  VOID
-  );
-
 #endif /* _PREPI_H_ */



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




[edk2-devel] [edk2-platforms PATCH v2 0/4] clean up ProcessLibraryConstructorList() declarations in SEC modules

2024-03-05 Thread Laszlo Ersek
Bugzilla:
- https://bugzilla.tianocore.org/show_bug.cgi?id=990

This patch series puts the recent BaseTools feature to use in which
AutoGen generates the ProcessLibraryConstructorList() declaration in
"AutoGen.h" for such non-library SEC modules whose INF_VERSION is at
least 1.30. The BaseTools feature is present in both edk2 [1] and
edk2-basetools [2], and has been documented in the Build spec [3] and
the Inf spec [4]. Kudos to Rebecca for tagging a new edk2-basetools
release [5] [6] with the new feature.

[1] edk2 commit bac9c74080cf
[2] edk2-basetools commit 5b7161de22ee
[3] edk2-BuildSpecification commit range db69f5661cae..7a7165a7d199
[4] edk2-InfSpecification commit range a31e3c842bee..1ea6546578fe
[5] https://github.com/tianocore/edk2-basetools/releases/tag/v0.1.51
[6] https://pypi.org/project/edk2-basetools/0.1.51/

The edk2-basetools part is adopted in the first patch (for
"pip-requirements.txt") of the edk2 series

  [edk2-devel] [PATCH v2 00/10]
  clean up ProcessLibraryConstructorList() declarations in SEC modules

  https://edk2.groups.io/g/devel/message/116367
  msgid <20240305113843.68812-1-ler...@redhat.com>

The rest of the patches clean up -- superfluous, or even incorrect --
ProcessLibraryConstructorList() declarations (and, in some cases,
incorrect calls), together with raising the INF_VERSIONs in the related
SEC module INF files to 1.30.

Comparing this version to v1 is not useful, as the compatibility
approach is different, and so this version is structured differently.
Please review any patches for your subsystem from scratch (they are not
difficult or large).

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Nate DeSimone 
Cc: Sai Chaganty 
Cc: Bibo Mao 
Cc: Chao Li 
Cc: Xianglai li 
Cc: Sunil V L 
Cc: USER0FISH 
Cc: caiyuqing379 
Cc: dahogn 
Cc: meng-cz 

Thanks,
Laszlo

Laszlo Ersek (4):
  BeagleBoardPkg: auto-generate SEC ProcessLibraryConstructorList() decl
  SimicsOpenBoardPkg: auto-gen & fix SEC ProcessLibraryConstructorList()
decl
  LoongArchQemuPkg: auto-gen & fix SEC ProcessLibraryConstructorList()
decl
  SG2042Pkg/Sec: clean up ProcessLibraryConstructorList() decl

 Platform/BeagleBoard/BeagleBoardPkg/PrePi/PeiUniCore.inf |  2 +-
 Platform/BeagleBoard/BeagleBoardPkg/PrePi/PrePi.h|  6 --
 Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.c  |  3 +--
 Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.inf|  2 +-
 Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.c |  3 +--
 Platform/Loongson/LoongArchQemuPkg/Sec/SecMain.inf   |  2 +-
 Silicon/Sophgo/SG2042Pkg/Sec/Memory.c|  1 -
 Silicon/Sophgo/SG2042Pkg/Sec/SecMain.h   | 12 
 Silicon/Sophgo/SG2042Pkg/Sec/SecMain.inf |  2 +-
 9 files changed, 6 insertions(+), 27 deletions(-)


base-commit: fe41713668d42b20a2370dab27de3269e877e454


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




Re: [edk2-devel] [PATCH v8 14/37] UefiCpuPkg: Add CpuMmuLib to UefiCpuPkg

2024-03-05 Thread Chao Li

Hi Laszlo,

OK, I see, let's me try. And I have another question:

Where should the low-level library be placed? Under the 
UefiCpuPkg/Library and as the same folder as CpuMmuLib?



Thanks,
Chao
On 2024/3/5 17:26, Laszlo Ersek wrote:

Hello Chao,

On 3/4/24 04:39, Chao Li wrote:

Hi Laszlo,

OK.

When I discussed the CpuMmuLib API as a public API with Ray in the early
days, the API recommended by Ray should be the patch 13 in this series,
which only contains set/get memory region attribute, but in the first
version in this series, it contains more API, one is ConfigureMmu API,
which is included in ARM and RISCV versions. This API provides a
interface called in PEI or DXE stage, it will configures the MMU and
enables it, such as creating the page tables, filling the static page
tables, cofniguring the MMU registers, enbale MMU, etc.

The paths for ARM and RISCV version APIs:

ARM: ArmPkg/Include/Library/ArmMmuLib.h

RISCV: UefiCpuPkg/Include/Library/BaseRiscVMmuLib.h

I have now re-read this subthread in its entirey, and I think I
understand what's up.

What confused me recently was your expression "so should we open
configure API?"

I think what you meant by "opening" was "publicly declaring".

Anyway, here's my recommendation (consistently with what I said earlier
in this thread):

- I think you need a new (lower-level) library class and instance for
exposing ConfigureMemoryManagementUnit().

Please see:  (msgid
<2a91f2f0-df4c-e106-65cd-79be16722...@redhat.com>).

- I do not recommend trying to unify the new LoongArch library classes
(low level and high level) with "ArmMmuLib.h" or "BaseRiscVMmuLib.h".

Each of "ArmMmuLib.h" and "BaseRiscVMmuLib.h" seems to declare both
low-level and high-level interfaces. For LoongArch, we apparently don't
want that; hence the idea to introduce two library classes for LoongArch
-- that may be considered an improved design.

At the same time, I don't believe that this requires us to unify
"ArmMmuLib.h" and "BaseRiscVMmuLib.h" with the new, LoongArch-motivated
library class design.

Laszlo



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




[edk2-devel] [PATCH v2 10/10] UefiPayloadPkg: auto-generate SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Laszlo Ersek
Rely on AutoGen for declaring ProcessLibraryConstructorList().

Build-tested with:

  python UefiPayloadPkg/UniversalPayloadBuild.py -a X64 -b DEBUG -t GCC5

  python UefiPayloadPkg/UniversalPayloadBuild.py -a X64 -b DEBUG -f \
-t GCC5

  build -a X64 -b DEBUG -p UefiPayloadPkg/UefiPayloadPkg.dsc -t GCC5 \
-D BUILD_ARCH=X64

Cc: Gua Guo 
Cc: Guo Dong 
Cc: James Lu 
Cc: Sean Rhodes 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
Signed-off-by: Laszlo Ersek 
---
 UefiPayloadPkg/UefiPayloadEntry/FitUniversalPayloadEntry.inf |  2 +-
 UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf |  2 +-
 UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf|  2 +-
 UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h   | 10 --
 4 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadEntry/FitUniversalPayloadEntry.inf 
b/UefiPayloadPkg/UefiPayloadEntry/FitUniversalPayloadEntry.inf
index 01fb3aceb3e4..b87a0989eee3 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/FitUniversalPayloadEntry.inf
+++ b/UefiPayloadPkg/UefiPayloadEntry/FitUniversalPayloadEntry.inf
@@ -8,7 +8,7 @@
 ##
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = FitUniversalPayloadEntry
   FILE_GUID  = CED5A8A9-B6EA-4D5A-8689-577EE88566CF
   MODULE_TYPE= SEC
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf 
b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
index e2af8a4b7c1b..a3ff4b86eaf6 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
+++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
@@ -9,7 +9,7 @@
 ##
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = PayloadEntry
   FILE_GUID  = 2119BBD7-9432-4f47-B5E2-5C4EA31B6BDC
   MODULE_TYPE= SEC
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf 
b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
index 5112cdc1e5df..a62da5c7059d 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
+++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
@@ -8,7 +8,7 @@
 ##
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = UniversalPayloadEntry
   FILE_GUID  = D4F0F269-1209-4A66-8039-C4D5A700EA4E
   MODULE_TYPE= SEC
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h 
b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
index ad8a9fd22b66..80ccc5072c55 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
+++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
@@ -51,16 +51,6 @@
 #define E820_PMEM   7
 #define E820_UNDEFINED  8
 
-/**
-  Auto-generated function that calls the library constructors for all of the 
module's
-  dependent libraries.
-**/
-VOID
-EFIAPI
-ProcessLibraryConstructorList (
-  VOID
-  );
-
 /**
   Add a new HOB to the HOB List.
 


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




[edk2-devel] [PATCH v2 09/10] UefiCpuPkg: auto-generate SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Laszlo Ersek
Rely on AutoGen for declaring ProcessLibraryConstructorList().

Build-tested with:

  build -a X64 -b DEBUG -m UefiCpuPkg/SecCore/SecCore.inf \
-p UefiCpuPkg/UefiCpuPkg.dsc -t GCC5

  build -a X64 -b DEBUG -m UefiCpuPkg/SecCore/SecCoreNative.inf \
-p UefiCpuPkg/UefiCpuPkg.dsc -t GCC5

Cc: Catharine West 
Cc: Gerd Hoffmann 
Cc: Rahul Kumar 
Cc: Ray Ni 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
Signed-off-by: Laszlo Ersek 
---
 UefiCpuPkg/SecCore/SecCore.inf   |  2 +-
 UefiCpuPkg/SecCore/SecCoreNative.inf |  2 +-
 UefiCpuPkg/SecCore/SecMain.h | 12 
 3 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/UefiCpuPkg/SecCore/SecCore.inf b/UefiCpuPkg/SecCore/SecCore.inf
index cab69b8b97f3..4f732cccb7fc 100644
--- a/UefiCpuPkg/SecCore/SecCore.inf
+++ b/UefiCpuPkg/SecCore/SecCore.inf
@@ -13,7 +13,7 @@
 ##
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = SecCore
   MODULE_UNI_FILE= SecCore.uni
   FILE_GUID  = 1BA0062E-C779-4582-8566-336AE8F78F09
diff --git a/UefiCpuPkg/SecCore/SecCoreNative.inf 
b/UefiCpuPkg/SecCore/SecCoreNative.inf
index fa241cca94d4..454a3629e505 100644
--- a/UefiCpuPkg/SecCore/SecCoreNative.inf
+++ b/UefiCpuPkg/SecCore/SecCoreNative.inf
@@ -13,7 +13,7 @@
 ##
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = SecCoreNative
   MODULE_UNI_FILE= SecCore.uni
   FILE_GUID  = 43CA74CA-7D29-49A0-B3B9-20F84015B27D
diff --git a/UefiCpuPkg/SecCore/SecMain.h b/UefiCpuPkg/SecCore/SecMain.h
index b50d96e45b33..81c561424e3b 100644
--- a/UefiCpuPkg/SecCore/SecMain.h
+++ b/UefiCpuPkg/SecCore/SecMain.h
@@ -101,18 +101,6 @@ FindAndReportEntryPoints (
   OUT EFI_PEI_CORE_ENTRY_POINT*PeiCoreEntryPoint
   );
 
-/**
-  Auto-generated function that calls the library constructors for all of the 
module's
-  dependent libraries.  This function must be called by the SEC Core once a 
stack has
-  been established.
-
-**/
-VOID
-EFIAPI
-ProcessLibraryConstructorList (
-  VOID
-  );
-
 /**
   Implementation of the PlatformInformation service in 
EFI_SEC_PLATFORM_INFORMATION_PPI.
 



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




[edk2-devel] [PATCH v2 08/10] IntelFsp2Pkg: auto-generate SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Laszlo Ersek
Rely on AutoGen for declaring ProcessLibraryConstructorList().

Build-tested with:

  build -a X64 -b DEBUG -m IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf \
-p IntelFsp2Pkg/IntelFsp2Pkg.dsc -t GCC5

  build -a X64 -b DEBUG -m IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf \
-p IntelFsp2Pkg/IntelFsp2Pkg.dsc -t GCC5

Cc: Ashraf Ali S 
Cc: Chasel Chiu 
Cc: Duggapu Chinni B 
Cc: Nate DeSimone 
Cc: Star Zeng 
Cc: Susovan Mohapatra 
Cc: Ted Kuo 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
Signed-off-by: Laszlo Ersek 
---
 IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf |  2 +-
 IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf   |  2 +-
 IntelFsp2Pkg/FspSecCore/SecMain.h | 12 
 3 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf 
b/IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf
index cb011f99f964..7d60e2283e26 100644
--- a/IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf
+++ b/IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf
@@ -8,7 +8,7 @@
 ##
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = Fsp24SecCoreM
   FILE_GUID  = C5BC0719-4A23-4F6E-94DA-05FB6A0DFA9C
   MODULE_TYPE= SEC
diff --git a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf 
b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
index 8029832235ec..d496f3957d1b 100644
--- a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
+++ b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
@@ -8,7 +8,7 @@
 ##
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = FspSecCoreM
   FILE_GUID  = C2F9AE46-3437-4FEF-9CB1-9A568B282FEE
   MODULE_TYPE= SEC
diff --git a/IntelFsp2Pkg/FspSecCore/SecMain.h 
b/IntelFsp2Pkg/FspSecCore/SecMain.h
index 023deb7e2bda..eb1458d19773 100644
--- a/IntelFsp2Pkg/FspSecCore/SecMain.h
+++ b/IntelFsp2Pkg/FspSecCore/SecMain.h
@@ -110,18 +110,6 @@ SecStartup (
   IN UINT32  ApiIdx
   );
 
-/**
-  Autogenerated function that calls the library constructors for all of the 
module's
-  dependent libraries.  This function must be called by the SEC Core once a 
stack has
-  been established.
-
-**/
-VOID
-EFIAPI
-ProcessLibraryConstructorList (
-  VOID
-  );
-
 /**
 
   Return value of esp.



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




[edk2-devel] [PATCH v2 07/10] EmulatorPkg: auto-generate SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Laszlo Ersek
Rely on AutoGen for declaring ProcessLibraryConstructorList().

Build-tested with:

  build -a X64 -b DEBUG -m EmulatorPkg/Sec/Sec.inf \
-p EmulatorPkg/EmulatorPkg.dsc -t GCC5

Cc: Andrew Fish 
Cc: Ray Ni 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
Signed-off-by: Laszlo Ersek 
---
 EmulatorPkg/Sec/Sec.inf | 2 +-
 EmulatorPkg/Sec/Sec.h   | 9 -
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/EmulatorPkg/Sec/Sec.inf b/EmulatorPkg/Sec/Sec.inf
index 2f9e3d4780cc..7476094f1305 100644
--- a/EmulatorPkg/Sec/Sec.inf
+++ b/EmulatorPkg/Sec/Sec.inf
@@ -11,7 +11,7 @@
 ##
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = EmuSec
   FILE_GUID  = BCAF98C9-22B0-3B4F-9CBD-C8A6B4DBCEE9
   MODULE_TYPE= SEC
diff --git a/EmulatorPkg/Sec/Sec.h b/EmulatorPkg/Sec/Sec.h
index 29272a29ffa5..94689eb41d35 100644
--- a/EmulatorPkg/Sec/Sec.h
+++ b/EmulatorPkg/Sec/Sec.h
@@ -20,15 +20,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 #include 
 
-//
-// I think this should be defined in a MdePkg include file?
-//
-VOID
-EFIAPI
-ProcessLibraryConstructorList (
-  VOID
-  );
-
 EFI_STATUS
 EFIAPI
 SecTemporaryRamSupport (



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




[edk2-devel] [PATCH v2 04/10] OvmfPkg/RiscVVirt/Sec: clean up ProcessLibraryConstructorList() decl

2024-03-05 Thread Laszlo Ersek
 declares a bogus
ProcessLibraryConstructorList() for the OvmfPkg/RiscVVirt SEC module. Rely
on AutoGen for (properly) declaring ProcessLibraryConstructorList().
Remove the correct, but superfluous, declaration as well.

Build-tested with:

  build -a RISCV64 -b DEBUG -m OvmfPkg/RiscVVirt/Sec/SecMain.inf \
-p OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc -t GCC5

Cc: Andrei Warkentin 
Cc: Ard Biesheuvel 
Cc: Gerd Hoffmann 
Cc: Jiewen Yao 
Cc: Sunil V L 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
Signed-off-by: Laszlo Ersek 
---
 OvmfPkg/RiscVVirt/Sec/SecMain.inf |  2 +-
 OvmfPkg/RiscVVirt/Sec/SecMain.h   | 12 
 OvmfPkg/RiscVVirt/Sec/Memory.c|  1 -
 3 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/OvmfPkg/RiscVVirt/Sec/SecMain.inf 
b/OvmfPkg/RiscVVirt/Sec/SecMain.inf
index 0e2a5785e8a4..73df0ee4cbe7 100644
--- a/OvmfPkg/RiscVVirt/Sec/SecMain.inf
+++ b/OvmfPkg/RiscVVirt/Sec/SecMain.inf
@@ -8,7 +8,7 @@
 ##
 
 [Defines]
-  INF_VERSION= 0x0001001B
+  INF_VERSION= 1.30
   BASE_NAME  = SecMainRiscV64
   FILE_GUID  = 16740C0A-AA84-4F62-A06D-AE328057AE07
   MODULE_TYPE= SEC
diff --git a/OvmfPkg/RiscVVirt/Sec/SecMain.h b/OvmfPkg/RiscVVirt/Sec/SecMain.h
index 7c7650f0d298..fd7c48f87653 100644
--- a/OvmfPkg/RiscVVirt/Sec/SecMain.h
+++ b/OvmfPkg/RiscVVirt/Sec/SecMain.h
@@ -49,18 +49,6 @@ SecStartup (
   IN  VOID   *DeviceTreeAddress
   );
 
-/**
-  Auto-generated function that calls the library constructors for all of the 
module's
-  dependent libraries.  This function must be called by the SEC Core once a 
stack has
-  been established.
-
-**/
-VOID
-EFIAPI
-ProcessLibraryConstructorList (
-  VOID
-  );
-
 /**
   Perform Platform PEIM initialization.
 
diff --git a/OvmfPkg/RiscVVirt/Sec/Memory.c b/OvmfPkg/RiscVVirt/Sec/Memory.c
index 7c6d920bd2a6..14c9569c78d4 100644
--- a/OvmfPkg/RiscVVirt/Sec/Memory.c
+++ b/OvmfPkg/RiscVVirt/Sec/Memory.c
@@ -25,7 +25,6 @@ Module Name:
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 



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




[edk2-devel] [PATCH v2 06/10] ArmVirtPkg: auto-generate SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Laszlo Ersek
Rely on AutoGen for declaring ProcessLibraryConstructorList().

Build-tested with:

  build -a AARCH64 -b DEBUG \
-m ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf \
-p ArmVirtPkg/ArmVirtKvmTool.dsc -t GCC5

Cc: Ard Biesheuvel 
Cc: Gerd Hoffmann 
Cc: Leif Lindholm 
Cc: Sami Mujawar 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf | 2 +-
 ArmVirtPkg/PrePi/PrePi.c| 6 --
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf 
b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
index 6b9244bd1a6b..578ee37e7467 100755
--- a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
+++ b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
@@ -8,7 +8,7 @@
 #**/
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = ArmVirtPrePiUniCoreRelocatable
   FILE_GUID  = f7d9fd14-9335-4389-80c5-334d6abfcced
   MODULE_TYPE= SEC
diff --git a/ArmVirtPkg/PrePi/PrePi.c b/ArmVirtPkg/PrePi/PrePi.c
index ff51a757a21a..f27e0ad3d223 100755
--- a/ArmVirtPkg/PrePi/PrePi.c
+++ b/ArmVirtPkg/PrePi/PrePi.c
@@ -22,12 +22,6 @@
 
 #include "PrePi.h"
 
-VOID
-EFIAPI
-ProcessLibraryConstructorList (
-  VOID
-  );
-
 VOID
 PrePiMain (
   IN  UINTN   UefiMemoryBase,



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




[edk2-devel] [PATCH v2 05/10] ArmPlatformPkg: auto-generate SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Laszlo Ersek
Rely on AutoGen for declaring ProcessLibraryConstructorList().

Build-tested with:

  build -a AARCH64 -b DEBUG \
-m ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf \
-p ArmPlatformPkg/ArmPlatformPkg.dsc -t GCC5

  build -a AARCH64 -b DEBUG \
-m ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf \
-p ArmPlatformPkg/ArmPlatformPkg.dsc -t GCC5

  build -a AARCH64 -b DEBUG \
-m ArmPlatformPkg/PrePi/PeiMPCore.inf \
-p ArmPlatformPkg/ArmPlatformPkg.dsc -t GCC5

  build -a AARCH64 -b DEBUG \
-m ArmPlatformPkg/PrePi/PeiUniCore.inf \
-p ArmPlatformPkg/ArmPlatformPkg.dsc -t GCC5

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
Signed-off-by: Laszlo Ersek 
---
 ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf  |  2 +-
 ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf |  2 +-
 ArmPlatformPkg/PrePi/PeiMPCore.inf  |  2 +-
 ArmPlatformPkg/PrePi/PeiUniCore.inf |  2 +-
 ArmPlatformPkg/PrePeiCore/PrePeiCore.h  | 10 --
 ArmPlatformPkg/PrePi/PrePi.h|  6 --
 6 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf 
b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
index 4a3112b58dcb..c5cad7e37fbd 100644
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
@@ -8,7 +8,7 @@
 #**/
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = ArmPlatformPrePeiCore
   FILE_GUID  = b78d02bb-d0b5-4389-bc7f-b39ee846c784
   MODULE_TYPE= SEC
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf 
b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
index ab5bf1dac2d8..1d50b4d0b5f2 100644
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
@@ -8,7 +8,7 @@
 #**/
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = ArmPlatformPrePeiCore
   FILE_GUID  = 469fc080-aec1-11df-927c-0002a5d5c51b
   MODULE_TYPE= SEC
diff --git a/ArmPlatformPkg/PrePi/PeiMPCore.inf 
b/ArmPlatformPkg/PrePi/PeiMPCore.inf
index a613b24c340e..0b13b723539c 100644
--- a/ArmPlatformPkg/PrePi/PeiMPCore.inf
+++ b/ArmPlatformPkg/PrePi/PeiMPCore.inf
@@ -8,7 +8,7 @@
 #**/
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = ArmPlatformPrePiMPCore
   FILE_GUID  = d959e387-7b91-452c-90e0-a1dbac90ddb8
   MODULE_TYPE= SEC
diff --git a/ArmPlatformPkg/PrePi/PeiUniCore.inf 
b/ArmPlatformPkg/PrePi/PeiUniCore.inf
index b62ea3c485bd..2e237172d571 100644
--- a/ArmPlatformPkg/PrePi/PeiUniCore.inf
+++ b/ArmPlatformPkg/PrePi/PeiUniCore.inf
@@ -9,7 +9,7 @@
 #**/
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = ArmPlatformPrePiUniCore
   FILE_GUID  = 3e401783-cc94-4fcd-97bc-bd35ac369d2f
   MODULE_TYPE= SEC
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h 
b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
index c1e13e23e11e..fbf6207db816 100644
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
@@ -73,14 +73,4 @@ PeiCommonExceptionEntry (
   IN UINTN   LR
   );
 
-/*
- * Autogenerated function that calls the library constructors for all of the
- * module's dependent libraries.
- */
-VOID
-EFIAPI
-ProcessLibraryConstructorList (
-  VOID
-  );
-
 #endif
diff --git a/ArmPlatformPkg/PrePi/PrePi.h b/ArmPlatformPkg/PrePi/PrePi.h
index 6074a22108d2..1d47ba26be3a 100644
--- a/ArmPlatformPkg/PrePi/PrePi.h
+++ b/ArmPlatformPkg/PrePi/PrePi.h
@@ -79,10 +79,4 @@ ArchInitialize (
   VOID
   );
 
-VOID
-EFIAPI
-ProcessLibraryConstructorList (
-  VOID
-  );
-
 #endif /* _PREPI_H_ */



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




[edk2-devel] [PATCH v2 03/10] OvmfPkg/IntelTdx: auto-gen & fix SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Laszlo Ersek
 declares a bogus
ProcessLibraryConstructorList() for IntelTdx's SEC module. Rely on AutoGen
for (properly) declaring ProcessLibraryConstructorList(). Update the call.

Build-tested with:

  build -a X64 -b DEBUG -m OvmfPkg/IntelTdx/Sec/SecMain.inf \
-p OvmfPkg/IntelTdx/IntelTdxX64.dsc -t GCC5

Cc: Ard Biesheuvel 
Cc: Gerd Hoffmann 
Cc: Jiewen Yao 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
Signed-off-by: Laszlo Ersek 
---
 OvmfPkg/IntelTdx/Sec/SecMain.inf | 2 +-
 OvmfPkg/IntelTdx/Sec/SecMain.c   | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/OvmfPkg/IntelTdx/Sec/SecMain.inf b/OvmfPkg/IntelTdx/Sec/SecMain.inf
index 7fb27941b7ed..cf95284f027e 100644
--- a/OvmfPkg/IntelTdx/Sec/SecMain.inf
+++ b/OvmfPkg/IntelTdx/Sec/SecMain.inf
@@ -8,7 +8,7 @@
 ##
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = SecMain
   FILE_GUID  = 69d96630-eb64-4b33-8491-13a5cf023dcf
   MODULE_TYPE= SEC
diff --git a/OvmfPkg/IntelTdx/Sec/SecMain.c b/OvmfPkg/IntelTdx/Sec/SecMain.c
index 42a587adfa57..4e750755bf7f 100644
--- a/OvmfPkg/IntelTdx/Sec/SecMain.c
+++ b/OvmfPkg/IntelTdx/Sec/SecMain.c
@@ -11,7 +11,6 @@
 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -125,7 +124,7 @@ SecCoreStartupWithStack (
   IdtDescriptor.Base  = (UINTN)
   IdtDescriptor.Limit = (UINT16)(sizeof (IdtTableInStack.IdtTable) - 1);
 
-  ProcessLibraryConstructorList (NULL, NULL);
+  ProcessLibraryConstructorList ();
 
   //
   // Load the IDTR.



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




[edk2-devel] [PATCH v2 02/10] OvmfPkg: auto-generate (and fix) SEC ProcessLibraryConstructorList() decl

2024-03-05 Thread Laszlo Ersek
 declares a bogus
ProcessLibraryConstructorList() for OVMF's SEC module. Rely on AutoGen for
(properly) declaring ProcessLibraryConstructorList(). Update the call.

Build-tested with:

  build -a X64 -b DEBUG -m OvmfPkg/Sec/SecMain.inf \
-p OvmfPkg/OvmfPkgX64.dsc -t GCC5

Cc: Ard Biesheuvel 
Cc: Erdem Aktas 
Cc: Gerd Hoffmann 
Cc: Jiewen Yao 
Cc: Michael Roth 
Cc: Min Xu 
Cc: Tom Lendacky 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4643
Signed-off-by: Laszlo Ersek 
---
 OvmfPkg/Sec/SecMain.inf | 2 +-
 OvmfPkg/Sec/SecMain.c   | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/OvmfPkg/Sec/SecMain.inf b/OvmfPkg/Sec/SecMain.inf
index 3c47a664a95d..dca932a474ee 100644
--- a/OvmfPkg/Sec/SecMain.inf
+++ b/OvmfPkg/Sec/SecMain.inf
@@ -8,7 +8,7 @@
 ##
 
 [Defines]
-  INF_VERSION= 0x00010005
+  INF_VERSION= 1.30
   BASE_NAME  = SecMain
   FILE_GUID  = df1ccef6-f301-4a63-9661-fc6030dcc880
   MODULE_TYPE= SEC
diff --git a/OvmfPkg/Sec/SecMain.c b/OvmfPkg/Sec/SecMain.c
index 31da5d0ace51..a30d4ce09ea8 100644
--- a/OvmfPkg/Sec/SecMain.c
+++ b/OvmfPkg/Sec/SecMain.c
@@ -11,7 +11,6 @@
 
 #include 
 
-#include 
 #include 
 #include 
 #include 
@@ -844,7 +843,7 @@ SecCoreStartupWithStack (
 InitializeCpuExceptionHandlers (NULL);
   }
 
-  ProcessLibraryConstructorList (NULL, NULL);
+  ProcessLibraryConstructorList ();
 
   if (!SevEsIsEnabled ()) {
 //



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




[edk2-devel] [PATCH v2 00/10] clean up ProcessLibraryConstructorList() declarations in SEC modules

2024-03-05 Thread Laszlo Ersek
Bugzillas:
- https://bugzilla.tianocore.org/show_bug.cgi?id=990
- https://bugzilla.tianocore.org/show_bug.cgi?id=991
- https://bugzilla.tianocore.org/show_bug.cgi?id=4643

CI:
- https://github.com/tianocore/edk2/pull/5442

Branch:
- 
https://github.com/lersek/edk2/tree/ProcessLibraryConstructorList-SEC-990-991-v2

This patch series puts the recent BaseTools feature to use in which
AutoGen generates the ProcessLibraryConstructorList() declaration in
"AutoGen.h" for such non-library SEC modules whose INF_VERSION is at
least 1.30. The BaseTools feature is present in both edk2 [1] and
edk2-basetools [2], and has been documented in the Build spec [3] and
the Inf spec [4]. Kudos to Rebecca for tagging a new edk2-basetools
release [5] [6] with the new feature.

[1] edk2 commit bac9c74080cf
[2] edk2-basetools commit 5b7161de22ee
[3] edk2-BuildSpecification commit range db69f5661cae..7a7165a7d199
[4] edk2-InfSpecification commit range a31e3c842bee..1ea6546578fe
[5] https://github.com/tianocore/edk2-basetools/releases/tag/v0.1.51
[6] https://pypi.org/project/edk2-basetools/0.1.51/

The edk2-basetools part is adopted in the first patch (for
"pip-requirements.txt").

The rest of the patches clean up -- superfluous, or even incorrect --
ProcessLibraryConstructorList() declarations (and, in some cases,
incorrect calls), together with raising the INF_VERSIONs in the related
SEC module INF files to 1.30.

Comparing this version to v1 is not useful, as the compatibility
approach is different, and so this version is structured differently.
Please review any patches for your subsystem from scratch (they are not
difficult or large).

Cc: Andrei Warkentin 
Cc: Andrew Fish 
Cc: Ard Biesheuvel 
Cc: Ashraf Ali S 
Cc: Bob Feng 
Cc: Catharine West 
Cc: Chasel Chiu 
Cc: Duggapu Chinni B 
Cc: Erdem Aktas 
Cc: Gerd Hoffmann 
Cc: Gua Guo 
Cc: Guo Dong 
Cc: James Lu 
Cc: Jiewen Yao 
Cc: Joey Vagedes 
Cc: Leif Lindholm 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Michael Roth 
Cc: Min Xu 
Cc: Nate DeSimone 
Cc: Rahul Kumar 
Cc: Ray Ni 
Cc: Rebecca Cran 
Cc: Sami Mujawar 
Cc: Sean Brogan 
Cc: Sean Rhodes 
Cc: Star Zeng 
Cc: Sunil V L 
Cc: Susovan Mohapatra 
Cc: Ted Kuo 
Cc: Tom Lendacky 
Cc: Yuwei Chen 

Thanks,
Laszlo

Laszlo Ersek (10):
  pip-requirements.txt: require edk2-basetools version 0.1.51
  OvmfPkg: auto-generate (and fix) SEC ProcessLibraryConstructorList()
decl
  OvmfPkg/IntelTdx: auto-gen & fix SEC ProcessLibraryConstructorList()
decl
  OvmfPkg/RiscVVirt/Sec: clean up ProcessLibraryConstructorList() decl
  ArmPlatformPkg: auto-generate SEC ProcessLibraryConstructorList() decl
  ArmVirtPkg: auto-generate SEC ProcessLibraryConstructorList() decl
  EmulatorPkg: auto-generate SEC ProcessLibraryConstructorList() decl
  IntelFsp2Pkg: auto-generate SEC ProcessLibraryConstructorList() decl
  UefiCpuPkg: auto-generate SEC ProcessLibraryConstructorList() decl
  UefiPayloadPkg: auto-generate SEC ProcessLibraryConstructorList() decl

 ArmPlatformPkg/PrePeiCore/PrePeiCore.h   | 10 --
 ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf   |  2 +-
 ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf  |  2 +-
 ArmPlatformPkg/PrePi/PeiMPCore.inf   |  2 +-
 ArmPlatformPkg/PrePi/PeiUniCore.inf  |  2 +-
 ArmPlatformPkg/PrePi/PrePi.h |  6 --
 ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf  |  2 +-
 ArmVirtPkg/PrePi/PrePi.c |  6 --
 EmulatorPkg/Sec/Sec.h|  9 -
 EmulatorPkg/Sec/Sec.inf  |  2 +-
 IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf|  2 +-
 IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf  |  2 +-
 IntelFsp2Pkg/FspSecCore/SecMain.h| 12 
 OvmfPkg/IntelTdx/Sec/SecMain.c   |  3 +--
 OvmfPkg/IntelTdx/Sec/SecMain.inf |  2 +-
 OvmfPkg/RiscVVirt/Sec/Memory.c   |  1 -
 OvmfPkg/RiscVVirt/Sec/SecMain.h  | 12 
 OvmfPkg/RiscVVirt/Sec/SecMain.inf|  2 +-
 OvmfPkg/Sec/SecMain.c|  3 +--
 OvmfPkg/Sec/SecMain.inf  |  2 +-
 UefiCpuPkg/SecCore/SecCore.inf   |  2 +-
 UefiCpuPkg/SecCore/SecCoreNative.inf |  2 +-
 UefiCpuPkg/SecCore/SecMain.h | 12 
 UefiPayloadPkg/UefiPayloadEntry/FitUniversalPayloadEntry.inf |  2 +-
 UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h   | 10 --
 UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf |  2 +-
 UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf|  2 +-
 pip-requirements.txt |  4 ++--
 28 files 

[edk2-devel] [PATCH v2 01/10] pip-requirements.txt: require edk2-basetools version 0.1.51

2024-03-05 Thread Laszlo Ersek
The edk2-basetools commit that corresponds to edk2 commit bac9c74080cf
("BaseTools/AutoGen: declare ProcessLibraryConstructorList() for SEC
modules", 2024-02-29) is 5b7161de22ee ("BaseTools/AutoGen: declare
ProcessLibraryConstructorList() for SEC modules", 2024-03-04); it is part
of tag v0.1.51.

Subsequent patches in this series put that feature to use. Require release
0.1.51 of edk2-basetools in "pip-requirements.txt", so that the next
patches work with in-tree and out-of-tree (e.g., CI) BaseTools.

Furthermore, require version 0.20.0 of edk2-pytool-library. This is a
dependency of edk2-basetools v0.1.50 (commit 08e5bbe755d2, "Add
pyproject.toml and fix setup.py deprecation warnings", 2024-02-13) and
v0.1.51 too (commit f3e15d654479, "Add pyproject.toml and fix setup.py
deprecation warnings", 2024-02-16).

Cc: Bob Feng 
Cc: Joey Vagedes 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Rebecca Cran 
Cc: Sean Brogan 
Cc: Yuwei Chen 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=991
Signed-off-by: Laszlo Ersek 
---
 pip-requirements.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pip-requirements.txt b/pip-requirements.txt
index 6420078822b5..2f4cd33cc620 100644
--- a/pip-requirements.txt
+++ b/pip-requirements.txt
@@ -12,9 +12,9 @@
 # https://www.python.org/dev/peps/pep-0440/#version-specifiers
 ##
 
-edk2-pytool-library==0.19.9
+edk2-pytool-library==0.20.0
 edk2-pytool-extensions==0.26.4
-edk2-basetools==0.1.48
+edk2-basetools==0.1.51
 antlr4-python3-runtime==4.7.1
 lcov-cobertura==2.0.2
 regex==2023.12.25



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116366): https://edk2.groups.io/g/devel/message/116366
Mute This Topic: https://groups.io/mt/104742519/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/2] ShellPkg/Acpiview: Adds HPET parser

2024-03-05 Thread Abdul Lateef Attar via groups.io
From: Abdul Lateef Attar 

Adds HPET parse to the UefiShellAcpiViewCommandLib library.

Cc: Zhichao Gao 
Cc: Pierre Gondois  
Signed-off-by: Abdul Lateef Attar 
---
 .../UefiShellAcpiViewCommandLib/AcpiParser.h  |  17 ++
 .../Parsers/Hpet/HpetParser.c | 221 ++
 .../UefiShellAcpiViewCommandLib.c |   1 +
 .../UefiShellAcpiViewCommandLib.inf   |   1 +
 4 files changed, 240 insertions(+)
 create mode 100644 
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hpet/HpetParser.c

diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h
index 4b4397961b..ba3364f2c2 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h
@@ -730,6 +730,23 @@ ParseAcpiHmat (
   IN UINT8AcpiTableRevision
   );
 
+/**
+  This function parses the ACPI HPET table.
+
+  @param [in] Trace  If TRUE, trace the ACPI fields.
+  @param [in] PtrPointer to the start of the buffer.
+  @param [in] AcpiTableLengthLength of the ACPI table.
+  @param [in] AcpiTableRevision  Revision of the ACPI table.
+**/
+VOID
+EFIAPI
+ParseAcpiHpet (
+  IN BOOLEAN  Trace,
+  IN UINT8*Ptr,
+  IN UINT32   AcpiTableLength,
+  IN UINT8AcpiTableRevision
+  );
+
 /**
   This function parses the ACPI IORT table.
   When trace is enabled this function parses the IORT table and
diff --git 
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hpet/HpetParser.c 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hpet/HpetParser.c
new file mode 100644
index 00..d1866f91c1
--- /dev/null
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hpet/HpetParser.c
@@ -0,0 +1,221 @@
+/** @file
+  HPET table parser
+
+  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+  @par Reference(s):
+- HPET spec, version 1.0a
+**/
+
+#include 
+#include "AcpiParser.h"
+
+STATIC ACPI_DESCRIPTION_HEADER_INFO  AcpiHdrInfo;
+
+/**
+  This function prints HPET page protection flags.
+  If no format string is specified the Format must be NULL.
+
+  @param [in] Format  Optional format string for tracing the data.
+  @param [in] Ptr Pointer to the start of the buffer.
+**/
+VOID
+EFIAPI
+DumpHpetPageProtectionFlag (
+  IN CONST CHAR16  *Format OPTIONAL,
+  IN UINT8 *Ptr
+  )
+{
+  if (Format != NULL) {
+Print (Format, *(UINT8 *)Ptr);
+return;
+  }
+
+  Print (L"0x%X ", *(UINT8 *)Ptr);
+  switch (*Ptr) {
+case 0:
+  Print (L"(no guarantee for page protection)");
+  break;
+case 1:
+  Print (L"(4K page protection)");
+  break;
+case 2:
+  Print (L"(64K page protection)");
+  break;
+default:
+  Print (L"(OEM Reserved)");
+  break;
+  }
+
+  return;
+}
+
+/**
+  An ACPI_PARSER array describing the ACPI HPET flags.
+**/
+STATIC CONST ACPI_PARSER  DumpHpetFlagParser[] = {
+  { L"Page Protection Flag", 4, 0, NULL,DumpHpetPageProtectionFlag, NULL, 
NULL, NULL },
+  { L"OEM Attributes",   4, 4, L"0x%x", NULL,   NULL, 
NULL, NULL }
+};
+
+/**
+  This function prints HPET Flags fields.
+  If no format string is specified the Format must be NULL.
+
+  @param [in] Format  Optional format string for tracing the data.
+  @param [in] Ptr Pointer to the start of the buffer.
+**/
+VOID
+EFIAPI
+DumpHpetFlag (
+  IN CONST CHAR16  *Format OPTIONAL,
+  IN UINT8 *Ptr
+  )
+{
+  if (Format != NULL) {
+Print (Format, *(UINT8 *)Ptr);
+return;
+  }
+
+  Print (L"0x%X\n", *(UINT8 *)Ptr);
+  ParseAcpiBitFields (
+TRUE,
+2,
+NULL,
+Ptr,
+4,
+PARSER_PARAMS (DumpHpetFlagParser)
+);
+}
+
+/**
+  This function prints HPET Counter size fields.
+  If no format string is specified the Format must be NULL.
+
+  @param [in] Format  Optional format string for tracing the data.
+  @param [in] Ptr Pointer to the start of the buffer.
+**/
+VOID
+EFIAPI
+DumpCounterSize (
+  IN CONST CHAR16  *Format OPTIONAL,
+  IN UINT8 *Ptr
+  )
+{
+  if (Format != NULL) {
+Print (Format, *(UINT32 *)Ptr);
+return;
+  }
+
+  Print (L"0x%X ", *(UINT32 *)Ptr);
+  if (*Ptr == 0) {
+Print (L"(Max 32-bit counter size)");
+  } else {
+Print (L"(Max 64-bit counter size)");
+  }
+}
+
+/**
+  This function validates the flags.
+
+  @param [in] Ptr Pointer to the start of the field data.
+  @param [in] Context Pointer to context specific information e.g. this
+  could be a pointer to the ACPI table header.
+**/
+STATIC
+VOID
+EFIAPI
+ValidateHpetRevId (
+  IN UINT8  *Ptr,
+  IN VOID   *Context
+  )
+{
+  if ((*(UINT8 *)Ptr) == 0) {
+IncrementErrorCount ();
+Print (
+  L"\nERROR: HPET Hardware Rev ID must be set."
+  );
+  }
+}
+
+/**
+  An ACPI_PARSER array describing the ACPI HPET Event Timer Block ID.
+**/
+STATIC CONST 

[edk2-devel] [PATCH v1 2/2] ShellPkg/Acpiview: Adds ACPI WSMT Table parser

2024-03-05 Thread Abdul Lateef Attar via groups.io
From: Abdul Lateef Attar 

Adds WSMT parse to the UefiShellAcpiViewCommandLib library.

Cc: Zhichao Gao 
Cc: Pierre Gondois  
Signed-off-by: Abdul Lateef Attar 
---
 .../UefiShellAcpiViewCommandLib/AcpiParser.h  | 17 
 .../Parsers/Wsmt/WsmtParser.c | 89 +++
 .../UefiShellAcpiViewCommandLib.c |  1 +
 .../UefiShellAcpiViewCommandLib.inf   |  1 +
 4 files changed, 108 insertions(+)
 create mode 100644 
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Wsmt/WsmtParser.c

diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h
index ba3364f2c2..6468fe5d8c 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h
@@ -985,6 +985,23 @@ ParseAcpiSsdt (
   IN UINT8AcpiTableRevision
   );
 
+/**
+  This function parses the ACPI WSMT table.
+
+  @param [in] Trace  If TRUE, trace the ACPI fields.
+  @param [in] PtrPointer to the start of the buffer.
+  @param [in] AcpiTableLengthLength of the ACPI table.
+  @param [in] AcpiTableRevision  Revision of the ACPI table.
+**/
+VOID
+EFIAPI
+ParseAcpiWsmt (
+  IN BOOLEAN  Trace,
+  IN UINT8*Ptr,
+  IN UINT32   AcpiTableLength,
+  IN UINT8AcpiTableRevision
+  );
+
 /**
   This function parses the ACPI XSDT table
   and optionally traces the ACPI table fields.
diff --git 
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Wsmt/WsmtParser.c 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Wsmt/WsmtParser.c
new file mode 100644
index 00..eb2668c059
--- /dev/null
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Wsmt/WsmtParser.c
@@ -0,0 +1,89 @@
+/** @file
+  WSMT table parser
+
+  Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+  @par Reference(s):
+- Windows SMM Security Mitigation Table spec, version 1.0
+**/
+
+#include 
+#include "AcpiParser.h"
+
+STATIC ACPI_DESCRIPTION_HEADER_INFO  AcpiHdrInfo;
+
+/**
+  An ACPI_PARSER array describing the WSMT Protection flag .
+**/
+STATIC CONST ACPI_PARSER  WsmtProtectionFlagParser[] = {
+  { L"FIXED_COMM_BUFFERS ",1,  0, L"0x%x", NULL, NULL, NULL, 
NULL },
+  { L"COMM_BUFFER_NESTED_PTR_PROTECTION ", 1,  1, L"0x%x", NULL, NULL, NULL, 
NULL },
+  { L"SYSTEM_RESOURCE_PROTECTION ",1,  2, L"0x%x", NULL, NULL, NULL, 
NULL },
+  { L"Reserved ",  29, 3, L"0x%x", NULL, NULL, NULL, 
NULL },
+};
+
+/**
+  This function prints WSMT Protection flag.
+  If no format string is specified the Format must be NULL.
+
+  @param [in] Format  Optional format string for tracing the data.
+  @param [in] Ptr Pointer to the start of the buffer.
+**/
+VOID
+EFIAPI
+DumpWsmtProtectionFlag (
+  IN CONST CHAR16  *Format OPTIONAL,
+  IN UINT8 *Ptr
+  )
+{
+  if (Format != NULL) {
+Print (Format, *(UINT32 *)Ptr);
+return;
+  }
+
+  Print (L"0x%X\n", *(UINT32 *)Ptr);
+  ParseAcpiBitFields (
+TRUE,
+2,
+NULL,
+Ptr,
+4,
+PARSER_PARAMS (WsmtProtectionFlagParser)
+);
+}
+
+/**
+  An ACPI_PARSER array describing the ACPI WSMT Table.
+**/
+STATIC CONST ACPI_PARSER  WsmtParser[] = {
+  PARSE_ACPI_HEADER (),
+  { L"Protection Flag",4,36, NULL, DumpWsmtProtectionFlag, NULL, 
NULL, NULL }
+};
+
+/**
+  This function parses the ACPI WSMT table.
+
+  @param [in] Trace  If TRUE, trace the ACPI fields.
+  @param [in] PtrPointer to the start of the buffer.
+  @param [in] AcpiTableLengthLength of the ACPI table.
+  @param [in] AcpiTableRevision  Revision of the ACPI table.
+**/
+VOID
+EFIAPI
+ParseAcpiWsmt (
+  IN BOOLEAN  Trace,
+  IN UINT8*Ptr,
+  IN UINT32   AcpiTableLength,
+  IN UINT8AcpiTableRevision
+  )
+{
+  ParseAcpi (
+Trace,
+0,
+"WSMT",
+Ptr,
+AcpiTableLength,
+PARSER_PARAMS (WsmtParser)
+);
+}
diff --git 
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c
index 9e15979ea2..0bdf068fe0 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c
@@ -73,6 +73,7 @@ ACPI_TABLE_PARSER  ParserList[] = {
   { EFI_ACPI_6_2_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE,  
  ParseAcpiSpcr },
   { EFI_ACPI_6_2_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE, 
  ParseAcpiSrat },
   { EFI_ACPI_6_2_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE, 
  ParseAcpiSsdt },
+  { EFI_ACPI_6_5_WINDOWS_SMM_SECURITY_MITIGATION_TABLE_SIGNATURE,  
  ParseAcpiWsmt },
   { 

[edk2-devel] [PATCH v1 0/2] ShellPkg/AcpiView: Adds HPET and WSMT parser

2024-03-05 Thread Abdul Lateef Attar via groups.io
From: Abdul Lateef Attar 

Adds HPET and WSMT parser for acpiview.

Cc: Zhichao Gao 
Cc: Pierre Gondois  

Abdul Lateef Attar (2):
  ShellPkg/Acpiview: Adds HPET parser
  ShellPkg/Acpiview: Adds ACPI WSMT Table parser

 .../UefiShellAcpiViewCommandLib/AcpiParser.h  |  34 +++
 .../Parsers/Hpet/HpetParser.c | 221 ++
 .../Parsers/Wsmt/WsmtParser.c |  89 +++
 .../UefiShellAcpiViewCommandLib.c |   2 +
 .../UefiShellAcpiViewCommandLib.inf   |   2 +
 5 files changed, 348 insertions(+)
 create mode 100644 
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hpet/HpetParser.c
 create mode 100644 
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Wsmt/WsmtParser.c

-- 
2.34.1



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




Re: [edk2-devel] [staging/dynamictables-reorg PATCH v1 0/2] DynamicTablesPkg: Arch Common Namespace

2024-03-05 Thread Abdul Lateef Attar via groups.io

Hi Sami, Sunil,

    Yesterday I submitted few patches on main branch; I'll port those 
changes to this staging branch.


Currently from AMD X64 perspective I'm working on ACPI tables, once that 
is done, then will move to smbios tables.


Thanks

AbduL


On 05-03-2024 16:22, Sunil V L wrote:

Caution: This message originated from an External Source. Use proper caution 
when opening attachments, clicking links, or responding.


Hi Sami,

On Mon, Mar 04, 2024 at 04:46:15PM +, Sami Mujawar wrote:

This series is an initial proposal for introducing an Arch Common
namespace. Based on the mailing list discussions, further patch
series to move the configuration manager objects to the Arch
Common namespace and the corresponding platform support patches
shall be submitted for review.

The changes can be seen at:
https://github.com/samimujawar/edk2/tree/3007_dynamictables_reorg_arch_namespace_v1


Looks good to me.

Reviewed-by: Sunil V L 

How do we plan creating further patches? I am fine with any approach you
suggest but don't want to duplicate effort. I think it would be helpful
to know whether someone is already working on it.

Thanks!
Sunil



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




Re: [edk2-devel] [staging/dynamictables-reorg PATCH v1 1/2] DynamicTablesPkg: Introduce an Arch Common Namespace

2024-03-05 Thread Sami Mujawar
Hi Sunil,

Thank you for the feedback.
> +
> +The CM_OBJECT_ID type is used to identify the Configuration Manager
> + objects.
> +
> +## Description of Configuration Manager Object ID
> +
> +| 31 30 29 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 
> 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 6 5 4 3 2 1 0 |
> +| ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: 
> | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
> +| `Name Space ID` | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 
> 0 | 0 | 0 | 0 | 0 | 0 | `Object ID` |
> +-
> +
NIT: Can we minimize the width by using range instead of each bits? 31-28,
27-8 and 7-0 would be better even when it is rendered in the browser
IMO.
[SAMI] Ack.

Regards,

Sami Mujawar

Otherwise LGTM.


Thanks!


Reviewed-by: Sunil V L mailto:suni...@ventanamicro.com>>














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




Re: [edk2-devel] [staging/dynamictables-reorg PATCH v1 0/2] DynamicTablesPkg: Arch Common Namespace

2024-03-05 Thread Sunil V L
Hi Sami,

On Mon, Mar 04, 2024 at 04:46:15PM +, Sami Mujawar wrote:
> This series is an initial proposal for introducing an Arch Common
> namespace. Based on the mailing list discussions, further patch
> series to move the configuration manager objects to the Arch
> Common namespace and the corresponding platform support patches
> shall be submitted for review.
> 
> The changes can be seen at:
> https://github.com/samimujawar/edk2/tree/3007_dynamictables_reorg_arch_namespace_v1
> 
Looks good to me.

Reviewed-by: Sunil V L 

How do we plan creating further patches? I am fine with any approach you
suggest but don't want to duplicate effort. I think it would be helpful
to know whether someone is already working on it.

Thanks!
Sunil


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




Re: [edk2-devel] [staging/dynamictables-reorg PATCH v1 1/2] DynamicTablesPkg: Introduce an Arch Common Namespace

2024-03-05 Thread Sunil V L
On Mon, Mar 04, 2024 at 04:46:16PM +, Sami Mujawar wrote:
> Introduce an Arch Common Namespace so that the common
> architectural objects can be defined under this namespace
> in the Configuration manager. Also rearrange the namespace
> IDs so that the Arch Common Namespace has a value of 0x1,
> the Arm Namespace ID has a value of 0x2, and the Custom/OEM
> namespace ID has a value of 0xF. Also introduce a helper
> macro to create configuration manager objects in the Arch
> Common Namespace.
> 
> The Arch Common Namespace shall contain objects like
> Serial Port, PCI Bus information etc. It must not contain
> Architecture specific components e.g. GICC which is Arm
> architecture specific component and therefore must be
> defined in the Arm Namespace.
> 
> Cc: Pierre Gondois 
> Cc: Yeo Reum Yun 
> Cc: Sunil V L 
> Cc: AbdulLateef Attar 
> Cc: Jeshua Smith 
> Cc: Jeff Brasen 
> Cc: Girish Mahadevan 
> Cc: Leif Lindholm 
> Cc: Meenakshi Aggarwal 
> Signed-off-by: Sami Mujawar 
> ---
>  DynamicTablesPkg/Include/ConfigurationManagerObject.h | 26 --
>  DynamicTablesPkg/Readme.md| 98 
> 
>  2 files changed, 117 insertions(+), 7 deletions(-)
> 
> diff --git a/DynamicTablesPkg/Include/ConfigurationManagerObject.h 
> b/DynamicTablesPkg/Include/ConfigurationManagerObject.h
> index 
> 74ad25d5d94a34da39e6c8dd909f9863e223d086..4255c82b42aefb52148a14a44c91328ec82f1550
>  100644
> --- a/DynamicTablesPkg/Include/ConfigurationManagerObject.h
> +++ b/DynamicTablesPkg/Include/ConfigurationManagerObject.h
> @@ -1,6 +1,6 @@
>  /** @file
>  
> -  Copyright (c) 2017 - 2022, ARM Limited. All rights reserved.
> +  Copyright (c) 2017 - 2024, Arm Limited. All rights reserved.
>  
>SPDX-License-Identifier: BSD-2-Clause-Patent
>  
> @@ -29,8 +29,9 @@ 
> ___
>  
>  Bits: [31:28] - Name Space ID
>   - Standard
> -0001 - ARM
> -1000 - Custom/OEM
> +0001 - Arch Common
> +0010 - ARM
> + - Custom/OEM
>  All other values are reserved.
>  
>  Bits: [27:16] - Reserved.
> @@ -105,10 +106,11 @@ typedef UINT32 CM_OBJECT_ID;
>  for the Configuration Manager Objects.
>  */
>  typedef enum ObjectNameSpaceID {
> -  EObjNameSpaceStandard,  ///< Standard Objects Namespace
> -  EObjNameSpaceArm,   ///< ARM Objects Namespace
> -  EObjNameSpaceOem = 0x8, ///< OEM Objects Namespace
> -  EObjNameSpaceMax
> +  EObjNameSpaceStandard,  ///< Standard Objects Namespace
> +  EObjNameSpaceArchCommon,///< Arch Common Objects Namespace
> +  EObjNameSpaceArm,   ///< ARM Objects Namespace
> +  EObjNameSpaceOem = 0xF, ///< OEM Objects Namespace
> +  EObjNameSpaceMax,
>  } EOBJECT_NAMESPACE_ID;
>  
>  /** A descriptor for Configuration Manager Objects.
> @@ -182,6 +184,16 @@ typedef struct CmObjDescriptor {
>  #define CREATE_CM_ARM_OBJECT_ID(ObjectId) \
>(CREATE_CM_OBJECT_ID (EObjNameSpaceArm, ObjectId))
>  
> +/** This macro returns a Configuration Manager Object ID
> +in the Arch Common Object Namespace.
> +
> +  @param [in] ObjectIdThe Object ID.
> +
> +  @retval Returns an Arch Common Configuration Manager Object ID.
> +**/
> +#define CREATE_CM_ARCH_COMMON_OBJECT_ID(ObjectId) \
> +  (CREATE_CM_OBJECT_ID (EObjNameSpaceArchCommon, ObjectId))
> +
>  /** This macro returns a Configuration Manager Object ID
>  in the OEM Object Namespace.
>  
> diff --git a/DynamicTablesPkg/Readme.md b/DynamicTablesPkg/Readme.md
> index 
> c1cdc5e17326709e811a2f3fe530316e95dec7ee..ba4ae7155f13a77298ece74cc567bb3e9dfc303d
>  100644
> --- a/DynamicTablesPkg/Readme.md
> +++ b/DynamicTablesPkg/Readme.md
> @@ -402,3 +402,101 @@ Refer to the following presentation from *UEFI Plugfest 
> Seattle 2018*:
>  
>  [Dynamic Tables Framework: A Step Towards Automatic Generation of Advanced 
> Configuration and Power Interface (ACPI) & System Management BIOS (SMBIOS) 
> Tables](http://www.uefi.org/sites/default/files/resources/Arm_Dynamic%20Tables%20Framework%20A%20Step%20Towards%20Automatic%20Generation%20of%20Advanced%20Configuration%20and%20Power%20Interface%20%28ACPI%29%20%26%20System%20Management%20BIOS%20%28SMBIOS%29%20Tables%20_0.pdf)
>  
> +## Configuration Manager Objects
> +
> +The CM_OBJECT_ID type is used to identify the Configuration Manager
> +objects.
> +
> +## Description of Configuration Manager Object ID
> +
> +| 31 30 29 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 
> 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 6 5 4 3 2 1 0 |
> +| ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: 
> | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
> +| `Name Space ID` | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 
> 0 | 0 | 0 | 0 | 0 | 0 | `Object ID` |
> 

Re: [edk2-devel] [staging/dynamictables-reorg PATCH v1 0/2] DynamicTablesPkg: Arch Common Namespace

2024-03-05 Thread Sami Mujawar
Hi Pierre,

The staging branches have been created at:
https://github.com/tianocore/edk2-staging/tree/dynamictables-reorg
https://github.com/tianocore/edk2-platforms/tree/devel-dynamictables-reorg

It would be good to have feedback from other stakeholders for this patch series.

Regards,

Sami Mujawar

On 05/03/2024, 08:45, "Pierre Gondois" mailto:pierre.gond...@arm.com>> wrote:


Hello Sami,
The patches look good to me:
Reviewed-by: Pierre Gondois mailto:pierre.gond...@arm.com>>


Shall we proceed to create the staging branch ?


Regards,
Pierre


On 3/4/24 17:46, Sami Mujawar wrote:
> This series is an initial proposal for introducing an Arch Common
> namespace. Based on the mailing list discussions, further patch
> series to move the configuration manager objects to the Arch
> Common namespace and the corresponding platform support patches
> shall be submitted for review.
> 
> The changes can be seen at:
> https://github.com/samimujawar/edk2/tree/3007_dynamictables_reorg_arch_namespace_v1
>  
> 
> 
> Sami Mujawar (2):
> DynamicTablesPkg: Introduce an Arch Common Namespace
> DynamicTablesPkg: Identify common Arm namespace objects
> 
> DynamicTablesPkg/Include/ConfigurationManagerObject.h | 26 --
> DynamicTablesPkg/Readme.md | 98 
> 2 files changed, 117 insertions(+), 7 deletions(-)
> 





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




Re: [edk2-devel] [PATCH v8 14/37] UefiCpuPkg: Add CpuMmuLib to UefiCpuPkg

2024-03-05 Thread Laszlo Ersek
Hello Chao,

On 3/4/24 04:39, Chao Li wrote:
> Hi Laszlo,
> 
> OK.
> 
> When I discussed the CpuMmuLib API as a public API with Ray in the early
> days, the API recommended by Ray should be the patch 13 in this series,
> which only contains set/get memory region attribute, but in the first
> version in this series, it contains more API, one is ConfigureMmu API,
> which is included in ARM and RISCV versions. This API provides a
> interface called in PEI or DXE stage, it will configures the MMU and
> enables it, such as creating the page tables, filling the static page
> tables, cofniguring the MMU registers, enbale MMU, etc.
> 
> The paths for ARM and RISCV version APIs:
> 
> ARM: ArmPkg/Include/Library/ArmMmuLib.h
> 
> RISCV: UefiCpuPkg/Include/Library/BaseRiscVMmuLib.h

I have now re-read this subthread in its entirey, and I think I
understand what's up.

What confused me recently was your expression "so should we open
configure API?"

I think what you meant by "opening" was "publicly declaring".

Anyway, here's my recommendation (consistently with what I said earlier
in this thread):

- I think you need a new (lower-level) library class and instance for
exposing ConfigureMemoryManagementUnit().

Please see:  (msgid
<2a91f2f0-df4c-e106-65cd-79be16722...@redhat.com>).

- I do not recommend trying to unify the new LoongArch library classes
(low level and high level) with "ArmMmuLib.h" or "BaseRiscVMmuLib.h".

Each of "ArmMmuLib.h" and "BaseRiscVMmuLib.h" seems to declare both
low-level and high-level interfaces. For LoongArch, we apparently don't
want that; hence the idea to introduce two library classes for LoongArch
-- that may be considered an improved design.

At the same time, I don't believe that this requires us to unify
"ArmMmuLib.h" and "BaseRiscVMmuLib.h" with the new, LoongArch-motivated
library class design.

Laszlo



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




Re: [edk2-devel] [PATCH] OvmfPkg/SmbiosPlatformDxe: tweak fallback release date again

2024-03-05 Thread Laszlo Ersek
On 3/4/24 12:37, joeyli via groups.io wrote:
> Hi,
> 
> On Wed, Feb 07, 2024 at 04:02:52PM +0800, joeyli via groups.io wrote:
>> On Wed, Feb 07, 2024 at 03:55:49PM +0800, joeyli wrote:
>>> Hi Laszlo,
>>>
>>> First, thanks for your review!
>>>
>>> On Mon, Feb 05, 2024 at 05:41:25PM +0100, Laszlo Ersek wrote:
 On 2/4/24 10:29, Lee, Chun-Yi wrote:
> In case PcdFirmwareReleaseDateString is not set use a valid date
> as fallback. But the default valid date can _NOT_ pass the Microsoft
> SVVP test "Check SMBIOS Table Specific Requirements". The test emitted
> the error message:
>
> BIOS Release Date string is unexpected length: 8. This string must be in
> MM/DD/ format. No other format is allowed and no additional 
> information
> may be included. See field description in the SMBIOS specification.
>
> Base on SMBIOS spec v3.7.0:
>
> 08h 2.0+BIOS Release Date   BYTESTRING
> String number of the BIOS release date. The date
> string, if supplied, is in either mm/dd/yy or
> mm/dd/ format. If the year portion of the string
> is two digits, the year is assumed to be 19yy.
> NOTE: The mm/dd/ format is required for SMBIOS
> version 2.3 and later.
>
> So, let's tweek the fallback release date again.
>
> Fixes: a0f9628705e3 ("OvmfPkg/SmbiosPlatformDxe: tweak fallback release 
> date") [edk2-stable202305~327]
> Signed-off-by: "Lee, Chun-Yi" 
> ---
>  OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c 
> b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
> index 0ca3776045..e929da6b81 100644
> --- a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
> +++ b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
> @@ -160,7 +160,7 @@ InstallAllStructures (
>  DateStr = (CHAR16 *)FixedPcdGetPtr (PcdFirmwareReleaseDateString);
>  DateLen = StrLen (DateStr);
>  if (DateLen < 3) {
> -  DateStr = L"2/2/2022";
> +  DateStr = L"02/02/2022";
>DateLen = StrLen (DateStr);
>  }
>  

 Are you proposing this as an important (but low risk) bugfix that might
 qualify for the freeze(s)? If so, please loop in Liming and Mike.

>>>
>>> hm... What does freeze mean? 
>>>
>>
>> ah... You mean soft feature freeze for edk2-stable202402. 
>>
>> Hi Liming, Michael,
>>
>> This change is important but low risk. Could you please consider to add it
>> to edk2-stable202402 release?
>>
>> Thanks a lot!
>> Joey Lee
> 
> This patch is not in edk2-stable202402. Will it to be merged to next release?

Thanks for the reminder, and sorry about the delay!

Merged as commit 2a0d4a2641a7, via
.

For future contributions: please run PatchCheck.py on the patch series
before formatting and posting it (better yet, submit a personal CI build
PR).

Thanks
Laszlo



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




Re: [edk2-devel] [staging/dynamictables-reorg PATCH v1 0/2] DynamicTablesPkg: Arch Common Namespace

2024-03-05 Thread PierreGondois

Hello Sami,
The patches look good to me:
Reviewed-by: Pierre Gondois 

Shall we proceed to create the staging branch ?

Regards,
Pierre

On 3/4/24 17:46, Sami Mujawar wrote:

This series is an initial proposal for introducing an Arch Common
namespace. Based on the mailing list discussions, further patch
series to move the configuration manager objects to the Arch
Common namespace and the corresponding platform support patches
shall be submitted for review.

The changes can be seen at:
https://github.com/samimujawar/edk2/tree/3007_dynamictables_reorg_arch_namespace_v1

Sami Mujawar (2):
   DynamicTablesPkg: Introduce an Arch Common Namespace
   DynamicTablesPkg: Identify common Arm namespace objects

  DynamicTablesPkg/Include/ConfigurationManagerObject.h | 26 --
  DynamicTablesPkg/Readme.md| 98 

  2 files changed, 117 insertions(+), 7 deletions(-)




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