Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM

2023-06-06 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

I can't retrigger the CI to try it. @Kinney, Michael 
D, could you please help to retrigger it?

Thanks
Abner

From: Wu, Hao A 
Sent: Tuesday, June 6, 2023 10:25 AM
To: Andrew Fish ; Leif Lindholm ; 
Kinney, Michael D ; Gao, Liming 
; devel@edk2.groups.io; Hsueh, Hong-Chih (Neo) 
; Chang, Abner ; He, Jiangang 

Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in 
AhciPei PEIM


[AMD Official Use Only - General]

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

Add Stewards.

I cannot merge PR https://github.com/tianocore/edk2/pull/4478 due to constant 
cancelled CI tests.
Could someone help with the situation or help to merge the change? Thanks in 
advance.

Best Regards,
Hao Wu

From: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>> On Behalf Of Wu, Hao A
Sent: Monday, June 5, 2023 12:32 PM
To: Hsueh, Hong-Chih (Neo) 
mailto:hong-chih.hs...@amd.com>>; Chang, Abner 
mailto:abner.ch...@amd.com>>; He, Jiangang 
mailto:jiangang...@amd.com>>; 
devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in 
AhciPei PEIM

Thanks all,

Tried to merge the patch via PR - https://github.com/tianocore/edk2/pull/4478, 
but failed 3 times (all due to some canceled CI tests).
Will re-try tomorrow.

Best Regards,
Hao Wu

From: Hsueh, Hong-Chih (Neo) 
mailto:hong-chih.hs...@amd.com>>
Sent: Saturday, June 3, 2023 2:12 AM
To: Chang, Abner mailto:abner.ch...@amd.com>>; Wu, Hao A 
mailto:hao.a...@intel.com>>; He, Jiangang 
mailto:jiangang...@amd.com>>; 
devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in 
AhciPei PEIM


[AMD Official Use Only - General]

Hi Abner,

Thank you for your feedback. I updated the commit and re-create the PR as below:
https://github.com/tianocore/edk2/pull/4471

Regards,
Neo


From: Chang, Abner mailto:abner.ch...@amd.com>>
Sent: Friday, June 2, 2023 11:31 AM
To: Hsueh, Hong-Chih (Neo) 
mailto:hong-chih.hs...@amd.com>>; Wu, Hao A 
mailto:hao.a...@intel.com>>; He, Jiangang 
mailto:jiangang...@amd.com>>; 
devel@edk2.groups.io 
mailto:devel@edk2.groups.io>>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in 
AhciPei PEIM


[AMD Official Use Only - General]


Hi Leo,

Please add Hao's RB in the commit message below your signed-off-by, thus we 
know this patch has been reviewed.

I also suggest to update your commit subject to "MdeModulePkg/Bus: Fix port 
multiplier port in AhciPei PEIM".



Please resend the PR with above updates, then Hao will add "Push" label to this 
PR once your change passed CI.



Thanks

Abner







From: Hsueh, Hong-Chih (Neo) 
mailto:hong-chih.hs...@amd.com>>
Sent: Friday, June 2, 2023 10:37 PM
To: Wu, Hao A mailto:hao.a...@intel.com>>; He, Jiangang 
mailto:jiangang...@amd.com>>; 
devel@edk2.groups.io
Cc: Chang, Abner mailto:abner.ch...@amd.com>>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in 
AhciPei PEIM



[AMD Official Use Only - General]



Hi Hao,



Thank you for your review.



I already created a pull request for this commit, may I know how to proceed to 
merge it into master?



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





Regards,

Neo



From: Wu, Hao A mailto:hao.a...@intel.com>>
Sent: Thursday, June 1, 2023 10:14 PM
To: He, Jiangang mailto:jiangang...@amd.com>>; 
devel@edk2.groups.io 
mailto:devel@edk2.groups.io>>; Hsueh, Hong-Chih (Neo) 
mailto:hong-chih.hs...@amd.com>>
Cc: Chang, Abner mailto:abner.ch...@amd.com>>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in 
AhciPei PEIM



[AMD Official Use Only - General]

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


Thanks.
Reviewed-by: Hao A Wu mailto:hao.a...@intel.com>>

Best Regards,
Hao Wu

> -Original Message-
> From: He, Jiangang mailto:jiangang...@amd.com>>
> Sent: Wednesday, May 31, 2023 10:49 PM
> To: Wu, Hao A mailto:hao.a...@intel.com>>; 
> devel@edk2.groups.io; Hsueh, Hong-
> Chih (Neo) mailto:hong-chih.hs...@amd.com>>
> Cc: Chang, Abner mailto:abner.ch...@amd.com>>
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
>
> [AMD Official Use Only - General]
>
> We did crisis recovery and Opal HD password unlock from S3 resume from
> SATA HD test on two different version of AHCI host controllers.
>
> Thanks,
> Jiangang
> -Original Message-
> From: Wu, Hao A mailto:hao.a...@intel.com>>
> Sent: Tuesday, May 30, 2023 10:30 PM
> To: devel@edk2.groups.io

Re: [edk2-devel] [PATCH] Maintainers.txt: Drop Radoslaw from sbsa-ref maintainers

2023-06-06 Thread Ard Biesheuvel
On Mon, 5 Jun 2023 at 21:26, Radoslaw Biernacki  wrote:
>
> Regardless of the long standing desire to resume involvement
> in the project, I'm unable to double the time in a day.
> That's why I'm removing myself from sbsa-ref maintainers.
>
> Signed-off-by: Radoslaw Biernacki 

Understood - thanks for all your contributions.

Pushed as 32dd70a3a1f0..93a71a67fd80

> ---
>  Maintainers.txt | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/Maintainers.txt b/Maintainers.txt
> index 24918d1c6e..020c72677a 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -374,7 +374,6 @@ F: Silicon/Qemu/SbsaQemu/
>  M: Ard Biesheuvel 
>  M: Leif Lindholm 
>  R: Graeme Gregory 
> -R: Radoslaw Biernacki 
>
>  Raspberry Pi platforms and silicon
>  F: Platform/RaspberryPi/
> --
> 2.41.0.rc0.172.g3f132b7071-goog
>


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




[edk2-devel] [PATCH edk2-platforms v2 2/2] Platform/SbsaQemu: read GIC base from TF-A

2023-06-06 Thread Marcin Juszkiewicz
Qemu has versioning for sbsa-ref platform. TF-A reads data from provided
DeviceTree and provides as SMC.

This change adds reading GIC base addresses into EDK2.

Signed-off-by: Marcin Juszkiewicz 
---
 .../SbsaQemuPlatformDxe.inf|  5 +
 .../Include/IndustryStandard/SbsaQemuSmc.h |  1 +
 .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c  | 18 ++
 3 files changed, 24 insertions(+)

diff --git 
a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf 
b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf
index cb1826979bd6..545794a8c7ff 100644
--- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf
+++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf
@@ -40,6 +40,11 @@ [Pcd]
 
   gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMajor
   gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMinor
+
+  gArmTokenSpaceGuid.PcdGicDistributorBase
+  gArmTokenSpaceGuid.PcdGicRedistributorsBase
+
+
 [Depex]
   TRUE
 
diff --git a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h 
b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h
index 5a179f69b629..24ae6e390abd 100644
--- a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h
+++ b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h
@@ -9,3 +9,4 @@
 #include 
 
 #define SIP_SVC_VERSION  SMC_SIP_FUNCTION_ID(1)
+#define SIP_SVC_GET_GIC  SMC_SIP_FUNCTION_ID(100)
diff --git 
a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c 
b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c
index 515d18564bd0..2c4ee54c3e6b 100644
--- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c
+++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c
@@ -70,5 +70,23 @@ InitializeSbsaQemuPlatformDxe (
   Arg1 = PcdGet32 (PcdPlatformVersionMinor);
 
   DEBUG ((DEBUG_INFO, "Platform version: %d.%d\n", Arg0, Arg1));
+
+  SmcResult = ArmCallSmc0 (SIP_SVC_GET_GIC, &Arg0, &Arg1, NULL);
+  if (SmcResult == SMC_ARCH_CALL_SUCCESS)
+  {
+Result = PcdSet64S (PcdGicDistributorBase, Arg0);
+ASSERT_RETURN_ERROR (Result);
+Result = PcdSet64S (PcdGicRedistributorsBase, Arg1);
+ASSERT_RETURN_ERROR (Result);
+  }
+
+  Arg0 = PcdGet64 (PcdGicDistributorBase);
+
+  DEBUG ((DEBUG_INFO, "GICD base: 0x%x\n", Arg0));
+
+  Arg0 = PcdGet64 (PcdGicRedistributorsBase);
+
+  DEBUG ((DEBUG_INFO, "GICR base: 0x%x\n", Arg0));
+
   return EFI_SUCCESS;
 }
-- 
2.40.1



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




[edk2-devel] [PATCH edk2-platforms v2 0/2] SbsaQemu: get GIC data from QEMU

2023-06-06 Thread Marcin Juszkiewicz
Those changes make use of recently added SMC calls to get GIC data from
QEMU instead of having them hardcoded. This is a beginning of changing
this platform to be more flexible.

My blog post about our plans to QEMU SBSA Reference Platform:

https://marcin.juszkiewicz.com.pl/2023/05/23/versioning-of-sbsa-ref-machine/

Marcin Juszkiewicz (2):
  Platform/SbsaQemu: read platform version
  Platform/SbsaQemu: read GIC base from TF-A

 Silicon/Qemu/SbsaQemu/SbsaQemu.dec|  3 ++
 Platform/Qemu/SbsaQemu/SbsaQemu.dsc   |  3 ++
 .../SbsaQemuPlatformDxe.inf   |  9 +
 .../Include/IndustryStandard/SbsaQemuSmc.h| 12 ++
 .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 37 +++
 5 files changed, 64 insertions(+)
 create mode 100644 Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h

-- 
2.40.1



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




[edk2-devel] [PATCH edk2-platforms v2 1/2] Platform/SbsaQemu: read platform version

2023-06-06 Thread Marcin Juszkiewicz
Qemu has versioning for sbsa-ref platform. TF-A reads it from provided
DeviceTree and provides as SMC.

This change adds reading platform version into EDK2.

Signed-off-by: Marcin Juszkiewicz 
---
 Silicon/Qemu/SbsaQemu/SbsaQemu.dec|  3 +++
 Platform/Qemu/SbsaQemu/SbsaQemu.dsc   |  3 +++
 .../SbsaQemuPlatformDxe.inf   |  4 
 .../Include/IndustryStandard/SbsaQemuSmc.h| 11 +++
 .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 19 +++
 5 files changed, 40 insertions(+)
 create mode 100644 Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h

diff --git a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec 
b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec
index 9448852967b6..5182978cf56d 100644
--- a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec
+++ b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec
@@ -67,3 +67,6 @@ [PcdsDynamic.common]
   
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisManufacturer|L""|VOID*|0x011B
   
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisAssetTag|L""|VOID*|0x011C
   gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisSKU|L""|VOID*|0x011D
+
+  
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMajor|0x0|UINT32|0x011E
+  
gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMinor|0x0|UINT32|0x011F
diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc 
b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
index 0bd0df4f0239..b88729ad8ad6 100644
--- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
+++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
@@ -558,6 +558,9 @@ [PcdsDynamicDefault.common]
   gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisAssetTag|L"AT"
   gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisSKU|L"SK"
 
+  gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMajor|0x0
+  gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMinor|0x0
+
 

 #
 # Components Section - list of all EDK II Modules needed by this Platform
diff --git 
a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf 
b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf
index 21d2135f6d17..cb1826979bd6 100644
--- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf
+++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf
@@ -20,6 +20,7 @@ [Sources]
   SbsaQemuPlatformDxe.c
 
 [Packages]
+  ArmPkg/ArmPkg.dec
   ArmVirtPkg/ArmVirtPkg.dec
   EmbeddedPkg/EmbeddedPkg.dec
   MdeModulePkg/MdeModulePkg.dec
@@ -27,6 +28,7 @@ [Packages]
   Silicon/Qemu/SbsaQemu/SbsaQemu.dec
 
 [LibraryClasses]
+  ArmSmcLib
   PcdLib
   DebugLib
   NonDiscoverableDeviceRegistrationLib
@@ -36,6 +38,8 @@ [Pcd]
   gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase
   gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize
 
+  gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMajor
+  gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMinor
 [Depex]
   TRUE
 
diff --git a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h 
b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h
new file mode 100644
index ..5a179f69b629
--- /dev/null
+++ b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h
@@ -0,0 +1,11 @@
+/** @file
+*
+*  Copyright (c) 2023, Linaro Ltd. All rights reserved.
+*
+*  SPDX-License-Identifier: BSD-2-Clause-Patent
+*
+**/
+
+#include 
+
+#define SIP_SVC_VERSION  SMC_SIP_FUNCTION_ID(1)
diff --git 
a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c 
b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c
index b7270a07abbd..515d18564bd0 100644
--- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c
+++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c
@@ -7,12 +7,14 @@
 *
 **/
 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -26,6 +28,10 @@ InitializeSbsaQemuPlatformDxe (
   EFI_STATUS Status;
   UINTN  Size;
   VOID*  Base;
+  UINTN  Arg0;
+  UINTN  Arg1;
+  UINTN  SmcResult;
+  RETURN_STATUS  Result;
 
   DEBUG ((DEBUG_INFO, "%a: InitializeSbsaQemuPlatformDxe called\n", 
__FUNCTION__));
 
@@ -51,5 +57,18 @@ InitializeSbsaQemuPlatformDxe (
 return Status;
   }
 
+  SmcResult = ArmCallSmc0 (SIP_SVC_VERSION, &Arg0, &Arg1, NULL);
+  if (SmcResult == SMC_ARCH_CALL_SUCCESS)
+  {
+Result = PcdSet32S (PcdPlatformVersionMajor, Arg0);
+ASSERT_RETURN_ERROR (Result);
+Result = PcdSet32S (PcdPlatformVersionMinor, Arg1);
+ASSERT_RETURN_ERROR (Result);
+  }
+
+  Arg0 = PcdGet32 (PcdPlatformVersionMajor);
+  Arg1 = PcdGet32 (PcdPlatformVersionMinor);
+
+  DEBUG ((DEBUG_INFO, "Platform version: %d.%d\n", Arg0, Arg1));
   return EFI_SUCCESS;
 }
-- 
2.40.1



-=-=-=-=-

[edk2-devel] [PATCH v6 0/3] OvmfPkg/Bhyve: install ACPI tables from memory

2023-06-06 Thread Corvin Köhne
CI: https://github.com/tianocore/edk2/pull/4379/checks

Corvin Köhne (3):
  OvmfPkg/Xen: export search of RSDP into a library function
  OvmfPkg/Xen: export AcpiTable installation into AcpiPlatformLib
  OvmfPkg/Bhyve: install ACPI tables from memory

 OvmfPkg/OvmfPkg.dec   |   4 +
 OvmfPkg/Bhyve/BhyveX64.dsc|   1 +
 OvmfPkg/OvmfXen.dsc   |   1 +
 .../Bhyve/AcpiPlatformDxe/AcpiPlatformDxe.inf |   1 +
 .../AcpiPlatformLib/DxeAcpiPlatformLib.inf|  26 
 .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |   2 +-
 OvmfPkg/Include/Library/AcpiPlatformLib.h |  49 ++
 OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c  |  37 -
 .../AcpiPlatformLib/DxeAcpiPlatformLib.c} | 140 +-
 OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.c |  47 +-
 10 files changed, 200 insertions(+), 108 deletions(-)
 create mode 100644 OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf
 create mode 100644 OvmfPkg/Include/Library/AcpiPlatformLib.h
 rename OvmfPkg/{XenAcpiPlatformDxe/Xen.c => 
Library/AcpiPlatformLib/DxeAcpiPlatformLib.c} (61%)

-- 
2.40.1



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




[edk2-devel] [PATCH v6 1/3] OvmfPkg/Xen: export search of RSDP into a library function

2023-06-06 Thread Corvin Köhne
Xen and bhyve are placing ACPI tables into system memory. So, they can
share the same code. Therefore, create a new library which searches and
installs ACPI tables from system memory.

Signed-off-by: Corvin Köhne 
Reviewed-by: Anthony PERARD 
Acked-by: Gerd Hoffmann 
Cc: Ard Biesheuvel 
Cc: Jiewen Yao 
Cc: Jordan Justen 
Cc: Julien Grall 
Cc: Rebecca Cran 
Cc: Peter Grehan 
---
 OvmfPkg/OvmfPkg.dec   |   4 +
 OvmfPkg/OvmfXen.dsc   |   1 +
 .../AcpiPlatformLib/DxeAcpiPlatformLib.inf|  26 
 .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |   1 +
 OvmfPkg/Include/Library/AcpiPlatformLib.h |  24 
 .../AcpiPlatformLib/DxeAcpiPlatformLib.c  |  67 ++
 OvmfPkg/XenAcpiPlatformDxe/Xen.c  | 119 +-
 7 files changed, 152 insertions(+), 90 deletions(-)
 create mode 100644 OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf
 create mode 100644 OvmfPkg/Include/Library/AcpiPlatformLib.h
 create mode 100644 OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.c

diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec
index cc5a4ceead25..e3861e5c1b39 100644
--- a/OvmfPkg/OvmfPkg.dec
+++ b/OvmfPkg/OvmfPkg.dec
@@ -20,6 +20,10 @@ [Includes]
   Csm/Include
 
 [LibraryClasses]
+  ##  @libraryclass  Search and install ACPI tables.
+  #
+  AcpiPlatformLib|Include/Library/AcpiPlatformLib.h
+
   ##  @libraryclass  Access bhyve's firmware control interface.
   BhyveFwCtlLib|Include/Library/BhyveFwCtlLib.h
 
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
index 02d7f204d418..210578c1d74d 100644
--- a/OvmfPkg/OvmfXen.dsc
+++ b/OvmfPkg/OvmfXen.dsc
@@ -322,6 +322,7 @@ [LibraryClasses.common.UEFI_DRIVER]
   PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
 
 [LibraryClasses.common.DXE_DRIVER]
+  AcpiPlatformLib|OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   ResetSystemLib|OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
diff --git a/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf 
b/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf
new file mode 100644
index ..dfe0e5623d32
--- /dev/null
+++ b/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf
@@ -0,0 +1,26 @@
+## @file
+#  ACPI Platform Library Instance.
+#
+#  Copyright (C) 2023, Corvin Köhne 
+#
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+[Defines]
+  INF_VERSION= 0x00010005
+  BASE_NAME  = DxeAcpiPlatformLib
+  FILE_GUID  = 578F441A-4A4C-4D24-B9BE-F783152B46F6
+  MODULE_TYPE= DXE_DRIVER
+  VERSION_STRING = 1.0
+  LIBRARY_CLASS  = AcpiPlatformLib
+
+[Sources]
+  DxeAcpiPlatformLib.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  OvmfPkg/OvmfPkg.dec
+
+[LibraryClasses]
+  BaseLib
+  DebugLib
diff --git a/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf 
b/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
index d3a6353a50a6..65374569ddc2 100644
--- a/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
+++ b/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
@@ -32,6 +32,7 @@ [Packages]
   OvmfPkg/OvmfPkg.dec
 
 [LibraryClasses]
+  AcpiPlatformLib
   BaseLib
   DebugLib
   UefiBootServicesTableLib
diff --git a/OvmfPkg/Include/Library/AcpiPlatformLib.h 
b/OvmfPkg/Include/Library/AcpiPlatformLib.h
new file mode 100644
index ..b0a3c5bd0048
--- /dev/null
+++ b/OvmfPkg/Include/Library/AcpiPlatformLib.h
@@ -0,0 +1,24 @@
+/** @file
+  Copyright (c) 2023, Corvin Köhne 
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+/**
+  Searches and returns the address of the ACPI Root System Description Pointer 
(RSDP) in system memory.
+
+  @param  StartAddressStart address of search range.
+  @param  EndAddress  End address of search range.
+  @param  RsdpPtr Return pointer to RSDP.
+
+  @retval EFI_SUCCESS RSDP successfully found.
+  @retval EFI_NOT_FOUND   Couldn't find RSDP.
+  @retval EFI_ABORTED Invalid RSDP found.
+**/
+EFI_STATUS
+EFIAPI
+GetAcpiRsdpFromMemory (
+  IN UINT64 StartAddress,
+  IN UINT64 EndAddress,
+  OUT EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER  **RsdpPtr
+  );
diff --git a/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.c 
b/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.c
new file mode 100644
index ..9dd9026edb12
--- /dev/null
+++ b/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.c
@@ -0,0 +1,67 @@
+/** @file
+  OVMF ACPI support
+
+  Copyright (C) 2021, Red Hat, Inc.
+  Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.
+  Copyright (c) 2012, Bei Guan 
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include 
+#include 
+#include 
+
+EFI_STATUS
+EFIAPI
+GetAcpiRsdpFromMemory (
+  IN UINTNStartAddress,
+  IN UINTNEndAddr

[edk2-devel] [PATCH v6 2/3] OvmfPkg/Xen: export AcpiTable installation into AcpiPlatformLib

2023-06-06 Thread Corvin Köhne
This makes the function reuseable by bhyve.

Signed-off-by: Corvin Köhne 
Reviewed-by: Anthony PERARD 
Acked-by: Gerd Hoffmann 
Cc: Ard Biesheuvel 
Cc: Jiewen Yao 
Cc: Jordan Justen 
Cc: Julien Grall 
Cc: Rebecca Cran 
Cc: Peter Grehan 
---
 .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |   1 -
 OvmfPkg/Include/Library/AcpiPlatformLib.h |  25 ++
 .../AcpiPlatformLib/DxeAcpiPlatformLib.c  | 185 +
 OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.c |  47 +++-
 OvmfPkg/XenAcpiPlatformDxe/Xen.c  | 257 --
 5 files changed, 254 insertions(+), 261 deletions(-)
 delete mode 100644 OvmfPkg/XenAcpiPlatformDxe/Xen.c

diff --git a/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf 
b/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
index 65374569ddc2..be175d290f92 100644
--- a/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
+++ b/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
@@ -25,7 +25,6 @@ [Sources]
   AcpiPlatform.c
   AcpiPlatform.h
   EntryPoint.c
-  Xen.c
 
 [Packages]
   MdePkg/MdePkg.dec
diff --git a/OvmfPkg/Include/Library/AcpiPlatformLib.h 
b/OvmfPkg/Include/Library/AcpiPlatformLib.h
index b0a3c5bd0048..73a170636032 100644
--- a/OvmfPkg/Include/Library/AcpiPlatformLib.h
+++ b/OvmfPkg/Include/Library/AcpiPlatformLib.h
@@ -4,6 +4,8 @@
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
+#include 
+
 /**
   Searches and returns the address of the ACPI Root System Description Pointer 
(RSDP) in system memory.
 
@@ -22,3 +24,26 @@ GetAcpiRsdpFromMemory (
   IN UINT64 EndAddress,
   OUT EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER  **RsdpPtr
   );
+
+/**
+  Get Acpi tables from the RSDP structure. And installs ACPI tables
+  into the RSDT/XSDT using InstallAcpiTable. Some signature of the installed
+  ACPI tables are: FACP, APIC, HPET, WAET, SSDT, FACS, DSDT.
+
+  @param  AcpiProtocol   Protocol instance pointer.
+
+  @return EFI_SUCCESSThe table was successfully inserted.
+  @return EFI_INVALID_PARAMETER  Either AcpiTableBuffer is NULL, TableHandle is
+ NULL, or AcpiTableBufferSize and the size
+ field embedded in the ACPI table pointed to
+ by AcpiTableBuffer are not in sync.
+  @return EFI_OUT_OF_RESOURCES   Insufficient resources exist to complete the
+request.
+
+**/
+EFI_STATUS
+EFIAPI
+InstallAcpiTablesFromRsdp (
+  IN EFI_ACPI_TABLE_PROTOCOL   *AcpiProtocol,
+  IN EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER  *Rsdp
+  );
diff --git a/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.c 
b/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.c
index 9dd9026edb12..228cb20ee697 100644
--- a/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.c
+++ b/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.c
@@ -65,3 +65,188 @@ GetAcpiRsdpFromMemory (
 
   return EFI_NOT_FOUND;
 }
+
+EFI_STATUS
+EFIAPI
+InstallAcpiTablesFromRsdp (
+  IN EFI_ACPI_TABLE_PROTOCOL   *AcpiProtocol,
+  IN EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER  *Rsdp
+  )
+{
+  EFI_STATUS  Status;
+  UINTN   TableHandle;
+
+  EFI_ACPI_DESCRIPTION_HEADER   *Rsdt;
+  EFI_ACPI_DESCRIPTION_HEADER   *Xsdt;
+  VOID  *CurrentTableEntry;
+  UINTN CurrentTablePointer;
+  EFI_ACPI_DESCRIPTION_HEADER   *CurrentTable;
+  UINTN Index;
+  UINTN NumberOfTableEntries;
+  EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *Fadt2Table;
+  EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE *Fadt1Table;
+  EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE  *Facs2Table;
+  EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE  *Facs1Table;
+  EFI_ACPI_DESCRIPTION_HEADER   *DsdtTable;
+
+  Fadt2Table   = NULL;
+  Fadt1Table   = NULL;
+  Facs2Table   = NULL;
+  Facs1Table   = NULL;
+  DsdtTable= NULL;
+  TableHandle  = 0;
+  NumberOfTableEntries = 0;
+
+  //
+  // If XSDT table is find, just install its tables.
+  // Otherwise, try to find and install the RSDT tables.
+  //
+  if (Rsdp->XsdtAddress) {
+//
+// Retrieve the addresses of XSDT and
+// calculate the number of its table entries.
+//
+Xsdt = (EFI_ACPI_DESCRIPTION_HEADER 
*)(UINTN)Rsdp->XsdtAddress;
+NumberOfTableEntries =
+  (Xsdt->Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / sizeof (UINT64);
+
+//
+// Install ACPI tables found in XSDT.
+//
+for (Index = 0; Index < NumberOfTableEntries; Index++) {
+  //
+  // Get the table entry from XSDT
+  //
+  CurrentTableEntry =
+(VOID *)((UINT8 *)Xsdt + sizeof (EFI_ACPI_DESCRIPTION_HEADER) +
+ Index * sizeof (UINT64));
+  CurrentTablePointer = (UINTN)*(UINT64 *)CurrentTableE

[edk2-devel] [PATCH v6 3/3] OvmfPkg/Bhyve: install ACPI tables from memory

2023-06-06 Thread Corvin Köhne
It's much easier to create configuration dependend ACPI tables for bhyve
than for OVMF. For this reason, don't use the statically created ACPI
tables provided by OVMF. Instead prefer the dynamically created ACPI
tables of bhyve. If bhyve provides no ACPI tables or we are unable to
detect those, fall back to OVMF tables.

Ideally, we use the qemu fwcfg interface to pass the ACPI tables from
bhyve to OVMF. bhyve will support this in the future. However, current
bhyve executables don't support passing ACPI tables by the qemu fwcfg
interface. They just copy the ACPI into main memory. For that reason,
pick up the ACPI tables from main memory.

Signed-off-by: Corvin Köhne 
Reviewed-by: Rebecca Cran 
Acked-by: Peter Grehan 
Acked-by: Gerd Hoffmann 
Cc: Ard Biesheuvel 
Cc: Jiewen Yao 
Cc: Jordan Justen 
---
 OvmfPkg/Bhyve/BhyveX64.dsc|  1 +
 .../Bhyve/AcpiPlatformDxe/AcpiPlatformDxe.inf |  1 +
 OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c  | 37 ++-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc
index bb317a50e6af..7b974706f958 100644
--- a/OvmfPkg/Bhyve/BhyveX64.dsc
+++ b/OvmfPkg/Bhyve/BhyveX64.dsc
@@ -341,6 +341,7 @@ [LibraryClasses.common.UEFI_DRIVER]
   PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf
 
 [LibraryClasses.common.DXE_DRIVER]
+  AcpiPlatformLib|OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatformDxe.inf 
b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatformDxe.inf
index 94c65f32dcab..75ed8e4a7deb 100644
--- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatformDxe.inf
+++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatformDxe.inf
@@ -35,6 +35,7 @@ [Packages]
   UefiCpuPkg/UefiCpuPkg.dec
 
 [LibraryClasses]
+  AcpiPlatformLib
   BaseLib
   BaseMemoryLib
   BhyveFwCtlLib
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c 
b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
index 999e9f151ebb..1e1c90614ea1 100644
--- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
+++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
@@ -10,6 +10,11 @@
 
 #include "AcpiPlatform.h"
 
+#include  // InstallAcpiTablesFromMemory()
+
+#define BHYVE_ACPI_PHYSICAL_ADDRESS  ((UINTN)0x000F2400)
+#define BHYVE_BIOS_PHYSICAL_END  ((UINTN)0x0010)
+
 EFI_STATUS
 EFIAPI
 InstallAcpiTable (
@@ -241,7 +246,37 @@ InstallAcpiTables (
   IN   EFI_ACPI_TABLE_PROTOCOL  *AcpiTable
   )
 {
-  EFI_STATUS  Status;
+  EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER  *Rsdp;
+  EFI_STATUSStatus;
+
+  Status = GetAcpiRsdpFromMemory (
+ BHYVE_ACPI_PHYSICAL_ADDRESS,
+ BHYVE_BIOS_PHYSICAL_END,
+ &Rsdp
+ );
+  if (EFI_ERROR (Status)) {
+return Status;
+  }
+
+  Status = InstallAcpiTablesFromRsdp (
+ AcpiTable,
+ Rsdp
+ );
+  if (!EFI_ERROR (Status)) {
+return EFI_SUCCESS;
+  }
+
+  if (Status != EFI_NOT_FOUND) {
+DEBUG (
+  (
+   DEBUG_WARN,
+   "%a: unable to install bhyve's ACPI tables (%r)\n",
+   __func__,
+   Status
+  )
+  );
+return Status;
+  }
 
   Status = InstallOvmfFvTables (AcpiTable);
 
-- 
2.40.1



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




Re: [edk2-devel] [PATCH] Maintainers.txt: Drop Radoslaw from sbsa-ref maintainers

2023-06-06 Thread Leif Lindholm
On Mon, Jun 05, 2023 at 21:26:18 +0200, Radoslaw Biernacki wrote:
> Regardless of the long standing desire to resume involvement
> in the project, I'm unable to double the time in a day.
> That's why I'm removing myself from sbsa-ref maintainers.

Many thanks for your contributions!

> Signed-off-by: Radoslaw Biernacki 
> ---
>  Maintainers.txt | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index 24918d1c6e..020c72677a 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -374,7 +374,6 @@ F: Silicon/Qemu/SbsaQemu/
>  M: Ard Biesheuvel 
>  M: Leif Lindholm 
>  R: Graeme Gregory 
> -R: Radoslaw Biernacki 
>  
>  Raspberry Pi platforms and silicon
>  F: Platform/RaspberryPi/
> -- 
> 2.41.0.rc0.172.g3f132b7071-goog
> 


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




Re: [edk2-devel] [PATCH] Maintainers.txt: Drop Radoslaw from sbsa-ref maintainers

2023-06-06 Thread Marcin Juszkiewicz

W dniu 5.06.2023 o 21:26, Radoslaw Biernacki pisze:

Regardless of the long standing desire to resume involvement
in the project, I'm unable to double the time in a day.
That's why I'm removing myself from sbsa-ref maintainers.


Thanks for your contributions Radosław!


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




Re: [edk2-devel] [PATCH 1/2] UefiCpuPkg: CpuTimerDxeRiscV64: Fix incorrect value sent to SbiSetTimer

2023-06-06 Thread Sunil V L
On Fri, May 26, 2023 at 04:25:17PM -0700, Tuan Phan wrote:
> SbiSetTimer expects core tick value.
> 
> Signed-off-by: Tuan Phan 
> ---

Thanks for the patch!. LGTM.

Reviewed-by: Sunil V L 


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




Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg: RISC-V: TimerLib: Fix delay function to use 64-bit

2023-06-06 Thread Sunil V L
On Fri, May 26, 2023 at 04:25:18PM -0700, Tuan Phan wrote:
> The timer compare register is 64-bit so simplifying the delay
> function.
> 
> Signed-off-by: Tuan Phan 
> ---
>  MdePkg/Include/Register/RiscV64/RiscVImpl.h   |  1 -
>  .../BaseRiscV64CpuTimerLib/CpuTimerLib.c  | 62 +--
>  2 files changed, 28 insertions(+), 35 deletions(-)
> 
> diff --git a/MdePkg/Include/Register/RiscV64/RiscVImpl.h 
> b/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> index ee5c2ba60377..6997de6cc001 100644
> --- a/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> +++ b/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> @@ -20,6 +20,5 @@
>Name:
>  
>  #define ASM_FUNC(Name)  _ASM_FUNC(ASM_PFX(Name), .text. ## Name)
> -#define RISCV_TIMER_COMPARE_BITS  32
>  
>  #endif
> diff --git a/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c 
> b/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> index 9c8efc0f3530..57800177023c 100644
> --- a/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> +++ b/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> @@ -22,26 +22,19 @@
>@param  Delay A period of time to delay in ticks.
>  
>  **/
> +STATIC
>  VOID
>  InternalRiscVTimerDelay (
> -  IN UINT32  Delay
> +  IN UINT64  Delay
>)
>  {
> -  UINT32  Ticks;
> -  UINT32  Times;
> -
> -  Times  = Delay >> (RISCV_TIMER_COMPARE_BITS - 2);
> -  Delay &= ((1 << (RISCV_TIMER_COMPARE_BITS - 2)) - 1);
> -  do {
> -//
> -// The target timer count is calculated here
> -//
> -Ticks = RiscVReadTimer () + Delay;
> -Delay = 1 << (RISCV_TIMER_COMPARE_BITS - 2);
> -while (((Ticks - RiscVReadTimer ()) & (1 << (RISCV_TIMER_COMPARE_BITS - 
> 1))) == 0) {
> -  CpuPause ();
> -}
> -  } while (Times-- > 0);
> +  UINT64  Ticks;
> +
> +  Ticks = RiscVReadTimer () + Delay;
> +
> +  while (RiscVReadTimer () <= Ticks) {
> +CpuPause ();
> +  }
>  }
>  
>  /**
> @@ -61,14 +54,14 @@ MicroSecondDelay (
>)
>  {
>InternalRiscVTimerDelay (
> -(UINT32)DivU64x32 (
> -  MultU64x32 (
> -MicroSeconds,
> -PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> -),
> -  100u
> -  )
> -);
> +DivU64x32 (
> +  MultU64x32 (
> +MicroSeconds,
> +PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> +  ),
> +  100u
> +)
> +  );
>return MicroSeconds;
>  }
>  
> @@ -89,14 +82,14 @@ NanoSecondDelay (
>)
>  {
>InternalRiscVTimerDelay (
> -(UINT32)DivU64x32 (
> -  MultU64x32 (
> -NanoSeconds,
> -PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> -),
> -  10u
> -  )
> -);
> +DivU64x32 (
> +  MultU64x32 (
> +NanoSeconds,
> +PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> +  ),
> +  10u
> +)
> +  );
>return NanoSeconds;
>  }
>  
> @@ -147,8 +140,9 @@ GetPerformanceCounter (
>  UINT64
>  EFIAPI
>  GetPerformanceCounterProperties (
> -  OUT  UINT64 *StartValue, OPTIONAL
> -  OUT  UINT64*EndValue OPTIONAL
> +  OUT  UINT64  *StartValue,
> +  OPTIONAL
> +  OUT  UINT64  *EndValue OPTIONAL

Hi Tuan,

What is this change? The formatting doesn't look correct. Have you run
CI tests?

Otherwise LGTM. Thanks for the fix!

Reviewed-by: Sunil V L 


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




Re: [edk2-devel] [PATCH v3 1/7] MdePkg/BaseLib: RISC-V: Support getting satp register value

2023-06-06 Thread Sunil V L
On Fri, May 26, 2023 at 04:17:27PM -0700, Tuan Phan wrote:
> Add an API to retrieve satp register value.
> 
> Signed-off-by: Tuan Phan 
> Reviewed-by: Andrei Warkentin 
> ---

LGTM.

Reviewed-by: Sunil V L 


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




Re: [edk2-devel] [PATCH v3 2/7] MdePkg/Register: RISC-V: Add satp mode bits shift definition

2023-06-06 Thread Sunil V L
On Fri, May 26, 2023 at 04:17:28PM -0700, Tuan Phan wrote:
> The satp mode bits shift is used cross modules. It should be defined
> in one place.
> 
> Signed-off-by: Tuan Phan 
> Reviewed-by: Andrei Warkentin 
> ---

LGTM.

Reviewed-by: Sunil V L 


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




Re: [edk2-devel] [PATCH v3 5/7] OvmfPkg/RiscVVirt: VirtNorFlashPlatformLib: Fix wrong flash size

2023-06-06 Thread Sunil V L
On Fri, May 26, 2023 at 04:17:31PM -0700, Tuan Phan wrote:
> The size should be for single region, not the whole firmware FD.
> 
> Signed-off-by: Tuan Phan 
> Reviewed-by: Andrei Warkentin 
> ---

Thanks for the fix. LGTM.

Reviewed-by: Sunil V L 


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




Re: [edk2-devel] [PATCH v3 4/7] OvmfPkg/RiscVVirt: Remove satp bare mode setting

2023-06-06 Thread Sunil V L
On Fri, May 26, 2023 at 04:17:30PM -0700, Tuan Phan wrote:
> MMU now is initialized in CpuDxe. There is no point to set satp to bare
> mode as that should be the default mode when booting edk2.
> 
> Signed-off-by: Tuan Phan 
> Reviewed-by: Andrei Warkentin 
> ---
>  OvmfPkg/RiscVVirt/RiscVVirt.dsc.inc |  1 +
>  OvmfPkg/RiscVVirt/Sec/Memory.c  | 18 ++
>  2 files changed, 3 insertions(+), 16 deletions(-)
> 
> diff --git a/OvmfPkg/RiscVVirt/RiscVVirt.dsc.inc 
> b/OvmfPkg/RiscVVirt/RiscVVirt.dsc.inc
> index 731f54f73f81..bc204ba5fe52 100644
> --- a/OvmfPkg/RiscVVirt/RiscVVirt.dsc.inc
> +++ b/OvmfPkg/RiscVVirt/RiscVVirt.dsc.inc
> @@ -83,6 +83,7 @@
># RISC-V Architectural Libraries
>
> CpuExceptionHandlerLib|UefiCpuPkg/Library/BaseRiscV64CpuExceptionHandlerLib/BaseRiscV64CpuExceptionHandlerLib.inf
>RiscVSbiLib|MdePkg/Library/BaseRiscVSbiLib/BaseRiscVSbiLib.inf
> +  RiscVMmuLib|UefiCpuPkg/Library/BaseRiscVMmuLib/BaseRiscVMmuLib.inf
>
> PlatformBootManagerLib|OvmfPkg/RiscVVirt/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
>
> ResetSystemLib|OvmfPkg/RiscVVirt/Library/ResetSystemLib/BaseResetSystemLib.inf
>  
> diff --git a/OvmfPkg/RiscVVirt/Sec/Memory.c b/OvmfPkg/RiscVVirt/Sec/Memory.c
> index 0e2690c73687..aad71ee5dcbb 100644
> --- a/OvmfPkg/RiscVVirt/Sec/Memory.c
> +++ b/OvmfPkg/RiscVVirt/Sec/Memory.c
> @@ -85,21 +85,6 @@ AddMemoryRangeHob (
>AddMemoryBaseSizeHob (MemoryBase, (UINT64)(MemoryLimit - MemoryBase));
>  }
>  
> -/**
> -  Configure MMU
> -**/
> -STATIC
> -VOID
> -InitMmu (
> -  )
> -{
> -  //
> -  // Set supervisor translation mode to Bare mode
> -  //
> -  RiscVSetSupervisorAddressTranslationRegister ((UINT64)SATP_MODE_OFF << 60);
> -  DEBUG ((DEBUG_INFO, "%a: Set Supervisor address mode to bare-metal 
> mode.\n", __func__));
> -}
> -
>  /**
>Publish system RAM and reserve memory regions.
>  
> @@ -327,7 +312,8 @@ MemoryPeimInitialization (
>  
>AddReservedMemoryMap (FdtPointer);
>  
> -  InitMmu ();
> +  /* Make sure SEC is booting with bare mode */
> +  ASSERT ((RiscVGetSupervisorAddressTranslationRegister () & SATP64_MODE) == 
> (SATP_MODE_OFF << SATP64_MODE_SHIFT));
>  
Makes sense. LGTM.

Reviewed-by: Sunil V L 


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




Re: [edk2-devel] [PATCH v6 0/3] OvmfPkg/Bhyve: install ACPI tables from memory

2023-06-06 Thread Ard Biesheuvel
On Tue, 6 Jun 2023 at 11:22, Corvin Köhne  wrote:
>
> CI: https://github.com/tianocore/edk2/pull/4379/checks
>
> Corvin Köhne (3):
>   OvmfPkg/Xen: export search of RSDP into a library function
>   OvmfPkg/Xen: export AcpiTable installation into AcpiPlatformLib
>   OvmfPkg/Bhyve: install ACPI tables from memory
>

Merged as #4521

Thanks

>  OvmfPkg/OvmfPkg.dec   |   4 +
>  OvmfPkg/Bhyve/BhyveX64.dsc|   1 +
>  OvmfPkg/OvmfXen.dsc   |   1 +
>  .../Bhyve/AcpiPlatformDxe/AcpiPlatformDxe.inf |   1 +
>  .../AcpiPlatformLib/DxeAcpiPlatformLib.inf|  26 
>  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |   2 +-
>  OvmfPkg/Include/Library/AcpiPlatformLib.h |  49 ++
>  OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c  |  37 -
>  .../AcpiPlatformLib/DxeAcpiPlatformLib.c} | 140 +-
>  OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.c |  47 +-
>  10 files changed, 200 insertions(+), 108 deletions(-)
>  create mode 100644 OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf
>  create mode 100644 OvmfPkg/Include/Library/AcpiPlatformLib.h
>  rename OvmfPkg/{XenAcpiPlatformDxe/Xen.c => 
> Library/AcpiPlatformLib/DxeAcpiPlatformLib.c} (61%)
>
> --
> 2.40.1
>
>
>
> 
>
>


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




[edk2-devel] [edk2-redfish-client][PATCH v2 0/9] Fix RedfishClientPkg build errors

2023-06-06 Thread Nickle Wang via groups.io
V2: 
Instead of modifying ConverterLib, use build option in INF file to 
fix build error 

V1:
Fix RedfishClientPkg build errors and typos. The compiler toolchain 
is GCC5.

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

Nickle Wang (9):
  RedfishClientPkg/ConverterLib: Fix unused-but-set-variable error
  RedfishClientPkg/RedfishAddendumLib: Fix build error
  RedfishClientPkg/EdkIIRedfishResourceConfigLib: Fix build error
  RedfishClientPkg/RedfishFeatureUtilityLib: Fix build error
  RedfishClientPkg/RedfishETagDxe: Fix build error
  RedfishClientPkg/RedfishConfigLangMapDxe: Fix build error
  RedfishClientPkg/BiosDxe: Fix build error
  RedfishClientPkg/MemoryDxe: Fix build error
  RedfishClientPkg/ComputerSystemDxe: Fix build error

 .../edk2library/Bios/v1_0_9/Lib.inf   |  4 +-
 .../edk2library/ComputerSystem/v1_5_0/Lib.inf |  4 +-
 .../ComputerSystemCollection/Lib.inf  |  4 +-
 .../edk2library/Memory/v1_7_1/Lib.inf |  4 +-
 .../edk2library/MemoryCollection/Lib.inf  |  4 +-
 .../Protocol/EdkIIRedfishETagProtocol.h   |  2 +-
 .../Features/Bios/v1_0_9/Dxe/BiosDxe.c| 20 
 .../v1_5_0/Dxe/ComputerSystemDxe.c| 19 ---
 .../Features/Memory/V1_7_1/Dxe/MemoryDxe.c| 19 ---
 .../EdkIIRedfishResourceConfigLib.c   |  4 +-
 .../RedfishAddendumLib/RedfishAddendumLib.c   |  4 +-
 .../RedfishFeatureUtilityLib.c| 50 +--
 .../RedfishConfigLangMapDxe.c |  3 ++
 .../RedfishETagDxe/RedfishETagDxe.c   | 13 +++--
 14 files changed, 84 insertions(+), 70 deletions(-)

-- 
2.17.1



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




[edk2-devel] [edk2-redfish-client][PATCH v2 1/9] RedfishClientPkg/ConverterLib: Fix unused-but-set-variable error

2023-06-06 Thread Nickle Wang via groups.io
Add GCC flag "-Wno-unused-but-set-variable" to remove build error
because ConverterLib is 3rd party library.

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
---
 .../edk2library/Bios/v1_0_9/Lib.inf   | 102 +-
 .../edk2library/ComputerSystem/v1_5_0/Lib.inf | 102 +-
 .../ComputerSystemCollection/Lib.inf  | 102 +-
 .../edk2library/Memory/v1_7_1/Lib.inf | 102 +-
 .../edk2library/MemoryCollection/Lib.inf  | 102 +-
 5 files changed, 255 insertions(+), 255 deletions(-)

diff --git a/RedfishClientPkg/ConverterLib/edk2library/Bios/v1_0_9/Lib.inf 
b/RedfishClientPkg/ConverterLib/edk2library/Bios/v1_0_9/Lib.inf
index e2740488..e5b73dab 100644
--- a/RedfishClientPkg/ConverterLib/edk2library/Bios/v1_0_9/Lib.inf
+++ b/RedfishClientPkg/ConverterLib/edk2library/Bios/v1_0_9/Lib.inf
@@ -1,51 +1,51 @@
-#
-#  (C) Copyright 2019-2021 Hewlett Packard Enterprise Development LP
-#  SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-# Auto-generated file by Redfish Schema C Structure Generator.
-# https://github.com/DMTF/Redfish-Schema-C-Struct-Generator.
-# Copyright Notice:
-# Copyright 2019-2021 Distributed Management Task Force, Inc. All rights 
reserved.
-# License: BSD 3-Clause License. For full text see link: 
https://github.com/DMTF/Redfish-JSON-C-Struct-Converter/blob/master/LICENSE.md
-#
-[Defines]
-INF_VERSION= 0x00010006
-BASE_NAME  = BiosV1_0_9Lib
-FILE_GUID  =  46BBD6C8-5077-44D6-B535-109AB834F4E3
-MODULE_TYPE= BASE
-VERSION_STRING = 1.0
-LIBRARY_CLASS  = BiosV1_0_9Lib | DXE_DRIVER UEFI_APPLICATION 
UEFI_DRIVER
-#
-# The following information is for reference only and not required by the 
build tools.
-#
-#  VALID_ARCHITECTURES   = IA32 X64 IPF EBC RISCV64
-#
-
-[Sources]
-  ../../../include/RedfishDataTypeDef.h
-  ../../../src/RedfishCsCommon.c
-  ../../../src/RedfishCsMemory.c
-  ../../../src/Bios/Bios.V1_0_9/Bios.V1_0_9.c
-
-
-[Packages]
-  MdePkg/MdePkg.dec
-  RedfishPkg/RedfishPkg.dec
-  RedfishClientPkg/RedfishClientPkg.dec
-
-[LibraryClasses]
-  BaseLib
-  BaseMemoryLib
-  DebugLib
-  MemoryAllocationLib
-  JsonLib
-
-[BuildOptions]
-  #
-  # Disables the following Visual Studio compiler warnings
-  # so we do not break the build with /WX option:
-  #   C4706: assignment within conditional expression
-  #
-  MSFT:*_*_*_CC_FLAGS = /wd4706
-
-
+#
+#  (C) Copyright 2019-2021 Hewlett Packard Enterprise Development LP
+#  Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+# Auto-generated file by Redfish Schema C Structure Generator.
+# https://github.com/DMTF/Redfish-Schema-C-Struct-Generator.
+# Copyright Notice:
+# Copyright 2019-2021 Distributed Management Task Force, Inc. All rights 
reserved.
+# License: BSD 3-Clause License. For full text see link: 
https://github.com/DMTF/Redfish-JSON-C-Struct-Converter/blob/master/LICENSE.md
+#
+[Defines]
+INF_VERSION= 0x00010006
+BASE_NAME  = BiosV1_0_9Lib
+FILE_GUID  =  46BBD6C8-5077-44D6-B535-109AB834F4E3
+MODULE_TYPE= BASE
+VERSION_STRING = 1.0
+LIBRARY_CLASS  = BiosV1_0_9Lib | DXE_DRIVER UEFI_APPLICATION 
UEFI_DRIVER
+#
+# The following information is for reference only and not required by the 
build tools.
+#
+#  VALID_ARCHITECTURES   = IA32 X64 IPF EBC RISCV64
+#
+
+[Sources]
+  ../../../include/RedfishDataTypeDef.h
+  ../../../src/RedfishCsCommon.c
+  ../../../src/RedfishCsMemory.c
+  ../../../src/Bios/Bios.V1_0_9/Bios.V1_0_9.c
+
+
+[Packages]
+  MdePkg/MdePkg.dec
+  RedfishPkg/RedfishPkg.dec
+  RedfishClientPkg/RedfishClientPkg.dec
+
+[LibraryClasses]
+  BaseLib
+  BaseMemoryLib
+  DebugLib
+  MemoryAllocationLib
+  JsonLib
+
+[BuildOptions]
+  #
+  # Disables the following Visual Studio compiler warnings
+  # so we do not break the build with /WX option:
+  #   C4706: assignment within conditional expression
+  #
+  MSFT:*_*_*_CC_FLAGS = /wd4706
+  GCC:*_*_*_CC_FLAGS = -Wno-unused-but-set-variable
diff --git 
a/RedfishClientPkg/ConverterLib/edk2library/ComputerSystem/v1_5_0/Lib.inf 
b/RedfishClientPkg/ConverterLib/edk2library/ComputerSystem/v1_5_0/Lib.inf
index 09192f67..1f37166f 100644
--- a/RedfishClientPkg/ConverterLib/edk2library/ComputerSystem/v1_5_0/Lib.inf
+++ b/RedfishClientPkg/ConverterLib/edk2library/ComputerSystem/v1_5_0/Lib.inf
@@ -1,51 +1,51 @@
-#
-#  (C) Copyright 2019-2021 Hewlett Packard Enterprise Development LP
-#  SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-# Auto-generated file by Redfish Schema C Structure Generator.
-# https://github.com/DMTF/Redfish-Schema-C-Struct-Generator.
-# Copyright Notice:
-# Copyright 2019-2021 Distributed Management Task Force, Inc. All rights 
reserved.
-# License: BSD 3-Clau

[edk2-devel] [edk2-redfish-client][PATCH v2 2/9] RedfishClientPkg/RedfishAddendumLib: Fix build error

2023-06-06 Thread Nickle Wang via groups.io
Rename ProvisioningCallback() to GetData() and
OemCallback() to GetOemData() and fix build error

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
---
 .../Library/RedfishAddendumLib/RedfishAddendumLib.c   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/RedfishClientPkg/Library/RedfishAddendumLib/RedfishAddendumLib.c 
b/RedfishClientPkg/Library/RedfishAddendumLib/RedfishAddendumLib.c
index 5eaada1e..59cf2743 100644
--- a/RedfishClientPkg/Library/RedfishAddendumLib/RedfishAddendumLib.c
+++ b/RedfishClientPkg/Library/RedfishAddendumLib/RedfishAddendumLib.c
@@ -129,7 +129,7 @@ RedfishGetAddendumData (
   continue;
 }
 
-Status = Protocol->ProvisioningCallback (Protocol, &SchemaInfo, JsonValue);
+Status = Protocol->GetData (Protocol, &SchemaInfo, JsonValue);
 if (!EFI_ERROR (Status)) {
   *JsonWithAddendum = JsonDumpString (JsonValue, EDKII_JSON_COMPACT);
   break;
@@ -232,7 +232,7 @@ RedfishGetOemData (
   continue;
 }
 
-Status = Protocol->OemCallback (Protocol, &SchemaInfo, JsonValueOem);
+Status = Protocol->GetOemData (Protocol, &SchemaInfo, JsonValueOem);
 if (!EFI_ERROR (Status)) {
   Status = JsonObjectSetValue (JsonValue, "Oem", JsonValueOem);
   if (!EFI_ERROR (Status)) {
-- 
2.17.1



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




[edk2-devel] [edk2-redfish-client][PATCH v2 3/9] RedfishClientPkg/EdkIIRedfishResourceConfigLib: Fix build error

2023-06-06 Thread Nickle Wang via groups.io
Remove uncessary parameter and fix build error.

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
---
 .../EdkIIRedfishResourceConfigLib.c   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
 
b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
index f608b120..ce86ce70 100644
--- 
a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
+++ 
b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
@@ -2,7 +2,7 @@
   Redfish resource config library implementation
 
   (C) Copyright 2022 Hewlett Packard Enterprise Development LP
-  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+  Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights 
reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -125,7 +125,7 @@ GetSupportedSchemaVersion (
 return EFI_INVALID_PARAMETER;
   }
 
-  Status = RedfishPlatformConfigGetSupportedSchema (NULL, &SupportSchema);
+  Status = RedfishPlatformConfigGetSupportedSchema (&SupportSchema);
   if (EFI_ERROR (Status)) {
 return Status;
   }
-- 
2.17.1



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




[edk2-devel] [edk2-redfish-client][PATCH v2 3/9] RedfishClientPkg/EdkIIRedfishResourceConfigLib: Fix build error

2023-06-06 Thread Nickle Wang via groups.io
Remove uncessary parameter and fix build error.

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
---
 .../EdkIIRedfishResourceConfigLib.c   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
 
b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
index f608b120..ce86ce70 100644
--- 
a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
+++ 
b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
@@ -2,7 +2,7 @@
   Redfish resource config library implementation
 
   (C) Copyright 2022 Hewlett Packard Enterprise Development LP
-  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+  Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights 
reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -125,7 +125,7 @@ GetSupportedSchemaVersion (
 return EFI_INVALID_PARAMETER;
   }
 
-  Status = RedfishPlatformConfigGetSupportedSchema (NULL, &SupportSchema);
+  Status = RedfishPlatformConfigGetSupportedSchema (&SupportSchema);
   if (EFI_ERROR (Status)) {
 return Status;
   }
-- 
2.17.1



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




[edk2-devel] [edk2-redfish-client][PATCH v2 4/9] RedfishClientPkg/RedfishFeatureUtilityLib: Fix build error

2023-06-06 Thread Nickle Wang via groups.io
Follow latest definition of EDKII_REDFISH_VALUE_TYPES and
rename all corresponding variable in RedfishFeatureUtilityLib.

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
---
 .../RedfishFeatureUtilityLib.c| 50 +--
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git 
a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c 
b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
index ab0b650c..1e5c3f11 100644
--- 
a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
+++ 
b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
@@ -308,7 +308,7 @@ ApplyFeatureSettingsStringType (
   if (EFI_ERROR (Status)) {
 DEBUG ((DEBUG_ERROR, "%a, %a.%a %s failed: %r\n", __func__, Schema, 
Version, ConfigureLang, Status));
   } else {
-if (RedfishValue.Type != REDFISH_VALUE_TYPE_STRING) {
+if (RedfishValue.Type != RedfishValueTypeString) {
   DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not string type\n", 
__func__, Schema, Version, ConfigureLang));
   return EFI_DEVICE_ERROR;
 }
@@ -374,7 +374,7 @@ ApplyFeatureSettingsNumericType (
   if (EFI_ERROR (Status)) {
 DEBUG ((DEBUG_ERROR, "%a, %a.%a %s failed: %r\n", __func__, Schema, 
Version, ConfigureLang, Status));
   } else {
-if (RedfishValue.Type != REDFISH_VALUE_TYPE_INTEGER) {
+if (RedfishValue.Type != RedfishValueTypeInteger) {
   DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not numeric type\n", 
__func__, Schema, Version, ConfigureLang));
   return EFI_DEVICE_ERROR;
 }
@@ -439,7 +439,7 @@ ApplyFeatureSettingsBooleanType (
   if (EFI_ERROR (Status)) {
 DEBUG ((DEBUG_ERROR, "%a, %a.%a %s failed: %r\n", __func__, Schema, 
Version, ConfigureLang, Status));
   } else {
-if (RedfishValue.Type != REDFISH_VALUE_TYPE_BOOLEAN) {
+if (RedfishValue.Type != RedfishValueTypeBoolean) {
   DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not boolean type\n", 
__func__, Schema, Version, ConfigureLang));
   return EFI_DEVICE_ERROR;
 }
@@ -542,11 +542,11 @@ ApplyFeatureSettingsVagueType (
 // Initial property data type and value.
 //
 if (CurrentVagueValuePtr->Value->DataType == 
RedfishCS_Vague_DataType_String) {
-  PropertyDatatype = REDFISH_VALUE_TYPE_STRING;
+  PropertyDatatype = RedfishValueTypeString;
 } else if (CurrentVagueValuePtr->Value->DataType == 
RedfishCS_Vague_DataType_Bool) {
-  PropertyDatatype = REDFISH_VALUE_TYPE_BOOLEAN;
+  PropertyDatatype = RedfishValueTypeBoolean;
 } else if (CurrentVagueValuePtr->Value->DataType == 
RedfishCS_Vague_DataType_Int64) {
-  PropertyDatatype = REDFISH_VALUE_TYPE_INTEGER;
+  PropertyDatatype = RedfishValueTypeInteger;
 } else {
   DEBUG ((DEBUG_ERROR, "%a, %a.%a %s Unsupported Redfish property data 
type\n", __func__, Schema, Version, ConfigureLang));
   goto ErrorContinue;
@@ -564,7 +564,7 @@ ApplyFeatureSettingsVagueType (
 goto ErrorContinue;
   }
 
-  if (PropertyDatatype == REDFISH_VALUE_TYPE_STRING) {
+  if (PropertyDatatype == RedfishValueTypeString) {
 //
 // This is a string property.
 //
@@ -587,7 +587,7 @@ ApplyFeatureSettingsVagueType (
 } else {
   DEBUG ((DEBUG_MANAGEABILITY, "%a, %a.%a %s value is: %a\n", 
__func__, Schema, Version, ConfigureKeyLang, RedfishValue.Value.Buffer, 
Status));
 }
-  } else if (PropertyDatatype == REDFISH_VALUE_TYPE_BOOLEAN) {
+  } else if (PropertyDatatype == RedfishValueTypeBoolean) {
 //
 // This is a boolean property.
 //
@@ -619,7 +619,7 @@ ApplyFeatureSettingsVagueType (
 } else {
   DEBUG ((DEBUG_MANAGEABILITY, "%a, %a.%a %s value is: %a\n", 
__func__, Schema, Version, ConfigureKeyLang, (RedfishValue.Value.Boolean ? 
"True" : "False"), Status));
 }
-  } else if (PropertyDatatype == REDFISH_VALUE_TYPE_INTEGER) {
+  } else if (PropertyDatatype == RedfishValueTypeInteger) {
 //
 // This is a integer property.
 //
@@ -695,12 +695,12 @@ FreeArrayTypeRedfishValue (
 return;
   }
 
-  if ((RedfishValue->Type != REDFISH_VALUE_TYPE_INTEGER_ARRAY) && 
(RedfishValue->Type != REDFISH_VALUE_TYPE_STRING_ARRAY)) {
+  if ((RedfishValue->Type != RedfishValueTypeIntegerArray) && 
(RedfishValue->Type != RedfishValueTypeStringArray)) {
 return;
   }
 
   switch (RedfishValue->Type) {
-case REDFISH_VALUE_TYPE_STRING_ARRAY:
+case RedfishValueTypeStringArray:
   for (Index = 0; Index < RedfishValue->ArrayCount; Index++) {
 FreePool (RedfishValue->Value.StringArray[Index]);
   }
@@ -709,12 +709,12 @@ FreeArrayTypeRedfishValue (
   RedfishValue->Value.StringArray = NULL;
   break;
 
-case REDFISH_VALUE_TYPE_INTEGER_ARRAY:
+case RedfishValueTypeIntegerArray:
   FreePool (RedfishValue->Value.IntegerArray);
   RedfishValue->Value.In

[edk2-devel] [edk2-redfish-client][PATCH v2 5/9] RedfishClientPkg/RedfishETagDxe: Fix build error

2023-06-06 Thread Nickle Wang via groups.io
- Fix missing "EFIAPI" build error.
- Fix typos.

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
---
 .../Include/Protocol/EdkIIRedfishETagProtocol.h |  2 +-
 RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c| 13 -
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishETagProtocol.h 
b/RedfishClientPkg/Include/Protocol/EdkIIRedfishETagProtocol.h
index 4e10965a..42853860 100644
--- a/RedfishClientPkg/Include/Protocol/EdkIIRedfishETagProtocol.h
+++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishETagProtocol.h
@@ -36,7 +36,7 @@ EFI_STATUS
 
   @param[in]   ThisPointer to EDKII_REDFISH_ETAG_PROTOCOL 
instance.
   @param[in]   Uri The target Uri which related to ETag.
-  @param[in]   ETagThe ETag to add. If ETag is NULL, the 
record of correspoonding URI will be removed.
+  @param[in]   ETagThe ETag to add. If ETag is NULL, the 
record of corresponding URI will be removed.
 
   @retval EFI_SUCCESS  This handler has been stoped successfully.
   @retval Others   Some error happened.
diff --git a/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c 
b/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c
index 60b05e8b..7ac6e885 100644
--- a/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c
+++ b/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c
@@ -102,7 +102,7 @@ ON_ERROR:
   @param[in]Uri   The URI string matching to this ETAG.
   @param[in]ETag  ETAG string.
 
-  @retval EFI_SUCCESS   ETAG recourd is added.
+  @retval EFI_SUCCESS   ETAG record is added.
   @retval OthersFail to add ETAG.
 
 **/
@@ -137,7 +137,7 @@ AddETagRecord (
   @param[in]ListTarget ETAG list to be removed.
   @param[in]Record  Pointer to the instance to be deleted.
 
-  @retval EFI_SUCCESS   ETAG recourd is removed.
+  @retval EFI_SUCCESS   ETAG record is removed.
   @retval OthersFail to add ETAG.
 
 **/
@@ -357,7 +357,7 @@ SaveETagList (
   }
 
   //
-  // Caculate the total size we need to keep ETag list.
+  // Calculate the total size we need to keep ETag list.
   //
   VarSize = ETagList->TotalSize + 1; // terminator character
   VarData = AllocateZeroPool (VarSize);
@@ -514,6 +514,7 @@ ON_ERROR:
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishETagGet (
   IN  EDKII_REDFISH_ETAG_PROTOCOL  *This,
   IN  CHAR8*Uri,
@@ -546,13 +547,14 @@ RedfishETagGet (
 
   @param[in]   ThisPointer to EDKII_REDFISH_ETAG_PROTOCOL 
instance.
   @param[in]   Uri The target Uri which related to ETag.
-  @param[in]   ETagThe ETag to add. If ETag is NULL, the 
record of correspoonding URI will be removed.
+  @param[in]   ETagThe ETag to add. If ETag is NULL, the 
record of corresponding URI will be removed.
 
   @retval EFI_SUCCESS  This handler has been stoped successfully.
   @retval Others   Some error happened.
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishETagSet (
   IN  EDKII_REDFISH_ETAG_PROTOCOL  *This,
   IN  CHAR8*Uri,
@@ -579,7 +581,7 @@ RedfishETagSet (
   }
 
   //
-  // When ETag is NULL, it means that we want to remov this record.
+  // When ETag is NULL, it means that we want to remove this record.
   //
   if (ETag == NULL) {
 return Status;
@@ -598,6 +600,7 @@ RedfishETagSet (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishETagFlush (
   IN  EDKII_REDFISH_ETAG_PROTOCOL  *This
   )
-- 
2.17.1



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




[edk2-devel] [edk2-redfish-client][PATCH v2 6/9] RedfishClientPkg/RedfishConfigLangMapDxe: Fix build error

2023-06-06 Thread Nickle Wang via groups.io
Add missing "EFIAPI" and fix build error

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
---
 .../RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c  | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c 
b/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c
index 141a6063..86684cc7 100644
--- a/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c
+++ b/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c
@@ -528,6 +528,7 @@ ON_ERROR:
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishConfigLangMapGet (
   IN  EDKII_REDFISH_CONFIG_LANG_MAP_PROTOCOL  *This,
   IN  REDFISH_CONFIG_LANG_MAP_GET_TYPEQueryStringType,
@@ -577,6 +578,7 @@ RedfishConfigLangMapGet (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishConfigLangMapSet (
   IN  EDKII_REDFISH_CONFIG_LANG_MAP_PROTOCOL  *This,
   IN  EFI_STRING  ConfigLang,
@@ -622,6 +624,7 @@ RedfishConfigLangMapSet (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishConfigLangMapFlush (
   IN  EDKII_REDFISH_CONFIG_LANG_MAP_PROTOCOL  *This
   )
-- 
2.17.1



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




[edk2-devel] [edk2-redfish-client][PATCH v2 7/9] RedfishClientPkg/BiosDxe: Fix build error

2023-06-06 Thread Nickle Wang via groups.io
- Fix "variable set but not used" error.
- Fix missing "EFIAPI" error.
- Fix typos.

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
---
 .../Features/Bios/v1_0_9/Dxe/BiosDxe.c| 20 ++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c 
b/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c
index c65e2f51..e7ac8779 100644
--- a/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c
+++ b/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c
@@ -2,7 +2,7 @@
   Redfish feature driver implementation - Bios
 
   (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP
-  Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
+  Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -18,10 +18,10 @@ HandleResource (
   IN  EFI_STRING   Uri
   );
 
-EFI_HANDLE  medfishResourceConfigProtocolHandle;
+EFI_HANDLE  mRedfishResourceConfigProtocolHandle;
 
 /**
-  Provising redfish resource by given URI.
+  Provisioning redfish resource by given URI.
 
   @param[in]   ThisPointer to EFI_HP_REDFISH_HII_PROTOCOL 
instance.
   @param[in]   Uri Target URI to create resource.
@@ -33,6 +33,7 @@ EFI_HANDLE  medfishResourceConfigProtocolHandle;
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceProvisioningResource (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri,
@@ -94,6 +95,7 @@ RedfishResourceProvisioningResource (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceConsumeResource (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri
@@ -233,19 +235,16 @@ RedfishResourceConsumeResource (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceGetInfo (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   OUTREDFISH_SCHEMA_INFO *Info
   )
 {
-  REDFISH_RESOURCE_COMMON_PRIVATE  *Private;
-
   if ((This == NULL) || (Info == NULL)) {
 return EFI_INVALID_PARAMETER;
   }
 
-  Private = REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_RESOURCE_PROTOCOL (This);
-
   AsciiStrCpyS (Info->Schema, REDFISH_SCHEMA_STRING_SIZE, RESOURCE_SCHEMA);
   AsciiStrCpyS (Info->Major, REDFISH_SCHEMA_VERSION_SIZE, 
RESOURCE_SCHEMA_MAJOR);
   AsciiStrCpyS (Info->Minor, REDFISH_SCHEMA_VERSION_SIZE, 
RESOURCE_SCHEMA_MINOR);
@@ -265,6 +264,7 @@ RedfishResourceGetInfo (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceUpdate (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri
@@ -334,6 +334,7 @@ RedfishResourceUpdate (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceCheck (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri
@@ -404,6 +405,7 @@ RedfishResourceCheck (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceIdentify (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri
@@ -478,7 +480,7 @@ EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  
mRedfishResourceConfig = {
   handler.
 
   @param[in]   This Pointer to 
EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL instance.
-  @param[in]   RedfishConfigServiceInfo Redfish service informaion.
+  @param[in]   RedfishConfigServiceInfo Redfish service information.
 
   @retval EFI_SUCCESS  The handler has been initialized 
successfully.
   @retval EFI_DEVICE_ERROR Failed to create or configure the REST 
EX protocol instance.
@@ -799,7 +801,7 @@ RedfishResourceEntryPoint (
 return EFI_ALREADY_STARTED;
   }
 
-  medfishResourceConfigProtocolHandle = ImageHandle;
+  mRedfishResourceConfigProtocolHandle = ImageHandle;
 
   mRedfishResourcePrivate = AllocateZeroPool (sizeof 
(REDFISH_RESOURCE_COMMON_PRIVATE));
   CopyMem (&mRedfishResourcePrivate->ConfigHandler, &mRedfishConfigHandler, 
sizeof (EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL));
-- 
2.17.1



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




[edk2-devel] [edk2-redfish-client][PATCH v2 8/9] RedfishClientPkg/MemoryDxe: Fix build error

2023-06-06 Thread Nickle Wang via groups.io
- Fix "variable set but not used" error.
- Fix missing "EFIAPI" error.
- Fix typos.

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
---
 .../Features/Memory/V1_7_1/Dxe/MemoryDxe.c| 19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c 
b/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c
index 78784118..c55a6848 100644
--- a/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c
+++ b/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c
@@ -2,6 +2,7 @@
   Redfish feature driver implementation - Memory
 
   (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP
+  Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -11,10 +12,10 @@
 
 extern REDFISH_RESOURCE_COMMON_PRIVATE  *mRedfishResourcePrivate;
 
-EFI_HANDLE  medfishResourceConfigProtocolHandle;
+EFI_HANDLE  mRedfishResourceConfigProtocolHandle;
 
 /**
-  Provising redfish resource by given URI.
+  Provisioning redfish resource by given URI.
 
   @param[in]   ThisPointer to EFI_HP_REDFISH_HII_PROTOCOL 
instance.
   @param[in]   Uri Target URI to create resource.
@@ -26,6 +27,7 @@ EFI_HANDLE  medfishResourceConfigProtocolHandle;
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceProvisioningResource (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri,
@@ -87,6 +89,7 @@ RedfishResourceProvisioningResource (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceConsumeResource (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri
@@ -178,19 +181,16 @@ RedfishResourceConsumeResource (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceGetInfo (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   OUTREDFISH_SCHEMA_INFO *Info
   )
 {
-  REDFISH_RESOURCE_COMMON_PRIVATE  *Private;
-
   if ((This == NULL) || (Info == NULL)) {
 return EFI_INVALID_PARAMETER;
   }
 
-  Private = REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_RESOURCE_PROTOCOL (This);
-
   AsciiStrCpyS (Info->Schema, REDFISH_SCHEMA_STRING_SIZE, RESOURCE_SCHEMA);
   AsciiStrCpyS (Info->Major, REDFISH_SCHEMA_VERSION_SIZE, 
RESOURCE_SCHEMA_MAJOR);
   AsciiStrCpyS (Info->Minor, REDFISH_SCHEMA_VERSION_SIZE, 
RESOURCE_SCHEMA_MINOR);
@@ -210,6 +210,7 @@ RedfishResourceGetInfo (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceUpdate (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri
@@ -279,6 +280,7 @@ RedfishResourceUpdate (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceCheck (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri
@@ -349,6 +351,7 @@ RedfishResourceCheck (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceIdentify (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri
@@ -423,7 +426,7 @@ EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  
mRedfishResourceConfig = {
   handler.
 
   @param[in]   This Pointer to 
EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL instance.
-  @param[in]   RedfishConfigServiceInfo Redfish service informaion.
+  @param[in]   RedfishConfigServiceInfo Redfish service information.
 
   @retval EFI_SUCCESS  The handler has been initialized 
successfully.
   @retval EFI_DEVICE_ERROR Failed to create or configure the REST 
EX protocol instance.
@@ -613,7 +616,7 @@ RedfishResourceEntryPoint (
 return EFI_ALREADY_STARTED;
   }
 
-  medfishResourceConfigProtocolHandle = ImageHandle;
+  mRedfishResourceConfigProtocolHandle = ImageHandle;
 
   mRedfishResourcePrivate = AllocateZeroPool (sizeof 
(REDFISH_RESOURCE_COMMON_PRIVATE));
   CopyMem (&mRedfishResourcePrivate->ConfigHandler, &mRedfishConfigHandler, 
sizeof (EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL));
-- 
2.17.1



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




[edk2-devel] [edk2-redfish-client][PATCH v2 9/9] RedfishClientPkg/ComputerSystemDxe: Fix build error

2023-06-06 Thread Nickle Wang via groups.io
- Fix "variable set but not used" error.
- Fix missing "EFIAPI" error.
- Fix typos.

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
---
 .../v1_5_0/Dxe/ComputerSystemDxe.c| 19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git 
a/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Dxe/ComputerSystemDxe.c 
b/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Dxe/ComputerSystemDxe.c
index 49d065c9..91968dbe 100644
--- a/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Dxe/ComputerSystemDxe.c
+++ b/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Dxe/ComputerSystemDxe.c
@@ -2,6 +2,7 @@
   Redfish feature driver implementation - ComputerSystem
 
   (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP
+  Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -11,10 +12,10 @@
 
 extern REDFISH_RESOURCE_COMMON_PRIVATE  *mRedfishResourcePrivate;
 
-EFI_HANDLE  medfishResourceConfigProtocolHandle;
+EFI_HANDLE  mRedfishResourceConfigProtocolHandle;
 
 /**
-  Provising redfish resource by given URI.
+  Provisioning redfish resource by given URI.
 
   @param[in]   ThisPointer to EFI_HP_REDFISH_HII_PROTOCOL 
instance.
   @param[in]   Uri Target URI to create resource.
@@ -26,6 +27,7 @@ EFI_HANDLE  medfishResourceConfigProtocolHandle;
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceProvisioningResource (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri,
@@ -87,6 +89,7 @@ RedfishResourceProvisioningResource (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceConsumeResource (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri
@@ -178,19 +181,16 @@ RedfishResourceConsumeResource (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceGetInfo (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   OUTREDFISH_SCHEMA_INFO *Info
   )
 {
-  REDFISH_RESOURCE_COMMON_PRIVATE  *Private;
-
   if ((This == NULL) || (Info == NULL)) {
 return EFI_INVALID_PARAMETER;
   }
 
-  Private = REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_RESOURCE_PROTOCOL (This);
-
   AsciiStrCpyS (Info->Schema, REDFISH_SCHEMA_STRING_SIZE, RESOURCE_SCHEMA);
   AsciiStrCpyS (Info->Major, REDFISH_SCHEMA_VERSION_SIZE, 
RESOURCE_SCHEMA_MAJOR);
   AsciiStrCpyS (Info->Minor, REDFISH_SCHEMA_VERSION_SIZE, 
RESOURCE_SCHEMA_MINOR);
@@ -210,6 +210,7 @@ RedfishResourceGetInfo (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceUpdate (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri
@@ -279,6 +280,7 @@ RedfishResourceUpdate (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceCheck (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri
@@ -349,6 +351,7 @@ RedfishResourceCheck (
 
 **/
 EFI_STATUS
+EFIAPI
 RedfishResourceIdentify (
   IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
   IN EFI_STRING  Uri
@@ -423,7 +426,7 @@ EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  
mRedfishResourceConfig = {
   handler.
 
   @param[in]   This Pointer to 
EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL instance.
-  @param[in]   RedfishConfigServiceInfo Redfish service informaion.
+  @param[in]   RedfishConfigServiceInfo Redfish service information.
 
   @retval EFI_SUCCESS  The handler has been initialized 
successfully.
   @retval EFI_DEVICE_ERROR Failed to create or configure the REST 
EX protocol instance.
@@ -613,7 +616,7 @@ RedfishResourceEntryPoint (
 return EFI_ALREADY_STARTED;
   }
 
-  medfishResourceConfigProtocolHandle = ImageHandle;
+  mRedfishResourceConfigProtocolHandle = ImageHandle;
 
   mRedfishResourcePrivate = AllocateZeroPool (sizeof 
(REDFISH_RESOURCE_COMMON_PRIVATE));
   CopyMem (&mRedfishResourcePrivate->ConfigHandler, &mRedfishConfigHandler, 
sizeof (EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL));
-- 
2.17.1



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




[edk2-devel] [PATCH 0/1] bhyve: TPM support for OVMF

2023-06-06 Thread Corvin Köhne
Hi,

I'm currently working on TPM emulation for bhyve. Therefore, the guest
firmware has to set up the TPM device properly for the guest OS. I'd
like to send the attached patch to the EDKII project.

Any comments are appreciated.

Thanks,
Corvin

Corvin Köhne (1):
  OvmfPkg/Bhyve: include TPM driver

 OvmfPkg/Bhyve/BhyveX64.dsc | 17 +++--
 OvmfPkg/Bhyve/BhyveX64.fdf |  7 +++
 2 files changed, 22 insertions(+), 2 deletions(-)

-- 
2.40.1



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




[edk2-devel] [PATCH 1/1] OvmfPkg/Bhyve: include TPM driver

2023-06-06 Thread Corvin Köhne
From: Corvin Köhne 

Bhyve will gain support for TPM emulation in the near future. Therefore,
prepare OVMF by copying all TPM driver used by qemu's OVMF DSC into the
bhyve OVMF DSC.

Signed-off-by: Corvin Köhne 
---
 OvmfPkg/Bhyve/BhyveX64.dsc | 17 +++--
 OvmfPkg/Bhyve/BhyveX64.fdf |  7 +++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc
index bb317a50e6af..5ff0b1a22438 100644
--- a/OvmfPkg/Bhyve/BhyveX64.dsc
+++ b/OvmfPkg/Bhyve/BhyveX64.dsc
@@ -32,6 +32,8 @@ [Defines]
   DEFINE SMM_REQUIRE = FALSE
   DEFINE SOURCE_DEBUG_ENABLE = FALSE
 
+!include OvmfPkg/Include/Dsc/OvmfTpmDefines.dsc.inc
+
   #
   # Network definition
   #
@@ -226,8 +228,7 @@ [LibraryClasses]
   
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
   XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf
 
-  
Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLib.inf
-  
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
+!include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc
 
 [LibraryClasses.common]
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
@@ -563,12 +564,17 @@ [PcdsDynamicDefault]
 
   gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00
 
+!include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc
+
   # MdeModulePkg resolution sets up the system display resolution
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0
 
+[PcdsDynamicHii]
+!include OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc
+
 

 #
 # Components Section - list of all EDK II Modules needed by this Platform.
@@ -608,6 +614,8 @@ [Components]
 
   }
 
+!include OvmfPkg/Include/Dsc/OvmfTpmComponentsPei.dsc.inc
+
   #
   # DXE Phase modules
   #
@@ -631,6 +639,7 @@ [Components]
 !if $(SECURE_BOOT_ENABLE) == TRUE
   
NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
 !endif
+!include OvmfPkg/Include/Dsc/OvmfTpmSecurityStub.dsc.inc
   }
 
   MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
@@ -825,3 +834,7 @@ [Components]
   NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
   }
 
+  #
+  # TPM support
+  #
+!include OvmfPkg/Include/Dsc/OvmfTpmComponentsDxe.dsc.inc
diff --git a/OvmfPkg/Bhyve/BhyveX64.fdf b/OvmfPkg/Bhyve/BhyveX64.fdf
index 3f6270c048cc..c62d5757092e 100644
--- a/OvmfPkg/Bhyve/BhyveX64.fdf
+++ b/OvmfPkg/Bhyve/BhyveX64.fdf
@@ -158,6 +158,8 @@ [FV.PEIFV]
 INF  OvmfPkg/Bhyve/SmmAccess/SmmAccessPei.inf
 !endif
 
+!include OvmfPkg/Include/Fdf/OvmfTpmPei.fdf.inc
+
 

 
 [FV.DXEFV]
@@ -335,6 +337,11 @@ [FV.DXEFV]
 INF  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
 !endif
 
+#
+# TPM support
+#
+!include OvmfPkg/Include/Fdf/OvmfTpmDxe.fdf.inc
+
 

 
 [FV.FVMAIN_COMPACT]
-- 
2.40.1



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




Re: [edk2-devel] [PATCH 0/1] bhyve: TPM support for OVMF

2023-06-06 Thread Corvin Köhne
On Tue, 2023-06-06 at 15:20 +0200, Corvin Köhne wrote:
> Hi,
> 
> I'm currently working on TPM emulation for bhyve. Therefore, the
> guest
> firmware has to set up the TPM device properly for the guest OS. I'd
> like to send the attached patch to the EDKII project.
> 
> Any comments are appreciated.
> 
> Thanks,
> Corvin
> 
> Corvin Köhne (1):
>   OvmfPkg/Bhyve: include TPM driver
> 
>  OvmfPkg/Bhyve/BhyveX64.dsc | 17 +++--
>  OvmfPkg/Bhyve/BhyveX64.fdf |  7 +++
>  2 files changed, 22 insertions(+), 2 deletions(-)
> 

Sry, wrong mailing list at the moment. I'd like to send this to the
FreeBSD virtualization list for discussion before sending it to EDKII.

So, please ignore it yet.


-- 
Kind regards,
Corvin


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




signature.asc
Description: This is a digitally signed message part


[edk2-devel] [edk2-redfish-client][PATCH 0/3] Introduce HII to Redfish sample drivers

2023-06-06 Thread Nickle Wang via groups.io
Introduce three sample drivers to demonstrate the way of providing Redfish 
attributes in HII provider driver.

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

Nickle Wang (3):
  RedfishClientPkg: Add a sample memory configuration HII driver
  RedfishClientPkg: Introduce Hii2RedfishBootDxe driver
  RedfishClientPkg: Introduce Hii2RedfishBiosDxe driver

 RedfishClientPkg/RedfishClientPkg.dec |   4 +
 .../RedfishClientComponents.dsc.inc   |   4 +
 RedfishClientPkg/RedfishClientPkg.dsc |  11 +
 .../Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.inf |  55 ++
 .../Hii2RedfishBootDxe/Hii2RedfishBootDxe.inf |  59 ++
 .../Hii2RedfishMemoryDxe.inf  |  56 ++
 .../Hii2RedfishBiosDxe/Hii2RedfishBiosData.h  |  46 ++
 .../Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.h   |  44 ++
 .../Hii2RedfishBootDxe/Hii2RedfishBootData.h  |  60 ++
 .../Hii2RedfishBootDxe/Hii2RedfishBootDxe.h   |  53 ++
 .../Hii2RedfishMemoryData.h   |  71 ++
 .../Hii2RedfishMemoryDxe.h|  44 ++
 .../Hii2RedfishBiosDxe/Hii2RedfishBiosVfr.vfr |  67 ++
 .../Hii2RedfishBootDxe/Hii2RedfishBootVfr.vfr |  83 +++
 .../Hii2RedfishMemoryVfr.vfr  | 219 ++
 .../Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.c   | 289 
 .../Hii2RedfishBootDxe/Hii2RedfishBootDxe.c   | 698 ++
 .../Hii2RedfishMemoryDxe.c| 292 
 .../Hii2RedfishBiosDxeMap.uni |  20 +
 .../Hii2RedfishBiosDxeStrings.uni |  30 +
 .../Hii2RedfishBootDxeMap.uni |  28 +
 .../Hii2RedfishBootDxeStrings.uni |  41 +
 .../Hii2RedfishMemoryDxeMap.uni   |  38 +
 .../Hii2RedfishMemoryDxeStrings.uni   |  68 ++
 RedfishClientPkg/RedfishClient.fdf.inc|   6 +-
 25 files changed, 2385 insertions(+), 1 deletion(-)
 create mode 100644 RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.inf
 create mode 100644 RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxe.inf
 create mode 100644 
RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.inf
 create mode 100644 RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosData.h
 create mode 100644 RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.h
 create mode 100644 RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootData.h
 create mode 100644 RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxe.h
 create mode 100644 
RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryData.h
 create mode 100644 RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.h
 create mode 100644 RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosVfr.vfr
 create mode 100644 RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootVfr.vfr
 create mode 100644 
RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryVfr.vfr
 create mode 100644 RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.c
 create mode 100644 RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxe.c
 create mode 100644 RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.c
 create mode 100644 
RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosDxeMap.uni
 create mode 100644 
RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosDxeStrings.uni
 create mode 100644 
RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxeMap.uni
 create mode 100644 
RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxeStrings.uni
 create mode 100644 
RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxeMap.uni
 create mode 100644 
RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxeStrings.uni

-- 
2.17.1



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




[edk2-devel] [edk2-redfish-client][PATCH 1/3] RedfishClientPkg: Add a sample memory configuration HII driver

2023-06-06 Thread Nickle Wang via groups.io
This is an HII sample driver of memory configuration. This demonstrates
the communication between platform configuration (EDK2/HII) and Redfish
service (Memory resource) base on RedfishClientPkg.

The language ("x-uef-redfish-*") defined in the Redfish-specific uni file
is the connection between HII configuration and the Redfish schema.

e.g.

The HII option strings those applied with "x-uef-redfish-* HII language
are connected to the corresponding Redfish properties.

e.g.
x-uefi-redfish-Memory.v1_7_1   "/Memory/{1}/BaseModuleType"

The changes made on BIOS setup page or remote (OOB to Redfish service)
will be sync-up each other through EDKII Redfish feature driver using
the transport (REST_EX) provided by RedfishPkg.

On EDK2, HTTP based REST EX protocol instance is used to consume and
update the Redfish properties.

Check this for the RedfishClientPkg design architecture,
https://github.com/tianocore/edk2-redfish-client/blob/main/RedfishClientPkg/Readme.md

Below for RedfishPkg design architecture,
https://github.com/tianocore/edk2/blob/master/RedfishPkg/Readme.md

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
---
 RedfishClientPkg/RedfishClientPkg.dec |   2 +
 .../RedfishClientComponents.dsc.inc   |   2 +
 RedfishClientPkg/RedfishClientPkg.dsc |   2 +
 .../Hii2RedfishMemoryDxe.inf  |  56 
 .../Hii2RedfishMemoryData.h   |  71 +
 .../Hii2RedfishMemoryDxe.h|  44 +++
 .../Hii2RedfishMemoryVfr.vfr  | 219 +
 .../Hii2RedfishMemoryDxe.c| 292 ++
 .../Hii2RedfishMemoryDxeMap.uni   |  38 +++
 .../Hii2RedfishMemoryDxeStrings.uni   |  68 
 RedfishClientPkg/RedfishClient.fdf.inc|   4 +-
 11 files changed, 797 insertions(+), 1 deletion(-)
 create mode 100644 
RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.inf
 create mode 100644 
RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryData.h
 create mode 100644 RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.h
 create mode 100644 
RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryVfr.vfr
 create mode 100644 RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.c
 create mode 100644 
RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxeMap.uni
 create mode 100644 
RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxeStrings.uni

diff --git a/RedfishClientPkg/RedfishClientPkg.dec 
b/RedfishClientPkg/RedfishClientPkg.dec
index 84bceca3..af241cf6 100644
--- a/RedfishClientPkg/RedfishClientPkg.dec
+++ b/RedfishClientPkg/RedfishClientPkg.dec
@@ -57,6 +57,8 @@
   ## Include/RedfishBase.h
   gEfiRedfishClientVariableGuid   = { 0x91c46a3d, 0xed1a, 
0x477b, { 0xa5, 0x33, 0x87, 0x2d, 0xcd, 0xb0, 0xfc, 0xc1 } }
 
+  gHii2RedfishMemoryFormsetGuid   = { 0XC2BE579E, 0X3C57, 
0X499C, { 0XA9, 0XDF, 0XE6, 0X23, 0X8A, 0X49, 0X64, 0XF8 }}
+
 [PcdsFixedAtBuild]
   
gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize|32|UINT32|0x1001
   
gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaVersionSize|8|UINT32|0x1002
diff --git a/RedfishClientPkg/RedfishClientComponents.dsc.inc 
b/RedfishClientPkg/RedfishClientComponents.dsc.inc
index e83f4bc9..3451c185 100644
--- a/RedfishClientPkg/RedfishClientComponents.dsc.inc
+++ b/RedfishClientPkg/RedfishClientComponents.dsc.inc
@@ -7,6 +7,7 @@
 # "RedfishClientDefines.dsc.inc".
 #
 # (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
+# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 #
 #SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -16,6 +17,7 @@
   RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
   RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.inf
   RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf
+  RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.inf
 !endif
   #
   # Below two modules should be pulled in by build tool.
diff --git a/RedfishClientPkg/RedfishClientPkg.dsc 
b/RedfishClientPkg/RedfishClientPkg.dsc
index d3b645b6..ac9f8e9d 100644
--- a/RedfishClientPkg/RedfishClientPkg.dsc
+++ b/RedfishClientPkg/RedfishClientPkg.dsc
@@ -37,6 +37,8 @@
   Ucs2Utf8Lib|RedfishPkg/Library/BaseUcs2Utf8Lib/BaseUcs2Utf8Lib.inf
   RedfishCrtLib|RedfishPkg/PrivateLibrary/RedfishCrtLib/RedfishCrtLib.inf
   BaseSortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
+  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
+  
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
 
 [LibraryClasses.ARM, LibraryClasses.AARCH64]
   #
diff --git a/RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.inf 
b/RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.inf
new file mode 100644
index ..2dd6b0dd
--- /dev/null
+++ b/RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.inf
@@ -0,0 +1,56 @@
+## @file
+#  HII-to-Redfish m

[edk2-devel] [edk2-redfish-client][PATCH 2/3] RedfishClientPkg: Introduce Hii2RedfishBootDxe driver

2023-06-06 Thread Nickle Wang via groups.io
Add Hii2RedfishBootDxe driver with configure language defined in UNI
file in order to demonstrate the use of Redfish Platform Config
Protocol. Feature drivers under RedfishClientPkg will work with this
driver and provide the REST data to Redfish service.

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
---
 RedfishClientPkg/RedfishClientPkg.dec |   1 +
 .../RedfishClientComponents.dsc.inc   |   1 +
 RedfishClientPkg/RedfishClientPkg.dsc |   9 +
 .../Hii2RedfishBootDxe/Hii2RedfishBootDxe.inf |  59 ++
 .../Hii2RedfishBootDxe/Hii2RedfishBootData.h  |  60 ++
 .../Hii2RedfishBootDxe/Hii2RedfishBootDxe.h   |  53 ++
 .../Hii2RedfishBootDxe/Hii2RedfishBootVfr.vfr |  83 +++
 .../Hii2RedfishBootDxe/Hii2RedfishBootDxe.c   | 698 ++
 .../Hii2RedfishBootDxeMap.uni |  28 +
 .../Hii2RedfishBootDxeStrings.uni |  41 +
 RedfishClientPkg/RedfishClient.fdf.inc|   1 +
 11 files changed, 1034 insertions(+)
 create mode 100644 RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxe.inf
 create mode 100644 RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootData.h
 create mode 100644 RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxe.h
 create mode 100644 RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootVfr.vfr
 create mode 100644 RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxe.c
 create mode 100644 
RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxeMap.uni
 create mode 100644 
RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxeStrings.uni

diff --git a/RedfishClientPkg/RedfishClientPkg.dec 
b/RedfishClientPkg/RedfishClientPkg.dec
index af241cf6..055c1924 100644
--- a/RedfishClientPkg/RedfishClientPkg.dec
+++ b/RedfishClientPkg/RedfishClientPkg.dec
@@ -58,6 +58,7 @@
   gEfiRedfishClientVariableGuid   = { 0x91c46a3d, 0xed1a, 
0x477b, { 0xa5, 0x33, 0x87, 0x2d, 0xcd, 0xb0, 0xfc, 0xc1 } }
 
   gHii2RedfishMemoryFormsetGuid   = { 0XC2BE579E, 0X3C57, 
0X499C, { 0XA9, 0XDF, 0XE6, 0X23, 0X8A, 0X49, 0X64, 0XF8 }}
+  gHii2RedfishBootFormsetGuid = { 0x8399a787, 0x108e, 
0x4e53, { 0x9e, 0xde, 0x4b, 0x18, 0xcc, 0x9e, 0xab, 0x3b }}
 
 [PcdsFixedAtBuild]
   
gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize|32|UINT32|0x1001
diff --git a/RedfishClientPkg/RedfishClientComponents.dsc.inc 
b/RedfishClientPkg/RedfishClientComponents.dsc.inc
index 3451c185..4633e962 100644
--- a/RedfishClientPkg/RedfishClientComponents.dsc.inc
+++ b/RedfishClientPkg/RedfishClientComponents.dsc.inc
@@ -18,6 +18,7 @@
   RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.inf
   RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf
   RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.inf
+  RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxe.inf
 !endif
   #
   # Below two modules should be pulled in by build tool.
diff --git a/RedfishClientPkg/RedfishClientPkg.dsc 
b/RedfishClientPkg/RedfishClientPkg.dsc
index ac9f8e9d..edc387ac 100644
--- a/RedfishClientPkg/RedfishClientPkg.dsc
+++ b/RedfishClientPkg/RedfishClientPkg.dsc
@@ -39,6 +39,15 @@
   BaseSortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
   
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
+  
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
+  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
+  
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
+  
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
+  
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
+  DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
+  
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+  SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
+  
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
 
 [LibraryClasses.ARM, LibraryClasses.AARCH64]
   #
diff --git a/RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxe.inf 
b/RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxe.inf
new file mode 100644
index ..da80b79b
--- /dev/null
+++ b/RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxe.inf
@@ -0,0 +1,59 @@
+## @file
+#  HII-to-Redfish boot driver.
+#
+#  (C) Copyright 2022 Hewlett Packard Enterprise Development LP
+#
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  INF_VERSION= 0x00010005
+  BASE_NAME  = Hii2RedfishBootDxe
+  FILE_GUID  = F9BA69BD-1EDB-4334-9D57-7E974ADF1361
+  MODULE_TYPE= UEFI_DRIVER
+  VERSION_STRING = 1.0
+  ENTRY_POINT= Hii2RedfishBootDxeDriverEntryPoint
+  UNLOAD_IMAGE   = Hii2RedfishBootDxeDriverUnload
+
+[Sources]
+  Hii

[edk2-devel] [edk2-redfish-client][PATCH 3/3] RedfishClientPkg: Introduce Hii2RedfishBiosDxe driver

2023-06-06 Thread Nickle Wang via groups.io
Add Hii2RedfishBiosDxe driver with configure language defined in UNI
file in order to demonstrate the use of Redfish Platform Config
Protocol. Feature drivers under RedfishClientPkg will work with this
driver and provide the REST data to Redfish service.

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
---
 RedfishClientPkg/RedfishClientPkg.dec |   1 +
 .../RedfishClientComponents.dsc.inc   |   1 +
 .../Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.inf |  55 
 .../Hii2RedfishBiosDxe/Hii2RedfishBiosData.h  |  46 +++
 .../Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.h   |  44 +++
 .../Hii2RedfishBiosDxe/Hii2RedfishBiosVfr.vfr |  67 
 .../Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.c   | 289 ++
 .../Hii2RedfishBiosDxeMap.uni |  20 ++
 .../Hii2RedfishBiosDxeStrings.uni |  30 ++
 RedfishClientPkg/RedfishClient.fdf.inc|   1 +
 10 files changed, 554 insertions(+)
 create mode 100644 RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.inf
 create mode 100644 RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosData.h
 create mode 100644 RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.h
 create mode 100644 RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosVfr.vfr
 create mode 100644 RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.c
 create mode 100644 
RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosDxeMap.uni
 create mode 100644 
RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosDxeStrings.uni

diff --git a/RedfishClientPkg/RedfishClientPkg.dec 
b/RedfishClientPkg/RedfishClientPkg.dec
index 055c1924..77e04894 100644
--- a/RedfishClientPkg/RedfishClientPkg.dec
+++ b/RedfishClientPkg/RedfishClientPkg.dec
@@ -59,6 +59,7 @@
 
   gHii2RedfishMemoryFormsetGuid   = { 0XC2BE579E, 0X3C57, 
0X499C, { 0XA9, 0XDF, 0XE6, 0X23, 0X8A, 0X49, 0X64, 0XF8 }}
   gHii2RedfishBootFormsetGuid = { 0x8399a787, 0x108e, 
0x4e53, { 0x9e, 0xde, 0x4b, 0x18, 0xcc, 0x9e, 0xab, 0x3b }}
+  gHii2RedfishBiosFormsetGuid = { 0xC2724AD1, 0x4049, 
0x2404, { 0xF8, 0xCE, 0x01, 0xA7, 0x9C, 0xEC, 0x16, 0xF6 }}
 
 [PcdsFixedAtBuild]
   
gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize|32|UINT32|0x1001
diff --git a/RedfishClientPkg/RedfishClientComponents.dsc.inc 
b/RedfishClientPkg/RedfishClientComponents.dsc.inc
index 4633e962..858bd381 100644
--- a/RedfishClientPkg/RedfishClientComponents.dsc.inc
+++ b/RedfishClientPkg/RedfishClientComponents.dsc.inc
@@ -19,6 +19,7 @@
   RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf
   RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.inf
   RedfishClientPkg/Hii2RedfishBootDxe/Hii2RedfishBootDxe.inf
+  RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.inf
 !endif
   #
   # Below two modules should be pulled in by build tool.
diff --git a/RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.inf 
b/RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.inf
new file mode 100644
index ..06080113
--- /dev/null
+++ b/RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosDxe.inf
@@ -0,0 +1,55 @@
+## @file
+#  HII-to-Redfish BIOS Example driver.
+#
+#  (C) Copyright 2022 Hewlett Packard Enterprise Development LP
+#
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  INF_VERSION= 0x00010005
+  BASE_NAME  = Hii2RedfishBiosDxe
+  FILE_GUID  = 9A7FA287-4038-CB66-DC70-92AE8C0FCF73
+  MODULE_TYPE= UEFI_DRIVER
+  VERSION_STRING = 1.0
+  ENTRY_POINT= Hii2RedfishBiosDxeDriverEntryPoint
+  UNLOAD_IMAGE   = Hii2RedfishBiosDxeDriverUnload
+
+[Sources]
+  Hii2RedfishBiosDxe.c
+  Hii2RedfishBiosDxe.h
+  Hii2RedfishBiosData.h
+  Hii2RedfishBiosVfr.vfr
+  Hii2RedfishBiosDxeStrings.uni
+  Hii2RedfishBiosDxeMap.uni
+
+[Packages]
+  MdePkg/MdePkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+  EmulatorPkg/EmulatorPkg.dec
+
+[LibraryClasses]
+  UefiDriverEntryPoint
+  BaseLib
+  BaseMemoryLib
+  DebugLib
+  PcdLib
+  MemoryAllocationLib
+  UefiBootServicesTableLib
+  UefiRuntimeServicesTableLib
+  UefiLib
+  PrintLib
+  HiiLib
+
+[Protocols]
+  gEfiDevicePathProtocolGuid
+  gEfiHiiConfigAccessProtocolGuid
+
+
+[Guids]
+  gHii2RedfishBiosFormsetGuid
+
+[Depex]
+  gEfiHiiDatabaseProtocolGuid
+
diff --git a/RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosData.h 
b/RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosData.h
new file mode 100644
index ..24f2fd7c
--- /dev/null
+++ b/RedfishClientPkg/Hii2RedfishBiosDxe/Hii2RedfishBiosData.h
@@ -0,0 +1,46 @@
+/** @file
+  The header file of HII-to-Redfish BIOS example driver.
+
+  (C) Copyright 2022 Hewlett Packard Enterprise Development LP
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef HII_2_REDFISH_BIOS_DATA_H_
+#define HII_2_REDFISH_BIOS_DATA_H_
+
+#include 
+#include 
+
+#define HII_2_REDFISH_BIOS_FORMSET_GUID \
+  { \
+   

Re: [edk2-devel] [edk2-rfc] [RFC] Introduce new status code for ManageabilityPkg and Redfish*Pkg

2023-06-06 Thread Zimmer, Vincent
I agree. These additions make sense.  Perhaps you can format the submission per 
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-First-Process 
 in order to have this included in a future UEFI PI specification 
https://uefi.org/specs/PI/1.8/V3_Status_Codes.html. I can help you w/ the 
process of submission into the uefi forum platform initialization working 
group, too.
Vincent

-Original Message-
From: r...@edk2.groups.io  On Behalf Of Isaac Oram
Sent: Thursday, June 1, 2023 10:34 AM
To: devel@edk2.groups.io; nick...@nvidia.com; r...@edk2.groups.io
Cc: Simon Wang (SW-GPU) ; Chang, Abner 
; Nick Ramirez 
Subject: Re: [edk2-rfc] [RFC] Introduce new status code for ManageabilityPkg 
and Redfish*Pkg

Nickle,

This looks reasonable to me.  I can see an argument that suggests these align 
more with the peripheral class errors, but your proposal looks better to me.

Regards,
Isaac

From: devel@edk2.groups.io  On Behalf Of Nickle Wang via 
groups.io
Sent: Wednesday, May 31, 2023 9:23 PM
To: r...@edk2.groups.io
Cc: devel@edk2.groups.io; Simon Wang (SW-GPU) ; Chang, 
Abner ; Nick Ramirez 
Subject: [edk2-devel] [RFC] Introduce new status code for ManageabilityPkg and 
Redfish*Pkg

Hi edk2 community,

I like to introduce EFI_COMPUTING_UNIT_MANAGEABILITY status code to 
PiStatusCode.h. EFI_COMPUTING_UNIT_MANAGEABILITY will be used in edk2 
RedfishPkg and edk2-redfish-client RedfishClientPkg to report Redfish operation 
errors. It will also be used to report errors in edk2-platforms 
ManageabilityPkg.

EFI_COMPUTING_UNIT_MANAGEABILITY is created as one of the subclasses in 
computing unit class.

#define EFI_COMPUTING_UNIT_CACHE   (EFI_COMPUTING_UNIT | 0x0004)
#define EFI_COMPUTING_UNIT_MEMORY  (EFI_COMPUTING_UNIT | 0x0005)
#define EFI_COMPUTING_UNIT_CHIPSET (EFI_COMPUTING_UNIT | 0x0006)
+ #define EFI_COMPUTING_UNIT_MANAGEABILITY   (EFI_COMPUTING_UNIT | 
0x0007)

Below operation values are defined to report failure in manageability related 
operations. I only provide the definitions for Redfish functions but the 
failure case like in MCTP, IPMI and KCS can be created in the future.

+///
+/// Computing Unit Manageability Subclass Error Code definitions.
+/// The detail information is reported by REPORT_STATUS_CODE_WITH_EXTENDED_DATA
+//  with ASCII string in EFI_STATUS_CODE_STRING_DATA.
+///@{
+#define EFI_MANAGEABILITY_EC_REDFISH_COMMUNICATION_ERROR
(EFI_SUBCLASS_SPECIFIC | 0x)
+#define EFI_MANAGEABILITY_EC_REDFISH_HOST_INTERFACE_ERROR   
(EFI_SUBCLASS_SPECIFIC | 0x0001)
+#define EFI_MANAGEABILITY_EC_REDFISH_BOOTSTRAP_CREDENTIAL_ERROR 
(EFI_SUBCLASS_SPECIFIC | 0x0002)

* EFI_MANAGEABILITY_EC_REDFISH_COMMUNICATION_ERROR will be used to report 
communication failure between host and Redfish service providers (or BMC).
* EFI_MANAGEABILITY_EC_REDFISH_HOST_INTERFACE_ERROR is reported when host 
system can not create Redfish host interface due to some errors.
* EFI_MANAGEABILITY_EC_REDFISH_BOOTSTRAP_CREDENTIAL_ERROR is reported when host 
system cannot get bootstrap credentials by following the Host Interface 
standard.

Detail reason will be provided in ASCII string by calling 
REPORT_STATUS_CODE_WITH_EXTENDED_DATA().

The pull request is here for reference: 
https://github.com/nicklela/edk2/pull/4/files  Any feedback is welcome.

Thanks,
Nickle









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




Re: [edk2-devel] [PATCH v2] UnitTestFrameworkPkg: Add UnitTestPeiServicesTablePointerLib

2023-06-06 Thread Michael Kubacki
It looks like you're following a similar pattern to a library instance 
already in UnitTestFrameworkPkg/Library like 
UnitTestUefiBootServicesTableLib. I can't find where these types of 
libraries are explicitly called out in the 
UnitTestFrameworkPkg/ReadMe.md file [1]. You don't need to add it in 
this patch, but we might want to explain these in the readme (unless I 
just missed it).


They are not really a pure mock since they have a self-contained 
functional implementation of some structures typically in core modules 
like the PPI and HOB lists. They might also have more code outside the 
unit being tested than is ideal in a unit test, but they are useful for 
code that has dependencies in global databases.


[1] - 
https://github.com/tianocore/edk2/blob/master/UnitTestFrameworkPkg/ReadMe.md#unit-test-locationlayout-rules


There's some code I think is unnecessary in a unit test implementation 
like surrounding this NULL pointer check with debug code markers in 
UnitTestGetHobList():


  DEBUG_CODE_BEGIN ();
  if (HobList == NULL) {
return EFI_INVALID_PARAMETER;
  }

  DEBUG_CODE_END ();

Can you please simply check if the pointer is NULL?

Reviewed-by: Michael Kubacki 

On 6/6/2023 1:40 AM, Zhiguang Liu wrote:

This library supports a PeiServicesTablePointerLib implementation
that allows code dependent upon PeiServicesTable to operate in an
isolated execution environment such as within the context of a
host-based unit test framework.

The unit test should initialize the PeiServicesTable database with
any required elements (e.g. PPIs, Hob etc.) prior to the services
being invoked by code under test.

It is strongly recommended to clean any global databases by using
EFI_PEI_SERVICES.ResetSystem2 after every unit test so the tests
execute in a predictable manner from a clean state.

Cc: Michael D Kinney 
Cc: Michael Kubacki 
Cc: Sean Brogan 
Signed-off-by: Zhiguang Liu 
---
  .../UnitTestPeiServicesTablePointerLib.c  | 187 +
  .../UnitTestPeiServicesTablePointerLib.h  | 653 ++
  .../UnitTestPeiServicesTablePointerLib.inf|  37 +
  .../UnitTestPeiServicesTablePointerLib.uni|  12 +
  .../UnitTestPeiServicesTablePointerLibHob.c   | 162 +
  .../UnitTestPeiServicesTablePointerLibMisc.c  | 430 
  .../UnitTestPeiServicesTablePointerLibPpi.c   | 485 +
  UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc |   1 +
  .../UnitTestFrameworkPkgHost.dsc.inc  |   1 +
  9 files changed, 1968 insertions(+)
  create mode 100644 
UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.c
  create mode 100644 
UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.h
  create mode 100644 
UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.inf
  create mode 100644 
UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.uni
  create mode 100644 
UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLibHob.c
  create mode 100644 
UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLibMisc.c
  create mode 100644 
UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLibPpi.c

diff --git 
a/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.c
 
b/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.c
new file mode 100644
index 00..a1b982fbae
--- /dev/null
+++ 
b/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.c
@@ -0,0 +1,187 @@
+/** @file
+  This library supports a PEI Service table Pointer library implementation that
+  allows code dependent upon PEI Service to operate in an isolated execution 
environment
+  such as within the context of a host-based unit test framework.
+
+  Copyright (c) 2023, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "UnitTestPeiServicesTablePointerLib.h"
+
+///
+/// Pei service instance
+///
+EFI_PEI_SERVICES  mPeiServices = {
+  {
+PEI_SERVICES_SIGNATURE,
+PEI_SERVICES_REVISION,
+sizeof (EFI_PEI_SERVICES),
+0,
+0
+  },
+  UnitTestInstallPpi,   // InstallPpi
+  UnitTestReInstallPpi, // ReInstallPpi
+  UnitTestLocatePpi,// LocatePpi
+  UnitTestNotifyPpi,// NotifyPpi
+
+  UnitTestGetBootMode,  // GetBootMode
+  UnitTestSetBootMode,  // SetBootMode
+
+  UnitTestGetHobList, // GetHobList
+  UnitTestCreateHob,  // CreateHob
+
+  UnitTestFfsFindNextVolume,  // FfsFindNextVolume
+  UnitTestFfsFindNextFile,// FfsFindNextFile
+  UnitTestFfsFindSectionData, // FfsFindSectionData
+
+  UnitTestInstallPeiMemory, // InstallPeiMemory
+  UnitTestAllocatePages,// AllocatePages
+  UnitTestAllocatePool, //

Re: [edk2-devel] [PATCH v1 4/8] MdePkg/Rng: Add GUIDs to describe Rng algorithms

2023-06-06 Thread PierreGondois

Hello,
The mantis ticket (created by Jose Marinho) is available at:
https://mantis.uefi.org/mantis/view.php?id=2386

Also, are there any comments on the patch-set ?

Regards,
Pierre

On 5/9/23 15:50, Samer El-Haj-Mahmoud wrote:

Hi Jiewen,

There is an open ECR for UEFI spec review: 
https://bugzilla.tianocore.org/show_bug.cgi?id=4441. These patches can wait on 
the list until the ECR is reviewed by UEFI Forum and the decision is documented 
in the BZ. If approved, then the code patches should be able to proceed.

Thanks,
--Samer




-Original Message-
From: Yao, Jiewen 
Sent: Tuesday, May 9, 2023 9:46 AM
To: Pierre Gondois ; devel@edk2.groups.io
Cc: Kinney, Michael D ; Gao, Liming
; Liu, Zhiguang ; Wang,
Jian J ; Ard Biesheuvel ;
Sami Mujawar ; Jose Marinho
; Samer El-Haj-Mahmoud 
Subject: RE: [PATCH v1 4/8] MdePkg/Rng: Add GUIDs to describe Rng algorithms

Is this defined in UEFI spec? or approved in future UEFI spec?


-Original Message-
From: pierre.gond...@arm.com 
Sent: Tuesday, May 9, 2023 3:41 PM
To: devel@edk2.groups.io
Cc: Kinney, Michael D ; Gao, Liming
; Liu, Zhiguang ; Yao,
Jiewen ; Wang, Jian J ; Ard
Biesheuvel ; Sami Mujawar
; Jose Marinho ;
Samer El-Haj-Mahmoud 
Subject: [PATCH v1 4/8] MdePkg/Rng: Add GUIDs to describe Rng algorithms

From: Pierre Gondois 

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

The EFI_RNG_PROTOCOL can rely on the RngLib. The RngLib has multiple
implementations, some of them are unsafe (e.g. BaseRngLibTimerLib).
To allow the RngDxe to detect when such implementation is used,
a GetRngGuid() function is added in a following patch.

Prepare GetRngGuid() return values and add GUIDs describing
Rng algorithms:
- gEfiRngAlgorithmArmRndr
to describe a Rng algorithm accessed through Arm's RNDR instruction.
[1] states that the implementation of this algorithm should be
compliant to NIST SP900-80. The compliance is not guaranteed.
- gEfiRngAlgorithmUnSafe
to describe an unsafe implementation, cf. the BaseRngLibTimerLib.

[1] Arm Architecture Reference Manual Armv8, for A-profile architecture
sK12.1 'Properties of the generated random number'

Signed-off-by: Pierre Gondois 
---
  MdePkg/Include/Protocol/Rng.h | 20 
  MdePkg/MdePkg.dec |  2 ++
  2 files changed, 22 insertions(+)

diff --git a/MdePkg/Include/Protocol/Rng.h
b/MdePkg/Include/Protocol/Rng.h
index baf425587b3c..dfdaf36e41dc 100644
--- a/MdePkg/Include/Protocol/Rng.h
+++ b/MdePkg/Include/Protocol/Rng.h
@@ -67,6 +67,24 @@ typedef EFI_GUID EFI_RNG_ALGORITHM;
{ \
  0xe43176d7, 0xb6e8, 0x4827, {0xb7, 0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85,
0x61 } \
}
+///
+/// The Arm Architecture states the RNDR that the DRBG algorithm should
be compliant
+/// with NIST SP800-90A, while not mandating a particular algorithm, so as
to be
+/// inclusive of different geographies.
+///
+#define EFI_RNG_ALGORITHM_ARM_RNDR \
+  { \
+0x43d2fde3, 0x9d4e, 0x4d79,  {0x02, 0x96, 0xa8, 0x9b, 0xca, 0x78, 0x08,
0x41} \
+  }
+///
+/// The implementation of a Random Number Generator might be unsafe,
when using
+/// a dummy implementation for instance. Allow identifying such
implementation
+/// with this GUID.
+///
+#define EFI_RNG_ALGORITHM_UNSAFE \
+  { \
+0x869f728c, 0x409d, 0x4ab4, {0xac, 0x03, 0x71, 0xd3, 0x09, 0xc1, 0xb3,
0xf4 } \
+  }

  /**
Returns information about the random number generation implementation.
@@ -146,5 +164,7 @@ extern EFI_GUID
gEfiRngAlgorithmSp80090Ctr256Guid;
  extern EFI_GUID  gEfiRngAlgorithmX9313DesGuid;
  extern EFI_GUID  gEfiRngAlgorithmX931AesGuid;
  extern EFI_GUID  gEfiRngAlgorithmRaw;
+extern EFI_GUID  gEfiRngAlgorithmArmRndr;
+extern EFI_GUID  gEfiRngAlgorithmUnSafe;

  #endif
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 0ecfad5795e4..754085eaa55b 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -633,6 +633,8 @@ [Guids]
gEfiRngAlgorithmX9313DesGuid   = { 0x63c4785a, 0xca34, 0x4012, {0xa3,
0xc8, 0x0b, 0x6a, 0x32, 0x4f, 0x55, 0x46 }}
gEfiRngAlgorithmX931AesGuid= { 0xacd03321, 0x777e, 0x4d3d, {0xb1,
0xc8, 0x20, 0xcf, 0xd8, 0x88, 0x20, 0xc9 }}
gEfiRngAlgorithmRaw= { 0xe43176d7, 0xb6e8, 0x4827, {0xb7,
0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61 }}
+  gEfiRngAlgorithmArmRndr= { 0x43d2fde3, 0x9d4e, 0x4d79, {0x02,
0x96, 0xa8, 0x9b, 0xca, 0x78, 0x08, 0x41 }}
+  gEfiRngAlgorithmUnSafe = { 0x869f728c, 0x409d, 0x4ab4, {0xac,
0x03, 0x71, 0xd3, 0x09, 0xc1, 0xb3, 0xf4 }}

## Include/Protocol/AdapterInformation.h
gEfiAdapterInfoMediaStateGuid   = { 0xD7C74207, 0xA831, 0x4A26,
{0xB1, 0xF5, 0xD1, 0x93, 0x06, 0x5C, 0xE8, 0xB6 }}
--
2.25.1





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

Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg: RISC-V: TimerLib: Fix delay function to use 64-bit

2023-06-06 Thread Tuan Phan
On Tue, Jun 6, 2023 at 3:27 AM Sunil V L  wrote:

> On Fri, May 26, 2023 at 04:25:18PM -0700, Tuan Phan wrote:
> > The timer compare register is 64-bit so simplifying the delay
> > function.
> >
> > Signed-off-by: Tuan Phan 
> > ---
> >  MdePkg/Include/Register/RiscV64/RiscVImpl.h   |  1 -
> >  .../BaseRiscV64CpuTimerLib/CpuTimerLib.c  | 62 +--
> >  2 files changed, 28 insertions(+), 35 deletions(-)
> >
> > diff --git a/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> b/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> > index ee5c2ba60377..6997de6cc001 100644
> > --- a/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> > +++ b/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> > @@ -20,6 +20,5 @@
> >Name:
> >
> >  #define ASM_FUNC(Name)  _ASM_FUNC(ASM_PFX(Name), .text. ## Name)
> > -#define RISCV_TIMER_COMPARE_BITS  32
> >
> >  #endif
> > diff --git a/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> b/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> > index 9c8efc0f3530..57800177023c 100644
> > --- a/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> > +++ b/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> > @@ -22,26 +22,19 @@
> >@param  Delay A period of time to delay in ticks.
> >
> >  **/
> > +STATIC
> >  VOID
> >  InternalRiscVTimerDelay (
> > -  IN UINT32  Delay
> > +  IN UINT64  Delay
> >)
> >  {
> > -  UINT32  Ticks;
> > -  UINT32  Times;
> > -
> > -  Times  = Delay >> (RISCV_TIMER_COMPARE_BITS - 2);
> > -  Delay &= ((1 << (RISCV_TIMER_COMPARE_BITS - 2)) - 1);
> > -  do {
> > -//
> > -// The target timer count is calculated here
> > -//
> > -Ticks = RiscVReadTimer () + Delay;
> > -Delay = 1 << (RISCV_TIMER_COMPARE_BITS - 2);
> > -while (((Ticks - RiscVReadTimer ()) & (1 <<
> (RISCV_TIMER_COMPARE_BITS - 1))) == 0) {
> > -  CpuPause ();
> > -}
> > -  } while (Times-- > 0);
> > +  UINT64  Ticks;
> > +
> > +  Ticks = RiscVReadTimer () + Delay;
> > +
> > +  while (RiscVReadTimer () <= Ticks) {
> > +CpuPause ();
> > +  }
> >  }
> >
> >  /**
> > @@ -61,14 +54,14 @@ MicroSecondDelay (
> >)
> >  {
> >InternalRiscVTimerDelay (
> > -(UINT32)DivU64x32 (
> > -  MultU64x32 (
> > -MicroSeconds,
> > -PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> > -),
> > -  100u
> > -  )
> > -);
> > +DivU64x32 (
> > +  MultU64x32 (
> > +MicroSeconds,
> > +PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> > +  ),
> > +  100u
> > +)
> > +  );
> >return MicroSeconds;
> >  }
> >
> > @@ -89,14 +82,14 @@ NanoSecondDelay (
> >)
> >  {
> >InternalRiscVTimerDelay (
> > -(UINT32)DivU64x32 (
> > -  MultU64x32 (
> > -NanoSeconds,
> > -PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> > -),
> > -  10u
> > -  )
> > -);
> > +DivU64x32 (
> > +  MultU64x32 (
> > +NanoSeconds,
> > +PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> > +  ),
> > +  10u
> > +)
> > +  );
> >return NanoSeconds;
> >  }
> >
> > @@ -147,8 +140,9 @@ GetPerformanceCounter (
> >  UINT64
> >  EFIAPI
> >  GetPerformanceCounterProperties (
> > -  OUT  UINT64 *StartValue, OPTIONAL
> > -  OUT  UINT64*EndValue OPTIONAL
> > +  OUT  UINT64  *StartValue,
> > +  OPTIONAL
> > +  OUT  UINT64  *EndValue OPTIONAL
>
> Hi Tuan,
>
> What is this change? The formatting doesn't look correct. Have you run
> CI tests?
>
=> That is the result of running crutinize tool with edk2 config. Should I
leave it as before?

>
> Otherwise LGTM. Thanks for the fix!
>
> Reviewed-by: Sunil V L 
>


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




[edk2-devel] [PATCH 1/1] MdePkg/BaseSynchronizationLib: Fix RISC-V synchronization functions

2023-06-06 Thread Sunil V L
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4433

There is a return value bug. SyncIncrement and SyncDecrement functions
should return the updated value. But destination register rd in
amoadd instruction will not have final incremented value. Fix this
by loading the incremented value from the memory where amoadd
instruction would have stored the final incremented value.

Signed-off-by: Sunil V L 
Reported-by: Chao Li 
Cc: Daniel Schaefer 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Andrei Warkentin 
---
 .../Library/BaseSynchronizationLib/RiscV64/Synchronization.S  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdePkg/Library/BaseSynchronizationLib/RiscV64/Synchronization.S 
b/MdePkg/Library/BaseSynchronizationLib/RiscV64/Synchronization.S
index f287ef38f651..34672507d8dc 100644
--- a/MdePkg/Library/BaseSynchronizationLib/RiscV64/Synchronization.S
+++ b/MdePkg/Library/BaseSynchronizationLib/RiscV64/Synchronization.S
@@ -61,7 +61,7 @@ exit2:
 ASM_PFX (InternalSyncIncrement):
 li  a1, 1
 amoadd.w  a2, a1, (a0)
-mv  a0, a2
+ld  a0, 0(a0)
 ret
 
 //
@@ -72,5 +72,5 @@ ASM_PFX (InternalSyncIncrement):
 ASM_PFX (InternalSyncDecrement):
 li  a1, -1
 amoadd.w  a2, a1, (a0)
-mv  a0, a2
+ld  a0, 0(a0)
 ret
-- 
2.34.1



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




Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg: RISC-V: TimerLib: Fix delay function to use 64-bit

2023-06-06 Thread Sunil V L
On Tue, Jun 06, 2023 at 10:02:08AM -0700, Tuan Phan wrote:
> On Tue, Jun 6, 2023 at 3:27 AM Sunil V L  wrote:
> 
> > On Fri, May 26, 2023 at 04:25:18PM -0700, Tuan Phan wrote:
> > > The timer compare register is 64-bit so simplifying the delay
> > > function.
> > >
> > > Signed-off-by: Tuan Phan 
> > > ---
> > >  MdePkg/Include/Register/RiscV64/RiscVImpl.h   |  1 -
> > >  .../BaseRiscV64CpuTimerLib/CpuTimerLib.c  | 62 +--
> > >  2 files changed, 28 insertions(+), 35 deletions(-)
> > >
> > > diff --git a/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> > b/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> > > index ee5c2ba60377..6997de6cc001 100644
> > > --- a/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> > > +++ b/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> > > @@ -20,6 +20,5 @@
> > >Name:
> > >
> > >  #define ASM_FUNC(Name)  _ASM_FUNC(ASM_PFX(Name), .text. ## Name)
> > > -#define RISCV_TIMER_COMPARE_BITS  32
> > >
> > >  #endif
> > > diff --git a/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> > b/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> > > index 9c8efc0f3530..57800177023c 100644
> > > --- a/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> > > +++ b/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> > > @@ -22,26 +22,19 @@
> > >@param  Delay A period of time to delay in ticks.
> > >
> > >  **/
> > > +STATIC
> > >  VOID
> > >  InternalRiscVTimerDelay (
> > > -  IN UINT32  Delay
> > > +  IN UINT64  Delay
> > >)
> > >  {
> > > -  UINT32  Ticks;
> > > -  UINT32  Times;
> > > -
> > > -  Times  = Delay >> (RISCV_TIMER_COMPARE_BITS - 2);
> > > -  Delay &= ((1 << (RISCV_TIMER_COMPARE_BITS - 2)) - 1);
> > > -  do {
> > > -//
> > > -// The target timer count is calculated here
> > > -//
> > > -Ticks = RiscVReadTimer () + Delay;
> > > -Delay = 1 << (RISCV_TIMER_COMPARE_BITS - 2);
> > > -while (((Ticks - RiscVReadTimer ()) & (1 <<
> > (RISCV_TIMER_COMPARE_BITS - 1))) == 0) {
> > > -  CpuPause ();
> > > -}
> > > -  } while (Times-- > 0);
> > > +  UINT64  Ticks;
> > > +
> > > +  Ticks = RiscVReadTimer () + Delay;
> > > +
> > > +  while (RiscVReadTimer () <= Ticks) {
> > > +CpuPause ();
> > > +  }
> > >  }
> > >
> > >  /**
> > > @@ -61,14 +54,14 @@ MicroSecondDelay (
> > >)
> > >  {
> > >InternalRiscVTimerDelay (
> > > -(UINT32)DivU64x32 (
> > > -  MultU64x32 (
> > > -MicroSeconds,
> > > -PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> > > -),
> > > -  100u
> > > -  )
> > > -);
> > > +DivU64x32 (
> > > +  MultU64x32 (
> > > +MicroSeconds,
> > > +PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> > > +  ),
> > > +  100u
> > > +)
> > > +  );
> > >return MicroSeconds;
> > >  }
> > >
> > > @@ -89,14 +82,14 @@ NanoSecondDelay (
> > >)
> > >  {
> > >InternalRiscVTimerDelay (
> > > -(UINT32)DivU64x32 (
> > > -  MultU64x32 (
> > > -NanoSeconds,
> > > -PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> > > -),
> > > -  10u
> > > -  )
> > > -);
> > > +DivU64x32 (
> > > +  MultU64x32 (
> > > +NanoSeconds,
> > > +PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> > > +  ),
> > > +  10u
> > > +)
> > > +  );
> > >return NanoSeconds;
> > >  }
> > >
> > > @@ -147,8 +140,9 @@ GetPerformanceCounter (
> > >  UINT64
> > >  EFIAPI
> > >  GetPerformanceCounterProperties (
> > > -  OUT  UINT64 *StartValue, OPTIONAL
> > > -  OUT  UINT64*EndValue OPTIONAL
> > > +  OUT  UINT64  *StartValue,
> > > +  OPTIONAL
> > > +  OUT  UINT64  *EndValue OPTIONAL
> >
> > Hi Tuan,
> >
> > What is this change? The formatting doesn't look correct. Have you run
> > CI tests?
> >
> => That is the result of running crutinize tool with edk2 config. Should I
> leave it as before?
> 
I have not used crutinize tool. But this change looks unnecessary. I
would use uncrustify tool locally for any formatting fixes since the
same tool gets used in CI tests also.

> >
> > Otherwise LGTM. Thanks for the fix!
> >
> > Reviewed-by: Sunil V L 
> >


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105810): https://edk2.groups.io/g/devel/message/105810
Mute This Topic: https://groups.io/mt/99160087/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/3] MdePkg/Include/IndustryStandard: Add Operator and Xor field names

2023-06-06 Thread Michael D Kinney
Hi Pedro,

Based on this info, would you prefer we use xor_ style instead of Xor?

I can update the PR with that change.

Mike

> -Original Message-
> From: Kinney, Michael D 
> Sent: Thursday, June 1, 2023 8:02 AM
> To: Pedro Falcato 
> Cc: devel@edk2.groups.io; Gao, Liming ; Liu,
> Zhiguang ; Oliver Smith-Denny
> ; Pop, Aaron ; Kinney,
> Michael D 
> Subject: RE: [Patch v2 1/3] MdePkg/Include/IndustryStandard: Add Operator
> and Xor field names
> 
> Hi Pedro,
> 
> It appears other projects have run into this same issue with the
> TPM specifications and have changed the field names by appending '_'.
> 
> https://github.com/MIPS/external-
> tpm2/blob/d704926273cf17498c95ff0dc50b4b17e523c109/generator/structure_gene
> rator.py#L1183
> 
> Mike
> 
> > -Original Message-
> > From: Kinney, Michael D 
> > Sent: Wednesday, May 31, 2023 11:42 AM
> > To: Pedro Falcato 
> > Cc: devel@edk2.groups.io; Gao, Liming ; Liu,
> > Zhiguang ; Oliver Smith-Denny
> > ; Pop, Aaron ; Kinney,
> > Michael D 
> > Subject: RE: [Patch v2 1/3] MdePkg/Include/IndustryStandard: Add Operator
> > and Xor field names
> >
> >
> >
> > > -Original Message-
> > > From: Pedro Falcato 
> > > Sent: Wednesday, May 31, 2023 11:17 AM
> > > To: Kinney, Michael D 
> > > Cc: devel@edk2.groups.io; Gao, Liming ; Liu,
> > > Zhiguang ; Oliver Smith-Denny
> > > ; Pop, Aaron 
> > > Subject: Re: [Patch v2 1/3] MdePkg/Include/IndustryStandard: Add
> Operator
> > > and Xor field names
> > >
> > > On Tue, May 30, 2023 at 7:53 PM Michael D Kinney
> > >  wrote:
> > > >
> > > > Update Tpm12.h and Tpm20.h and not use c++ reserved keywords
> > > > operator and xor in C structures to support use of these
> > > > include files when building with a C++ compiler.
> > > >
> > > > This patch temporarily introduces an anonymous union to add
> > > > Operator and Xor fields to support migration from the current
> > > > field names to the new field names.
> > > >
> > > > Warning 4201 is disabled for VS20xx tool chains is a temporary
> > > > change to allow the use of anonymous unions.
> > > >
> > > > Cc: Liming Gao 
> > > > Cc: Zhiguang Liu 
> > > > Cc: Oliver Smith-Denny 
> > > > Cc: Pedro Falcato 
> > > > Cc: Aaron Pop 
> > > > Signed-off-by: Michael D Kinney 
> > > > ---
> > > >  MdePkg/Include/IndustryStandard/Tpm12.h | 22 --
> > > >  MdePkg/Include/IndustryStandard/Tpm20.h | 25
> +++--
> > > >  2 files changed, 43 insertions(+), 4 deletions(-)
> > > >
> > > > diff --git a/MdePkg/Include/IndustryStandard/Tpm12.h
> > > b/MdePkg/Include/IndustryStandard/Tpm12.h
> > > > index 155dcc9f5f99..56e89d9d0835 100644
> > > > --- a/MdePkg/Include/IndustryStandard/Tpm12.h
> > > > +++ b/MdePkg/Include/IndustryStandard/Tpm12.h
> > > > @@ -9,6 +9,14 @@
> > > >  #ifndef _TPM12_H_
> > > >  #define _TPM12_H_
> > > >
> > > > +///
> > > > +/// Temporary disable 4201 to support anonymous unions
> > > > +///
> > > > +#if defined (_MSC_EXTENSIONS)
> > > > +#pragma warning( push )
> > > > +#pragma warning ( disable : 4201 )
> > > > +#endif
> > > > +
> > > >  ///
> > > >  /// The start of TPM return codes
> > > >  ///
> > > > @@ -744,8 +752,11 @@ typedef struct tdTPM_PERMANENT_FLAGS {
> > > >BOOLEAN  TPMpost;
> > > >BOOLEAN  TPMpostLock;
> > > >BOOLEAN  FIPS;
> > > > -  BOOLEAN   operator;
> > > > -  BOOLEAN   enableRevokeEK;
> > > > +  union {
> > > > +BOOLEANoperator;
> > > > +BOOLEANOperator;
> > > > +  };
> > >
> > > Do you know if this works cleanly for the other toolchains? i.e
> > > supported GCCs and CLANGs?
> > > I don't *think* there's a warning for anonymous unions beyond passing
> > > -pedantic + -std=c, but it'd be good to know.
> > > If so, we may need a pragma for this.
> >
> > I did not see any issues with my local testing or with EDK II CI.
> >
> > >
> > > > +  BOOLEAN  enableRevokeEK;
> > > >BOOLEAN  nvLocked;
> > > >BOOLEAN  readSRKPub;
> > > >BOOLEAN  tpmEstablished;
> > > > @@ -2162,4 +2173,11 @@ typedef struct tdTPM_RSP_COMMAND_HDR {
> > > >
> > > >  #pragma pack ()
> > > >
> > > > +///
> > > > +/// Temporary disable 4201 to support anonymous unions
> > > > +///
> > > > +#if defined (_MSC_EXTENSIONS)
> > > > +#pragma warning( pop )
> > > > +#endif
> > > > +
> > > >  #endif
> > > > diff --git a/MdePkg/Include/IndustryStandard/Tpm20.h
> > > b/MdePkg/Include/IndustryStandard/Tpm20.h
> > > > index 4440f3769f26..a602c0d9c289 100644
> > > > --- a/MdePkg/Include/IndustryStandard/Tpm20.h
> > > > +++ b/MdePkg/Include/IndustryStandard/Tpm20.h
> > > > @@ -15,6 +15,14 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> > > >
> > > >  #include 
> > > >
> > > > +///
> > > > +/// Temporary disable 4201 to support anonymous unions
> > > > +///
> > > > +#if defined (_MSC_EXTENSIONS)
> > > > +#pragma warning( push )
> > > > +#pragma warning ( disable

Re: [edk2-devel] [PATCH v2 2/7] MdeModulePkg/DxeIpl: Merge EBC, RISCV64 and LOONGARCH code

2023-06-06 Thread Michael Kubacki

On 6/2/2023 11:17 AM, Ard Biesheuvel wrote:

The Risc-V and LoongArch specific versions of the DXE core handoff code
in DxeIpl are essentially copies of the EBC version (modulo the
copyright in the header and some debug prints in the code).

In preparation for introducing a generic PPI based method to implement
the non-executable stack, let's merge these versions, so we only need to
add this logic once.

Signed-off-by: Ard Biesheuvel 
---
  MdeModulePkg/Core/DxeIplPeim/{Ebc/DxeLoadFunc.c => DxeHandoff.c} |  2 +-
  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf  | 10 +--
  MdeModulePkg/Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c   | 63 

  MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c   | 75 

  4 files changed, 3 insertions(+), 147 deletions(-)

diff --git a/MdeModulePkg/Core/DxeIplPeim/Ebc/DxeLoadFunc.c 
b/MdeModulePkg/Core/DxeIplPeim/DxeHandoff.c
similarity index 92%
rename from MdeModulePkg/Core/DxeIplPeim/Ebc/DxeLoadFunc.c
rename to MdeModulePkg/Core/DxeIplPeim/DxeHandoff.c
index c1a16b602452218e..a0f85ebea56e6cba 100644
--- a/MdeModulePkg/Core/DxeIplPeim/Ebc/DxeLoadFunc.c
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeHandoff.c
@@ -1,5 +1,5 @@
  /** @file

-  EBC-specific functionality for DxeLoad.

+  Generic version of arch-specific functionality for DxeLoad.

  


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

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

diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf 
b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
index 052ea0ec1a6f2771..60c998be6c1bad01 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
@@ -45,17 +45,11 @@ [Sources.X64]
X64/VirtualMemory.c

X64/DxeLoadFunc.c

  


-[Sources.EBC]

-  Ebc/DxeLoadFunc.c

-

  [Sources.ARM, Sources.AARCH64]

Arm/DxeLoadFunc.c

  


-[Sources.RISCV64]

-  RiscV64/DxeLoadFunc.c

-

-[Sources.LOONGARCH64]

-  LoongArch64/DxeLoadFunc.c

+[Sources.LOONGARCH64,Sources.RISCV64,Sources.EBC]

+  DxeHandoff.c

  


  [Packages]

MdePkg/MdePkg.dec

diff --git a/MdeModulePkg/Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c 
b/MdeModulePkg/Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c
deleted file mode 100644
index 95d3af19ea4c9f00..
--- a/MdeModulePkg/Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/** @file

-  LoongArch specifc functionality for DxeLoad.

-

-  Copyright (c) 2022, Loongson Technology Corporation Limited. All rights 
reserved.

-

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

-

-**/

-

-#include "DxeIpl.h"

-

-/**

-   Transfers control to DxeCore.

-

-   This function performs a CPU architecture specific operations to execute

-   the entry point of DxeCore with the parameters of HobList.

-   It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.

-

-   @param[in] DxeCoreEntryPoint The entry point of DxeCore.

-   @param[in] HobList   The start of HobList passed to DxeCore.

-

-**/

-VOID

-HandOffToDxeCore (

-  IN EFI_PHYSICAL_ADDRESS  DxeCoreEntryPoint,

-  IN EFI_PEI_HOB_POINTERS  HobList

-  )

-{

-  VOID*BaseOfStack;

-  VOID*TopOfStack;

-  EFI_STATUS  Status;

-

-  //

-  // Allocate 128KB for the Stack

-  //

-  BaseOfStack = AllocatePages (EFI_SIZE_TO_PAGES (STACK_SIZE));

-  ASSERT (BaseOfStack != NULL);

-


I know this code path is critical to continue boot, but dereferencing a 
null pointer if asserts are not active is not a great alternative.


Perhaps a status error code could be reported to allow platforms to 
potentially hook onto? Kind of like what is done if the DXE IPL PPI 
cannot be found 
https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c#LL518-L522.




-  //

-  // Compute the top of the stack we were allocated. Pre-allocate a UINTN

-  // for safety.

-  //

-  TopOfStack = (VOID *)((UINTN)BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * 
EFI_PAGE_SIZE - CPU_STACK_ALIGNMENT);

-  TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);

-

-  //

-  // End of PEI phase signal

-  //

-  Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);

-  ASSERT_EFI_ERROR (Status);

-

-  //

-  // Update the contents of BSP stack HOB to reflect the real stack info 
passed to DxeCore.

-  //

-  UpdateStackHob ((EFI_PHYSICAL_ADDRESS)(UINTN)BaseOfStack, STACK_SIZE);

-

-  SwitchStack (

-(SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,

-HobList.Raw,

-NULL,

-TopOfStack

-);

-}

diff --git a/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c 
b/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c
deleted file mode 100644
index b3567d88f73467e7..
--- a/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/** @file

-  RISC-V specific functionality for DxeLoad.

-

-  Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights 
r

[edk2-devel] [edk2-platforms] AlderlakeOpenBoardPkg/AlderlakePRvp: Add library instances

2023-06-06 Thread Saloni Kasbekar
Adds the following library instances:
AlderlakePRvp/Library/BoardAcpiLib
AlderlakePRvp/Library/BoardInitLib

Cc: Sai Chaganty 
Cc: Nate DeSimone 
Cc: Isaac Oram 
Cc: Rosen Chuang 
Signed-off-by: Saloni Kasbekar 
---
 .../Library/BoardAcpiLib/BaseAcpiTableLib.c   |  30 ++
 .../BaseMultiBoardAcpiSupportLib.c|  53 +++
 .../BaseMultiBoardAcpiSupportLib.inf  |  43 +++
 .../Library/BoardInitLib/Dxe/DxeInitLib.c | 178 ++
 .../BoardInitLib/Dxe/DxeMultiBoardInitLib.c   |  65 
 .../BoardInitLib/Dxe/DxeMultiBoardInitlib.inf |  97 ++
 .../BoardInitLib/Pei/BoardPchInitPreMemLib.c  | 131 
 .../BoardInitLib/Pei/BoardSaConfigPreMem.h|  81 +
 .../BoardInitLib/Pei/BoardSaInitPreMemLib.c   | 245 ++
 .../BoardInitLib/Pei/GpioTableAdlPPostMem.h   |  25 ++
 .../Library/BoardInitLib/Pei/PeiDetect.c  |  63 
 .../BoardInitLib/Pei/PeiInitPostMemLib.c  | 306 ++
 .../BoardInitLib/Pei/PeiInitPreMemLib.c   | 236 ++
 .../Pei/PeiMultiBoardInitPostMemLib.c |  50 +++
 .../Pei/PeiMultiBoardInitPostMemLib.inf   | 156 +
 .../Pei/PeiMultiBoardInitPreMemLib.c  | 105 ++
 .../Pei/PeiMultiBoardInitPreMemLib.inf| 230 +
 17 files changed, 2094 insertions(+)
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardAcpiLib/BaseAcpiTableLib.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardAcpiLib/BaseMultiBoardAcpiSupportLib.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardAcpiLib/BaseMultiBoardAcpiSupportLib.inf
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardInitLib/Dxe/DxeInitLib.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardInitLib/Dxe/DxeMultiBoardInitLib.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardInitLib/Dxe/DxeMultiBoardInitlib.inf
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardInitLib/Pei/BoardPchInitPreMemLib.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardInitLib/Pei/BoardSaConfigPreMem.h
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardInitLib/Pei/BoardSaInitPreMemLib.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardInitLib/Pei/GpioTableAdlPPostMem.h
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardInitLib/Pei/PeiDetect.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardInitLib/Pei/PeiInitPostMemLib.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardInitLib/Pei/PeiInitPreMemLib.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardInitLib/Pei/PeiMultiBoardInitPostMemLib.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardInitLib/Pei/PeiMultiBoardInitPostMemLib.inf
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardInitLib/Pei/PeiMultiBoardInitPreMemLib.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardInitLib/Pei/PeiMultiBoardInitPreMemLib.inf

diff --git 
a/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardAcpiLib/BaseAcpiTableLib.c
 
b/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardAcpiLib/BaseAcpiTableLib.c
new file mode 100644
index 00..c8154b84c7
--- /dev/null
+++ 
b/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardAcpiLib/BaseAcpiTableLib.c
@@ -0,0 +1,30 @@
+/** @file
+  Board ACPI Table Library
+
+   Copyright (c) 2022, Intel Corporation. All rights reserved.
+   SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include 
+#include 
+#include 
+
+/**
+  Update ACPI Table
+
+  @param[in, out]  TablePointer to table, need to be update in Acpi table.
+  @param[in, out]  Version  ACPI table version
+
+  @retval EFI_SUCCESS   The function always return successfully.
+**/
+EFI_STATUS
+EFIAPI
+AdlPBoardUpdateAcpiTable (
+  IN OUT EFI_ACPI_COMMON_HEADER   *Table,
+  IN OUT EFI_ACPI_TABLE_VERSION   *Version
+  )
+{
+  return EFI_SUCCESS;
+}
+
diff --git 
a/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardAcpiLib/BaseMultiBoardAcpiSupportLib.c
 
b/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardAcpiLib/BaseMultiBoardAcpiSupportLib.c
new file mode 100644
index 00..c78bee4b0a
--- /dev/null
+++ 
b/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Library/BoardAcpiLib/BaseMultiBoardAcpiSupportLib.c
@@ -0,0 +1,53 @@
+/** @file
+  Multi-Board ACPI Support Library
+
+   Copyright (c) 2022, Intel Corporation. All rights reserved.
+   SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#in

Re: [edk2-devel] [PATCH v2] MdePkg ACPI65: Update MADT Revision pre ACPI Spec 6.5

2023-06-06 Thread Michael D Kinney
Merged

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

Mike

> -Original Message-
> From: Kinney, Michael D 
> Sent: Friday, June 2, 2023 11:10 AM
> To: Chen, Aryeh ; devel@edk2.groups.io
> Cc: Gao, Liming ; Liu, Zhiguang
> ; Yao, Jiewen ; Kinney,
> Michael D 
> Subject: RE: [PATCH v2] MdePkg ACPI65: Update MADT Revision pre ACPI Spec
> 6.5
> 
> Reviewed-by: Michael D Kinney 
> 
> 
> 
> > -Original Message-
> > From: Chen, Aryeh 
> > Sent: Thursday, June 1, 2023 4:56 AM
> > To: devel@edk2.groups.io
> > Cc: Chen, Aryeh ; Kinney, Michael D
> > ; Gao, Liming ;
> Liu,
> > Zhiguang ; Yao, Jiewen 
> > Subject: [PATCH v2] MdePkg ACPI65: Update MADT Revision pre ACPI Spec 6.5
> >
> > From: Aryeh Chen 
> >
> > Fix issue: https://bugzilla.tianocore.org/show_bug.cgi?id=4474
> >
> > ACPI_Spec_6_5_Aug29 Table 5.19 page #128 that MADT Revision
> > field is 6.
> >
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> > Cc: Zhiguang Liu 
> > Cc: Jiewen Yao 
> > Signed-off-by: Aryeh Chen 
> > ---
> >  MdePkg/Include/IndustryStandard/Acpi65.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/MdePkg/Include/IndustryStandard/Acpi65.h
> > b/MdePkg/Include/IndustryStandard/Acpi65.h
> > index 1e41ae9a27..6caadf2404 100644
> > --- a/MdePkg/Include/IndustryStandard/Acpi65.h
> > +++ b/MdePkg/Include/IndustryStandard/Acpi65.h
> > @@ -293,7 +293,7 @@ typedef struct {
> >  ///
> >
> >  /// MADT Revision (as defined in ACPI 6.5 spec.)
> >
> >  ///
> >
> > -#define EFI_ACPI_6_5_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION  0x05
> >
> > +#define EFI_ACPI_6_5_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION  0x06
> >
> >
> >
> >  ///
> >
> >  /// Multiple APIC Flags
> >
> > --
> > 2.34.0.windows.1



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




Re: [edk2-devel] failed pr

2023-06-06 Thread Michael D Kinney
All EDK II Maintainers should now have permissions to "re-run failed jobs".

If you see a PR with failed jobs that are not related to the code change,
then try rerunning the specific failed job or select "re-run failed jobs"
from the drop down in top right of "Checks" tab.

Please let me know if you do not see this as an option.

Thanks,

Mike

> -Original Message-
> From: Kinney, Michael D 
> Sent: Friday, June 2, 2023 5:07 PM
> To: Ard Biesheuvel ; devel@edk2.groups.io
> Cc: Michael Kubacki ; Sean Brogan
> ; Kinney, Michael D 
> Subject: RE: [edk2-devel] failed pr
> 
> Merged
> 
> Mike
> 
> > -Original Message-
> > From: Ard Biesheuvel 
> > Sent: Friday, June 2, 2023 4:39 PM
> > To: devel@edk2.groups.io; Kinney, Michael D 
> > Cc: Michael Kubacki ; Sean Brogan
> > 
> > Subject: Re: [edk2-devel] failed pr
> >
> > Another one
> >
> > https://github.com/tianocore/edk2/pull/4473
> >
> > On Sat, 3 Jun 2023 at 00:32, Ard Biesheuvel  wrote:
> > >
> > > Thanks!
> > >
> > > On Fri, 2 Jun 2023 at 18:38, Michael D Kinney
> > >  wrote:
> > > >
> > > > Done.
> > > >
> > > > Mike
> > > >
> > > > > -Original Message-
> > > > > From: Kinney, Michael D 
> > > > > Sent: Friday, June 2, 2023 9:37 AM
> > > > > To: devel@edk2.groups.io; a...@kernel.org; Michael Kubacki
> > > > > ; Sean Brogan
> > 
> > > > > Cc: Kinney, Michael D 
> > > > > Subject: RE: [edk2-devel] failed pr
> > > > >
> > > > > I am working on it.
> > > > >
> > > > > Mike
> > > > >
> > > > > > -Original Message-
> > > > > > From: devel@edk2.groups.io  On Behalf Of
> Ard
> > > > > > Biesheuvel
> > > > > > Sent: Friday, June 2, 2023 9:19 AM
> > > > > > To: Kinney, Michael D ; Michael
> Kubacki
> > > > > > ; Sean Brogan
> > ;
> > > > > > edk2-devel-groups-io 
> > > > > > Subject: [edk2-devel] failed pr
> > > > > >
> > > > > > Could someone push the merge button on this pr please?
> > > > > >
> > > > > > https://github.com/tianocore/edk2/pull/4470
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> > > > 
> > > >
> > > >


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




Re: [edk2-devel] [edk2-platforms] AlderlakeOpenBoardPkg/AlderlakePRvp: Add library instances

2023-06-06 Thread Pedro Falcato
On Tue, Jun 6, 2023 at 8:41 PM Saloni Kasbekar
 wrote:
>
> Adds the following library instances:
> AlderlakePRvp/Library/BoardAcpiLib
> AlderlakePRvp/Library/BoardInitLib

Hi Saloni,

Thanks for the patch. Is this part of a larger series? There's no
AlderlakeOpenBoardPkg in-tree, and this patch does nothing except
adding two libs for a platform that's not in-tree.

-- 
Pedro


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105816): https://edk2.groups.io/g/devel/message/105816
Mute This Topic: https://groups.io/mt/99370885/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/3] MdePkg/Include/IndustryStandard: Add Operator and Xor field names

2023-06-06 Thread Pedro Falcato
On Tue, Jun 6, 2023 at 6:57 PM Michael D Kinney
 wrote:
>
> Hi Pedro,
>
> Based on this info, would you prefer we use xor_ style instead of Xor?
>
> I can update the PR with that change.
>
> Mike
Hi Mike,

Sorry, I didn't know you were waiting for my input. Yes, I would
prefer xor_ style, but I'll leave it up to you.
You can add my

Reviewed-by: Pedro Falcato 

For the whole series, regardless of the style choice here.

-- 
Pedro


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105817): https://edk2.groups.io/g/devel/message/105817
Mute This Topic: https://groups.io/mt/99226543/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/1] MdePkg/BaseLib: Add SpeculationBarrier implementation for RiscV64

2023-06-06 Thread Michael D Kinney
Merged

Mike


> -Original Message-
> From: Li, Yong 
> Sent: Monday, June 5, 2023 12:45 AM
> To: devel@edk2.groups.io; suni...@ventanamicro.com; Kinney, Michael D
> ; Gao, Liming 
> Cc: Warkentin, Andrei ; Chai, Evan
> ; Tuan Phan 
> Subject: Re: [edk2-devel] [PATCH v2 1/1] MdePkg/BaseLib: Add
> SpeculationBarrier implementation for RiscV64
> 
> Hi  Michael,
> 
> I updated the commit messages and the EDK II CI passes,
> The PR link is as below.
> https://github.com/tianocore/edk2/pull/4480
> 
> Please help merge, thanks for the helping
> 
> 
> On 2023/6/3 14:13, Li, Yong wrote:
> > Hi Michael
> >
> > This is the change to MdePkg/Library/BaseLib/RiscV64.
> > Since it is for RiscV specific, I somehow got the review from Sunil.
> > Not sure need additional reviewer and or anything else from my side ?
> > It is my first patch to edk2, please help proceed and look for the
> feedback. Thanks
> >
> >
> > On 2023/6/3 1:09, Sunil V L wrote:
> >> On Thu, Jun 01, 2023 at 06:56:05PM +0800, Yong Li wrote:
> >>> Implement the SpeculationBarrier with implementations consisting of
> >>> fence instruction which provides finer-grain memory orderings.
> >>> Perform Data Barrier in RiscV: fence rw,rw
> >>> Perform Instruction Barrier in RiscV: fence.i; fence r,r
> >>> More detail is in Appendix A: RVWMO Explanatory Material in
> >>> https://github.com/riscv/riscv-isa-manual
> >>>
> >>> This API is first introduced in the below commits for IA32 and x64
> >>>
> https://github.com/tianocore/edk2/commit/d9f1cac51bd354507e880e614d11a1dc16
> 0d38a3
> >>>
> https://github.com/tianocore/edk2/commit/e83d841fdc2878959185c4c6cc38a7a1e8
> 8377a4
> >>> and below the commit for ARM and AArch64 implementation
> >>>
> https://github.com/tianocore/edk2/commit/c0959b4426b2da45cdb8146a5116bb4fd9
> b86534
> >>>
> >>> This commit is to add the RiscV64 implementation which will be used by
> >>> variable service under Variable/RuntimeDxe
> >>>
> >>> Cc: Andrei Warkentin 
> >>> Cc: Evan Chai 
> >>> Cc: Sunil V L 
> >>> Cc: Tuan Phan 
> >>> Signed-off-by: Yong Li 
> >>> ---
> >>
> >> Reviewed-by: Sunil V L 
> >>
> >> Thanks,
> >> Sunil
> >>
> >>
> >> 
> >>
> >>


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




Re: [edk2-devel] [edk2-platforms] AlderlakeOpenBoardPkg/AlderlakePRvp: Add library instances

2023-06-06 Thread Saloni Kasbekar
Hi Pedro,

Yes, this is. I will be sending more patches over the next few days to add 
support for Intel Alderlake platform in edk2-platforms.

Thanks,
Saloni

-Original Message-
From: Pedro Falcato  
Sent: Tuesday, June 6, 2023 1:59 PM
To: devel@edk2.groups.io; Kasbekar, Saloni 
Cc: Chaganty, Rangasai V ; Desimone, Nathaniel L 
; Oram, Isaac W ; 
Chuang, Rosen 
Subject: Re: [edk2-devel] [edk2-platforms] AlderlakeOpenBoardPkg/AlderlakePRvp: 
Add library instances

On Tue, Jun 6, 2023 at 8:41 PM Saloni Kasbekar  
wrote:
>
> Adds the following library instances:
> AlderlakePRvp/Library/BoardAcpiLib
> AlderlakePRvp/Library/BoardInitLib

Hi Saloni,

Thanks for the patch. Is this part of a larger series? There's no 
AlderlakeOpenBoardPkg in-tree, and this patch does nothing except adding two 
libs for a platform that's not in-tree.

--
Pedro


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




Re: [edk2-devel] failed pr

2023-06-06 Thread Ard Biesheuvel
On Tue, 6 Jun 2023 at 21:55, Kinney, Michael D
 wrote:
>
> All EDK II Maintainers should now have permissions to "re-run failed jobs".
>
> If you see a PR with failed jobs that are not related to the code change,
> then try rerunning the specific failed job or select "re-run failed jobs"
> from the drop down in top right of "Checks" tab.
>
> Please let me know if you do not see this as an option.
>

Excellent! Thanks for taking care of this.


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




Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg: RISC-V: TimerLib: Fix delay function to use 64-bit

2023-06-06 Thread Tuan Phan
On Tue, Jun 6, 2023 at 10:10 AM Sunil V L  wrote:

> On Tue, Jun 06, 2023 at 10:02:08AM -0700, Tuan Phan wrote:
> > On Tue, Jun 6, 2023 at 3:27 AM Sunil V L 
> wrote:
> >
> > > On Fri, May 26, 2023 at 04:25:18PM -0700, Tuan Phan wrote:
> > > > The timer compare register is 64-bit so simplifying the delay
> > > > function.
> > > >
> > > > Signed-off-by: Tuan Phan 
> > > > ---
> > > >  MdePkg/Include/Register/RiscV64/RiscVImpl.h   |  1 -
> > > >  .../BaseRiscV64CpuTimerLib/CpuTimerLib.c  | 62
> +--
> > > >  2 files changed, 28 insertions(+), 35 deletions(-)
> > > >
> > > > diff --git a/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> > > b/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> > > > index ee5c2ba60377..6997de6cc001 100644
> > > > --- a/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> > > > +++ b/MdePkg/Include/Register/RiscV64/RiscVImpl.h
> > > > @@ -20,6 +20,5 @@
> > > >Name:
> > > >
> > > >  #define ASM_FUNC(Name)  _ASM_FUNC(ASM_PFX(Name), .text. ## Name)
> > > > -#define RISCV_TIMER_COMPARE_BITS  32
> > > >
> > > >  #endif
> > > > diff --git a/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> > > b/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> > > > index 9c8efc0f3530..57800177023c 100644
> > > > --- a/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> > > > +++ b/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c
> > > > @@ -22,26 +22,19 @@
> > > >@param  Delay A period of time to delay in ticks.
> > > >
> > > >  **/
> > > > +STATIC
> > > >  VOID
> > > >  InternalRiscVTimerDelay (
> > > > -  IN UINT32  Delay
> > > > +  IN UINT64  Delay
> > > >)
> > > >  {
> > > > -  UINT32  Ticks;
> > > > -  UINT32  Times;
> > > > -
> > > > -  Times  = Delay >> (RISCV_TIMER_COMPARE_BITS - 2);
> > > > -  Delay &= ((1 << (RISCV_TIMER_COMPARE_BITS - 2)) - 1);
> > > > -  do {
> > > > -//
> > > > -// The target timer count is calculated here
> > > > -//
> > > > -Ticks = RiscVReadTimer () + Delay;
> > > > -Delay = 1 << (RISCV_TIMER_COMPARE_BITS - 2);
> > > > -while (((Ticks - RiscVReadTimer ()) & (1 <<
> > > (RISCV_TIMER_COMPARE_BITS - 1))) == 0) {
> > > > -  CpuPause ();
> > > > -}
> > > > -  } while (Times-- > 0);
> > > > +  UINT64  Ticks;
> > > > +
> > > > +  Ticks = RiscVReadTimer () + Delay;
> > > > +
> > > > +  while (RiscVReadTimer () <= Ticks) {
> > > > +CpuPause ();
> > > > +  }
> > > >  }
> > > >
> > > >  /**
> > > > @@ -61,14 +54,14 @@ MicroSecondDelay (
> > > >)
> > > >  {
> > > >InternalRiscVTimerDelay (
> > > > -(UINT32)DivU64x32 (
> > > > -  MultU64x32 (
> > > > -MicroSeconds,
> > > > -PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> > > > -),
> > > > -  100u
> > > > -  )
> > > > -);
> > > > +DivU64x32 (
> > > > +  MultU64x32 (
> > > > +MicroSeconds,
> > > > +PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> > > > +  ),
> > > > +  100u
> > > > +)
> > > > +  );
> > > >return MicroSeconds;
> > > >  }
> > > >
> > > > @@ -89,14 +82,14 @@ NanoSecondDelay (
> > > >)
> > > >  {
> > > >InternalRiscVTimerDelay (
> > > > -(UINT32)DivU64x32 (
> > > > -  MultU64x32 (
> > > > -NanoSeconds,
> > > > -PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> > > > -),
> > > > -  10u
> > > > -  )
> > > > -);
> > > > +DivU64x32 (
> > > > +  MultU64x32 (
> > > > +NanoSeconds,
> > > > +PcdGet64 (PcdCpuCoreCrystalClockFrequency)
> > > > +  ),
> > > > +  10u
> > > > +)
> > > > +  );
> > > >return NanoSeconds;
> > > >  }
> > > >
> > > > @@ -147,8 +140,9 @@ GetPerformanceCounter (
> > > >  UINT64
> > > >  EFIAPI
> > > >  GetPerformanceCounterProperties (
> > > > -  OUT  UINT64 *StartValue, OPTIONAL
> > > > -  OUT  UINT64*EndValue OPTIONAL
> > > > +  OUT  UINT64  *StartValue,
> > > > +  OPTIONAL
> > > > +  OUT  UINT64  *EndValue OPTIONAL
> > >
> > > Hi Tuan,
> > >
> > > What is this change? The formatting doesn't look correct. Have you run
> > > CI tests?
> > >
> > => That is the result of running crutinize tool with edk2 config. Should
> I
> > leave it as before?
> >
> I have not used crutinize tool. But this change looks unnecessary. I
> would use uncrustify tool locally for any formatting fixes since the
> same tool gets used in CI tests also.
>
=> The problem is the old version of this file has not passed the
uncrustify tool. So without the "unnecessary changes", this MR will not
pass the CI.

>
> > >
> > > Otherwise LGTM. Thanks for the fix!
> > >
> > > Reviewed-by: Sunil V L 
> > >
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105821): https://edk2.groups.io/g/devel/message/105821
Mute This Topic: https://groups.io/mt/99160087/21656
Group Owner

Re: [edk2-devel] [PATCH v2 2/7] MdeModulePkg/DxeIpl: Merge EBC, RISCV64 and LOONGARCH code

2023-06-06 Thread Ard Biesheuvel
On Tue, 6 Jun 2023 at 20:48, Michael Kubacki
 wrote:
>
> On 6/2/2023 11:17 AM, Ard Biesheuvel wrote:
> > The Risc-V and LoongArch specific versions of the DXE core handoff code
> > in DxeIpl are essentially copies of the EBC version (modulo the
> > copyright in the header and some debug prints in the code).
> >
> > In preparation for introducing a generic PPI based method to implement
> > the non-executable stack, let's merge these versions, so we only need to
> > add this logic once.
> >
> > Signed-off-by: Ard Biesheuvel 
> > ---
> >   MdeModulePkg/Core/DxeIplPeim/{Ebc/DxeLoadFunc.c => DxeHandoff.c} |  2 +-
> >   MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf  | 10 +--
> >   MdeModulePkg/Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c   | 63 
> > 
> >   MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c   | 75 
> > 
> >   4 files changed, 3 insertions(+), 147 deletions(-)
> >
...
> > diff --git a/MdeModulePkg/Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c 
> > b/MdeModulePkg/Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c
> > deleted file mode 100644
> > index 95d3af19ea4c9f00..
> > --- a/MdeModulePkg/Core/DxeIplPeim/LoongArch64/DxeLoadFunc.c
> > +++ /dev/null
> > @@ -1,63 +0,0 @@
> > -/** @file
> >
> > -  LoongArch specifc functionality for DxeLoad.
> >
> > -
> >
> > -  Copyright (c) 2022, Loongson Technology Corporation Limited. All rights 
> > reserved.
> >
> > -
> >
> > -  SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > -
> >
> > -**/
> >
> > -
> >
> > -#include "DxeIpl.h"
> >
> > -
> >
> > -/**
> >
> > -   Transfers control to DxeCore.
> >
> > -
> >
> > -   This function performs a CPU architecture specific operations to execute
> >
> > -   the entry point of DxeCore with the parameters of HobList.
> >
> > -   It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.
> >
> > -
> >
> > -   @param[in] DxeCoreEntryPoint The entry point of DxeCore.
> >
> > -   @param[in] HobList   The start of HobList passed to 
> > DxeCore.
> >
> > -
> >
> > -**/
> >
> > -VOID
> >
> > -HandOffToDxeCore (
> >
> > -  IN EFI_PHYSICAL_ADDRESS  DxeCoreEntryPoint,
> >
> > -  IN EFI_PEI_HOB_POINTERS  HobList
> >
> > -  )
> >
> > -{
> >
> > -  VOID*BaseOfStack;
> >
> > -  VOID*TopOfStack;
> >
> > -  EFI_STATUS  Status;
> >
> > -
> >
> > -  //
> >
> > -  // Allocate 128KB for the Stack
> >
> > -  //
> >
> > -  BaseOfStack = AllocatePages (EFI_SIZE_TO_PAGES (STACK_SIZE));
> >
> > -  ASSERT (BaseOfStack != NULL);
> >
> > -
>
> I know this code path is critical to continue boot, but dereferencing a
> null pointer if asserts are not active is not a great alternative.
>
> Perhaps a status error code could be reported to allow platforms to
> potentially hook onto? Kind of like what is done if the DXE IPL PPI
> cannot be found
> https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c#LL518-L522.
>

I understand your point, but you are responding to a patch that
removes these lines.

All architectures currently implement basically the same logic here,
with the exception of IA32, which does

Status = PeiServicesAllocatePages (EfiBootServicesData,
EFI_SIZE_TO_PAGES (STACK_SIZE), &BaseOfStack);
ASSERT_EFI_ERROR (Status);

and so the only difference is that it dereferences a bogus pointer
instead of a NULL pointer on failure. (RISC-V doesn't ASSERT() so it
will happily carry on even in DEBUG mode)

So I propose we log this as a todo item for after we've unified all
these implementations across architectures.


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




[edk2-devel] [PATCH] OvmfPkg: RiscVVirt: Fix network drivers not be built

2023-06-06 Thread Tuan Phan
Only need to include Network.dsc.inc to have all network
drivers/components be built. Otherwise, there were missing definition
that prevent them from be built for RiscVVirt platform.

Signed-off-by: Tuan Phan 
---
 OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc | 15 +--
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc 
b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc
index 414d186179fb..5281b611d453 100644
--- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc
+++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc
@@ -52,6 +52,7 @@
 
 
 !include MdePkg/MdeLibs.dsc.inc
+!include NetworkPkg/Network.dsc.inc
 
 [BuildOptions]
   GCC:RELEASE_*_*_CC_FLAGS   = -DMDEPKG_NDEBUG
@@ -69,8 +70,6 @@
 #
 

 
-!include NetworkPkg/NetworkDefines.dsc.inc
-
 !include OvmfPkg/RiscVVirt/RiscVVirt.dsc.inc
 
 !include MdePkg/MdeLibs.dsc.inc
@@ -124,8 +123,6 @@
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
   
PciExpressLib|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
 
-#!include NetworkPkg/NetworkBuildOptions.dsc.inc
-
 

 #
 # Pcd Section - list of all EDK II PCD Entries defined by this Platform.
@@ -164,11 +161,6 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|3686400
   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|1
 
-  #
-  # Network Pcds
-  #
-!include NetworkPkg/NetworkPcds.dsc.inc
-
   gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 
0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
 
@@ -397,11 +389,6 @@
   NULL|OvmfPkg/Library/BlobVerifierLibNull/BlobVerifierLibNull.inf
   }
 
-  #
-  # Networking stack
-  #
-!include NetworkPkg/NetworkComponents.dsc.inc
-
   NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf {
 
   NULL|OvmfPkg/Library/PxeBcPcdProducerLib/PxeBcPcdProducerLib.inf
-- 
2.25.1



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




[edk2-devel] Using Depex for Standalone MM drivers on ARM

2023-06-06 Thread Kun Qin

Hi all,

We found an issue a while back on ARM systems, where the Standalone MM
drivers with Depex specified will run into a hang when TFA hands off to
Standalone MM core. (https://bugzilla.tianocore.org/show_bug.cgi?id=3883)

After some debugging, the logic in the ticket still seems to be true
until today:

1. The UEFI Standalone MM partition needs to setup Standalone MM core to
be branched off that the beginning of this FV by manipulating the build
rules. Example:
https://github.com/tianocore/edk2-platforms/blob/93a71a67fd80bbc5baf0708ba75e73696b4a1c67/Platform/ARM/SgiPkg/PlatformStandaloneMm.fdf#LL88C1-L89C1

2. During build time, the MM partition was initialized to code pages
through `ARM_SP_IMAGE_MMAP` as part of `plat_arm_mmap` see here:
https://github.com/ARM-software/arm-trusted-firmware/blob/a0f3b552cfa45258099170c83f79619b2dbd7b9b/include/plat/arm/common/arm_spm_def.h#LL36C11-L36C11,
which was later used for initial setup.

3. During BL31 setup step, the EL1 jump point will be updated to
`sp_image_base` from `plat_get_secure_partition_boot_info`:
https://github.com/ARM-software/arm-trusted-firmware/blob/a0f3b552cfa45258099170c83f79619b2dbd7b9b/services/std_svc/spm/spm_mm/spm_mm_setup.c#LL45C29-L45C42
which was initialized to `ARM_SP_IMAGE_BASE`.

4. After demoting to Secure EL1, the FD will first branch off to
standalone core entrypoint:
https://github.com/tianocore/edk2/blob/ded0b489af09cde5afa05d74acdb12cd4b4f8394/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c#L319.
Standalone core entrypoint will execute in place of FV for the first few
lines. Then the core will locate itself in reported buffer SpImageBase
(which is also the FV image buffer location) and update the page
attribute accordingly
(https://github.com/tianocore/edk2/blob/ded0b489af09cde5afa05d74acdb12cd4b4f8394/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/StandaloneMmCoreEntryPoint.c#LL386C12-L386C48).

5. The FV image buffer location (SpImageBase from UEFI, sp_image_base
from tf-a) is then published as an FV hob for further dispatches
(https://github.com/tianocore/edk2/blob/ded0b489af09cde5afa05d74acdb12cd4b4f8394/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/CreateHobList.c#LL84C1-L84C75),
which was then used for Depex tracking/evaluation during driver discovery
and dispatching process in
https://github.com/tianocore/edk2/blob/ded0b489af09cde5afa05d74acdb12cd4b4f8394/StandaloneMmPkg/Core/StandaloneMmCore.c#L646.

6. Depex discovered from FV during this process is cached in the
DriverEntry structure as pointers and added to the mDiscoveredList in
https://github.com/tianocore/edk2/blob/ded0b489af09cde5afa05d74acdb12cd4b4f8394/StandaloneMmPkg/Core/Dispatcher.c#L864

7. Later during Standalone MM dispatching, this Depex pointer will be
updated in place:
https://github.com/tianocore/edk2/blob/ded0b489af09cde5afa05d74acdb12cd4b4f8394/StandaloneMmPkg/Core/Dependency.c#LL256C14-L256C14,
which causes memory violation as we are writing to the code pages.

Could you please let me know if there is anything I missed on this path?

To resolve this issue, I think any one of the following changes
could be considered:

1. Updating the incoming FV region to be Data pages, in TF-A;
2. Copying this incoming region to a separate data buffer;
3. Allocating designated copy pools for Depex sections during dispatching
(and free them once done).

We could work around this by compressing the FV, but I think we should
still fix the issue, correct?

Any thoughts or suggestions on this would be appreciated.

Regards,
Kun



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105826): https://edk2.groups.io/g/devel/message/105826
Mute This Topic: https://groups.io/mt/99376023/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/1] Add support for running shell test application in an immutable volume

2023-06-06 Thread Kun Qin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4467

This is a follow-up of a previously submitted patch series based on top
of master branch: https://edk2.groups.io/g/devel/message/105514.

The main changes between v1 and v2 patch are:
  - Added input argument support at library entrypoint.

The updated changes are verified on QEMU based Q35 virtual platform as
well as proprietary physical platforms.

Patch v2 branch: https://github.com/kuqin12/edk2/tree/unit_test_fv_v2

Cc: Michael D Kinney 
Cc: Michael Kubacki 
Cc: Sean Brogan 

Kun Qin (1):
  UnitTestFrameworkPkg: UnitTestPersistenceLib: Save Unit Test Cache
Option

 
UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.c
 | 232 +---
 1 file changed, 157 insertions(+), 75 deletions(-)

-- 
2.40.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105827): https://edk2.groups.io/g/devel/message/105827
Mute This Topic: https://groups.io/mt/99376207/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/1] UnitTestFrameworkPkg: UnitTestPersistenceLib: Save Unit Test Cache Option

2023-06-06 Thread Kun Qin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4467

Current implementation of UnitTestFrameworkPkg for shell-based unit test
will save the unit test cache to the same volume as the test application
itself. This works as long as the test application is on a writable
volume, such as USB or EFI partition.

Instead of saving the files to the same file system of unit test
application, this change will save the cache file to the path where the
user ran this test application.

This change then added an input argument to allow user to specify where
to save such cache file through `--CachePath` shell argument to allow
even more flexibility.

This change was tested on proprietary physical hardware platforms and
QEMU based virtual platform.

Cc: Sean Brogan 
Cc: Michael Kubacki 
Cc: Michael D Kinney 

Signed-off-by: Kun Qin 
---

Notes:
v2:
- Adding input argument [Mike Kinney]

 
UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.c
 | 232 +---
 1 file changed, 157 insertions(+), 75 deletions(-)

diff --git 
a/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.c
 
b/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.c
index b59991683f48..8f7f03646cd5 100644
--- 
a/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.c
+++ 
b/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.c
@@ -16,13 +16,16 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
 #define CACHE_FILE_SUFFIX  L"_Cache.dat"
 
+CHAR16  *mCachePath = NULL;
+
 /**
-  Generate the device path to the cache file.
+  Generate the file name and path to the cache file.
 
   @param[in]  FrameworkHandle  A pointer to the framework that is being 
persisted.
 
@@ -31,8 +34,8 @@
 
 **/
 STATIC
-EFI_DEVICE_PATH_PROTOCOL *
-GetCacheFileDevicePath (
+CHAR16 *
+GetCacheFileName (
   IN UNIT_TEST_FRAMEWORK_HANDLE  FrameworkHandle
   )
 {
@@ -44,13 +47,11 @@ GetCacheFileDevicePath (
   CHAR16 *TestName;
   UINTN  DirectorySlashOffset;
   UINTN  CacheFilePathLength;
-  EFI_DEVICE_PATH_PROTOCOL   *CacheFileDevicePath;
 
-  Framework   = (UNIT_TEST_FRAMEWORK *)FrameworkHandle;
-  AppPath = NULL;
-  CacheFilePath   = NULL;
-  TestName= NULL;
-  CacheFileDevicePath = NULL;
+  Framework = (UNIT_TEST_FRAMEWORK *)FrameworkHandle;
+  AppPath   = NULL;
+  CacheFilePath = NULL;
+  TestName  = NULL;
 
   //
   // First, we need to get some information from the loaded image.
@@ -85,35 +86,62 @@ GetCacheFileDevicePath (
   // PathCleanUpDirectories (FileNameCopy);
   // if (PathRemoveLastItem (FileNameCopy)) {
   //
-  AppPath  = ConvertDevicePathToText (LoadedImage->FilePath, TRUE, 
TRUE); // NOTE: This must be freed.
-  DirectorySlashOffset = StrLen (AppPath);
-  //
-  // Make sure we didn't get any weird data.
-  //
-  if (DirectorySlashOffset == 0) {
-DEBUG ((DEBUG_ERROR, "%a - Weird 0-length string when processing app 
path.\n", __func__));
-goto Exit;
-  }
+  if (mCachePath == NULL) {
+AppPath = ConvertDevicePathToText (LoadedImage->FilePath, TRUE, TRUE); // 
NOTE: This must be freed.
+if (AppPath == NULL) {
+  goto Exit;
+}
 
-  //
-  // Now that we know we have a decent string, let's take a deeper look.
-  //
-  do {
-if (AppPath[DirectorySlashOffset] == L'\\') {
-  break;
+DirectorySlashOffset = StrLen (AppPath);
+//
+// Make sure we didn't get any weird data.
+//
+if (DirectorySlashOffset == 0) {
+  DEBUG ((DEBUG_ERROR, "%a - Weird 0-length string when processing app 
path.\n", __func__));
+  goto Exit;
 }
 
-DirectorySlashOffset--;
-  } while (DirectorySlashOffset > 0);
+//
+// Now that we know we have a decent string, let's take a deeper look.
+//
+do {
+  if (AppPath[DirectorySlashOffset] == L'\\') {
+break;
+  }
+
+  DirectorySlashOffset--;
+} while (DirectorySlashOffset > 0);
 
-  //
-  // After that little maneuver, DirectorySlashOffset should be pointing at 
the last '\' in AppString.
-  // That would be the path to the parent directory that the test app is 
executing from.
-  // Let's check and make sure that's right.
-  //
-  if (AppPath[DirectorySlashOffset] != L'\\') {
-DEBUG ((DEBUG_ERROR, "%a - Could not find a single directory separator in 
app path.\n", __func__));
-goto Exit;
+//
+// After that little maneuver, DirectorySlashOffset should be pointing at 
the last '\' in AppString.
+// That would be the path to the parent directory that the test app is 
executing from.
+// Let's check and make sure that's right.
+//
+if (AppPath[DirectorySlashOffset] != L'\\') {
+  DEBUG ((DEBUG_E

Re: [edk2-devel] [PATCH v1 1/1] UnitTestFrameworkPkg: UnitTestPersistenceLib: Save Unit Test Cache to Drive

2023-06-06 Thread Kun Qin

Hi Mike,

I reworked the patch and sent a v2 here:
https://edk2.groups.io/g/devel/message/105827

Note that I did not end up putting the shell based argument
checks in UnitTestLib.inf because that library has multi-phase
support. Adding Shell argument checks will break it unless
we add more library instances to maintain the compatibility.

I think adding argument support here would be more self-contained
and we do not need to pass the path around through changing
framework handle structure.

Please let me know if you have any feedback.

Thanks,
Kun

On 6/1/2023 9:48 AM, Michael D Kinney wrote:

I think your use case is limited to the UnitTestLib based tests running from 
the UEFI Shell.

In that case, the library 
UnitTestFrameworkPkg\Library\UnitTestLib\UnitTestLib.inf is always
linked to the unit test application.  You could add a CONSTRUCTOR to 
UnitTestLib.inf and the
CONSTRUCTOR function can look for UEFI Shell arguments and if args specify 
alternate path
for unit test cache then save some state for that path.

Mike
  


-Original Message-
From: Kun Qin 
Sent: Thursday, June 1, 2023 8:50 AM
To: Kinney, Michael D ; devel@edk2.groups.io
Cc: Sean Brogan ; Michael Kubacki

Subject: Re: [PATCH v1 1/1] UnitTestFrameworkPkg: UnitTestPersistenceLib:
Save Unit Test Cache to Drive

Hi Mike,

Yes, that would indeed serve the purpose. Could you please show me a
pointer on how to add that
commonly? I would be open to change the code the other way.

The reason I would like to change this commonly is because if the input
argument has to be added
per test, that will prevent the existing tests to be used in the
aforementioned scenarios. Please let
me how you think.

Thanks in advance.

Regards,
Kun

On 5/31/2023 1:39 PM, Kinney, Michael D wrote:

Would it be more flexible for unit tests apps to support an optional

command line arg

to specify the volume to write results?

Mike


-Original Message-
From: Kun Qin 
Sent: Wednesday, May 31, 2023 12:14 PM
To: devel@edk2.groups.io
Cc: Sean Brogan ; Michael Kubacki
; Kinney, Michael D

Subject: [PATCH v1 1/1] UnitTestFrameworkPkg: UnitTestPersistenceLib:

Save

Unit Test Cache to Drive

From: kuqin12 <42554914+kuqi...@users.noreply.github.com>

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

Current implementation of UnitTestFrameworkPkg for shell-based unit test
will save the unit test cache to the same volume as the test application
itself. This works as long as the test application is on a writable
volume, such as USB or EFI partition.

Instead of saving the files to the same file system of unit test
application, this change will save the cache file to the path where the
user ran this test application.

This change was tested on proprietary physical hardware platforms and
QEMU based virtual platform.

Cc: Sean Brogan 
Cc: Michael Kubacki 
Cc: Michael D Kinney 
Signed-off-by: Kun Qin 
---



UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTes

tPersistenceLibSimpleFileSystem.c | 81 +++-
   1 file changed, 43 insertions(+), 38 deletions(-)

diff --git


a/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitT

estPersistenceLibSimpleFileSystem.c


b/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitT

estPersistenceLibSimpleFileSystem.c
index b59991683f48..d4181808b2be 100644
---


a/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitT

estPersistenceLibSimpleFileSystem.c
+++


b/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitT

estPersistenceLibSimpleFileSystem.c
@@ -22,7 +22,7 @@
   #define CACHE_FILE_SUFFIX  L"_Cache.dat"



   /**

-  Generate the device path to the cache file.

+  Generate the file name and path to the cache file.



 @param[in]  FrameworkHandle  A pointer to the framework that is

being

persisted.



@@ -31,8 +31,8 @@


   **/

   STATIC

-EFI_DEVICE_PATH_PROTOCOL *

-GetCacheFileDevicePath (

+CHAR16 *

+GetCacheFileName (

 IN UNIT_TEST_FRAMEWORK_HANDLE  FrameworkHandle

 )

   {

@@ -85,7 +85,12 @@ GetCacheFileDevicePath (
 // PathCleanUpDirectories (FileNameCopy);

 // if (PathRemoveLastItem (FileNameCopy)) {

 //

-  AppPath  = ConvertDevicePathToText (LoadedImage-

FilePath,

TRUE, TRUE); // NOTE: This must be freed.

+  AppPath = ConvertDevicePathToText (LoadedImage->FilePath, TRUE,

TRUE);

// NOTE: This must be freed.

+  if (AppPath == NULL) {

+DEBUG ((DEBUG_ERROR, "%a - Failed to convert device path to

text.\n",

__func__));

+goto Exit;

+  }

+

 DirectorySlashOffset = StrLen (AppPath);

 //

 // Make sure we didn't get any weird data.

@@ -148,15 +153,15 @@ Exit:
   FreePool (AppPath);

 }



-  if (CacheFilePath != NULL) {

-FreePool (CacheFilePath);

+  if (CacheFileDevicePath != NULL) {

+FreePool (CacheFileDevicePath);

 }



 if (TestName != NULL) {

   FreePool (TestName);

 }



-  re

Re: [edk2-devel] 回复: [PATCH v1 0/3] Adding Statuc Code Definitions from PI Spec v1.8

2023-06-06 Thread Kun Qin

Hi Liming/Jiewen,

Do you mind helping merging this patch series? It has collected necessary
reviewed-by tags already:
https://edk2.groups.io/g/devel/message/105602
https://edk2.groups.io/g/devel/message/105609

Please let me know if it is preferable for me to add the garner and send 
a v2.


Thanks,
Kun

On 6/1/2023 6:18 PM, gaoliming via groups.io wrote:

Reviewed-by: Liming Gao 


-邮件原件-
发件人: Kun Qin 
发送时间: 2023年6月2日 2:30
收件人: devel@edk2.groups.io
抄送: Jiewen Yao ; Jian J Wang
; Qi Zhang ; Rahul Kumar
; Michael D Kinney ;
Liming Gao ; Zhiguang Liu

主题: [PATCH v1 0/3] Adding Statuc Code Definitions from PI Spec v1.8

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

This is an official patch series to add status codes into PiStatusCode,
continued from 2 previously sent code-first patch series:
https://edk2.groups.io/g/devel/message/91330
https://edk2.groups.io/g/devel/message/92093

Now the macro definitions have landed in PI spec v1.8, this patch is
to add them in Tianocore.

Patch v1 branch: https://github.com/kuqin12/edk2/tree/pi_v1p8_v1

Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Qi Zhang 
Cc: Rahul Kumar 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 

Kun Qin (3):
   MdePkg: PiStatusCode: Add new Host Software class Error Code to MdePkg
   MdePkg: PiStatusCode: Add TPM subclass definition to MdePkg
   SecurityPkg: SubClassTpm: Updated default value

  MdePkg/Include/Pi/PiStatusCode.h | 42 ++--
  SecurityPkg/SecurityPkg.dec  |  6 +--
  SecurityPkg/SecurityPkg.uni  |  2 +-
  3 files changed, 26 insertions(+), 24 deletions(-)

--
2.40.1.windows.1











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




Re: [edk2-devel] [PATCH] RedfishPkg: update Readme.md

2023-06-06 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

Reviewed-by: Abner Chang 

> -Original Message-
> From: Nickle Wang 
> Sent: Monday, June 5, 2023 10:41 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner ; Igor Kulchytskyy
> 
> Subject: [PATCH] RedfishPkg: update Readme.md
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> RedfishClientPkg is moved from edk2-staging repository to
> edk2-redfish-client repository. Update the link in Readme.md
> to new location.
>
> Signed-off-by: Nickle Wang 
> Cc: Abner Chang 
> Cc: Igor Kulchytskyy 
> ---
>  RedfishPkg/Readme.md | 22 +++---
>  1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/RedfishPkg/Readme.md b/RedfishPkg/Readme.md
> index 7defe78eb1e0..3156c89f027d 100644
> --- a/RedfishPkg/Readme.md
> +++ b/RedfishPkg/Readme.md
> @@ -5,7 +5,7 @@ UEFI Redfish EDK2 solution is an efficient and secure
> solution for the end-users
>
>  Below are the block diagrams of UEFI Redfish EDK2 Implementation.
> ***[EDK2 Redfish Foundation[1]](#[0])*** in the lower part of the figure
> refers to the EDK2 Redfish Foundation, which provides the fundamental EDK2
> drivers to communicate with Redfish service ***([[19]](#[0]) in the above
> figure)***. The Redfish service could be implemented in BMC to manage the
> system, or on the network for managing multiple systems.
>
> -***[EDK2 Redfish Client[2]](#[0])*** in the upper part of the figure refers 
> to
> the EDK2 Redfish client, which is the EDK2 Redfish application used to
> configure platform configurations by consuming the Redfish properties. The
> EDK2 Redfish client can also provision the UEFI platform-owned Redfish
> properties, consume and update Redfish properties as well. The ***[EDK2
> Redfish Feature DXE Drivers [17]](https://github.com/tianocore/edk2-
> staging/blob/edk2-redfish-client/RedfishClientPkg/Readme.md)*** is the
> project under development in EDK2 staging repository. Each EDK2 Redfish
> Feature DXE Driver is designed to communicate with the particular Redfish
> data model defined in the Redfish schema *(e.g. Edk2RedfishBiosDxe driver
> manipulates the properties defined in Redfish BIOS data model)*.
> +***[EDK2 Redfish Client[2]](#[0])*** in the upper part of the figure refers 
> to
> the EDK2 Redfish client, which is the EDK2 Redfish application used to
> configure platform configurations by consuming the Redfish properties. The
> EDK2 Redfish client can also provision the UEFI platform-owned Redfish
> properties, consume and update Redfish properties as well. The ***[EDK2
> Redfish Feature DXE Drivers [17]](https://github.com/tianocore/edk2-
> redfish-client/blob/main/RedfishClientPkg/Readme.md)*** is the project in
> tianocore/edk2-redfish-client repository. Each EDK2 Redfish Feature DXE
> Driver is designed to communicate with the particular Redfish data model
> defined in the Redfish schema *(e.g. Edk2RedfishBiosDxe driver manipulates
> the properties defined in Redfish BIOS data model)*.
>
>  ## EDK2 Redfish Implementation Diagrams
>  ![UEFI Redfish
> Implementation](https://github.com/tianocore/edk2/blob/master/RedfishPk
> g/Documents/Media/RedfishDriverStack.svg?raw=true)
> @@ -136,16 +136,16 @@ programmatic way to recognize the BMC-exposed
> USB NIC.
>  The USB NIC exposed by BMC must be reported as one of the message
> channels as 802.3 LAN/IPMB 1.0 message
>  channel.
>
> -| IPMI NetFn | IPMI Command| Purpose | Corresponding Host Interface
> Field|
> -
> ||-|-|---|
> -| App(0x06) | 0x42 | Check the message channel's medium type and
> protocol.Medium: 802.3 LANProtocol: IPMB 1.0| None|
> -| Transport(0x0C) | 0x02 | Get MAC address of message channel.
> Used to match with the MAC address populated in EFI Device Path of network
> device| None|
> -| Group Ext(0x2C) | Group Extension ID: 0x52Command: 0x02 |
> Check if Redfish bootstrap credential is supported or not.| In Device
> Descriptor Data, Credential Bootstrapping Handle|
> -| Transport(0x0C) | Command: 0x02Parameter: 0x04 | Get BMC-
> end message channel IP address source| In Protocol Specific Record Data-
> Host IP Assignment Type- Redfish Service IP Discovery Type-
> Generate the Host-side IP address|.
> -| Transport(0x0C) | Command: 0x02Parameter: 0x03 | Get BMC-
> end message channel IPv4 address| In Protocol Specific Record Data-
> Host IP Address Format- Host IP Address|
> -| Transport(0x0C) | Command: 0x02Parameter: 0x06 | Get BMC-
> end message channel IPv4 subnet mask| In Protocol Specific Record Data-
> Host IP Mask- Redfish Service IP Mask|
> -| Transport(0x0C) | Command: 0x02Parameter: 0x12 | Get BMC-
> end message channel gateway IP address| None, used to configure edk2
> network configuration|
> -| Transport(0x0C) | Command: 0x02Parameter: 0x14 | Get BMC-
> end message channel VLAN ID| In Protocol Speci

Re: [edk2-devel] [edk2-redfish-client][PATCH v2 0/9] Fix RedfishClientPkg build errors

2023-06-06 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

To the entire series: Reviewed-by: Abner Chang 

> -Original Message-
> From: Nickle Wang 
> Sent: Tuesday, June 6, 2023 8:32 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner ; Igor Kulchytskyy
> 
> Subject: [edk2-redfish-client][PATCH v2 0/9] Fix RedfishClientPkg build errors
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> V2:
> Instead of modifying ConverterLib, use build option in INF file to
> fix build error
>
> V1:
> Fix RedfishClientPkg build errors and typos. The compiler toolchain
> is GCC5.
>
> Signed-off-by: Nickle Wang 
> Cc: Abner Chang 
> Cc: Igor Kulchytskyy 
>
> Nickle Wang (9):
>   RedfishClientPkg/ConverterLib: Fix unused-but-set-variable error
>   RedfishClientPkg/RedfishAddendumLib: Fix build error
>   RedfishClientPkg/EdkIIRedfishResourceConfigLib: Fix build error
>   RedfishClientPkg/RedfishFeatureUtilityLib: Fix build error
>   RedfishClientPkg/RedfishETagDxe: Fix build error
>   RedfishClientPkg/RedfishConfigLangMapDxe: Fix build error
>   RedfishClientPkg/BiosDxe: Fix build error
>   RedfishClientPkg/MemoryDxe: Fix build error
>   RedfishClientPkg/ComputerSystemDxe: Fix build error
>
>  .../edk2library/Bios/v1_0_9/Lib.inf   |  4 +-
>  .../edk2library/ComputerSystem/v1_5_0/Lib.inf |  4 +-
>  .../ComputerSystemCollection/Lib.inf  |  4 +-
>  .../edk2library/Memory/v1_7_1/Lib.inf |  4 +-
>  .../edk2library/MemoryCollection/Lib.inf  |  4 +-
>  .../Protocol/EdkIIRedfishETagProtocol.h   |  2 +-
>  .../Features/Bios/v1_0_9/Dxe/BiosDxe.c| 20 
>  .../v1_5_0/Dxe/ComputerSystemDxe.c| 19 ---
>  .../Features/Memory/V1_7_1/Dxe/MemoryDxe.c| 19 ---
>  .../EdkIIRedfishResourceConfigLib.c   |  4 +-
>  .../RedfishAddendumLib/RedfishAddendumLib.c   |  4 +-
>  .../RedfishFeatureUtilityLib.c| 50 +--
>  .../RedfishConfigLangMapDxe.c |  3 ++
>  .../RedfishETagDxe/RedfishETagDxe.c   | 13 +++--
>  14 files changed, 84 insertions(+), 70 deletions(-)
>
> --
> 2.17.1



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




Re: [edk2-devel] failed pr

2023-06-06 Thread Wu, Hao A
Hello Mike,

I do not see the "re-run failed jobs" under "Checks" tab for cancelled CI tests:
https://github.com/tianocore/edk2/pull/4478
(Only "Re-run all checks" is found)

What should be done to handle such case?

Best Regards,
Hao Wu

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Michael
> D Kinney
> Sent: Wednesday, June 7, 2023 3:55 AM
> To: Ard Biesheuvel ; devel@edk2.groups.io
> Cc: Michael Kubacki ; Sean Brogan
> ; Kinney, Michael D
> 
> Subject: Re: [edk2-devel] failed pr
> 
> All EDK II Maintainers should now have permissions to "re-run failed jobs".
> 
> If you see a PR with failed jobs that are not related to the code change, then
> try rerunning the specific failed job or select "re-run failed jobs"
> from the drop down in top right of "Checks" tab.
> 
> Please let me know if you do not see this as an option.
> 
> Thanks,
> 
> Mike
> 
> > -Original Message-
> > From: Kinney, Michael D 
> > Sent: Friday, June 2, 2023 5:07 PM
> > To: Ard Biesheuvel ; devel@edk2.groups.io
> > Cc: Michael Kubacki ; Sean Brogan
> > ; Kinney, Michael D
> > 
> > Subject: RE: [edk2-devel] failed pr
> >
> > Merged
> >
> > Mike
> >
> > > -Original Message-
> > > From: Ard Biesheuvel 
> > > Sent: Friday, June 2, 2023 4:39 PM
> > > To: devel@edk2.groups.io; Kinney, Michael D
> > > 
> > > Cc: Michael Kubacki ; Sean Brogan
> > > 
> > > Subject: Re: [edk2-devel] failed pr
> > >
> > > Another one
> > >
> > > https://github.com/tianocore/edk2/pull/4473
> > >
> > > On Sat, 3 Jun 2023 at 00:32, Ard Biesheuvel  wrote:
> > > >
> > > > Thanks!
> > > >
> > > > On Fri, 2 Jun 2023 at 18:38, Michael D Kinney
> > > >  wrote:
> > > > >
> > > > > Done.
> > > > >
> > > > > Mike
> > > > >
> > > > > > -Original Message-
> > > > > > From: Kinney, Michael D 
> > > > > > Sent: Friday, June 2, 2023 9:37 AM
> > > > > > To: devel@edk2.groups.io; a...@kernel.org; Michael Kubacki
> > > > > > ; Sean Brogan
> > > 
> > > > > > Cc: Kinney, Michael D 
> > > > > > Subject: RE: [edk2-devel] failed pr
> > > > > >
> > > > > > I am working on it.
> > > > > >
> > > > > > Mike
> > > > > >
> > > > > > > -Original Message-
> > > > > > > From: devel@edk2.groups.io  On Behalf
> > > > > > > Of
> > Ard
> > > > > > > Biesheuvel
> > > > > > > Sent: Friday, June 2, 2023 9:19 AM
> > > > > > > To: Kinney, Michael D ; Michael
> > Kubacki
> > > > > > > ; Sean Brogan
> > > ;
> > > > > > > edk2-devel-groups-io 
> > > > > > > Subject: [edk2-devel] failed pr
> > > > > > >
> > > > > > > Could someone push the merge button on this pr please?
> > > > > > >
> > > > > > > https://github.com/tianocore/edk2/pull/4470
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105833): https://edk2.groups.io/g/devel/message/105833
Mute This Topic: https://groups.io/mt/99289807/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] StandaloneMmPkg: Add StandaloneMmIplPei driver.

2023-06-06 Thread Ni, Ray
Hongbin,
The patch is so big. Can you please split the patch to small patches? For 
example:
1st patch only implements the Ipl entrypoint to find the correct SMRAM range 
and dump it
2nd patch loads SMM CORE without mode switch if sizeof (UINTN) matches SMM core 
module type.
3rd patch loads SMM CORE with mode switch if sizeof (UINTN) == 4 but SMM core 
module type is 64bit.
4th patch Deadloop() when sizeof (UINTN) == 8 but SMM core module type is 32bit.
5th patch register ReadyToBoot callback. But is it too late from security 
perspective? Why not lock after SMM core exit? @Yao, Jiewen

Back to the code content, 3 comments:
1. Have you tested the flow when LoadImageAtFixedAddress is enabled? If no, I 
prefer you do not add the logic at all in the first version. We can enable that 
later.
2. "EFIAPI" for GetSectionFromAnyFvByFileType should be removed. And the 
function prototype could be refined as below:
EFI_STATUS
LocateMmFvAndCore
  OUT EFI_PHYSICAL_ADDRESS  *MmFvBaseAddress,
  OUT VOID  **MmCoreImageAddress
Please avoid directly modifying global variables inside this function.

3. Can the StandaloneMmCore in open source be directly used with this IPL? 

Thanks,
Ray


> -Original Message-
> From: Zhang, Hongbin1 
> Sent: Monday, May 22, 2023 1:21 PM
> To: devel@edk2.groups.io
> Cc: Zhang, Hongbin1 ; Yao, Jiewen
> ; Ni, Ray ; Zeng, Star
> ; Wu, Jiaxin ; Sami Mujawar
> ; Ard Biesheuvel ;
> Supreeth Venkatesh 
> Subject: [PATCH v1] StandaloneMmPkg: Add StandaloneMmIplPei driver.
> 
> Add StandaloneMmIplPei IA32/X64 driver at PEI stage.
> FSP will use this driver to load Standalone MM code
> to dispatch other Standalone MM drivers.
> 
> Signed-off-by: Hongbin1 Zhang 
> Cc: Jiewen Yao 
> Cc: Ray Ni 
> Cc: Star Zeng 
> Cc: Jiaxin Wu 
> Cc: Sami Mujawar 
> Cc: Ard Biesheuvel 
> Cc: Supreeth Venkatesh 
> ---
>  StandaloneMmPkg/Drivers/StandaloneMmIplPei/Ia32/LoadSmmCore.c | 456
> 
>  StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c   | 787
> 
>  StandaloneMmPkg/Drivers/StandaloneMmIplPei/X64/LoadSmmCore.c  |  32 +
>  StandaloneMmPkg/Drivers/StandaloneMmIplPei/Ia32/Thunk32To64.nasm  | 148
> 
>  StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.h   |  66
> ++
>  StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.inf |  75
> ++
>  StandaloneMmPkg/StandaloneMmPkg.ci.yaml   |   4 +-
>  StandaloneMmPkg/StandaloneMmPkg.dsc   |  15 +-
>  UefiPayloadPkg/UniversalPayloadBuild.sh   |  34 +-
>  edksetup.sh   | 294 
> 
>  10 files changed, 1744 insertions(+), 167 deletions(-)
> 
> diff --git
> a/StandaloneMmPkg/Drivers/StandaloneMmIplPei/Ia32/LoadSmmCore.c
> b/StandaloneMmPkg/Drivers/StandaloneMmIplPei/Ia32/LoadSmmCore.c
> new file mode 100644
> index 00..d6174d73a3
> --- /dev/null
> +++ b/StandaloneMmPkg/Drivers/StandaloneMmIplPei/Ia32/LoadSmmCore.c
> @@ -0,0 +1,456 @@
> +/** @file
> +  SMM IPL that load the SMM Core into SMRAM
> +
> +  Copyright (c) 2023, Intel Corporation. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#pragma pack(1)
> +
> +//
> +// Page-Map Level-4 Offset (PML4) and
> +// Page-Directory-Pointer Offset (PDPE) entries 4K & 2MB
> +//
> +
> +typedef union {
> +  struct {
> +UINT64Present  : 1;   // 0 = Not present in memory, 1 = 
> Present in
> memory
> +UINT64ReadWrite: 1;   // 0 = Read-Only, 1= Read/Write
> +UINT64UserSupervisor   : 1;   // 0 = Supervisor, 1=User
> +UINT64WriteThrough : 1;   // 0 = Write-Back caching, 
> 1=Write-Through
> caching
> +UINT64CacheDisabled: 1;   // 0 = Cached, 1=Non-Cached
> +UINT64Accessed : 1;   // 0 = Not accessed, 1 = Accessed 
> (set by CPU)
> +UINT64Reserved : 1;   // Reserved
> +UINT64MustBeZero   : 2;   // Must Be Zero
> +UINT64Available: 3;   // Available for use by system 
> software
> +UINT64PageTableBaseAddress : 40;  // Page Table Base Address
> +UINT64AvailableHigh: 11;  // Available for use by system 
> software
> +UINT64Nx   : 1;   // No Execute bit
> +  } Bits;
> +  UINT64Uint64;
> +} PAGE_MAP_AND_DIRECTORY_POINTER;
> +
> +//
> +// Page Table Entry 2MB
> +//
> +typedef union {
> +  struct {
> +UINT64Present  : 1;   // 0 = Not present in memory, 1 = 
> Present in
> memory
> +UINT64ReadWrite: 1;   // 0 = Read-Only, 1= Read/Write
> +UINT64UserSupervisor   : 1;   // 0 = Supervisor, 1=User
> +UINT64WriteThrough : 1;   // 0 = Write-Back caching, 
> 1=Write-Through
> caching
> 

Re: [edk2-devel] [PATCH v1] StandaloneMmPkg: Add StandaloneMmIplPei driver.

2023-06-06 Thread Yao, Jiewen
> 5th patch register ReadyToBoot callback. But is it too late from security 
> perspective? Why not lock after SMM core exit? @Yao, Jiewen

Agree with Ray. ReadyToBoot is too late.



> -Original Message-
> From: Zhang, Hongbin1 
> Sent: Wednesday, June 7, 2023 10:29 AM
> To: Ni, Ray ; devel@edk2.groups.io; Yao, Jiewen
> 
> Cc: Zeng, Star ; Wu, Jiaxin ; Sami
> Mujawar ; Ard Biesheuvel
> ; Supreeth Venkatesh
> ; Bu, Daocheng ;
> Chen, Bo 
> Subject: RE: [PATCH v1] StandaloneMmPkg: Add StandaloneMmIplPei driver.
> 
> Thanks Ray.
> Replied your code comments with [Hongbin].
> And I will split to several patches, it will be better for reviewing.
> 
> -Original Message-
> From: Ni, Ray 
> Sent: Wednesday, June 7, 2023 10:04 AM
> To: Zhang, Hongbin1 ; devel@edk2.groups.io; Yao,
> Jiewen 
> Cc: Zeng, Star ; Wu, Jiaxin ; Sami
> Mujawar ; Ard Biesheuvel
> ; Supreeth Venkatesh
> 
> Subject: RE: [PATCH v1] StandaloneMmPkg: Add StandaloneMmIplPei driver.
> 
> Hongbin,
> The patch is so big. Can you please split the patch to small patches? For 
> example:
> 1st patch only implements the Ipl entrypoint to find the correct SMRAM range
> and dump it
> 2nd patch loads SMM CORE without mode switch if sizeof (UINTN) matches
> SMM core module type.
> 3rd patch loads SMM CORE with mode switch if sizeof (UINTN) == 4 but SMM
> core module type is 64bit.
> 4th patch Deadloop() when sizeof (UINTN) == 8 but SMM core module type is
> 32bit.
> 5th patch register ReadyToBoot callback. But is it too late from security
> perspective? Why not lock after SMM core exit? @Yao, Jiewen
> 
> Back to the code content, 3 comments:
> 1. Have you tested the flow when LoadImageAtFixedAddress is enabled? If no, I
> prefer you do not add the logic at all in the first version. We can enable 
> that
> later.
>  -- Yes, currently PcdLoadModuleAtFixAddressEnable was not used and
> verified, I will add later [Hongbin].
> 2. "EFIAPI" for GetSectionFromAnyFvByFileType should be removed. And the
> function prototype could be refined as below:
> EFI_STATUS
> LocateMmFvAndCore
>   OUT EFI_PHYSICAL_ADDRESS  *MmFvBaseAddress,
>   OUT VOID  **MmCoreImageAddress
> Please avoid directly modifying global variables inside this function.
>  -- Ok, will change that [Hongbin].
> 3. Can the StandaloneMmCore in open source be directly used with this IPL?
>  -- I will think about this later [Hongbin].
> 
> Thanks,
> Ray
> 
> 
> > -Original Message-
> > From: Zhang, Hongbin1 
> > Sent: Monday, May 22, 2023 1:21 PM
> > To: devel@edk2.groups.io
> > Cc: Zhang, Hongbin1 ; Yao, Jiewen
> > ; Ni, Ray ; Zeng, Star
> > ; Wu, Jiaxin ; Sami Mujawar
> > ; Ard Biesheuvel ;
> > Supreeth Venkatesh 
> > Subject: [PATCH v1] StandaloneMmPkg: Add StandaloneMmIplPei driver.
> >
> > Add StandaloneMmIplPei IA32/X64 driver at PEI stage.
> > FSP will use this driver to load Standalone MM code
> > to dispatch other Standalone MM drivers.
> >
> > Signed-off-by: Hongbin1 Zhang 
> > Cc: Jiewen Yao 
> > Cc: Ray Ni 
> > Cc: Star Zeng 
> > Cc: Jiaxin Wu 
> > Cc: Sami Mujawar 
> > Cc: Ard Biesheuvel 
> > Cc: Supreeth Venkatesh 
> > ---
> >  StandaloneMmPkg/Drivers/StandaloneMmIplPei/Ia32/LoadSmmCore.c |
> 456
> > 
> >  StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c   |
> 787
> > 
> >  StandaloneMmPkg/Drivers/StandaloneMmIplPei/X64/LoadSmmCore.c  |
> 32 +
> >  StandaloneMmPkg/Drivers/StandaloneMmIplPei/Ia32/Thunk32To64.nasm  |
> 148
> > 
> >  StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.h   |  66
> > ++
> >  StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.inf |
> 75
> > ++
> >  StandaloneMmPkg/StandaloneMmPkg.ci.yaml   |   4 +-
> >  StandaloneMmPkg/StandaloneMmPkg.dsc   |  15 +-
> >  UefiPayloadPkg/UniversalPayloadBuild.sh   |  34 +-
> >  edksetup.sh   | 294 
> > 
> >  10 files changed, 1744 insertions(+), 167 deletions(-)
> >
> > diff --git
> > a/StandaloneMmPkg/Drivers/StandaloneMmIplPei/Ia32/LoadSmmCore.c
> > b/StandaloneMmPkg/Drivers/StandaloneMmIplPei/Ia32/LoadSmmCore.c
> > new file mode 100644
> > index 00..d6174d73a3
> > --- /dev/null
> > +++ b/StandaloneMmPkg/Drivers/StandaloneMmIplPei/Ia32/LoadSmmCore.c
> > @@ -0,0 +1,456 @@
> > +/** @file
> > +  SMM IPL that load the SMM Core into SMRAM
> > +
> > +  Copyright (c) 2023, Intel Corporation. All rights reserved.
> > +  SPDX-License-Identifier: BSD-2-Clause-Patent
> > +
> > +**/
> > +
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +
> > +#pragma pack(1)
> > +
> > +//
> > +// Page-Map Level-4 Offset (PML4) and
> > +// Page-Directory-Pointer Offset (PDPE) entries 4K & 2MB
> > +//
> > +
> > +typedef union {
> > +  struct {
> > +UINT64Present  : 1;   // 0 = 

Re: [edk2-devel] failed pr

2023-06-06 Thread Michael D Kinney
There seems to be multiple views in the checks tab.

From Conversation tab, scroll down to the "Some checks were not successful"
area and scroll down to a check that failed.  The select "Details".
that will take you to the specific area of the Checks tab that contains
a failure and the drop down for "Re-run failed checks" is available.

Since we 4 groups of check jobs, you have to be in the right scope.

From the checks tab, you can also select "Azure Pipelines" and scroll
down to a failed check.  Click on it, and "Re-run failed jobs" will be
available.  Most of the failures are in Azure Pipelines.

Mike

> -Original Message-
> From: Wu, Hao A 
> Sent: Tuesday, June 6, 2023 7:02 PM
> To: devel@edk2.groups.io; Kinney, Michael D ;
> Ard Biesheuvel 
> Cc: Michael Kubacki ; Sean Brogan
> 
> Subject: RE: [edk2-devel] failed pr
> 
> Hello Mike,
> 
> I do not see the "re-run failed jobs" under "Checks" tab for cancelled CI
> tests:
> https://github.com/tianocore/edk2/pull/4478
> (Only "Re-run all checks" is found)
> 
> What should be done to handle such case?
> 
> Best Regards,
> Hao Wu
> 
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of Michael
> > D Kinney
> > Sent: Wednesday, June 7, 2023 3:55 AM
> > To: Ard Biesheuvel ; devel@edk2.groups.io
> > Cc: Michael Kubacki ; Sean Brogan
> > ; Kinney, Michael D
> > 
> > Subject: Re: [edk2-devel] failed pr
> >
> > All EDK II Maintainers should now have permissions to "re-run failed
> jobs".
> >
> > If you see a PR with failed jobs that are not related to the code change,
> then
> > try rerunning the specific failed job or select "re-run failed jobs"
> > from the drop down in top right of "Checks" tab.
> >
> > Please let me know if you do not see this as an option.
> >
> > Thanks,
> >
> > Mike
> >
> > > -Original Message-
> > > From: Kinney, Michael D 
> > > Sent: Friday, June 2, 2023 5:07 PM
> > > To: Ard Biesheuvel ; devel@edk2.groups.io
> > > Cc: Michael Kubacki ; Sean Brogan
> > > ; Kinney, Michael D
> > > 
> > > Subject: RE: [edk2-devel] failed pr
> > >
> > > Merged
> > >
> > > Mike
> > >
> > > > -Original Message-
> > > > From: Ard Biesheuvel 
> > > > Sent: Friday, June 2, 2023 4:39 PM
> > > > To: devel@edk2.groups.io; Kinney, Michael D
> > > > 
> > > > Cc: Michael Kubacki ; Sean Brogan
> > > > 
> > > > Subject: Re: [edk2-devel] failed pr
> > > >
> > > > Another one
> > > >
> > > > https://github.com/tianocore/edk2/pull/4473
> > > >
> > > > On Sat, 3 Jun 2023 at 00:32, Ard Biesheuvel  wrote:
> > > > >
> > > > > Thanks!
> > > > >
> > > > > On Fri, 2 Jun 2023 at 18:38, Michael D Kinney
> > > > >  wrote:
> > > > > >
> > > > > > Done.
> > > > > >
> > > > > > Mike
> > > > > >
> > > > > > > -Original Message-
> > > > > > > From: Kinney, Michael D 
> > > > > > > Sent: Friday, June 2, 2023 9:37 AM
> > > > > > > To: devel@edk2.groups.io; a...@kernel.org; Michael Kubacki
> > > > > > > ; Sean Brogan
> > > > 
> > > > > > > Cc: Kinney, Michael D 
> > > > > > > Subject: RE: [edk2-devel] failed pr
> > > > > > >
> > > > > > > I am working on it.
> > > > > > >
> > > > > > > Mike
> > > > > > >
> > > > > > > > -Original Message-
> > > > > > > > From: devel@edk2.groups.io  On Behalf
> > > > > > > > Of
> > > Ard
> > > > > > > > Biesheuvel
> > > > > > > > Sent: Friday, June 2, 2023 9:19 AM
> > > > > > > > To: Kinney, Michael D ; Michael
> > > Kubacki
> > > > > > > > ; Sean Brogan
> > > > ;
> > > > > > > > edk2-devel-groups-io 
> > > > > > > > Subject: [edk2-devel] failed pr
> > > > > > > >
> > > > > > > > Could someone push the merge button on this pr please?
> > > > > > > >
> > > > > > > > https://github.com/tianocore/edk2/pull/4470
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> >
> >
> > 
> >



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




Re: [edk2-devel] failed pr

2023-06-06 Thread Wu, Hao A
Thanks. Below approach works for me:

> From Conversation tab, scroll down to the "Some checks were not
> successful"
> area and scroll down to a check that failed.  The select "Details".
> that will take you to the specific area of the Checks tab that contains
> a failure and the drop down for "Re-run failed checks" is available.

Best Regards,
Hao Wu

> -Original Message-
> From: Kinney, Michael D 
> Sent: Wednesday, June 7, 2023 11:08 AM
> To: Wu, Hao A ; devel@edk2.groups.io; Ard
> Biesheuvel 
> Cc: Michael Kubacki ; Sean Brogan
> ; Kinney, Michael D
> 
> Subject: RE: [edk2-devel] failed pr
> 
> There seems to be multiple views in the checks tab.
> 
> From Conversation tab, scroll down to the "Some checks were not
> successful"
> area and scroll down to a check that failed.  The select "Details".
> that will take you to the specific area of the Checks tab that contains
> a failure and the drop down for "Re-run failed checks" is available.
> 
> Since we 4 groups of check jobs, you have to be in the right scope.
> 
> From the checks tab, you can also select "Azure Pipelines" and scroll
> down to a failed check.  Click on it, and "Re-run failed jobs" will be
> available.  Most of the failures are in Azure Pipelines.
> 
> Mike
> 
> > -Original Message-
> > From: Wu, Hao A 
> > Sent: Tuesday, June 6, 2023 7:02 PM
> > To: devel@edk2.groups.io; Kinney, Michael D
> ;
> > Ard Biesheuvel 
> > Cc: Michael Kubacki ; Sean Brogan
> > 
> > Subject: RE: [edk2-devel] failed pr
> >
> > Hello Mike,
> >
> > I do not see the "re-run failed jobs" under "Checks" tab for cancelled CI
> > tests:
> > https://github.com/tianocore/edk2/pull/4478
> > (Only "Re-run all checks" is found)
> >
> > What should be done to handle such case?
> >
> > Best Regards,
> > Hao Wu
> >
> > > -Original Message-
> > > From: devel@edk2.groups.io  On Behalf Of
> Michael
> > > D Kinney
> > > Sent: Wednesday, June 7, 2023 3:55 AM
> > > To: Ard Biesheuvel ; devel@edk2.groups.io
> > > Cc: Michael Kubacki ; Sean Brogan
> > > ; Kinney, Michael D
> > > 
> > > Subject: Re: [edk2-devel] failed pr
> > >
> > > All EDK II Maintainers should now have permissions to "re-run failed
> > jobs".
> > >
> > > If you see a PR with failed jobs that are not related to the code change,
> > then
> > > try rerunning the specific failed job or select "re-run failed jobs"
> > > from the drop down in top right of "Checks" tab.
> > >
> > > Please let me know if you do not see this as an option.
> > >
> > > Thanks,
> > >
> > > Mike
> > >
> > > > -Original Message-
> > > > From: Kinney, Michael D 
> > > > Sent: Friday, June 2, 2023 5:07 PM
> > > > To: Ard Biesheuvel ; devel@edk2.groups.io
> > > > Cc: Michael Kubacki ; Sean Brogan
> > > > ; Kinney, Michael D
> > > > 
> > > > Subject: RE: [edk2-devel] failed pr
> > > >
> > > > Merged
> > > >
> > > > Mike
> > > >
> > > > > -Original Message-
> > > > > From: Ard Biesheuvel 
> > > > > Sent: Friday, June 2, 2023 4:39 PM
> > > > > To: devel@edk2.groups.io; Kinney, Michael D
> > > > > 
> > > > > Cc: Michael Kubacki ; Sean Brogan
> > > > > 
> > > > > Subject: Re: [edk2-devel] failed pr
> > > > >
> > > > > Another one
> > > > >
> > > > > https://github.com/tianocore/edk2/pull/4473
> > > > >
> > > > > On Sat, 3 Jun 2023 at 00:32, Ard Biesheuvel  wrote:
> > > > > >
> > > > > > Thanks!
> > > > > >
> > > > > > On Fri, 2 Jun 2023 at 18:38, Michael D Kinney
> > > > > >  wrote:
> > > > > > >
> > > > > > > Done.
> > > > > > >
> > > > > > > Mike
> > > > > > >
> > > > > > > > -Original Message-
> > > > > > > > From: Kinney, Michael D 
> > > > > > > > Sent: Friday, June 2, 2023 9:37 AM
> > > > > > > > To: devel@edk2.groups.io; a...@kernel.org; Michael Kubacki
> > > > > > > > ; Sean Brogan
> > > > > 
> > > > > > > > Cc: Kinney, Michael D 
> > > > > > > > Subject: RE: [edk2-devel] failed pr
> > > > > > > >
> > > > > > > > I am working on it.
> > > > > > > >
> > > > > > > > Mike
> > > > > > > >
> > > > > > > > > -Original Message-
> > > > > > > > > From: devel@edk2.groups.io  On
> Behalf
> > > > > > > > > Of
> > > > Ard
> > > > > > > > > Biesheuvel
> > > > > > > > > Sent: Friday, June 2, 2023 9:19 AM
> > > > > > > > > To: Kinney, Michael D ; Michael
> > > > Kubacki
> > > > > > > > > ; Sean Brogan
> > > > > ;
> > > > > > > > > edk2-devel-groups-io 
> > > > > > > > > Subject: [edk2-devel] failed pr
> > > > > > > > >
> > > > > > > > > Could someone push the merge button on this pr please?
> > > > > > > > >
> > > > > > > > > https://github.com/tianocore/edk2/pull/4470
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > >
> > >
> > > 
> > >



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105837): https://edk2.groups.io/g/devel/message/105837
Mute This Topic: https://groups.io/mt/99289807/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubs

[edk2-devel] [PATCH] Maintainers.txt: Update maintainers for StandaloneMmPkg

2023-06-06 Thread Ni, Ray
Signed-off-by: Ray Ni 
Cc: Ard Biesheuvel 
Cc: Sami Mujawar 
Cc: Jiewen Yao 
Cc: Supreeth Venkatesh 
---
 Maintainers.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Maintainers.txt b/Maintainers.txt
index 09d04af27a..9c54800f2f 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -617,7 +617,7 @@ StandaloneMmPkg
 F: StandaloneMmPkg/
 M: Ard Biesheuvel  [ardbiesheuvel]
 M: Sami Mujawar  [samimujawar]
-M: Jiewen Yao  [jyao1]
+M: Ray Ni  [niruiyu]
 R: Supreeth Venkatesh  [supven01]
 
 UefiCpuPkg
-- 
2.37.2.windows.2



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




Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM

2023-06-06 Thread Wu, Hao A
Merged via:
PR - https://github.com/tianocore/edk2/pull/4478
Commit - 
https://github.com/tianocore/edk2/commit/67fc78d026490ea4c375eeb19724abb40e7be8f2

Best Regards,
Hao Wu

> -Original Message-
> From: Wu, Hao A
> Sent: Friday, June 2, 2023 11:14 AM
> To: He, Jiangang ; devel@edk2.groups.io; Hsueh,
> Hong-Chih (Neo) 
> Cc: Chang, Abner 
> Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in
> AhciPei PEIM
> 
> Thanks.
> Reviewed-by: Hao A Wu 
> 
> Best Regards,
> Hao Wu
> 
> > -Original Message-
> > From: He, Jiangang 
> > Sent: Wednesday, May 31, 2023 10:49 PM
> > To: Wu, Hao A ; devel@edk2.groups.io; Hsueh,
> Hong-
> > Chih (Neo) 
> > Cc: Chang, Abner 
> > Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier
> > port in AhciPei PEIM
> >
> > [AMD Official Use Only - General]
> >
> > We did crisis recovery and Opal HD password unlock from S3 resume from
> > SATA HD test on two different version of AHCI host controllers.
> >
> > Thanks,
> > Jiangang
> > -Original Message-
> > From: Wu, Hao A 
> > Sent: Tuesday, May 30, 2023 10:30 PM
> > To: devel@edk2.groups.io; Hsueh, Hong-Chih (Neo)  > chih.hs...@amd.com>
> > Cc: He, Jiangang ; Chang, Abner
> > 
> > Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier
> > port in AhciPei PEIM
> >
> > Caution: This message originated from an External Source. Use proper
> > caution when opening attachments, clicking links, or responding.
> >
> >
> > Thanks, the code changes look good to me.
> > May I know what tests have been performed for the patch?
> >
> > Best Regards,
> > Hao Wu
> >
> > > -Original Message-
> > > From: devel@edk2.groups.io  On Behalf Of Neo
> > > Hsueh via groups.io
> > > Sent: Wednesday, May 24, 2023 1:07 AM
> > > To: devel@edk2.groups.io
> > > Cc: jiangang...@amd.com; abner.ch...@amd.com; Neo Hsueh  > > chih.hs...@amd.com>
> > > Subject: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port
> > > in AhciPei PEIM
> > >
> > > If there is no port multiplier, PortMultiplierPort should be
> > > converted to 0 to follow AHCI spec.
> > > The same logic already applied in AtaAtapiPassThruDxe driver.
> > >
> > > Signed-off-by: Neo Hsueh 
> > > ---
> > >  MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++
> > >  1 file changed, 10 insertions(+)
> > >
> > > diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > > b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > > index cd55272c96..7bd04661d0 100644
> > > --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > > +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c
> > > @@ -3,6 +3,7 @@
> > >mode at PEI phase.
> > >
> > >Copyright (c) 2019, Intel Corporation. All rights reserved.
> > > +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> > > + reserved.
> > >
> > >SPDX-License-Identifier: BSD-2-Clause-Patent
> > >
> > > @@ -92,6 +93,15 @@ AhciPassThruExecute (  {
> > >EFI_STATUS  Status;
> > >
> > > +  if (PortMultiplierPort == 0x) {
> > > +//
> > > +// If there is no port multiplier, PortMultiplierPort will be 0x
> > > +// according to UEFI spec. Here, we convert its value to 0 to follow
> > > +// AHCI spec.
> > > +//
> > > +PortMultiplierPort = 0;
> > > +  }
> > > +
> > >switch (Packet->Protocol) {
> > >  case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA:
> > >Status = AhciNonDataTransfer (
> > > --
> > > 2.40.0.windows.1
> > >
> > >
> > >
> > > 
> > >



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




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

2023-06-06 Thread Yao, Jiewen
Reviewed by: jiewen@intel.com

发件人: Ni, Ray 
发送时间: Wednesday, June 7, 2023 11:20:16 AM
收件人: devel@edk2.groups.io 
抄送: Ard Biesheuvel ; Sami Mujawar 
; Yao, Jiewen ; Supreeth Venkatesh 

主题: [PATCH] Maintainers.txt: Update maintainers for StandaloneMmPkg

Signed-off-by: Ray Ni 
Cc: Ard Biesheuvel 
Cc: Sami Mujawar 
Cc: Jiewen Yao 
Cc: Supreeth Venkatesh 
---
 Maintainers.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Maintainers.txt b/Maintainers.txt
index 09d04af27a..9c54800f2f 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -617,7 +617,7 @@ StandaloneMmPkg
 F: StandaloneMmPkg/

 M: Ard Biesheuvel  [ardbiesheuvel]

 M: Sami Mujawar  [samimujawar]

-M: Jiewen Yao  [jyao1]

+M: Ray Ni  [niruiyu]

 R: Supreeth Venkatesh  [supven01]



 UefiCpuPkg

--
2.37.2.windows.2



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




Re: [edk2-devel] [edk2-rfc] [RFC] Introduce new status code for ManageabilityPkg and Redfish*Pkg

2023-06-06 Thread Nickle Wang via groups.io
Hi Vincent,

Thanks for your suggestion. I will follow the code-first-process to submit a 
change request to PI specification.

Regards,
Nickle

> -Original Message-
> From: Zimmer, Vincent 
> Sent: Tuesday, June 6, 2023 11:27 PM
> To: r...@edk2.groups.io; Oram, Isaac W ;
> devel@edk2.groups.io; Nickle Wang 
> Cc: Simon Wang (SW-GPU) ; Chang, Abner
> ; Nick Ramirez 
> Subject: RE: [edk2-rfc] [RFC] Introduce new status code for ManageabilityPkg 
> and
> Redfish*Pkg
> 
> External email: Use caution opening links or attachments
> 
> 
> I agree. These additions make sense.  Perhaps you can format the submission 
> per
> https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-First-Process
> in order to have this included in a future UEFI PI specification
> https://uefi.org/specs/PI/1.8/V3_Status_Codes.html. I can help you w/ the
> process of submission into the uefi forum platform initialization working 
> group,
> too.
> Vincent
> 
> -Original Message-
> From: r...@edk2.groups.io  On Behalf Of Isaac Oram
> Sent: Thursday, June 1, 2023 10:34 AM
> To: devel@edk2.groups.io; nick...@nvidia.com; r...@edk2.groups.io
> Cc: Simon Wang (SW-GPU) ; Chang, Abner
> ; Nick Ramirez 
> Subject: Re: [edk2-rfc] [RFC] Introduce new status code for ManageabilityPkg 
> and
> Redfish*Pkg
> 
> Nickle,
> 
> This looks reasonable to me.  I can see an argument that suggests these align
> more with the peripheral class errors, but your proposal looks better to me.
> 
> Regards,
> Isaac
> 
> From: devel@edk2.groups.io  On Behalf Of Nickle Wang
> via groups.io
> Sent: Wednesday, May 31, 2023 9:23 PM
> To: r...@edk2.groups.io
> Cc: devel@edk2.groups.io; Simon Wang (SW-GPU) ;
> Chang, Abner ; Nick Ramirez 
> Subject: [edk2-devel] [RFC] Introduce new status code for ManageabilityPkg and
> Redfish*Pkg
> 
> Hi edk2 community,
> 
> I like to introduce EFI_COMPUTING_UNIT_MANAGEABILITY status code to
> PiStatusCode.h. EFI_COMPUTING_UNIT_MANAGEABILITY will be used in edk2
> RedfishPkg and edk2-redfish-client RedfishClientPkg to report Redfish 
> operation
> errors. It will also be used to report errors in edk2-platforms 
> ManageabilityPkg.
> 
> EFI_COMPUTING_UNIT_MANAGEABILITY is created as one of the subclasses in
> computing unit class.
> 
> #define EFI_COMPUTING_UNIT_CACHE   (EFI_COMPUTING_UNIT |
> 0x0004)
> #define EFI_COMPUTING_UNIT_MEMORY  (EFI_COMPUTING_UNIT |
> 0x0005)
> #define EFI_COMPUTING_UNIT_CHIPSET (EFI_COMPUTING_UNIT |
> 0x0006)
> + #define EFI_COMPUTING_UNIT_MANAGEABILITY   (EFI_COMPUTING_UNIT
> | 0x0007)
> 
> Below operation values are defined to report failure in manageability related
> operations. I only provide the definitions for Redfish functions but the 
> failure case
> like in MCTP, IPMI and KCS can be created in the future.
> 
> +///
> +/// Computing Unit Manageability Subclass Error Code definitions.
> +/// The detail information is reported by
> REPORT_STATUS_CODE_WITH_EXTENDED_DATA
> +//  with ASCII string in EFI_STATUS_CODE_STRING_DATA.
> +///@{
> +#define EFI_MANAGEABILITY_EC_REDFISH_COMMUNICATION_ERROR
> (EFI_SUBCLASS_SPECIFIC | 0x)
> +#define EFI_MANAGEABILITY_EC_REDFISH_HOST_INTERFACE_ERROR
> (EFI_SUBCLASS_SPECIFIC | 0x0001)
> +#define EFI_MANAGEABILITY_EC_REDFISH_BOOTSTRAP_CREDENTIAL_ERROR
> (EFI_SUBCLASS_SPECIFIC | 0x0002)
> 
> * EFI_MANAGEABILITY_EC_REDFISH_COMMUNICATION_ERROR will be used to
> report communication failure between host and Redfish service providers (or
> BMC).
> * EFI_MANAGEABILITY_EC_REDFISH_HOST_INTERFACE_ERROR is reported
> when host system can not create Redfish host interface due to some errors.
> * EFI_MANAGEABILITY_EC_REDFISH_BOOTSTRAP_CREDENTIAL_ERROR is
> reported when host system cannot get bootstrap credentials by following the
> Host Interface standard.
> 
> Detail reason will be provided in ASCII string by calling
> REPORT_STATUS_CODE_WITH_EXTENDED_DATA().
> 
> The pull request is here for reference:
> https://github.com/nicklela/edk2/pull/4/files  Any feedback is welcome.
> 
> Thanks,
> Nickle
> 
> 
> 
> 
> 
> 



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




[edk2-devel] [PATCH] Maintainers.txt: Remove UEFI Shell Binaries section

2023-06-06 Thread Ni, Ray
The Shell binaries are not generated anymore in each
stable tag release.
So, remove the section.

Cc: Zhichao Gao 
Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Signed-off-by: Ray Ni 
---
 Maintainers.txt | 8 
 1 file changed, 8 deletions(-)

diff --git a/Maintainers.txt b/Maintainers.txt
index 9c54800f2f..5209e21449 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -81,14 +81,6 @@ EDK II Releases:
 W: 
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Release-Planning
 M: Liming Gao  [lgao4]
 
-UEFI Shell Binaries (ShellBinPkg.zip) from EDK II Releases:

-W: https://github.com/tianocore/edk2/releases/
-M: Ray Ni  [niruiyu](Ia32/X64)
-M: Zhichao Gao  [ZhichaoGao]   (Ia32/X64)
-M: Leif Lindholm  [leiflindholm]   
(ARM/AArch64)
-M: Ard Biesheuvel  [ardbiesheuvel] (ARM/AArch64)
-
 EDK II Architectures:
 -
 ARM, AARCH64
-- 
2.37.2.windows.2



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




[edk2-devel] [PATCH] Maintainers.txt: Remove me from maintainers of UefiPayloadPkg,ShellPkg

2023-06-06 Thread Ni, Ray
Signed-off-by: Ray Ni 
Cc: Guo Dong 
Cc: Sean Rhodes 
Cc: James Lu 
Cc: Gua Guo 
Cc: Zhichao Gao 
---
 Maintainers.txt | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Maintainers.txt b/Maintainers.txt
index 5209e21449..e40361a0ae 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -592,7 +592,6 @@ R: Rahul Kumar  [rahul1-kumar]
 ShellPkg
 F: ShellPkg/
 W: https://github.com/tianocore/tianocore.github.io/wiki/ShellPkg
-M: Ray Ni  [niruiyu]
 M: Zhichao Gao  [ZhichaoGao]
 
 SignedCapsulePkg
@@ -630,7 +629,6 @@ UefiPayloadPkg
 F: UefiPayloadPkg/
 W: https://github.com/tianocore/tianocore.github.io/wiki/UefiPayloadPkg
 M: Guo Dong  [gdong1]
-M: Ray Ni  [niruiyu]
 M: Sean Rhodes  [Sean-StarLabs]
 M: James Lu  [jameslu8]
 R: Gua Guo  [gguo11837463]
-- 
2.37.2.windows.2



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




[edk2-devel] [PATCH v1] UefiPayloadPkg: Enhance build script for BuildEntryOnly

2023-06-06 Thread Guo, Gua
From: Gua Guo 

Currently, have two command for pre-build binary support
1. --BuildEntryOnly: build UPL Entry file
2. --PreBuildUplBinary: build UPL binary based on UPL

And these two commands should be exclusived, shouldn't
have chance run it in the meantime.

Case1: Build UPL entry with CLANGDWARF
  python UefiPayloadPkg/UniversalPayloadBuild.py --BuildEntryOnly

Case2: Use pre-built UPL entry and build other fv by VS2019
  python UefiPayloadPkg/UniversalPayloadBuild.py -t VS2019 \
--PreBuildUplBinary UniversalPayload.elf

Case3: Build UPL Entry with CLANGDWARF and build other fv by VS2019
  python UefiPayloadPkg/UniversalPayloadBuild.py -t VS2019

Cc: Guo Dong 
Cc: Ray Ni 
Cc: Sean Rhodes 
Cc: James Lu 
Cc: Gua Guo 
Signed-off-by: Gua Guo 
---
 UefiPayloadPkg/UniversalPayloadBuild.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py 
b/UefiPayloadPkg/UniversalPayloadBuild.py
index 416946a431..ecc25dad83 100644
--- a/UefiPayloadPkg/UniversalPayloadBuild.py
+++ b/UefiPayloadPkg/UniversalPayloadBuild.py
@@ -187,10 +187,11 @@ def main():
 parser.add_argument("-s", "--SpecRevision", type=ValidateSpecRevision, 
default ='0.7', help='Indicates compliance with a revision of this 
specification in the BCD format.')
 parser.add_argument("-r", "--Revision", type=Validate32BitInteger, default 
='0x010105', help='Revision of the Payload binary. 
Major.Minor.Revision.Build')
 parser.add_argument("-o", "--ProducerId", default ='INTEL', help='A 
null-terminated OEM-supplied string that identifies the payload producer (16 
bytes maximal).')
-parser.add_argument("-e", "--BuildEntryOnly", action='store_true', 
help='Build UniversalPayload Entry file')
-parser.add_argument("-pb", "--PreBuildUplBinary", default=None, 
help='Specify the UniversalPayload file')
 parser.add_argument("-sk", "--SkipBuild", action='store_true', help='Skip 
UniversalPayload build')
 parser.add_argument("-af", "--AddFv", type=ValidateAddFv, action='append', 
help='Add or replace specific FV into payload, Ex: uefi_fv=XXX.fv')
+command_group = parser.add_mutually_exclusive_group()
+command_group.add_argument("-e", "--BuildEntryOnly", action='store_true', 
help='Build UniversalPayload Entry file')
+command_group.add_argument("-pb", "--PreBuildUplBinary", default=None, 
help='Specify the UniversalPayload file')
 args = parser.parse_args()
 
 MultiFvList = []
-- 
2.39.2.windows.1



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




Re: [edk2-devel] [PATCH] Maintainers.txt: Remove me from maintainers of UefiPayloadPkg,ShellPkg

2023-06-06 Thread Guo, Gua
Reviewed-by: Gua Guo  

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Ni, Ray
Sent: Wednesday, June 7, 2023 11:31 AM
To: devel@edk2.groups.io
Cc: Dong, Guo ; Rhodes, Sean ; Lu, 
James ; Guo, Gua ; Gao, Zhichao 

Subject: [edk2-devel] [PATCH] Maintainers.txt: Remove me from maintainers of 
UefiPayloadPkg,ShellPkg

Signed-off-by: Ray Ni 
Cc: Guo Dong 
Cc: Sean Rhodes 
Cc: James Lu 
Cc: Gua Guo 
Cc: Zhichao Gao 
---
 Maintainers.txt | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Maintainers.txt b/Maintainers.txt index 5209e21449..e40361a0ae 
100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -592,7 +592,6 @@ R: Rahul Kumar  [rahul1-kumar]  
ShellPkg F: ShellPkg/ W: 
https://github.com/tianocore/tianocore.github.io/wiki/ShellPkg-M: Ray Ni 
 [niruiyu] M: Zhichao Gao  
[ZhichaoGao]  SignedCapsulePkg@@ -630,7 +629,6 @@ UefiPayloadPkg
 F: UefiPayloadPkg/ W: 
https://github.com/tianocore/tianocore.github.io/wiki/UefiPayloadPkg M: Guo 
Dong  [gdong1]-M: Ray Ni  [niruiyu] M: 
Sean Rhodes  [Sean-StarLabs] M: James Lu 
 [jameslu8] R: Gua Guo  [gguo11837463]--
2.37.2.windows.2



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105843): https://edk2.groups.io/g/devel/message/105843
Mute This Topic: https://groups.io/mt/99378233/6998960
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/11616314/6998960/1091779826/xyzzy 
[gua@intel.com]
-=-=-=-=-=-=




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105845): https://edk2.groups.io/g/devel/message/105845
Mute This Topic: https://groups.io/mt/99378233/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] UefiPayloadPkg: Enhance build script for BuildEntryOnly

2023-06-06 Thread Lu, James
Reviewed-by: James Lu 


Thanks,
James

-Original Message-
From: Guo, Gua  
Sent: Wednesday, June 7, 2023 2:15 PM
To: devel@edk2.groups.io
Cc: Guo, Gua ; Dong, Guo ; Ni, Ray 
; Rhodes, Sean ; Lu, James 

Subject: [PATCH v1] UefiPayloadPkg: Enhance build script for BuildEntryOnly

From: Gua Guo 

Currently, have two command for pre-build binary support 1. --BuildEntryOnly: 
build UPL Entry file 2. --PreBuildUplBinary: build UPL binary based on UPL

And these two commands should be exclusived, shouldn't have chance run it in 
the meantime.

Case1: Build UPL entry with CLANGDWARF
  python UefiPayloadPkg/UniversalPayloadBuild.py --BuildEntryOnly

Case2: Use pre-built UPL entry and build other fv by VS2019
  python UefiPayloadPkg/UniversalPayloadBuild.py -t VS2019 \
--PreBuildUplBinary UniversalPayload.elf

Case3: Build UPL Entry with CLANGDWARF and build other fv by VS2019
  python UefiPayloadPkg/UniversalPayloadBuild.py -t VS2019

Cc: Guo Dong 
Cc: Ray Ni 
Cc: Sean Rhodes 
Cc: James Lu 
Cc: Gua Guo 
Signed-off-by: Gua Guo 
---
 UefiPayloadPkg/UniversalPayloadBuild.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py 
b/UefiPayloadPkg/UniversalPayloadBuild.py
index 416946a431..ecc25dad83 100644
--- a/UefiPayloadPkg/UniversalPayloadBuild.py
+++ b/UefiPayloadPkg/UniversalPayloadBuild.py
@@ -187,10 +187,11 @@ def main():
 parser.add_argument("-s", "--SpecRevision", type=ValidateSpecRevision, 
default ='0.7', help='Indicates compliance with a revision of this 
specification in the BCD format.') parser.add_argument("-r", "--Revision", 
type=Validate32BitInteger, default ='0x010105', help='Revision of the 
Payload binary. Major.Minor.Revision.Build') parser.add_argument("-o", 
"--ProducerId", default ='INTEL', help='A null-terminated OEM-supplied string 
that identifies the payload producer (16 bytes maximal).')-
parser.add_argument("-e", "--BuildEntryOnly", action='store_true', help='Build 
UniversalPayload Entry file')-parser.add_argument("-pb", 
"--PreBuildUplBinary", default=None, help='Specify the UniversalPayload file')  
   parser.add_argument("-sk", "--SkipBuild", action='store_true', help='Skip 
UniversalPayload build') parser.add_argument("-af", "--AddFv", 
type=ValidateAddFv, action='append', help='Add or replace specific FV into 
payload, Ex: uefi_fv=XXX.fv')+command_group = 
parser.add_mutually_exclusive_group()+command_group.add_argument("-e", 
"--BuildEntryOnly", action='store_true', help='Build UniversalPayload Entry 
file')+command_group.add_argument("-pb", "--PreBuildUplBinary", 
default=None, help='Specify the UniversalPayload file') args = 
parser.parse_args()  MultiFvList = []-- 
2.39.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105846): https://edk2.groups.io/g/devel/message/105846
Mute This Topic: https://groups.io/mt/99379543/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 1/3] RedfishClientPkg: Add a sample memory configuration HII driver

2023-06-06 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

Hi Nickle,
I have no problem with this patch except for the file naming and function that 
use "2" instead of "To".
Could you replace "2" with "To" in those naming?

Thanks
Abner

> -Original Message-
> From: Nickle Wang 
> Sent: Tuesday, June 6, 2023 9:38 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner ; Igor Kulchytskyy
> 
> Subject: [edk2-redfish-client][PATCH 1/3] RedfishClientPkg: Add a sample
> memory configuration HII driver
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> This is an HII sample driver of memory configuration. This demonstrates
> the communication between platform configuration (EDK2/HII) and Redfish
> service (Memory resource) base on RedfishClientPkg.
>
> The language ("x-uef-redfish-*") defined in the Redfish-specific uni file
> is the connection between HII configuration and the Redfish schema.
>
> e.g.
>
> The HII option strings those applied with "x-uef-redfish-* HII language
> are connected to the corresponding Redfish properties.
>
> e.g.
> x-uefi-redfish-Memory.v1_7_1   "/Memory/{1}/BaseModuleType"
>
> The changes made on BIOS setup page or remote (OOB to Redfish service)
> will be sync-up each other through EDKII Redfish feature driver using
> the transport (REST_EX) provided by RedfishPkg.
>
> On EDK2, HTTP based REST EX protocol instance is used to consume and
> update the Redfish properties.
>
> Check this for the RedfishClientPkg design architecture,
> https://github.com/tianocore/edk2-redfish-
> client/blob/main/RedfishClientPkg/Readme.md
>
> Below for RedfishPkg design architecture,
> https://github.com/tianocore/edk2/blob/master/RedfishPkg/Readme.md
>
> Signed-off-by: Nickle Wang 
> Cc: Abner Chang 
> Cc: Igor Kulchytskyy 
> ---
>  RedfishClientPkg/RedfishClientPkg.dec |   2 +
>  .../RedfishClientComponents.dsc.inc   |   2 +
>  RedfishClientPkg/RedfishClientPkg.dsc |   2 +
>  .../Hii2RedfishMemoryDxe.inf  |  56 
>  .../Hii2RedfishMemoryData.h   |  71 +
>  .../Hii2RedfishMemoryDxe.h|  44 +++
>  .../Hii2RedfishMemoryVfr.vfr  | 219 +
>  .../Hii2RedfishMemoryDxe.c| 292 ++
>  .../Hii2RedfishMemoryDxeMap.uni   |  38 +++
>  .../Hii2RedfishMemoryDxeStrings.uni   |  68 
>  RedfishClientPkg/RedfishClient.fdf.inc|   4 +-
>  11 files changed, 797 insertions(+), 1 deletion(-)
>  create mode 100644
> RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.inf
>  create mode 100644
> RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryData.h
>  create mode 100644
> RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.h
>  create mode 100644
> RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryVfr.vfr
>  create mode 100644
> RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.c
>  create mode 100644
> RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxeMap.uni
>  create mode 100644
> RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxeStrings.uni
>
> diff --git a/RedfishClientPkg/RedfishClientPkg.dec
> b/RedfishClientPkg/RedfishClientPkg.dec
> index 84bceca3..af241cf6 100644
> --- a/RedfishClientPkg/RedfishClientPkg.dec
> +++ b/RedfishClientPkg/RedfishClientPkg.dec
> @@ -57,6 +57,8 @@
>## Include/RedfishBase.h
>gEfiRedfishClientVariableGuid   = { 0x91c46a3d, 0xed1a, 
> 0x477b,
> { 0xa5, 0x33, 0x87, 0x2d, 0xcd, 0xb0, 0xfc, 0xc1 } }
>
> +  gHii2RedfishMemoryFormsetGuid   = { 0XC2BE579E, 0X3C57,
> 0X499C, { 0XA9, 0XDF, 0XE6, 0X23, 0X8A, 0X49, 0X64, 0XF8 }}
> +
>  [PcdsFixedAtBuild]
>
> gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize|32|UI
> NT32|0x1001
>
> gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaVersionSize|8|UI
> NT32|0x1002
> diff --git a/RedfishClientPkg/RedfishClientComponents.dsc.inc
> b/RedfishClientPkg/RedfishClientComponents.dsc.inc
> index e83f4bc9..3451c185 100644
> --- a/RedfishClientPkg/RedfishClientComponents.dsc.inc
> +++ b/RedfishClientPkg/RedfishClientComponents.dsc.inc
> @@ -7,6 +7,7 @@
>  # "RedfishClientDefines.dsc.inc".
>  #
>  # (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
> +# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights
> reserved.
>  #
>  #SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -16,6 +17,7 @@
>RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf
>RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.inf
>RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf
> +  RedfishClientPkg/Hii2RedfishMemoryDxe/Hii2RedfishMemoryDxe.inf
>  !endif
>#
># Below two modules should be pulled in by build tool.
> diff --git a/RedfishClientPkg/RedfishClientPkg.dsc
> b/RedfishClientPkg/RedfishClientPkg.dsc
> index d3b645b6..ac9f8e9d 100644
> --- a/RedfishClie