[edk2-devel] [PATCH v2] IntelFsp2Pkg: FSP should support input UPD as NULL.

2022-11-01 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4114

FSP specification supports input UPD as NULL cases which FSP will
use built-in UPD region instead.
FSP should not return INVALID_PARAMETER in such cases.

In FSP-T entry point case, the valid FSP-T UPD region pointer will be
passed to platform FSP code to consume.
In FSP-M and FSP-S cases, valid UPD pointer will be decided when
updating corresponding pointer field in FspGlobalData.

Cc: Nate DeSimone 
Cc: Star Zeng 
Signed-off-by: Chasel Chiu 
---
 IntelFsp2Pkg/FspSecCore/SecFspApiChk.c | 12 ++--
 IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm | 73 
+++--
 IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm  | 40 
++--
 3 files changed, 91 insertions(+), 34 deletions(-)

diff --git a/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c 
b/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c
index a44fbf2a50..5f59938518 100644
--- a/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c
+++ b/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c
@@ -44,6 +44,8 @@ FspApiCallingCheck (
 //
 if (((UINTN)FspData != MAX_ADDRESS) && ((UINTN)FspData != MAX_UINT32)) {
   Status = EFI_UNSUPPORTED;
+} else if (ApiParam == NULL) {
+  Status = EFI_SUCCESS;
 } else if (EFI_ERROR (FspUpdSignatureCheck (ApiIdx, ApiParam))) {
   Status = EFI_INVALID_PARAMETER;
 }
@@ -67,9 +69,13 @@ FspApiCallingCheck (
 } else {
   if (FspData->Signature != FSP_GLOBAL_DATA_SIGNATURE) {
 Status = EFI_UNSUPPORTED;
-  } else if (EFI_ERROR (FspUpdSignatureCheck (FspSiliconInitApiIndex, 
ApiParam))) {
-Status = EFI_INVALID_PARAMETER;
   } else if (ApiIdx == FspSiliconInitApiIndex) {
+if (ApiParam == NULL) {
+  Status = EFI_SUCCESS;
+} else if (EFI_ERROR (FspUpdSignatureCheck (FspSiliconInitApiIndex, 
ApiParam))) {
+  Status = EFI_INVALID_PARAMETER;
+}
+
 //
 // Reset MultiPhase NumberOfPhases to zero
 //
@@ -89,6 +95,8 @@ FspApiCallingCheck (
 } else {
   if (FspData->Signature != FSP_GLOBAL_DATA_SIGNATURE) {
 Status = EFI_UNSUPPORTED;
+  } else if (ApiParam == NULL) {
+Status = EFI_SUCCESS;
   } else if (EFI_ERROR (FspUpdSignatureCheck (FspSmmInitApiIndex, 
ApiParam))) {
 Status = EFI_INVALID_PARAMETER;
   }
diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm 
b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
index 61030a843b..73821ad22a 100644
--- a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
+++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
@@ -21,7 +21,7 @@ extern   ASM_PFX(PcdGet32 (PcdFspReservedBufferSize))
 ; Following functions will be provided in PlatformSecLib
 ;
 extern ASM_PFX(AsmGetFspBaseAddress)
-extern ASM_PFX(AsmGetFspInfoHeader)
+extern ASM_PFX(AsmGetFspInfoHeaderNoStack)
 ;extern ASM_PFX(LoadMicrocode); @todo: needs a weak implementation
 extern ASM_PFX(SecPlatformInit)   ; @todo: needs a weak implementation
 extern ASM_PFX(SecCarInit)
@@ -160,6 +160,47 @@ endstruc
  RET_ESI_EXT   mm7
 %endmacro
 
+%macro CALL_EDI  1
+
+  mov edi,  %%ReturnAddress
+  jmp %1
+%%ReturnAddress:
+
+%endmacro
+
+%macro CALL_EBP 1
+  mov ebp, %%ReturnAddress
+  jmp %1
+%%ReturnAddress:
+%endmacro
+
+%macro RET_EBP 0
+  jmp ebp   ; restore EIP from EBP
+%endmacro
+
+;
+; Load UPD region pointer in ECX
+;
+global ASM_PFX(LoadUpdPointerToECX)
+ASM_PFX(LoadUpdPointerToECX):
+  ;
+  ; esp + 4 is input UPD parameter
+  ; If esp + 4 is NULL the default UPD should be used
+  ; ecx will be the UPD region that should be used
+  ;
+  mov   ecx, dword [esp + 4]
+  cmp   ecx, 0
+  jnz   ParamValid
+
+  ;
+  ; Fall back to default UPD region
+  ;
+  CALL_EDI  ASM_PFX(AsmGetFspInfoHeaderNoStack)
+  mov   ecx, DWORD [eax + 01Ch]  ; Read FsptImageBaseAddress
+  add   ecx, DWORD [eax + 024h]  ; Get Cfg Region base address = 
FsptImageBaseAddress + CfgRegionOffset
+ParamValid:
+  RET_EBP
+
 ;
 ; @todo: The strong/weak implementation does not work.
 ;This needs to be reviewed later.
@@ -187,10 +228,9 @@ endstruc
 global ASM_PFX(LoadMicrocodeDefault)
 ASM_PFX(LoadMicrocodeDefault):
; Inputs:
-   ;   esp -> LoadMicrocodeParams pointer
+   ;   ecx -> UPD region contains LoadMicrocodeParams pointer
; Register Usage:
-   ;   esp  Preserved
-   ;   All others destroyed
+   ;   All are destroyed
; Assumptions:
;   No memory available, stack is hard-coded and used for return address
;   Executed by SBSP and NBSP
@@ -201,12 +241,9 @@ ASM_PFX(LoadMicrocodeDefault):
;
movd   ebp, mm7
 
+   movesp, ecx  ; ECX has been assigned to UPD region
cmpesp, 0
jz ParamError
-   moveax, dword [esp + 4]; Parameter pointer
-   cmpeax, 0
-   jz ParamError
-   movesp, eax
 
; skip loading Microcode if the MicrocodeCodeSize is zero
; 

Re: [edk2-devel] [PATCH 4/8] UefiPayloadPkg: Use CcExitLib instead of VmgExitLib

2022-11-01 Thread Guo, Gua
Reviewed-by: Gua Guo 

-Original Message-
From: Lu, James  
Sent: Wednesday, November 2, 2022 1:29 PM
To: Xu, Min M ; devel@edk2.groups.io
Cc: Dong, Guo ; Ni, Ray ; Rhodes, Sean 
; Guo, Gua 
Subject: RE: [PATCH 4/8] UefiPayloadPkg: Use CcExitLib instead of VmgExitLib

Reviewed-by: James Lu 

-Original Message-
From: Xu, Min M  
Sent: Wednesday, November 2, 2022 1:11 PM
To: devel@edk2.groups.io
Cc: Xu, Min M ; Dong, Guo ; Ni, Ray 
; Rhodes, Sean ; Lu, James 
; Guo, Gua 
Subject: [PATCH 4/8] UefiPayloadPkg: Use CcExitLib instead of VmgExitLib

From: Min M Xu 

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

VmgExitLib is renamed as CcExitLib. So UefiPayloadPkg.dsc should be updated as 
well.

Cc: Guo Dong 
Cc: Ray Ni 
Cc: Sean Rhodes 
Cc: James Lu 
Cc: Gua Guo 
Signed-off-by: Min Xu 
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc 
b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 1150be6acd0e..723a50a42284 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -301,7 +301,7 @@
   
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
   
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
   
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf
-  VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+  CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
   
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
 
 [LibraryClasses.common]
--
2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#95853): https://edk2.groups.io/g/devel/message/95853
Mute This Topic: https://groups.io/mt/94728439/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 8/9] UefiPayloadPkg: Remove UefiCpuLib from module INFs.

2022-11-01 Thread Guo, Gua
Reviewed-by: Gua Guo 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Lu, James
Sent: Wednesday, November 2, 2022 1:23 PM
To: devel@edk2.groups.io; Liu, Zhiguang 
Cc: Yu Pu ; Dong, Guo ; Ni, Ray 
; Maurice Ma ; You, Benjamin 
; Rhodes, Sean 
Subject: Re: [edk2-devel] [PATCH v3 8/9] UefiPayloadPkg: Remove UefiCpuLib from 
module INFs.

Reviewed-by: James Lu 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Zhiguang Liu
Sent: Tuesday, November 1, 2022 3:59 PM
To: devel@edk2.groups.io
Cc: Yu Pu ; Dong, Guo ; Ni, Ray 
; Maurice Ma ; You, Benjamin 
; Rhodes, Sean 
Subject: [edk2-devel] [PATCH v3 8/9] UefiPayloadPkg: Remove UefiCpuLib from 
module INFs.

From: Yu Pu 

Because UefiCpuPkg/UefiCpuLib is merged to MdePkg/CpuLib, remove the dependency 
of UefiCpuLib.

Cc: Guo Dong 
Cc: Ray Ni 
Cc: Maurice Ma 
Cc: Benjamin You 
Cc: Sean Rhodes 
Signed-off-by: Yu Pu 
Reviewed-by: Ray Ni 
---
 UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h| 1 -
 UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf  | 1 -
 UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf | 1 -
 UefiPayloadPkg/UefiPayloadPkg.dsc | 1 -
 4 files changed, 4 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h 
b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
index d1c7425b28..ad8a9fd22b 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
+++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
@@ -24,7 +24,6 @@
 #include 
 #include   #include  -#include 
  #include   #include 

 #include 
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf 
b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
index 95446dd997..d47e8e76cf 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
+++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
@@ -55,7 +55,6 @@
   PeCoffLib
   PlatformSupportLib
   CpuLib
-  UefiCpuLib
 
 [Guids]
   gEfiMemoryTypeInformationGuid
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf 
b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
index 3b4836042a..c4f4f28eaa 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
+++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
@@ -53,7 +53,6 @@
   HobLib
   PeCoffLib
   CpuLib
-  UefiCpuLib
 
 [Guids]
   gEfiMemoryTypeInformationGuid
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc 
b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 1150be6acd..b7712d4de1 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -221,7 +221,6 @@
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
   
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
-  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
 
   #
--
2.31.1.windows.1













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




Re: [edk2-devel] [PATCH 4/8] UefiPayloadPkg: Use CcExitLib instead of VmgExitLib

2022-11-01 Thread Lu, James
Reviewed-by: James Lu 

-Original Message-
From: Xu, Min M  
Sent: Wednesday, November 2, 2022 1:11 PM
To: devel@edk2.groups.io
Cc: Xu, Min M ; Dong, Guo ; Ni, Ray 
; Rhodes, Sean ; Lu, James 
; Guo, Gua 
Subject: [PATCH 4/8] UefiPayloadPkg: Use CcExitLib instead of VmgExitLib

From: Min M Xu 

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

VmgExitLib is renamed as CcExitLib. So UefiPayloadPkg.dsc should be updated as 
well.

Cc: Guo Dong 
Cc: Ray Ni 
Cc: Sean Rhodes 
Cc: James Lu 
Cc: Gua Guo 
Signed-off-by: Min Xu 
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc 
b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 1150be6acd0e..723a50a42284 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -301,7 +301,7 @@
   
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
   
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
   
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf
-  VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+  CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
   
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
 
 [LibraryClasses.common]
--
2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#95851): https://edk2.groups.io/g/devel/message/95851
Mute This Topic: https://groups.io/mt/94728439/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 8/9] UefiPayloadPkg: Remove UefiCpuLib from module INFs.

2022-11-01 Thread Lu, James
Reviewed-by: James Lu 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Zhiguang Liu
Sent: Tuesday, November 1, 2022 3:59 PM
To: devel@edk2.groups.io
Cc: Yu Pu ; Dong, Guo ; Ni, Ray 
; Maurice Ma ; You, Benjamin 
; Rhodes, Sean 
Subject: [edk2-devel] [PATCH v3 8/9] UefiPayloadPkg: Remove UefiCpuLib from 
module INFs.

From: Yu Pu 

Because UefiCpuPkg/UefiCpuLib is merged to MdePkg/CpuLib, remove the dependency 
of UefiCpuLib.

Cc: Guo Dong 
Cc: Ray Ni 
Cc: Maurice Ma 
Cc: Benjamin You 
Cc: Sean Rhodes 
Signed-off-by: Yu Pu 
Reviewed-by: Ray Ni 
---
 UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h| 1 -
 UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf  | 1 -
 UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf | 1 -
 UefiPayloadPkg/UefiPayloadPkg.dsc | 1 -
 4 files changed, 4 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h 
b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
index d1c7425b28..ad8a9fd22b 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
+++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
@@ -24,7 +24,6 @@
 #include 
 #include   #include  -#include 
  #include   #include 

 #include 
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf 
b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
index 95446dd997..d47e8e76cf 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
+++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
@@ -55,7 +55,6 @@
   PeCoffLib
   PlatformSupportLib
   CpuLib
-  UefiCpuLib
 
 [Guids]
   gEfiMemoryTypeInformationGuid
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf 
b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
index 3b4836042a..c4f4f28eaa 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
+++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
@@ -53,7 +53,6 @@
   HobLib
   PeCoffLib
   CpuLib
-  UefiCpuLib
 
 [Guids]
   gEfiMemoryTypeInformationGuid
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc 
b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 1150be6acd..b7712d4de1 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -221,7 +221,6 @@
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
   
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
-  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
 
   #
--
2.31.1.windows.1








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




[edk2-devel] [PATCH 6/8] OvmfPkg: Delete VmgExitLib

2022-11-01 Thread Min Xu
From: Min M Xu 

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

Delete VmgExitLib because it is replaced by CcExitLib.

Cc: Brijesh Singh 
Cc: Erdem Aktas 
Cc: Gerd Hoffmann 
Cc: James Bottomley 
Cc: Jiewen Yao 
Cc: Tom Lendacky 
Signed-off-by: Min Xu 
---
 .../VmgExitLib/PeiDxeVmgExitVcHandler.c   |  103 -
 OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf  |   48 -
 .../Library/VmgExitLib/SecVmgExitVcHandler.c  |  109 -
 OvmfPkg/Library/VmgExitLib/VmTdExitHandler.h  |   32 -
 .../Library/VmgExitLib/VmTdExitVeHandler.c|  559 
 OvmfPkg/Library/VmgExitLib/VmgExitLib.c   |  238 --
 OvmfPkg/Library/VmgExitLib/VmgExitLib.inf |   45 -
 OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 2356 -
 OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.h |   53 -
 .../Library/VmgExitLib/X64/TdVmcallCpuid.nasm |  146 -
 10 files changed, 3689 deletions(-)
 delete mode 100644 OvmfPkg/Library/VmgExitLib/PeiDxeVmgExitVcHandler.c
 delete mode 100644 OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf
 delete mode 100644 OvmfPkg/Library/VmgExitLib/SecVmgExitVcHandler.c
 delete mode 100644 OvmfPkg/Library/VmgExitLib/VmTdExitHandler.h
 delete mode 100644 OvmfPkg/Library/VmgExitLib/VmTdExitVeHandler.c
 delete mode 100644 OvmfPkg/Library/VmgExitLib/VmgExitLib.c
 delete mode 100644 OvmfPkg/Library/VmgExitLib/VmgExitLib.inf
 delete mode 100644 OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
 delete mode 100644 OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.h
 delete mode 100644 OvmfPkg/Library/VmgExitLib/X64/TdVmcallCpuid.nasm

diff --git a/OvmfPkg/Library/VmgExitLib/PeiDxeVmgExitVcHandler.c 
b/OvmfPkg/Library/VmgExitLib/PeiDxeVmgExitVcHandler.c
deleted file mode 100644
index e3d071583750..
--- a/OvmfPkg/Library/VmgExitLib/PeiDxeVmgExitVcHandler.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/** @file
-  X64 #VC Exception Handler functon.
-
-  Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.
-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "VmgExitVcHandler.h"
-
-/**
-  Handle a #VC exception.
-
-  Performs the necessary processing to handle a #VC exception.
-
-  @param[in, out]  ExceptionType  Pointer to an EFI_EXCEPTION_TYPE to be set
-  as value to use on error.
-  @param[in, out]  SystemContext  Pointer to EFI_SYSTEM_CONTEXT
-
-  @retval  EFI_SUCCESSException handled
-  @retval  EFI_UNSUPPORTED#VC not supported, (new) exception value to
-  propagate provided
-  @retval  EFI_PROTOCOL_ERROR #VC handling failed, (new) exception value to
-  propagate provided
-
-**/
-EFI_STATUS
-EFIAPI
-VmgExitHandleVc (
-  IN OUT EFI_EXCEPTION_TYPE  *ExceptionType,
-  IN OUT EFI_SYSTEM_CONTEXT  SystemContext
-  )
-{
-  MSR_SEV_ES_GHCB_REGISTER  Msr;
-  GHCB  *Ghcb;
-  GHCB  *GhcbBackup;
-  EFI_STATUSVcRet;
-  BOOLEAN   InterruptState;
-  SEV_ES_PER_CPU_DATA   *SevEsData;
-
-  InterruptState = GetInterruptState ();
-  if (InterruptState) {
-DisableInterrupts ();
-  }
-
-  Msr.GhcbPhysicalAddress = AsmReadMsr64 (MSR_SEV_ES_GHCB);
-  ASSERT (Msr.GhcbInfo.Function == 0);
-  ASSERT (Msr.Ghcb != 0);
-
-  Ghcb   = Msr.Ghcb;
-  GhcbBackup = NULL;
-
-  SevEsData = (SEV_ES_PER_CPU_DATA *)(Ghcb + 1);
-  SevEsData->VcCount++;
-
-  //
-  // Check for maximum PEI/DXE #VC nesting.
-  //
-  if (SevEsData->VcCount > VMGEXIT_MAXIMUM_VC_COUNT) {
-VmgExitIssueAssert (SevEsData);
-  } else if (SevEsData->VcCount > 1) {
-//
-// Nested #VC
-//
-if (SevEsData->GhcbBackupPages == NULL) {
-  VmgExitIssueAssert (SevEsData);
-}
-
-//
-// Save the active GHCB to a backup page.
-//   To access the correct backup page, increment the backup page pointer
-//   based on the current VcCount.
-//
-GhcbBackup  = (GHCB *)SevEsData->GhcbBackupPages;
-GhcbBackup += (SevEsData->VcCount - 2);
-
-CopyMem (GhcbBackup, Ghcb, sizeof (*Ghcb));
-  }
-
-  VcRet = InternalVmgExitHandleVc (Ghcb, ExceptionType, SystemContext);
-
-  if (GhcbBackup != NULL) {
-//
-// Restore the active GHCB from the backup page.
-//
-CopyMem (Ghcb, GhcbBackup, sizeof (*Ghcb));
-  }
-
-  SevEsData->VcCount--;
-
-  if (InterruptState) {
-EnableInterrupts ();
-  }
-
-  return VcRet;
-}
diff --git a/OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf 
b/OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf
deleted file mode 100644
index f9bd4974f6dc..
--- a/OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf
+++ /dev/null
@@ -1,48 +0,0 @@
-## @file
-#  VMGEXIT Support Library.
-#
-#  Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.
-#  SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-##
-
-[Defines]
-  INF_VERSION= 0x00010005
-  BASE_NAME  = SecVmgExitLib
-  FILE_GUID  

[edk2-devel] [PATCH 8/8] Maintainers: Update the VmgExitLib to CcExitLib

2022-11-01 Thread Min Xu
From: Min M Xu 

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

VmgExitLib is renamed as CcExitLib. The related section in
Maintainers.txt should be updated as well.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Erdem Aktas 
Cc: Gerd Hoffmann 
Cc: James Bottomley 
Cc: Jiewen Yao 
Cc: Tom Lendacky 
Signed-off-by: Min Xu 
---
 Maintainers.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Maintainers.txt b/Maintainers.txt
index 889990fa566f..454b93420da4 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -475,7 +475,7 @@ F: OvmfPkg/Include/Library/MemEncryptSevLib.h
 F: OvmfPkg/IoMmuDxe/AmdSevIoMmu.*
 F: OvmfPkg/Library/BaseMemEncryptSevLib/
 F: OvmfPkg/Library/PlatformBootManagerLibGrub/
-F: OvmfPkg/Library/VmgExitLib/
+F: OvmfPkg/Library/CcExitLib/
 F: OvmfPkg/PlatformPei/AmdSev.c
 F: OvmfPkg/ResetVector/
 F: OvmfPkg/Sec/
-- 
2.29.2.windows.2



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




[edk2-devel] [PATCH 7/8] UefiCpuPkg: Delete VmgExitLib

2022-11-01 Thread Min Xu
From: Min M Xu 

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

VmgExitLib is replaced by CcExitLib. So it is deleted from UefiCpuPkg.

Cc: Guo Dong 
Cc: Ray Ni 
Signed-off-by: Min Xu 
---
 UefiCpuPkg/Include/Library/VmgExitLib.h   | 173 --
 .../Library/VmgExitLibNull/VmTdExitNull.c |  38 
 .../Library/VmgExitLibNull/VmgExitLibNull.c   | 165 -
 .../Library/VmgExitLibNull/VmgExitLibNull.inf |  28 ---
 .../Library/VmgExitLibNull/VmgExitLibNull.uni |  15 --
 UefiCpuPkg/UefiCpuPkg.dec |   3 -
 UefiCpuPkg/UefiCpuPkg.dsc |   2 -
 7 files changed, 424 deletions(-)
 delete mode 100644 UefiCpuPkg/Include/Library/VmgExitLib.h
 delete mode 100644 UefiCpuPkg/Library/VmgExitLibNull/VmTdExitNull.c
 delete mode 100644 UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.c
 delete mode 100644 UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
 delete mode 100644 UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.uni

diff --git a/UefiCpuPkg/Include/Library/VmgExitLib.h 
b/UefiCpuPkg/Include/Library/VmgExitLib.h
deleted file mode 100644
index f9f911099a7b..
--- a/UefiCpuPkg/Include/Library/VmgExitLib.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/** @file
-  Public header file for the VMGEXIT Support library class.
-
-  This library class defines some routines used when invoking the VMGEXIT
-  instruction in support of SEV-ES and to handle #VC exceptions.
-
-  Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.
-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __VMG_EXIT_LIB_H__
-#define __VMG_EXIT_LIB_H__
-
-#include 
-#include 
-
-#define VE_EXCEPTION  20
-
-/**
-  Perform VMGEXIT.
-
-  Sets the necessary fields of the GHCB, invokes the VMGEXIT instruction and
-  then handles the return actions.
-
-  @param[in, out]  Ghcb   A pointer to the GHCB
-  @param[in]   ExitCode   VMGEXIT code to be assigned to the SwExitCode
-  field of the GHCB.
-  @param[in]   ExitInfo1  VMGEXIT information to be assigned to the
-  SwExitInfo1 field of the GHCB.
-  @param[in]   ExitInfo2  VMGEXIT information to be assigned to the
-  SwExitInfo2 field of the GHCB.
-
-  @retval  0  VMGEXIT succeeded.
-  @return Exception number to be propagated, VMGEXIT
-  processing did not succeed.
-
-**/
-UINT64
-EFIAPI
-VmgExit (
-  IN OUT GHCB*Ghcb,
-  IN UINT64  ExitCode,
-  IN UINT64  ExitInfo1,
-  IN UINT64  ExitInfo2
-  );
-
-/**
-  Perform pre-VMGEXIT initialization/preparation.
-
-  Performs the necessary steps in preparation for invoking VMGEXIT. Must be
-  called before setting any fields within the GHCB.
-
-  @param[in, out]  GhcbA pointer to the GHCB
-  @param[in, out]  InterruptState  A pointer to hold the current interrupt
-   state, used for restoring in VmgDone ()
-
-**/
-VOID
-EFIAPI
-VmgInit (
-  IN OUT GHCB *Ghcb,
-  IN OUT BOOLEAN  *InterruptState
-  );
-
-/**
-  Perform post-VMGEXIT cleanup.
-
-  Performs the necessary steps to cleanup after invoking VMGEXIT. Must be
-  called after obtaining needed fields within the GHCB.
-
-  @param[in, out]  GhcbA pointer to the GHCB
-  @param[in]   InterruptState  An indicator to conditionally (re)enable
-   interrupts
-
-**/
-VOID
-EFIAPI
-VmgDone (
-  IN OUT GHCB *Ghcb,
-  IN BOOLEAN  InterruptState
-  );
-
-/**
-  Marks a specified offset as valid in the GHCB.
-
-  The ValidBitmap area represents the areas of the GHCB that have been marked
-  valid. Set the bit in ValidBitmap for the input offset.
-
-  @param[in, out]  Ghcb   A pointer to the GHCB
-  @param[in]   Offset Qword offset in the GHCB to mark valid
-
-**/
-VOID
-EFIAPI
-VmgSetOffsetValid (
-  IN OUT GHCB   *Ghcb,
-  IN GHCB_REGISTER  Offset
-  );
-
-/**
-  Checks if a specified offset is valid in the GHCB.
-
-  The ValidBitmap area represents the areas of the GHCB that have been marked
-  valid. Return whether the bit in the ValidBitmap is set for the input offset.
-
-  @param[in]  GhcbA pointer to the GHCB
-  @param[in]  Offset  Qword offset in the GHCB to mark valid
-
-  @retval TRUEOffset is marked valid in the GHCB
-  @retval FALSE   Offset is not marked valid in the GHCB
-
-**/
-BOOLEAN
-EFIAPI
-VmgIsOffsetValid (
-  IN GHCB   *Ghcb,
-  IN GHCB_REGISTER  Offset
-  );
-
-/**
-  Handle a #VC exception.
-
-  Performs the necessary processing to handle a #VC exception.
-
-  The base library function returns an error equal to VC_EXCEPTION,
-  to be propagated to the standard exception handling stack.
-
-  @param[in, out]  ExceptionType  Pointer to an EFI_EXCEPTION_TYPE to be set
-  as value to use on error.
-  @param[in, out]  

[edk2-devel] [PATCH 5/8] OvmfPkg: Use CcExitLib instead of VmgExitLib

2022-11-01 Thread Min Xu
From: Min M Xu 

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

VmgExitLib is renamed as CcExitLib. See the description in BZ4123.
So OvmfPkg should be updated to this rename.

Cc: Brijesh Singh 
Cc: Erdem Aktas 
Cc: Gerd Hoffmann 
Cc: James Bottomley 
Cc: Jiewen Yao 
Cc: Tom Lendacky 
Signed-off-by: Min Xu 
---
 OvmfPkg/AmdSev/AmdSevX64.dsc   |  4 ++--
 OvmfPkg/Bhyve/BhyveX64.dsc |  2 +-
 OvmfPkg/CloudHv/CloudHvX64.dsc |  6 +++---
 OvmfPkg/IntelTdx/IntelTdxX64.dsc   |  4 ++--
 .../BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf   |  2 +-
 .../BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf   |  2 +-
 .../BaseMemEncryptSevLib/SecMemEncryptSevLib.inf   |  2 +-
 .../X64/SnpPageStateChangeInternal.c   | 10 +-
 OvmfPkg/Microvm/MicrovmX64.dsc |  4 ++--
 OvmfPkg/OvmfPkgIa32.dsc|  4 ++--
 OvmfPkg/OvmfPkgIa32X64.dsc |  4 ++--
 OvmfPkg/OvmfPkgX64.dsc |  6 +++---
 OvmfPkg/OvmfXen.dsc|  2 +-
 OvmfPkg/PlatformPei/AmdSev.c   | 10 +-
 OvmfPkg/PlatformPei/PlatformPei.inf|  2 +-
 .../FvbServicesRuntimeDxe.inf  |  2 +-
 OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c  | 10 +-
 17 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc
index 90e8a213ef77..8f7cae787e97 100644
--- a/OvmfPkg/AmdSev/AmdSevX64.dsc
+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc
@@ -204,7 +204,7 @@
 
 [LibraryClasses.common]
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
-  VmgExitLib|OvmfPkg/Library/VmgExitLib/VmgExitLib.inf
+  CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf
   TdxLib|MdePkg/Library/TdxLib/TdxLib.inf
 
 [LibraryClasses.common.SEC]
@@ -229,7 +229,7 @@
 !else
   
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
 !endif
-  VmgExitLib|OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf
+  CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.inf
   MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf
 
 [LibraryClasses.common.PEI_CORE]
diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc
index 475b88b21a4c..e3bb367b6bf6 100644
--- a/OvmfPkg/Bhyve/BhyveX64.dsc
+++ b/OvmfPkg/Bhyve/BhyveX64.dsc
@@ -232,7 +232,7 @@
 
 [LibraryClasses.common]
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
-  VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+  CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
   TdxLib|MdePkg/Library/TdxLib/TdxLib.inf
 
 [LibraryClasses.common.SEC]
diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc b/OvmfPkg/CloudHv/CloudHvX64.dsc
index 10b16104acd7..ce277cb2398b 100644
--- a/OvmfPkg/CloudHv/CloudHvX64.dsc
+++ b/OvmfPkg/CloudHv/CloudHvX64.dsc
@@ -251,7 +251,7 @@
 
 [LibraryClasses.common]
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
-  VmgExitLib|OvmfPkg/Library/VmgExitLib/VmgExitLib.inf
+  CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf
   TdxLib|MdePkg/Library/TdxLib/TdxLib.inf
 
 [LibraryClasses.common.SEC]
@@ -275,7 +275,7 @@
 !else
   
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
 !endif
-  VmgExitLib|OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf
+  CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.inf
   MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf
 
 [LibraryClasses.common.PEI_CORE]
@@ -915,7 +915,7 @@
   #
   OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf {
 
-VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
   }
   MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
   MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf {
diff --git a/OvmfPkg/IntelTdx/IntelTdxX64.dsc b/OvmfPkg/IntelTdx/IntelTdxX64.dsc
index c0c1a15b0926..345892651520 100644
--- a/OvmfPkg/IntelTdx/IntelTdxX64.dsc
+++ b/OvmfPkg/IntelTdx/IntelTdxX64.dsc
@@ -215,7 +215,7 @@
 
 [LibraryClasses.common]
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
-  VmgExitLib|OvmfPkg/Library/VmgExitLib/VmgExitLib.inf
+  CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf
   TdxLib|MdePkg/Library/TdxLib/TdxLib.inf
   TdxMailboxLib|OvmfPkg/Library/TdxMailboxLib/TdxMailboxLib.inf
   PlatformInitLib|OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf
@@ -237,7 +237,7 @@
 !else
   
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
 !endif
-  VmgExitLib|OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf
+  CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.inf
   

[edk2-devel] [PATCH 4/8] UefiPayloadPkg: Use CcExitLib instead of VmgExitLib

2022-11-01 Thread Min Xu
From: Min M Xu 

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

VmgExitLib is renamed as CcExitLib. So UefiPayloadPkg.dsc should be
updated as well.

Cc: Guo Dong 
Cc: Ray Ni 
Cc: Sean Rhodes 
Cc: James Lu 
Cc: Gua Guo 
Signed-off-by: Min Xu 
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc 
b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 1150be6acd0e..723a50a42284 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -301,7 +301,7 @@
   
VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf
   
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
   
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf
-  VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+  CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
   
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
 
 [LibraryClasses.common]
-- 
2.29.2.windows.2



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




[edk2-devel] [PATCH 2/8] OvmfPkg: Add CcExitLib

2022-11-01 Thread Min Xu
From: Min M Xu 

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

The base CcExitLib library provides a default limited interface. As it
does not provide full support, create an OVMF version of this library to
begin the process of providing full support of Cc guest (such as SEV-ES,
TDX) within OVMF.

Cc: Brijesh Singh 
Cc: Erdem Aktas 
Cc: Gerd Hoffmann 
Cc: James Bottomley 
Cc: Jiewen Yao 
Cc: Tom Lendacky 
Signed-off-by: Min Xu 
---
 OvmfPkg/Library/CcExitLib/CcExitLib.c |  239 ++
 OvmfPkg/Library/CcExitLib/CcExitLib.inf   |   46 +
 OvmfPkg/Library/CcExitLib/CcExitTd.h  |   32 +
 OvmfPkg/Library/CcExitLib/CcExitVcHandler.c   | 2355 +
 OvmfPkg/Library/CcExitLib/CcExitVcHandler.h   |   53 +
 OvmfPkg/Library/CcExitLib/CcExitVeHandler.c   |  559 
 .../Library/CcExitLib/PeiDxeCcExitVcHandler.c |  103 +
 OvmfPkg/Library/CcExitLib/SecCcExitLib.inf|   48 +
 .../Library/CcExitLib/SecCcExitVcHandler.c|  109 +
 .../Library/CcExitLib/X64/TdVmcallCpuid.nasm  |  146 +
 10 files changed, 3690 insertions(+)
 create mode 100644 OvmfPkg/Library/CcExitLib/CcExitLib.c
 create mode 100644 OvmfPkg/Library/CcExitLib/CcExitLib.inf
 create mode 100644 OvmfPkg/Library/CcExitLib/CcExitTd.h
 create mode 100644 OvmfPkg/Library/CcExitLib/CcExitVcHandler.c
 create mode 100644 OvmfPkg/Library/CcExitLib/CcExitVcHandler.h
 create mode 100644 OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
 create mode 100644 OvmfPkg/Library/CcExitLib/PeiDxeCcExitVcHandler.c
 create mode 100644 OvmfPkg/Library/CcExitLib/SecCcExitLib.inf
 create mode 100644 OvmfPkg/Library/CcExitLib/SecCcExitVcHandler.c
 create mode 100644 OvmfPkg/Library/CcExitLib/X64/TdVmcallCpuid.nasm

diff --git a/OvmfPkg/Library/CcExitLib/CcExitLib.c 
b/OvmfPkg/Library/CcExitLib/CcExitLib.c
new file mode 100644
index ..2e9ce141f33b
--- /dev/null
+++ b/OvmfPkg/Library/CcExitLib/CcExitLib.c
@@ -0,0 +1,239 @@
+/** @file
+  CcExitLib Support Library.
+
+  Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.
+  Copyright (C) 2020 - 2022, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/**
+  Check for VMGEXIT error
+
+  Check if the hypervisor has returned an error after completion of the VMGEXIT
+  by examining the SwExitInfo1 field of the GHCB.
+
+  @param[in]  Ghcb   A pointer to the GHCB
+
+  @retval  0 VMGEXIT succeeded.
+  @returnException number to be propagated, VMGEXIT processing
+ did not succeed.
+
+**/
+STATIC
+UINT64
+VmgExitErrorCheck (
+  IN GHCB  *Ghcb
+  )
+{
+  GHCB_EVENT_INJECTION  Event;
+  GHCB_EXIT_INFOExitInfo;
+  UINT64Status;
+
+  ExitInfo.Uint64 = Ghcb->SaveArea.SwExitInfo1;
+  ASSERT (
+(ExitInfo.Elements.Lower32Bits == 0) ||
+(ExitInfo.Elements.Lower32Bits == 1)
+);
+
+  Status = 0;
+  if (ExitInfo.Elements.Lower32Bits == 0) {
+return Status;
+  }
+
+  if (ExitInfo.Elements.Lower32Bits == 1) {
+ASSERT (Ghcb->SaveArea.SwExitInfo2 != 0);
+
+//
+// Check that the return event is valid
+//
+Event.Uint64 = Ghcb->SaveArea.SwExitInfo2;
+if (Event.Elements.Valid &&
+(Event.Elements.Type == GHCB_EVENT_INJECTION_TYPE_EXCEPTION))
+{
+  switch (Event.Elements.Vector) {
+case GP_EXCEPTION:
+case UD_EXCEPTION:
+  //
+  // Use returned event as return code
+  //
+  Status = Event.Uint64;
+  }
+}
+  }
+
+  if (Status == 0) {
+GHCB_EVENT_INJECTION  GpEvent;
+
+GpEvent.Uint64  = 0;
+GpEvent.Elements.Vector = GP_EXCEPTION;
+GpEvent.Elements.Type   = GHCB_EVENT_INJECTION_TYPE_EXCEPTION;
+GpEvent.Elements.Valid  = 1;
+
+Status = GpEvent.Uint64;
+  }
+
+  return Status;
+}
+
+/**
+  Perform VMGEXIT.
+
+  Sets the necessary fields of the GHCB, invokes the VMGEXIT instruction and
+  then handles the return actions.
+
+  @param[in, out]  Ghcb   A pointer to the GHCB
+  @param[in]   ExitCode   VMGEXIT code to be assigned to the SwExitCode
+  field of the GHCB.
+  @param[in]   ExitInfo1  VMGEXIT information to be assigned to the
+  SwExitInfo1 field of the GHCB.
+  @param[in]   ExitInfo2  VMGEXIT information to be assigned to the
+  SwExitInfo2 field of the GHCB.
+
+  @retval  0  VMGEXIT succeeded.
+  @return Exception number to be propagated, VMGEXIT
+  processing did not succeed.
+
+**/
+UINT64
+EFIAPI
+CcExitLibVmgExit (
+  IN OUT GHCB*Ghcb,
+  IN UINT64  ExitCode,
+  IN UINT64  ExitInfo1,
+  IN UINT64  ExitInfo2
+  )
+{
+  Ghcb->SaveArea.SwExitCode  = ExitCode;
+  Ghcb->SaveArea.SwExitInfo1 = ExitInfo1;
+  Ghcb->SaveArea.SwExitInfo2 = ExitInfo2;
+
+  CcExitLibVmgSetOffsetValid (Ghcb, GhcbSwExitCode);
+  

[edk2-devel] [PATCH 3/8] UefiCpuPkg: Use CcExitLib instead of VmgExitLib

2022-11-01 Thread Min Xu
From: Min M Xu 

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

VmgExitLib once was designed to provide interfaces to support #VC handler
and issue VMGEXIT instruction. After TDVF (enable TDX feature in OVMF) is
introduced, this library is updated to support #VE as well. Now the name
of VmgExitLib cannot reflect what the lib does. So VmgExitLib is replaced
by CcExitLib.

Cc: Eric Dong 
Cc: Ray Ni 
Cc: Brijesh Singh 
Cc: Erdem Aktas 
Cc: Gerd Hoffmann 
Cc: James Bottomley 
Cc: Jiewen Yao 
Cc: Tom Lendacky 
Signed-off-by: Min Xu 
---
 .../DxeCpuExceptionHandlerLib.inf  |  2 +-
 .../PeiCpuExceptionHandlerLib.inf  |  2 +-
 .../CpuExceptionHandlerLib/PeiDxeSmmCpuException.c |  6 +++---
 .../CpuExceptionHandlerLib/SecPeiCpuException.c|  6 +++---
 .../SecPeiCpuExceptionHandlerLib.inf   |  2 +-
 .../SmmCpuExceptionHandlerLib.inf  |  2 +-
 .../Xcode5SecPeiCpuExceptionHandlerLib.inf |  2 +-
 UefiCpuPkg/Library/MpInitLib/AmdSev.c  | 10 +-
 UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf  |  2 +-
 UefiCpuPkg/Library/MpInitLib/DxeMpLib.c|  8 
 UefiCpuPkg/Library/MpInitLib/MpLib.c   |  2 +-
 UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf  |  2 +-
 UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c  | 10 +-
 UefiCpuPkg/UefiCpuPkg.dsc  |  2 ++
 14 files changed, 30 insertions(+), 28 deletions(-)

diff --git 
a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf 
b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
index e7a81bebdb13..d0f82095cf92 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
@@ -60,4 +60,4 @@
   PeCoffGetEntryPointLib
   MemoryAllocationLib
   DebugLib
-  VmgExitLib
+  CcExitLib
diff --git 
a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf 
b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
index 7c2ec3b2db4c..5339f8e60404 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf
@@ -52,7 +52,7 @@
   HobLib
   MemoryAllocationLib
   SynchronizationLib
-  VmgExitLib
+  CcExitLib
 
 [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard# CONSUMES
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c 
b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
index a7d0897ef1f9..748cf8d3bfc6 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c
@@ -7,7 +7,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
 #include 
-#include 
+#include 
 #include "CpuExceptionCommon.h"
 
 /**
@@ -40,7 +40,7 @@ CommonExceptionHandlerWorker (
   //   On other   - ExceptionType contains (possibly new) exception
   //value
   //
-  Status = VmgExitHandleVc (, SystemContext);
+  Status = CcExitHandleVc (, SystemContext);
   if (!EFI_ERROR (Status)) {
 return;
   }
@@ -57,7 +57,7 @@ CommonExceptionHandlerWorker (
   //   On other   - ExceptionType contains (possibly new) exception
   //value
   //
-  Status = VmTdExitHandleVe (, SystemContext);
+  Status = CcExitHandleVe (, SystemContext);
   if (!EFI_ERROR (Status)) {
 return;
   }
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c 
b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
index ad5e0e9ed4f1..497cd1649930 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c
@@ -7,7 +7,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
 #include 
-#include 
+#include 
 #include "CpuExceptionCommon.h"
 
 CONST UINTN  mDoFarReturnFlag = 0;
@@ -39,7 +39,7 @@ CommonExceptionHandler (
   //   On other   - ExceptionType contains (possibly new) exception
   //value
   //
-  Status = VmgExitHandleVc (, SystemContext);
+  Status = CcExitHandleVc (, SystemContext);
   if (!EFI_ERROR (Status)) {
 return;
   }
@@ -57,7 +57,7 @@ CommonExceptionHandler (
   //   On other   - ExceptionType contains (possibly new) exception
   //value
   //
-  Status = VmTdExitHandleVe (, SystemContext);
+  Status = CcExitHandleVe (, SystemContext);
   if (!EFI_ERROR (Status)) {
 return;
   }
diff --git 
a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf 
b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
index 

[edk2-devel] [PATCH 1/8] UefiCpuPkg: Add CcExitLib

2022-11-01 Thread Min Xu
From: Min M Xu 

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

CcExitLib is designed to support handling #VC/#VE exceptions and issuing
VMGEXIT instructions. It can be used to perform these:
  - Handling #VC exceptions
  - Handling #VE exceptions
  - Preparing for and issuing a VMGEXIT
  - Performing MMIO-related write operations to support flash emulation
  - Performing AP related boot opeations

The base functions in this driver will not do anything and will return
an error if a return value is required. It is expected that other packages
(like OvmfPkg) will create a version of the library to fully support an
CC gueste (such as SEV-ES and TDX).

Cc: Eric Dong 
Cc: Ray Ni 
Cc: Brijesh Singh 
Cc: Erdem Aktas 
Cc: Gerd Hoffmann 
Cc: James Bottomley 
Cc: Jiewen Yao 
Cc: Tom Lendacky 
Signed-off-by: Min Xu 
---
 UefiCpuPkg/Include/Library/CcExitLib.h| 176 
 .../Library/CcExitLibNull/CcExitLibNull.c | 194 ++
 .../Library/CcExitLibNull/CcExitLibNull.inf   |  28 +++
 .../Library/CcExitLibNull/CcExitLibNull.uni   |  14 ++
 UefiCpuPkg/UefiCpuPkg.dec |   3 +
 5 files changed, 415 insertions(+)
 create mode 100644 UefiCpuPkg/Include/Library/CcExitLib.h
 create mode 100644 UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.c
 create mode 100644 UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
 create mode 100644 UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.uni

diff --git a/UefiCpuPkg/Include/Library/CcExitLib.h 
b/UefiCpuPkg/Include/Library/CcExitLib.h
new file mode 100644
index ..40372e10b39e
--- /dev/null
+++ b/UefiCpuPkg/Include/Library/CcExitLib.h
@@ -0,0 +1,176 @@
+/** @file
+  Public header file for the CcExitLib.
+
+  This library class defines some routines used for below CcExit handler.
+   - Invoking the VMGEXIT instruction in support of SEV-ES and to handle
+ #VC exceptions.
+   - Handle #VE exception in TDX.
+
+  Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.
+  Copyright (c) 2020 - 2022, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef CC_EXIT_LIB_H_
+#define CC_EXIT_LIB_H_
+
+#include 
+#include 
+
+#define VE_EXCEPTION  20
+
+/**
+  Perform VMGEXIT.
+
+  Sets the necessary fields of the GHCB, invokes the VMGEXIT instruction and
+  then handles the return actions.
+
+  @param[in, out]  Ghcb   A pointer to the GHCB
+  @param[in]   ExitCode   VMGEXIT code to be assigned to the SwExitCode
+  field of the GHCB.
+  @param[in]   ExitInfo1  VMGEXIT information to be assigned to the
+  SwExitInfo1 field of the GHCB.
+  @param[in]   ExitInfo2  VMGEXIT information to be assigned to the
+  SwExitInfo2 field of the GHCB.
+
+  @retval  0  VMGEXIT succeeded.
+  @return Exception number to be propagated, VMGEXIT
+  processing did not succeed.
+
+**/
+UINT64
+EFIAPI
+CcExitLibVmgExit (
+  IN OUT GHCB*Ghcb,
+  IN UINT64  ExitCode,
+  IN UINT64  ExitInfo1,
+  IN UINT64  ExitInfo2
+  );
+
+/**
+  Perform pre-VMGEXIT initialization/preparation.
+
+  Performs the necessary steps in preparation for invoking VMGEXIT. Must be
+  called before setting any fields within the GHCB.
+
+  @param[in, out]  GhcbA pointer to the GHCB
+  @param[in, out]  InterruptState  A pointer to hold the current interrupt
+   state, used for restoring in 
CcExitLibVmgDone ()
+
+**/
+VOID
+EFIAPI
+CcExitLibVmgInit (
+  IN OUT GHCB *Ghcb,
+  IN OUT BOOLEAN  *InterruptState
+  );
+
+/**
+  Perform post-VMGEXIT cleanup.
+
+  Performs the necessary steps to cleanup after invoking VMGEXIT. Must be
+  called after obtaining needed fields within the GHCB.
+
+  @param[in, out]  GhcbA pointer to the GHCB
+  @param[in]   InterruptState  An indicator to conditionally (re)enable
+   interrupts
+
+**/
+VOID
+EFIAPI
+CcExitLibVmgDone (
+  IN OUT GHCB *Ghcb,
+  IN BOOLEAN  InterruptState
+  );
+
+/**
+  Marks a specified offset as valid in the GHCB.
+
+  The ValidBitmap area represents the areas of the GHCB that have been marked
+  valid. Set the bit in ValidBitmap for the input offset.
+
+  @param[in, out]  Ghcb   A pointer to the GHCB
+  @param[in]   Offset Qword offset in the GHCB to mark valid
+
+**/
+VOID
+EFIAPI
+CcExitLibVmgSetOffsetValid (
+  IN OUT GHCB   *Ghcb,
+  IN GHCB_REGISTER  Offset
+  );
+
+/**
+  Checks if a specified offset is valid in the GHCB.
+
+  The ValidBitmap area represents the areas of the GHCB that have been marked
+  valid. Return whether the bit in the ValidBitmap is set for the input offset.
+
+  @param[in]  GhcbA pointer to the GHCB
+  @param[in]  Offset  Qword offset in the GHCB to mark valid
+
+  @retval TRUEOffset is 

[edk2-devel] [PATCH 0/8] Rename VmgExitLib to CcExitLib

2022-11-01 Thread Min Xu
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4123

VmgExitLib once was designed to provide interfaces to support #VC handler
and issue VMGEXIT instruction. After TDVF (enable TDX feature in OVMF) is
introduced, this library is updated to support #VE as well. Now the name
of VmgExitLib cannot reflect what the lib does.

This patch-set creates CcExitLib which is a simple copy of VmgExitLib
except some of the API names are renamed with a CcExitLib prefix. For
example VmgExit is renamed as CcExitLibVmgExit.

To make sure the build will not be broken by the renaming, this patch-set
first creates CcExitLib (Patch #1/2). Then VmgExitLib is replaced by
CcExitLib in UefiCpuPkg/UefiPayloadPkg/OvmfPkg (Patch #3/4/5). After
that VmgExitLib is deleted (Patch #6/7). At last Maintainers.txt
is updated (Patch #8).

Code: https://github.com/mxu9/edk2/tree/CcExitLib.v1

Cc: Eric Dong 
Cc: Ray Ni 
Cc: Brijesh Singh 
Cc: Erdem Aktas 
Cc: Gerd Hoffmann 
Cc: James Bottomley 
Cc: Jiewen Yao 
Cc: Tom Lendacky 
Cc: Guo Dong 
Cc: Sean Rhodes 
Cc: James Lu 
Cc: Gua Guo 
Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Min Xu 

Min M Xu (8):
  UefiCpuPkg: Add CcExitLib
  OvmfPkg: Add CcExitLib
  UefiCpuPkg: Use CcExitLib instead of VmgExitLib
  UefiPayloadPkg: Use CcExitLib instead of VmgExitLib
  OvmfPkg: Use CcExitLib instead of VmgExitLib
  OvmfPkg: Delete VmgExitLib
  UefiCpuPkg: Delete VmgExitLib
  Maintainers: Update the VmgExitLib to CcExitLib

 Maintainers.txt   |   2 +-
 OvmfPkg/AmdSev/AmdSevX64.dsc  |   4 +-
 OvmfPkg/Bhyve/BhyveX64.dsc|   2 +-
 OvmfPkg/CloudHv/CloudHvX64.dsc|   6 +-
 OvmfPkg/IntelTdx/IntelTdxX64.dsc  |   4 +-
 .../DxeMemEncryptSevLib.inf   |   2 +-
 .../PeiMemEncryptSevLib.inf   |   2 +-
 .../SecMemEncryptSevLib.inf   |   2 +-
 .../X64/SnpPageStateChangeInternal.c  |  10 +-
 .../VmgExitLib.c => CcExitLib/CcExitLib.c}|  23 ++--
 .../CcExitLib.inf}|  19 +--
 .../CcExitTd.h}   |   4 +-
 .../CcExitVcHandler.c}| 129 +-
 .../CcExitVcHandler.h}|   6 +-
 .../CcExitVeHandler.c}|   6 +-
 .../PeiDxeCcExitVcHandler.c}  |   6 +-
 .../SecCcExitLib.inf} |  16 +--
 .../SecCcExitVcHandler.c} |   6 +-
 .../X64/TdVmcallCpuid.nasm|   0
 OvmfPkg/Microvm/MicrovmX64.dsc|   4 +-
 OvmfPkg/OvmfPkgIa32.dsc   |   4 +-
 OvmfPkg/OvmfPkgIa32X64.dsc|   4 +-
 OvmfPkg/OvmfPkgX64.dsc|   6 +-
 OvmfPkg/OvmfXen.dsc   |   2 +-
 OvmfPkg/PlatformPei/AmdSev.c  |  10 +-
 OvmfPkg/PlatformPei/PlatformPei.inf   |   2 +-
 .../FvbServicesRuntimeDxe.inf |   2 +-
 .../QemuFlashDxe.c|  10 +-
 .../Library/{VmgExitLib.h => CcExitLib.h} |  29 ++--
 .../CcExitLibNull.c}  |  47 +--
 .../CcExitLibNull.inf}|  14 +-
 .../Library/CcExitLibNull/CcExitLibNull.uni   |  14 ++
 .../DxeCpuExceptionHandlerLib.inf |   2 +-
 .../PeiCpuExceptionHandlerLib.inf |   2 +-
 .../PeiDxeSmmCpuException.c   |   6 +-
 .../SecPeiCpuException.c  |   6 +-
 .../SecPeiCpuExceptionHandlerLib.inf  |   2 +-
 .../SmmCpuExceptionHandlerLib.inf |   2 +-
 .../Xcode5SecPeiCpuExceptionHandlerLib.inf|   2 +-
 UefiCpuPkg/Library/MpInitLib/AmdSev.c |  10 +-
 UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   2 +-
 UefiCpuPkg/Library/MpInitLib/DxeMpLib.c   |   8 +-
 UefiCpuPkg/Library/MpInitLib/MpLib.c  |   2 +-
 UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf |   2 +-
 UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c |  10 +-
 .../Library/VmgExitLibNull/VmTdExitNull.c |  38 --
 .../Library/VmgExitLibNull/VmgExitLibNull.uni |  15 --
 UefiCpuPkg/UefiCpuPkg.dec |   4 +-
 UefiCpuPkg/UefiCpuPkg.dsc |   4 +-
 UefiPayloadPkg/UefiPayloadPkg.dsc |   2 +-
 50 files changed, 255 insertions(+), 261 deletions(-)
 rename OvmfPkg/Library/{VmgExitLib/VmgExitLib.c => CcExitLib/CcExitLib.c} (89%)
 rename OvmfPkg/Library/{VmgExitLib/VmgExitLib.inf => CcExitLib/CcExitLib.inf} 
(60%)
 rename OvmfPkg/Library/{VmgExitLib/VmTdExitHandler.h => CcExitLib/CcExitTd.h} 
(86%)
 rename OvmfPkg/Library/{VmgExitLib/VmgExitVcHandler.c => 
CcExitLib/CcExitVcHandler.c} (90%)
 rename OvmfPkg/Library/{VmgExitLib/VmgExitVcHandler.h => 
CcExitLib/CcExitVcHandler.h} (89%)
 rename OvmfPkg/Library/{VmgExitLib/VmTdExitVeHandler.c => 
CcExitLib/CcExitVeHandler.c} (95%)
 rename OvmfPkg/Library/{VmgExitLib/PeiDxeVmgExitVcHandler.c => 
CcExitLib/PeiDxeCcExitVcHandler.c} (93%)
 rename 

[edk2-devel] [PATCH] ShellPkg:Improved Smbios Type 9 data under smbiosview

2022-11-01 Thread Sainadh Nagolu via groups.io
Added spec version check while publishing new fields, added Slot Pitch field 
which was missing and corrected the publishing order as per Smbios spec.

Signed-off-by: Sainadh Nagolu 

---
 .../SmbiosView/PrintInfo.c | 18 --
 .../SmbiosView/SmbiosViewStrings.uni   |  2 ++
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index bf5306205b..595de36b40 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -638,12 +638,18 @@ SmbiosPrintStructure (
 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_PRINTINFO_DATA_BUS_WIDTH), gShellDebug1HiiHandle, 
PeerGroupPtr[Index].DataBusWidth);

   }



-  // Since PeerGroups has a variable number of entries, new fields 
added after PeerGroups are defined in

-  // a extended structure. Those fields can be referenced using 
SMBIOS_TABLE_TYPE9_EXTENDED structure.

-  Type9ExtendedStruct = (SMBIOS_TABLE_TYPE9_EXTENDED *)((UINT8 
*)PeerGroupPtr + (PeerGroupCount * sizeof (MISC_SLOT_PEER_GROUP)));

-  DisplaySystemSlotHeight (Type9ExtendedStruct->SlotHeight, Option);

-  DisplaySystemSlotPhysicalWidth 
(Type9ExtendedStruct->SlotPhysicalWidth, Option);

-  DisplaySystemSlotInformation (Type9ExtendedStruct->SlotInformation, 
Option);

+

+  if (AE_SMBIOS_VERSION (0x3, 0x4)) {

+  // Since PeerGroups has a variable number of entries, new fields 
added after PeerGroups are defined in

+  // a extended structure. Those fields can be referenced using 
SMBIOS_TABLE_TYPE9_EXTENDED structure.

+  Type9ExtendedStruct = (SMBIOS_TABLE_TYPE9_EXTENDED *)((UINT8 
*)PeerGroupPtr + (PeerGroupCount * sizeof (MISC_SLOT_PEER_GROUP)));

+  DisplaySystemSlotInformation 
(Type9ExtendedStruct->SlotInformation, Option);

+  DisplaySystemSlotPhysicalWidth 
(Type9ExtendedStruct->SlotPhysicalWidth, Option);

+  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN 
(STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_PITCH), gShellDebug1HiiHandle, 
Type9ExtendedStruct->SlotPitch);

+  if (AE_SMBIOS_VERSION (0x3, 0x5)) {

+  DisplaySystemSlotHeight (Type9ExtendedStruct->SlotHeight, 
Option);

+  }

+  }

 }

   }



diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni
index 68211ce7ab..c24f7d5716 100644
--- 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni
+++ 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni
@@ -1,6 +1,7 @@
 // /**

 //

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

+// Copyright (c) 1985 - 2022, American Megatrends International LLC.

 // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.

 // (C) Copyright 2015-2019 Hewlett Packard Enterprise Development LP

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

@@ -417,6 +418,7 @@
 #string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_INFORMATION   #language 
en-US "System Slot Information: "

 #string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_HEIGHT#language 
en-US "System Slot Height: "

 #string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_PHYSICAL_WIDTH#language 
en-US "System Slot Physical Width: "

+#string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_SLOT_PITCH #language 
en-US "Slot Pitch: %d\r\n"

 #string STR_SMBIOSVIEW_QUERYTABLE_ONBOARD_DEVICE_TYPE   #language 
en-US "Onboard Device Type: "

 #string STR_SMBIOSVIEW_QUERYTABLE_SYSTEM_EVENT_LOG_TYPE #language 
en-US "System Event Log Type: "

 #string STR_SMBIOSVIEW_QUERYTABLE_EVENT_LOG_VAR_DATA_FORMAT #language 
en-US "Event Log Variable Data Format Types: "

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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#95840): https://edk2.groups.io/g/devel/message/95840
Mute This Topic: https://groups.io/mt/94728114/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] pip-requirements.txt: Bump pytool extensions and library

2022-11-01 Thread gaoliming via groups.io
Reviewed-by: Liming Gao 

> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Michael
> Kubacki
> 发送时间: 2022年11月2日 7:40
> 收件人: devel@edk2.groups.io
> 抄送: Sean Brogan ; Michael D Kinney
> ; Liming Gao ;
> Chasel Chiu 
> 主题: [edk2-devel] [PATCH v2 1/1] pip-requirements.txt: Bump pytool
> extensions and library
> 
> From: Michael Kubacki 
> 
> Fixes edk2 CI failure due to VM images being updated to Python 3.11
> and the old pip modules not being compatible with Python 3.11.
> 
> Updates the following pip modules:
> 
>   - edk2-pytool-library from 0.11.2 to 0.11.6
>   - edk2-pytool-extensions from 0.16 to 0.19.1
> 
> Needed to fix an issue with Python 3.11 compatibility.
> 
> Cc: Sean Brogan 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Chasel Chiu 
> Signed-off-by: Michael Kubacki 
> Reviewed-by: Michael D Kinney 
> ---
> 
> Notes:
> v2 changes:
> 
> - Add some reviewers to Cc list
> - Explain impact on CI
> 
>  pip-requirements.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/pip-requirements.txt b/pip-requirements.txt
> index 40e9ad72ee4f..74d1bb35f2f2 100644
> --- a/pip-requirements.txt
> +++ b/pip-requirements.txt
> @@ -12,7 +12,7 @@
>  # https://www.python.org/dev/peps/pep-0440/#version-specifiers
>  ##
> 
> -edk2-pytool-library==0.11.2
> -edk2-pytool-extensions~=0.16.0
> +edk2-pytool-library==0.11.6
> +edk2-pytool-extensions~=0.19.1
>  edk2-basetools==0.1.39
>  antlr4-python3-runtime==4.7.1
> --
> 2.28.0.windows.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#95835): https://edk2.groups.io/g/devel/message/95835
> Mute This Topic: https://groups.io/mt/94723719/4905953
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [gaolim...@byosoft.com.cn]
> -=-=-=-=-=-=
> 





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




[edk2-devel] Event: TianoCore Bug Triage - APAC / NAMO - 11/01/2022 #cal-reminder

2022-11-01 Thread Group Notification
*Reminder: TianoCore Bug Triage - APAC / NAMO*

*When:*
11/01/2022
6:30pm to 7:30pm
(UTC-07:00) America/Los Angeles

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

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

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

*Description:*

TianoCore Bug Triage - APAC / NAMO

Hosted by Liming Gao



Microsoft Teams meeting

*Join on your computer or mobile app*

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

*Join with a video conferencing device*

te...@conf.intel.com

Video Conference ID: 116 062 094 0

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

*Or call in (audio only)*

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

Phone Conference ID: 774 638 21#

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

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


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




回复: [edk2-devel] [PATCH 1/2] MdePkg/IndustryStandard: add definitions for ACPI APMT

2022-11-01 Thread gaoliming via groups.io
Reviewed-by: Liming Gao 

> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Sami
> Mujawar
> 发送时间: 2022年11月1日 19:42
> 收件人: devel@edk2.groups.io; jbra...@nvidia.com
> 抄送: michael.d.kin...@intel.com; gaolim...@byosoft.com.cn;
> zhiguang@intel.com; zhichao@intel.com; ray...@intel.com;
> n...@arm.com
> 主题: Re: [edk2-devel] [PATCH 1/2] MdePkg/IndustryStandard: add
> definitions for ACPI APMT
> 
> Hi Jeff,
> 
> Thank you for this patch.
> 
> These changes look good to me.
> 
> Reviewed-by: Sami Mujawar 
> 
> Regards,
> 
> Sami Mujawar
> 
> On 27/10/2022 03:40 pm, Jeff Brasen via groups.io wrote:
> > This adds #defines and struct typedefs for the various node types in
> >
> > the  ACPI Arm Performance Monitoring Unit (APMT) table.
> >
> >
> >
> > Signed-off-by: Jeff Brasen 
> >
> > ---
> >
> >   MdePkg/Include/IndustryStandard/Acpi64.h  |  5 ++
> >
> >   .../ArmPerformanceMonitoringUnitTable.h   | 69
> +++
> >
> >   2 files changed, 74 insertions(+)
> >
> >   create mode 100644
> MdePkg/Include/IndustryStandard/ArmPerformanceMonitoringUnitTable.h
> >
> >
> >
> > diff --git a/MdePkg/Include/IndustryStandard/Acpi64.h
> b/MdePkg/Include/IndustryStandard/Acpi64.h
> >
> > index fe5ebfac2b..575ca0430c 100644
> >
> > --- a/MdePkg/Include/IndustryStandard/Acpi64.h
> >
> > +++ b/MdePkg/Include/IndustryStandard/Acpi64.h
> >
> > @@ -2847,6 +2847,11 @@ typedef struct {
> >
> >   ///
> >
> >   #define
> EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE
> SIGNATURE_32('A', 'P', 'I', 'C')
> >
> >
> >
> > +///
> >
> > +/// "APMT" Arm Performance Monitoring Unit Table
> >
> > +///
> >
> > +#define
> EFI_ACPI_6_4_ARM_PERFORMANCE_MONITORING_UNIT_TABLE_SIGNATU
> RE  SIGNATURE_32('A', 'P', 'M', 'T')
> >
> > +
> >
> >   ///
> >
> >   /// "BERT" Boot Error Record Table
> >
> >   ///
> >
> > diff --git
> a/MdePkg/Include/IndustryStandard/ArmPerformanceMonitoringUnitTable.h
> b/MdePkg/Include/IndustryStandard/ArmPerformanceMonitoringUnitTable.h
> >
> > new file mode 100644
> >
> > index 00..fe7084cffd
> >
> > --- /dev/null
> >
> > +++
> b/MdePkg/Include/IndustryStandard/ArmPerformanceMonitoringUnitTable.h
> >
> > @@ -0,0 +1,69 @@
> >
> > +/** @file
> >
> > +  ACPI Arm Performance Monitoring Unit (APMT) table
> >
> > +  as specified in ARM spec DEN0117
> >
> > +
> >
> > +  Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
> >
> > +  Copyright (c) 2022, ARM Limited. All rights reserved.
> >
> > +  SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> > +**/
> >
> > +
> >
> > +#ifndef ARM_PERFORMANCE_MONITORING_UNIT_TABLE_H_
> >
> > +#define ARM_PERFORMANCE_MONITORING_UNIT_TABLE_H_
> >
> > +
> >
> > +#include 
> >
> > +
> >
> > +#pragma pack(1)
> >
> > +
> >
> > +///
> >
> > +/// Arm Performance Monitoring Unit (APMT) tabl
> >
> > +///
> >
> > +typedef struct {
> >
> > +  EFI_ACPI_DESCRIPTION_HEADERHeader;
> >
> > +} EFI_ACPI_ARM_PERFORMANCE_MONITORING_UNIT_TABLE_HEADER;
> >
> > +
> >
> > +///
> >
> > +/// APMT Revision (as defined in DEN0117.)
> >
> > +///
> >
> > +#define
> EFI_ACPI_ARM_PERFORMANCE_MONITORING_UNIT_TABLE_REVISION
> 0x00
> >
> > +
> >
> > +///
> >
> > +/// Arm PMU Node Structure
> >
> > +///
> >
> > +
> >
> > +// Node Flags
> >
> > +#define EFI_ACPI_APMT_DUAL_PAGE_EXTENSION_SUPPORTED
> BIT0
> >
> > +#define EFI_ACPI_APMT_PROCESSOR_AFFINITY_TYPE_CONTAINER
> BIT1
> >
> > +#define EFI_ACPI_APMT_PROCESSOR_AFFINITY_TYPE_PROCESSOR
> 0 // BIT 1
> >
> > +#define EFI_ACPI_APMT_64BIT_SINGLE_COPY_ATOMICITY_SUPPORTED
> BIT2
> >
> > +
> >
> > +// Interrupt Flags
> >
> > +#define EFI_ACPI_APMT_INTERRUPT_MODE_EDGE_TRIGGERED   BIT0
> >
> > +#define EFI_ACPI_APMT_INTERRUPT_MODE_LEVEL_TRIGGERED  0 //
> BIT 0
> >
> > +#define EFI_ACPI_APMT_INTERRUPT_TYPE_WIRED0 // BIT
> 1
> >
> > +
> >
> > +// Node Type
> >
> > +#define EFI_ACPI_APMT_NODE_TYPE_MEMORY_CONTROLLER  0x00
> >
> > +#define EFI_ACPI_APMT_NODE_TYPE_SMMU   0x01
> >
> > +#define EFI_ACPI_APMT_NODE_TYPE_PCIE_ROOT_COMPLEX  0x02
> >
> > +#define EFI_ACPI_APMT_NODE_TYPE_ACPI_DEVICE0x03
> >
> > +#define EFI_ACPI_APMT_NODE_TYPE_CPU_CACHE  0x04
> >
> > +
> >
> > +typedef struct {
> >
> > +  UINT16Length;
> >
> > +  UINT8 NodeFlags;
> >
> > +  UINT8 NodeType;
> >
> > +  UINT32Identifier;
> >
> > +  UINT64NodeInstancePrimary;
> >
> > +  UINT32NodeInstanceSecondary;
> >
> > +  UINT64BaseAddress0;
> >
> > +  UINT64BaseAddress1;
> >
> > +  UINT32OverflowInterrupt;
> >
> > +  UINT32Reserved1;
> >
> > +  UINT32OverflowInterruptFlags;
> >
> > +  UINT32ProcessorAffinity;
> >
> > +  UINT32ImplementationId;
> >
> > +} EFI_ACPI_ARM_PERFORMANCE_MONITORING_UNIT_NODE;
> >
> > +
> >
> > +#pragma pack()
> >
> > +
> >
> > +#endif
> >
> 
> 
> 
> 





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

Re: [edk2-devel] [PATCH v3 6/9] SourceLevelDebugPkg: Remove UefiCpuLib from module INFs.

2022-11-01 Thread Wu, Hao A
Acked-by: Hao A Wu 

Best Regards,
Hao Wu

> -Original Message-
> From: Liu, Zhiguang 
> Sent: Tuesday, November 1, 2022 3:59 PM
> To: devel@edk2.groups.io
> Cc: Yu Pu ; Wu, Hao A ; Ni, Ray
> 
> Subject: [PATCH v3 6/9] SourceLevelDebugPkg: Remove UefiCpuLib from
> module INFs.
> 
> From: Yu Pu 
> 
> Because UefiCpuPkg/UefiCpuLib is merged to MdePkg/CpuLib, remove the
> dependency of UefiCpuLib.
> 
> Cc: Hao A Wu 
> Signed-off-by: Yu Pu 
> Reviewed-by: Ray Ni 
> ---
>  SourceLevelDebugPkg/SourceLevelDebugPkg.dsc | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
> b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
> index eba64a7b78..986dd5a769 100644
> --- a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
> +++ b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
> @@ -35,7 +35,6 @@
>IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> 
> SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizati
> onLib.inf
>LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
> -  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
> 
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeC
> offGetEntryPointLib.inf
> 
> SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLi
> b16550.inf
> 
> PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebu
> g/PeCoffExtraActionLibDebug.inf
> --
> 2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#95836): https://edk2.groups.io/g/devel/message/95836
Mute This Topic: https://groups.io/mt/94704520/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] pip-requirements.txt: Bump pytool extensions and library

2022-11-01 Thread Michael Kubacki
From: Michael Kubacki 

Fixes edk2 CI failure due to VM images being updated to Python 3.11
and the old pip modules not being compatible with Python 3.11.

Updates the following pip modules:

  - edk2-pytool-library from 0.11.2 to 0.11.6
  - edk2-pytool-extensions from 0.16 to 0.19.1

Needed to fix an issue with Python 3.11 compatibility.

Cc: Sean Brogan 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Chasel Chiu 
Signed-off-by: Michael Kubacki 
Reviewed-by: Michael D Kinney 
---

Notes:
v2 changes:

- Add some reviewers to Cc list
- Explain impact on CI

 pip-requirements.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pip-requirements.txt b/pip-requirements.txt
index 40e9ad72ee4f..74d1bb35f2f2 100644
--- a/pip-requirements.txt
+++ b/pip-requirements.txt
@@ -12,7 +12,7 @@
 # https://www.python.org/dev/peps/pep-0440/#version-specifiers
 ##
 
-edk2-pytool-library==0.11.2
-edk2-pytool-extensions~=0.16.0
+edk2-pytool-library==0.11.6
+edk2-pytool-extensions~=0.19.1
 edk2-basetools==0.1.39
 antlr4-python3-runtime==4.7.1
-- 
2.28.0.windows.1



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




Re: [edk2-devel] [PATCH v1 1/1] pip-requirements.txt: Bump pytool extensions and library

2022-11-01 Thread Michael D Kinney
Thanks for fixing this CI issue.

Reviewed-by: Michael D Kinney 


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Michael Kubacki
> Sent: Tuesday, November 1, 2022 2:54 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH v1 1/1] pip-requirements.txt: Bump pytool 
> extensions and library
> 
> From: Michael Kubacki 
> 
> Updates the following pip modules:
> 
>   - edk2-pytool-library from 0.11.2 to 0.11.6
>   - edk2-pytool-extensions from 0.16 to 0.19.1
> 
> Needed to fix an issue with Python 3.11 compatibility.
> 
> Signed-off-by: Michael Kubacki 
> ---
>  pip-requirements.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/pip-requirements.txt b/pip-requirements.txt
> index 40e9ad72ee4f..74d1bb35f2f2 100644
> --- a/pip-requirements.txt
> +++ b/pip-requirements.txt
> @@ -12,7 +12,7 @@
>  # https://www.python.org/dev/peps/pep-0440/#version-specifiers
>  ##
> 
> -edk2-pytool-library==0.11.2
> -edk2-pytool-extensions~=0.16.0
> +edk2-pytool-library==0.11.6
> +edk2-pytool-extensions~=0.19.1
>  edk2-basetools==0.1.39
>  antlr4-python3-runtime==4.7.1
> --
> 2.28.0.windows.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#95831): https://edk2.groups.io/g/devel/message/95831
> Mute This Topic: https://groups.io/mt/94721743/1643496
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [michael.d.kin...@intel.com]
> -=-=-=-=-=-=
> 



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




Re: [edk2-devel] [PATCH] IntelFsp2Pkg: Update Function header to support IA32/X64.

2022-11-01 Thread Michael Kubacki
The reason it started happening is because the VM images started coming with 
Python 3.11.


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




Re: [edk2-devel] [PATCH] IntelFsp2Pkg: Update Function header to support IA32/X64.

2022-11-01 Thread Michael Kubacki
Because edk2 pip-requirements.txt is out of date.

I sent a patch to update them here. Reviews are appreciated.
[PATCH v1 1/1] pip-requirements.txt: Bump pytool extensions and library 
(groups.io) ( https://edk2.groups.io/g/devel/message/95831 )


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




[edk2-devel] [PATCH v1 1/1] pip-requirements.txt: Bump pytool extensions and library

2022-11-01 Thread Michael Kubacki
From: Michael Kubacki 

Updates the following pip modules:

  - edk2-pytool-library from 0.11.2 to 0.11.6
  - edk2-pytool-extensions from 0.16 to 0.19.1

Needed to fix an issue with Python 3.11 compatibility.

Signed-off-by: Michael Kubacki 
---
 pip-requirements.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pip-requirements.txt b/pip-requirements.txt
index 40e9ad72ee4f..74d1bb35f2f2 100644
--- a/pip-requirements.txt
+++ b/pip-requirements.txt
@@ -12,7 +12,7 @@
 # https://www.python.org/dev/peps/pep-0440/#version-specifiers
 ##
 
-edk2-pytool-library==0.11.2
-edk2-pytool-extensions~=0.16.0
+edk2-pytool-library==0.11.6
+edk2-pytool-extensions~=0.19.1
 edk2-basetools==0.1.39
 antlr4-python3-runtime==4.7.1
-- 
2.28.0.windows.1



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




Re: [edk2-devel] [PATCH] IntelFsp2Pkg: Update Function header to support IA32/X64.

2022-11-01 Thread Chiu, Chasel


Hi Michael D and Michael,

Could you please help me to clarify why CI build failed in this PR? 
https://github.com/tianocore/edk2/pull/3575
>From log file it seems to be some CI script crashed but I have no idea what 
>caused that failure.

Thanks,
Chasel

CI Failing log:
2022-11-01T18:58:09.3441767Z PROGRESS - --Running IntelFsp2Pkg: Guid Check Test 
NO-TARGET --
2022-11-01T18:58:09.3448996Z CRITICAL - EXCEPTION: global flags not at the 
start of the expression at position 1
2022-11-01T18:58:09.3474186Z CRITICAL - Traceback (most recent call last):
2022-11-01T18:58:09.3475314ZFile 
"/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/edk2toolext/invocables/edk2_ci_build.py",
 line 174, in Go
2022-11-01T18:58:09.3478154Z rc = Descriptor.Obj.RunBuildPlugin(pkgToRunOn, 
edk2path, pkg_plugin_configuration,
2022-11-01T18:58:09.3479182Z  
^
2022-11-01T18:58:09.3479821ZFile 
"/home/vsts/work/1/s/.pytool/Plugin/GuidCheck/GuidCheck.py", line 133, in 
RunBuildPlugin
2022-11-01T18:58:09.3480427Z gs = GuidList.guidlist_from_filesystem(
2022-11-01T18:58:09.3480971Z  ^^
2022-11-01T18:58:09.3482084ZFile 
"/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/edk2toollib/uefi/edk2/guid_list.py",
 line 47, in guidlist_from_filesystem
2022-11-01T18:58:09.3482840Z if(ignore(fullpath)):
2022-11-01T18:58:09.3483313Z
2022-11-01T18:58:09.3484178ZFile 
"/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/edk2toollib/gitignore_parser.py",
 line 68, in 
2022-11-01T18:58:09.3485030Z return lambda file_path: 
any(r.match(file_path) for r in rules)
2022-11-01T18:58:09.3485564Z  
^^
2022-11-01T18:58:09.3486488ZFile 
"/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/edk2toollib/gitignore_parser.py",
 line 68, in 
2022-11-01T18:58:09.3487221Z return lambda file_path: 
any(r.match(file_path) for r in rules)
2022-11-01T18:58:09.3487773Z  ^^
2022-11-01T18:58:09.3488632ZFile 
"/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/site-packages/edk2toollib/gitignore_parser.py",
 line 163, in match
2022-11-01T18:58:09.3489366Z if re.search(self.regex, rel_path):
2022-11-01T18:58:09.3490472Z^^^
2022-11-01T18:58:09.3491099ZFile 
"/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/re/__init__.py", line 
176, in search
2022-11-01T18:58:09.3491662Z return _compile(pattern, flags).search(string)
2022-11-01T18:58:09.3492114Z
2022-11-01T18:58:09.3493037ZFile 
"/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/re/__init__.py", line 
294, in _compile
2022-11-01T18:58:09.3493661Z p = _compiler.compile(pattern, flags)
2022-11-01T18:58:09.3494047Z ^
2022-11-01T18:58:09.3494593ZFile 
"/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/re/_compiler.py", line 
743, in compile
2022-11-01T18:58:09.3495110Z p = _parser.parse(p, flags)
2022-11-01T18:58:09.3495570Z ^^^
2022-11-01T18:58:09.3496047ZFile 
"/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/re/_parser.py", line 
980, in parse
2022-11-01T18:58:09.3496665Z p = _parse_sub(source, state, flags & 
SRE_FLAG_VERBOSE, 0)
2022-11-01T18:58:09.3497100Z 
^^
2022-11-01T18:58:09.3497650ZFile 
"/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/re/_parser.py", line 
455, in _parse_sub
2022-11-01T18:58:09.3498286Z itemsappend(_parse(source, state, verbose, 
nested + 1,
2022-11-01T18:58:09.3498727Z 
^^
2022-11-01T18:58:09.3499272ZFile 
"/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/re/_parser.py", line 
841, in _parse
2022-11-01T18:58:09.3500126Z raise source.error('global flags not at the 
start '
2022-11-01T18:58:09.3500721Z  re.error: global flags not at the start of the 
expression at position 1
2022-11-01T18:58:09.3501035Z 
2022-11-01T18:58:09.3501615Z ERROR - --->Test Failed: Guid Check Test NO-TARGET 
returned 1 






> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Monday, October 31, 2022 5:52 PM
> To: Chiu, Chasel ; devel@edk2.groups.io
> Cc: Zeng, Star 
> Subject: RE: [PATCH] IntelFsp2Pkg: Update Function header to support
> IA32/X64.
> 
> Reviewed-by: Nate DeSimone 
> 
> > -Original Message-
> > From: Chiu, Chasel 
> > Sent: Thursday, October 27, 2022 7:58 PM
> > To: devel@edk2.groups.io
> > Cc: Chiu, Chasel ; Desimone, Nathaniel L
> > ; Zeng, Star 
> > Subject: [PATCH] IntelFsp2Pkg: Update Function header to support
> IA32/X64.
> >
> > REF: 

Re: [edk2-devel] [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync protocol support

2022-11-01 Thread Clark-williams, Zachary
Great thank you Vincent, I will add them to the protocol header file and send 
an updated patch today.

-Original Message-
From: Zimmer, Vincent  
Sent: Tuesday, November 1, 2022 10:39 AM
To: Clark-williams, Zachary ; Rabeda, Maciej 
; Luo, Heng ; Kuo, Scottie 
; Kuo, Ted ; Dutkiewicz, Michal 
; devel@edk2.groups.io; Wu, Jiaxin 
; Otcheretianski, Andrei 
Cc: Alappat, Paul ; Kasbekar, Saloni 
; Patil, Ajit 
Subject: RE: [edk2-devel] [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi 
profile sync protocol support

That's great
If these links are not already in the .h files of the patch I'd add them.
Typically the uefi networking code leverages uefi spec or ietf rfc's or other 
public collateral.  Letting folks know the background of these interfaces with 
a reference should help consumers IMHO Vincent

-Original Message-
From: Clark-williams, Zachary 
Sent: Tuesday, November 1, 2022 10:35 AM
To: Zimmer, Vincent ; Rabeda, Maciej 
; Luo, Heng ; Kuo, Scottie 
; Kuo, Ted ; Dutkiewicz, Michal 
; devel@edk2.groups.io; Wu, Jiaxin 
; Otcheretianski, Andrei 
Cc: Alappat, Paul ; Kasbekar, Saloni 
; Patil, Ajit 
Subject: RE: [edk2-devel] [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi 
profile sync protocol support

Hey Vincent,

The documentation for describing the features in the PR description can be 
found in the CSME documentation found on the public accessible intel link below.

OCR - 
https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=WordDocuments%2Foneclickrecovery.htm

KVM - 
https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=WordDocuments%2Foneclickrecovery.htm

Thanks,
Zack

-Original Message-
From: Zimmer, Vincent 
Sent: Monday, October 31, 2022 2:16 PM
To: Clark-williams, Zachary 
Subject: RE: [edk2-devel] [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi 
profile sync protocol support

Quick question

Are the features described in " Enables KVM and One Click Recovery WLAN 
capability with WiFi Profile Sync feature and protocol. Adding 
WiFiProfileSyncProtocol, which supports the profilesync driver operations for 
transferring WiFi profiles from AMT to the Supplicant. WiFiConnectionManager 
will check for the WifiProfileSyncProtocol and if found will operate on the 
premise of a One Click Recovery, or KVM flow with a Wifi profile provided by 
AMT." in a public document?  Things like concept of profile sync?  I'm guessing 
they are since Linux probably does the same in the intel iwl driver?

Vincent

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Clark-williams, 
Zachary
Sent: Monday, October 31, 2022 12:31 PM
To: Kinney, Michael D ; Rabeda, Maciej 
; Luo, Heng ; Kuo, Scottie 
; Kuo, Ted ; Dutkiewicz, Michal 
; devel@edk2.groups.io; 'Fu, Siyuan' 
; Wu, Jiaxin ; Otcheretianski, Andrei 

Cc: Alappat, Paul ; Kasbekar, Saloni 
; Patil, Ajit 
Subject: Re: [edk2-devel] [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi 
profile sync protocol support

++ visibility

-Original Message-
From: Clark-williams, Zachary
Sent: Friday, October 28, 2022 1:13 PM
To: Kinney, Michael D ; Rabeda, Maciej 
; Luo, Heng ; Kuo, Scottie 
; Kuo, Ted ; Dutkiewicz, Michal 
; devel@edk2.groups.io; Fu, Siyuan 
; Wu, Jiaxin ; Otcheretianski, Andrei 

Subject: RE: [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync 
protocol support

++More for reviewal!

-Original Message-
From: Clark-williams, Zachary
Sent: Friday, October 28, 2022 1:10 PM
To: Kinney, Michael D ; Rabeda, Maciej 
; Luo, Heng ; Kuo, Scottie 
; Kuo, Ted ; Dutkiewicz, Michal 
; devel@edk2.groups.io
Subject: RE: [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync 
protocol support

Thanks for the forward Mike!

Maciej and All, 

If you could please review the PR below. I would like to get this review 
completed within the week.

Thanks,
Zack

-Original Message-
From: Kinney, Michael D 
Sent: Thursday, October 27, 2022 1:09 PM
To: Rabeda, Maciej ; Kinney, Michael D 
; Clark-williams, Zachary 

Subject: FW: [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync 
protocol support

Hi Maciej,

Can you please help review these NetworkPkg changes.

I am not sure if you monitor your linux.intel.com account as closely as your 
intel.com account.

Thanks,

Mike

-Original Message-
From: Clark-williams, Zachary 
Sent: Thursday, October 27, 2022 12:33 PM
To: Kinney, Michael D 
Subject: FW: [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync 
protocol support

Hey Mike,

I'm struggling to get any feedback on this PR. Do you have any suggestions to 
get better visibility and responses so I can get this miving?

Thanks,
Zack

-Original Message-
From: Clark-williams, Zachary 
Sent: Thursday, October 27, 2022 12:31 PM
To: devel@edk2.groups.io
Cc: Zachary Clark-Williams ; Maciej Rabeda 
; Fu Siyuan ; Wu, Jiaxin 
; Otcheretianski, Andrei 
; Clark-williams, Zachary 

Subject: 

Re: [edk2-devel] [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync protocol support

2022-11-01 Thread Zimmer, Vincent
That's great
If these links are not already in the .h files of the patch I'd add them.
Typically the uefi networking code leverages uefi spec or ietf rfc's or other 
public collateral.  Letting folks know the background of these interfaces with 
a reference should help consumers IMHO
Vincent

-Original Message-
From: Clark-williams, Zachary  
Sent: Tuesday, November 1, 2022 10:35 AM
To: Zimmer, Vincent ; Rabeda, Maciej 
; Luo, Heng ; Kuo, Scottie 
; Kuo, Ted ; Dutkiewicz, Michal 
; devel@edk2.groups.io; Wu, Jiaxin 
; Otcheretianski, Andrei 
Cc: Alappat, Paul ; Kasbekar, Saloni 
; Patil, Ajit 
Subject: RE: [edk2-devel] [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi 
profile sync protocol support

Hey Vincent,

The documentation for describing the features in the PR description can be 
found in the CSME documentation found on the public accessible intel link below.

OCR - 
https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=WordDocuments%2Foneclickrecovery.htm

KVM - 
https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=WordDocuments%2Foneclickrecovery.htm

Thanks,
Zack

-Original Message-
From: Zimmer, Vincent 
Sent: Monday, October 31, 2022 2:16 PM
To: Clark-williams, Zachary 
Subject: RE: [edk2-devel] [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi 
profile sync protocol support

Quick question

Are the features described in " Enables KVM and One Click Recovery WLAN 
capability with WiFi Profile Sync feature and protocol. Adding 
WiFiProfileSyncProtocol, which supports the profilesync driver operations for 
transferring WiFi profiles from AMT to the Supplicant. WiFiConnectionManager 
will check for the WifiProfileSyncProtocol and if found will operate on the 
premise of a One Click Recovery, or KVM flow with a Wifi profile provided by 
AMT." in a public document?  Things like concept of profile sync?  I'm guessing 
they are since Linux probably does the same in the intel iwl driver?

Vincent

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Clark-williams, 
Zachary
Sent: Monday, October 31, 2022 12:31 PM
To: Kinney, Michael D ; Rabeda, Maciej 
; Luo, Heng ; Kuo, Scottie 
; Kuo, Ted ; Dutkiewicz, Michal 
; devel@edk2.groups.io; 'Fu, Siyuan' 
; Wu, Jiaxin ; Otcheretianski, Andrei 

Cc: Alappat, Paul ; Kasbekar, Saloni 
; Patil, Ajit 
Subject: Re: [edk2-devel] [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi 
profile sync protocol support

++ visibility

-Original Message-
From: Clark-williams, Zachary
Sent: Friday, October 28, 2022 1:13 PM
To: Kinney, Michael D ; Rabeda, Maciej 
; Luo, Heng ; Kuo, Scottie 
; Kuo, Ted ; Dutkiewicz, Michal 
; devel@edk2.groups.io; Fu, Siyuan 
; Wu, Jiaxin ; Otcheretianski, Andrei 

Subject: RE: [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync 
protocol support

++More for reviewal!

-Original Message-
From: Clark-williams, Zachary
Sent: Friday, October 28, 2022 1:10 PM
To: Kinney, Michael D ; Rabeda, Maciej 
; Luo, Heng ; Kuo, Scottie 
; Kuo, Ted ; Dutkiewicz, Michal 
; devel@edk2.groups.io
Subject: RE: [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync 
protocol support

Thanks for the forward Mike!

Maciej and All, 

If you could please review the PR below. I would like to get this review 
completed within the week.

Thanks,
Zack

-Original Message-
From: Kinney, Michael D 
Sent: Thursday, October 27, 2022 1:09 PM
To: Rabeda, Maciej ; Kinney, Michael D 
; Clark-williams, Zachary 

Subject: FW: [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync 
protocol support

Hi Maciej,

Can you please help review these NetworkPkg changes.

I am not sure if you monitor your linux.intel.com account as closely as your 
intel.com account.

Thanks,

Mike

-Original Message-
From: Clark-williams, Zachary 
Sent: Thursday, October 27, 2022 12:33 PM
To: Kinney, Michael D 
Subject: FW: [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync 
protocol support

Hey Mike,

I'm struggling to get any feedback on this PR. Do you have any suggestions to 
get better visibility and responses so I can get this miving?

Thanks,
Zack

-Original Message-
From: Clark-williams, Zachary 
Sent: Thursday, October 27, 2022 12:31 PM
To: devel@edk2.groups.io
Cc: Zachary Clark-Williams ; Maciej Rabeda 
; Fu Siyuan ; Wu, Jiaxin 
; Otcheretianski, Andrei 
; Clark-williams, Zachary 

Subject: [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync protocol 
support

From: Zachary Clark-Williams 

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

Enables KVM and One Click Recovery WLAN capability with WiFi Profile Sync 
feature and protocol. Adding WiFiProfileSyncProtocol, which supports the 
profilesync driver operations for transferring WiFi profiles from AMT to the 
Supplicant. WiFiConnectionManager will check for the WifiProfileSyncProtocol 
and if found will operate on the premise of a One 

Re: [edk2-devel] [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync protocol support

2022-11-01 Thread Clark-williams, Zachary
Hey Vincent,

The documentation for describing the features in the PR description can be 
found in the CSME documentation found on the public accessible intel link below.

OCR - 
https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=WordDocuments%2Foneclickrecovery.htm

KVM - 
https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=WordDocuments%2Foneclickrecovery.htm

Thanks,
Zack

-Original Message-
From: Zimmer, Vincent  
Sent: Monday, October 31, 2022 2:16 PM
To: Clark-williams, Zachary 
Subject: RE: [edk2-devel] [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi 
profile sync protocol support

Quick question

Are the features described in " Enables KVM and One Click Recovery WLAN 
capability with WiFi Profile Sync feature and protocol. Adding 
WiFiProfileSyncProtocol, which supports the profilesync driver operations for 
transferring WiFi profiles from AMT to the Supplicant. WiFiConnectionManager 
will check for the WifiProfileSyncProtocol and if found will operate on the 
premise of a One Click Recovery, or KVM flow with a Wifi profile provided by 
AMT." in a public document?  Things like concept of profile sync?  I'm guessing 
they are since Linux probably does the same in the intel iwl driver?

Vincent

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Clark-williams, 
Zachary
Sent: Monday, October 31, 2022 12:31 PM
To: Kinney, Michael D ; Rabeda, Maciej 
; Luo, Heng ; Kuo, Scottie 
; Kuo, Ted ; Dutkiewicz, Michal 
; devel@edk2.groups.io; 'Fu, Siyuan' 
; Wu, Jiaxin ; Otcheretianski, Andrei 

Cc: Alappat, Paul ; Kasbekar, Saloni 
; Patil, Ajit 
Subject: Re: [edk2-devel] [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi 
profile sync protocol support

++ visibility

-Original Message-
From: Clark-williams, Zachary
Sent: Friday, October 28, 2022 1:13 PM
To: Kinney, Michael D ; Rabeda, Maciej 
; Luo, Heng ; Kuo, Scottie 
; Kuo, Ted ; Dutkiewicz, Michal 
; devel@edk2.groups.io; Fu, Siyuan 
; Wu, Jiaxin ; Otcheretianski, Andrei 

Subject: RE: [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync 
protocol support

++More for reviewal!

-Original Message-
From: Clark-williams, Zachary
Sent: Friday, October 28, 2022 1:10 PM
To: Kinney, Michael D ; Rabeda, Maciej 
; Luo, Heng ; Kuo, Scottie 
; Kuo, Ted ; Dutkiewicz, Michal 
; devel@edk2.groups.io
Subject: RE: [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync 
protocol support

Thanks for the forward Mike!

Maciej and All, 

If you could please review the PR below. I would like to get this review 
completed within the week.

Thanks,
Zack

-Original Message-
From: Kinney, Michael D 
Sent: Thursday, October 27, 2022 1:09 PM
To: Rabeda, Maciej ; Kinney, Michael D 
; Clark-williams, Zachary 

Subject: FW: [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync 
protocol support

Hi Maciej,

Can you please help review these NetworkPkg changes.

I am not sure if you monitor your linux.intel.com account as closely as your 
intel.com account.

Thanks,

Mike

-Original Message-
From: Clark-williams, Zachary 
Sent: Thursday, October 27, 2022 12:33 PM
To: Kinney, Michael D 
Subject: FW: [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync 
protocol support

Hey Mike,

I'm struggling to get any feedback on this PR. Do you have any suggestions to 
get better visibility and responses so I can get this miving?

Thanks,
Zack

-Original Message-
From: Clark-williams, Zachary 
Sent: Thursday, October 27, 2022 12:31 PM
To: devel@edk2.groups.io
Cc: Zachary Clark-Williams ; Maciej Rabeda 
; Fu Siyuan ; Wu, Jiaxin 
; Otcheretianski, Andrei 
; Clark-williams, Zachary 

Subject: [PATCH v4] NetworkPkg/WifiProfileSync: Add WiFi profile sync protocol 
support

From: Zachary Clark-Williams 

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

Enables KVM and One Click Recovery WLAN capability with WiFi Profile Sync 
feature and protocol. Adding WiFiProfileSyncProtocol, which supports the 
profilesync driver operations for transferring WiFi profiles from AMT to the 
Supplicant. WiFiConnectionManager will check for the WifiProfileSyncProtocol 
and if found will operate on the premise of a One Click Recovery, or KVM flow 
with a Wifi profile provided by AMT.

Cc: Maciej Rabeda 
Cc: Fu Siyuan 
Cc: Wu Jiaxin 
Cc: Andrei Otcheretianski 

Signed-off-by: Zachary Clark-Williams 
---
 .../Protocol/WiFiProfileSyncProtocol.h|  83 
 NetworkPkg/NetworkPkg.dec |   3 +
 .../WifiConnectionManagerDxe.inf  |   3 +-
 .../WifiConnectionMgrConfigNVDataStruct.h |   2 +-
 .../WifiConnectionMgrDriver.c | 126 
 .../WifiConnectionMgrDxe.h|   4 +-
 .../WifiConnectionMgrImpl.c   | 193 --
 .../WifiConnectionMgrMisc.c   |  13 ++
 8 files changed, 367 insertions(+), 60 

Re: [edk2-devel] [Patch 1/1] CryptoPkg/Test: Simplify BaseCryptLib host based unit tests

2022-11-01 Thread Wang, Jian J


Reviewed-by: Jian J Wang 

Regards,
Jian

> -Original Message-
> From: Kinney, Michael D 
> Sent: Saturday, October 29, 2022 3:01 AM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen ; Wang, Jian J ;
> Lu, Xiaoyu1 ; Jiang, Guomin 
> Subject: [Patch 1/1] CryptoPkg/Test: Simplify BaseCryptLib host based unit 
> tests
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4130
> 
> Remove TestBaseCryptLibHostAccel.inf and instead use FILE_GUID
> override in DSC file to run the same unit test INF against
> OpensslLibFull.inf and OpensslLibFullAccel.inf
> 
> Cc: Jiewen Yao 
> Cc: Jian J Wang 
> Cc: Xiaoyu Lu 
> Cc: Guomin Jiang 
> Signed-off-by: Michael D Kinney 
> ---
>  CryptoPkg/Test/CryptoPkgHostUnitTest.dsc  | 10 +++-
>  .../TestBaseCryptLibHostAccel.inf | 56 ---
>  2 files changed, 7 insertions(+), 59 deletions(-)
>  delete mode 100644
> CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHostAccel.inf
> 
> diff --git a/CryptoPkg/Test/CryptoPkgHostUnitTest.dsc
> b/CryptoPkg/Test/CryptoPkgHostUnitTest.dsc
> index 369a1cb69939..3ed3e9b75d84 100644
> --- a/CryptoPkg/Test/CryptoPkgHostUnitTest.dsc
> +++ b/CryptoPkg/Test/CryptoPkgHostUnitTest.dsc
> @@ -20,7 +20,6 @@ [Defines]
>  !include UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
> 
>  [LibraryClasses]
> -  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFull.inf
>BaseCryptLib|CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.inf
> 
> MmServicesTableLib|MdePkg/Library/MmServicesTableLib/MmServicesTableLib
> .inf
> 
> SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizati
> onLib.inf
> @@ -33,8 +32,13 @@ [Components]
>#
># Build HOST_APPLICATION that tests the SampleUnitTest
>#
> -  CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHost.inf
> -  CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHostAccel.inf
> {
> +  CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHost.inf {
> +
> +  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFull.inf
> +  }
> +  CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHost.inf {
> +
> +  FILE_GUID = 3604CCB8-138C-488F-8045-18704F73E734
>  
>OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf
>}
> diff --git
> a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHostAccel.inf
> b/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHostAccel.inf
> deleted file mode 100644
> index 9d0fcfd3577c..
> ---
> a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHostAccel.inf
> +++ /dev/null
> @@ -1,56 +0,0 @@
> -## @file
> -# Host-based UnitTest for BaseCryptLib
> -#
> -# Copyright (c) Microsoft Corporation.
> -# Copyright (c) 2022, Intel Corporation. All rights reserved.
> -# SPDX-License-Identifier: BSD-2-Clause-Patent
> -##
> -
> -[Defines]
> -  INF_VERSION= 0x00010005
> -  BASE_NAME  = BaseCryptLibUnitTestHostAccel
> -  FILE_GUID  = B1AED64E-B53A-4D69-B0BA-60EEDAC47A6B
> -  MODULE_TYPE= HOST_APPLICATION
> -  VERSION_STRING = 1.0
> -
> -#
> -# The following information is for reference only and not required by the 
> build
> tools.
> -#
> -#  VALID_ARCHITECTURES   = IA32 X64
> -#
> -
> -[Sources]
> -  UnitTestMain.c
> -  BaseCryptLibUnitTests.c
> -  TestBaseCryptLib.h
> -  HashTests.c
> -  HmacTests.c
> -  BlockCipherTests.c
> -  RsaTests.c
> -  RsaPkcs7Tests.c
> -  Pkcs5Pbkdf2Tests.c
> -  AuthenticodeTests.c
> -  TSTests.c
> -  DhTests.c
> -  RandTests.c
> -  Pkcs7EkuTests.c
> -  OaepEncryptTests.c
> -  RsaPssTests.c
> -  ParallelhashTests.c
> -  HkdfTests.c
> -  AeadAesGcmTests.c
> -  BnTests.c
> -  EcTests.c
> -  X509Tests.c
> -
> -[Packages]
> -  MdePkg/MdePkg.dec
> -  CryptoPkg/CryptoPkg.dec
> -
> -[LibraryClasses]
> -  BaseLib
> -  DebugLib
> -  BaseCryptLib
> -  UnitTestLib
> -  MmServicesTableLib
> -  SynchronizationLib
> --
> 2.37.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#95826): https://edk2.groups.io/g/devel/message/95826
Mute This Topic: https://groups.io/mt/94633928/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 3/9] IntelFsp2Pkg: Remove UefiCpuLib from module INFs.

2022-11-01 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: Liu, Zhiguang 
> Sent: Tuesday, November 1, 2022 12:59 AM
> To: devel@edk2.groups.io
> Cc: Yu Pu ; Chiu, Chasel ;
> Desimone, Nathaniel L ; Zeng, Star
> 
> Subject: [PATCH v3 3/9] IntelFsp2Pkg: Remove UefiCpuLib from module
> INFs.
> 
> From: Yu Pu 
> 
> Because UefiCpuPkg/UefiCpuLib is merged to MdePkg/CpuLib, remove the
> dependency of UefiCpuLib.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Signed-off-by: Yu Pu 
> Reviewed-by: Chasel Chiu 
> ---
>  IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf | 1 -
>  IntelFsp2Pkg/FspSecCore/SecMain.h   | 1 -
>  IntelFsp2Pkg/IntelFsp2Pkg.dsc   | 1 -
>  IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc | 1 -
>  IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf | 1 -
> IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf | 1 -
>  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc | 1 -
>  7 files changed, 7 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> index f920f1f6d0..8029832235 100644
> --- a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> +++ b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> @@ -59,7 +59,6 @@
>FspCommonLib
>FspSecPlatformLib
>CpuLib
> -  UefiCpuLib
> 
>  [Pcd]
>gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase  ##
> CONSUMES
> diff --git a/IntelFsp2Pkg/FspSecCore/SecMain.h
> b/IntelFsp2Pkg/FspSecCore/SecMain.h
> index a09653da96..023deb7e2b 100644
> --- a/IntelFsp2Pkg/FspSecCore/SecMain.h
> +++ b/IntelFsp2Pkg/FspSecCore/SecMain.h
> @@ -21,7 +21,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
> 
>  typedef
> diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dsc b/IntelFsp2Pkg/IntelFsp2Pkg.dsc
> index 0713f0028d..f236a7010b 100644
> --- a/IntelFsp2Pkg/IntelFsp2Pkg.dsc
> +++ b/IntelFsp2Pkg/IntelFsp2Pkg.dsc
> @@ -27,7 +27,6 @@
>PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
>IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> 
> UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDeco
> mpressLib.inf
> -  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
> 
> 
> ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseR
> eportStatusCodeLibNull.inf
> 
> PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanc
> eLibNull.inf
> diff --git a/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
> b/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
> index 961576c9a7..3155812118 100644
> --- a/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
> +++ b/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
> @@ -107,7 +107,6 @@
> 
> PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePl
> atformHookLibNull.inf
> 
> PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanc
> eLibNull.inf
> 
> OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLib
> Null/OemHookStatusCodeLibNull.inf
> -  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
>  !if $(TARGET) == DEBUG
> 
> DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort
> .inf
> 
> SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPo
> rtLib16550.inf
> diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
> b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
> index 332509e0bc..0307ce0acc 100644
> --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
> +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
> @@ -38,7 +38,6 @@
>FspWrapperPlatformLib
>FspWrapperHobProcessLib
>CpuLib
> -  UefiCpuLib
>PeCoffGetEntryPointLib
>PeCoffExtraActionLib
>PerformanceLib
> diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
> b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
> index f9c2ffca1c..a7b28e56b5 100644
> --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
> +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
> @@ -39,7 +39,6 @@
>FspWrapperPlatformLib
>FspWrapperHobProcessLib
>CpuLib
> -  UefiCpuLib
>PeCoffGetEntryPointLib
>PeCoffExtraActionLib
>PerformanceLib
> diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> index b1fc2291c8..fe621244a6 100644
> --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> @@ -41,7 +41,6 @@
> 
> DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLi
> bNull.inf
> 
># UefiCpuPkg
> -  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
>LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
> 
># FSP Wrapper Lib
> --
> 2.31.1.windows.1



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

[edk2-devel] [PATCH v1 2/2] .github: Add initial CodeQL config and workflow files

2022-11-01 Thread Michael Kubacki
From: Michael Kubacki 

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

Adds initial support for enabling CodeQL Code Scanning in this
repository per the RFC:

  https://github.com/tianocore/edk2/discussions/3258

Adds the following new files:
  - .github/workflows/codql-analysis.yml - The main GitHub workflow
file used to setup CodeQL in the repo.
  - .github/codeql/codeql-config.yml - The main CodeQL configuration
file used to customize the queries and other resources the repo
is using for CodeQL.

Cc: Sean Brogan 
Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Michael Kubacki 
---
 .github/codeql/codeql-config.yml  |  30 ++
 .github/codeql/edk2.qls   |  12 +++
 .github/workflows/codeql-analysis.yml | 102 
 3 files changed, 144 insertions(+)

diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml
new file mode 100644
index ..3e27c2fb0d28
--- /dev/null
+++ b/.github/codeql/codeql-config.yml
@@ -0,0 +1,30 @@
+## @file
+# CodeQL configuration file for edk2.
+#
+# Copyright (c) Microsoft Corporation.
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+name: "CodeQL config"
+
+# The following line disables the default queries. This is used because we 
want to enable on query at a time by
+# explicitly specifying each query in a "queries" array as they are enabled.
+#
+# See the following for more information about adding custom queries:
+# 
https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-a-custom-configuration-file
+
+#disable-default-queries: true
+
+queries:
+  - name: EDK2 CodeQL Query List
+uses: ./.github/codeql/edk2.qls
+
+# We must specify a query for CodeQL to run. Until the first query is enabled, 
enable the security query suite but
+# exclude all problem levels from impacting the results. After the first query 
is enabled, this filter can be relaxed
+# to find the level of problems desired from the query.
+query-filters:
+- exclude:
+problem.severity:
+  - error
+  - warning
+  - recommendation
diff --git a/.github/codeql/edk2.qls b/.github/codeql/edk2.qls
new file mode 100644
index ..0efc7dca52db
--- /dev/null
+++ b/.github/codeql/edk2.qls
@@ -0,0 +1,12 @@
+---
+- description: EDK2 (C++) queries
+
+# Bring in all queries from the official cpp-queries suite so individual 
queries can be explicitly enabled.
+
+- queries: '.'
+  from: codeql/cpp-queries
+
+# Enable individual queries below.
+
+- include:
+id: cpp/conditionallyuninitializedvariable
diff --git a/.github/workflows/codeql-analysis.yml 
b/.github/workflows/codeql-analysis.yml
new file mode 100644
index ..c3227d015477
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,102 @@
+# @file
+# GitHub Workflow for CodeQL Analysis
+#
+# Copyright (c) Microsoft Corporation.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+name: "CodeQL"
+
+on:
+  push:
+branches:
+  - master
+  pull_request:
+branches:
+  - master
+paths-ignore:
+  - '**/*.bat'
+  - '**/*.md'
+  - '**/*.py'
+  - '**/*.rst'
+  - '**/*.sh'
+  - '**/*.txt'
+
+  schedule:
+# https://crontab.guru/#20_23_*_*_4
+- cron: '20 23 * * 4'
+
+jobs:
+  analyze:
+name: Analyze
+runs-on: ubuntu-latest
+permissions:
+  actions: read
+  contents: read
+  security-events: write
+
+strategy:
+  fail-fast: false
+  matrix:
+package: [
+  "ArmPkg",
+  "CryptoPkg",
+  "DynamicTablesPkg",
+  "FatPkg",
+  "FmpDevicePkg",
+  "IntelFsp2Pkg",
+  "IntelFsp2WrapperPkg",
+  "MdeModulePkg",
+  "MdePkg",
+  "PcAtChipsetPkg",
+  "PrmPkg",
+  "SecurityPkg",
+  "ShellPkg",
+  "SourceLevelDebugPkg",
+  "StandaloneMmPkg",
+  "UefiCpuPkg",
+  "UnitTestFrameworkPkg"]
+
+steps:
+- name: Checkout repository
+  uses: actions/checkout@v3
+
+# Initializes the CodeQL tools for scanning.
+- name: Initialize CodeQL
+  uses: github/codeql-action/init@v2
+  with:
+languages: 'cpp'
+# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 
'python', 'ruby' ]
+# Learn more about CodeQL language support at 
https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/
+config-file: ./.github/codeql/codeql-config.yml
+# Note: Add new queries to codeql-config.yml file as they are enabled.
+
+- name: Install/Upgrade pip Modules
+  run: pip install -r pip-requirements.txt --upgrade
+
+- name: Use Node.js 19.x
+  uses: actions/setup-node@v3
+  with:
+  node-version: 19.x
+
+- name: Update apt
+  run: sudo apt-get update
+
+- name: Install required tools
+  run: sudo apt-get install gcc g++ 

[edk2-devel] [PATCH v1 0/2] Enable Initial CodeQL Support

2022-11-01 Thread Michael Kubacki
From: Michael Kubacki 

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

This patch series enables initial CodeQL support within the edk2
repository.

After this patch, a CodeQL Analyze step will run on a subset of
edk2 packages in Pull Requests. The plan to scale additional CodeQL
queries is documented in the RFC and it is recommeneded to read
that for more detail:

https://github.com/tianocore/edk2/discussions/3258#discussioncomment-3682099

In summary, this change will:

- Main workflow file - .github/workflows/codeql-analysis.yml

1. Add a code scanning workflow with the CodeQL Analysis GitHub action
2. Build packages on Ubuntu with GCC5
3. Perform CodeQL analysis on the build results

- Custom configuration file - .github/codeql/codeql-config.yml

1. Specify the edk2 CodeQL query set
2. Apply a query filter to exclude errors, warnings, and
   recommendations

- edk2 query set file - .github/codeql/edk2.qls

1. Enable a single query: cpp/conditionallyuninitializedvariable

Per the RFC, this enables CodeQL but does not allow any alerts
by suppressing all of the severity levels.

When the code changes necessary to resolve problems found with
cpp/conditionallyuninitializedvariable are checked in, the severity
filter can be adjusted such that query is enabled.

Note that there is an occassional issue with filesystem paths at
the moment that prevents this change from being checked in. A
bug has been filed against CodeQL and some additional investigation
is being done.

https://github.com/github/codeql-action/issues/1338

In the meantime, this v1 patch series is being sent for feedback.

Cc: Andrew Fish 
Cc: Leif Lindholm 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Sean Brogan 
Signed-off-by: Michael Kubacki 

Michael Kubacki (2):
  Maintainers.txt: Add .github maintainers and reviewers
  .github: Add initial CodeQL config and workflow files

 .github/codeql/codeql-config.yml  |  30 ++
 .github/codeql/edk2.qls   |  12 +++
 .github/workflows/codeql-analysis.yml | 102 
 Maintainers.txt   |   6 ++
 4 files changed, 150 insertions(+)
 create mode 100644 .github/codeql/codeql-config.yml
 create mode 100644 .github/codeql/edk2.qls
 create mode 100644 .github/workflows/codeql-analysis.yml

-- 
2.28.0.windows.1



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




Re: [edk2-devel] [Patch 1/1] CryptoPkg/Test: Simplify BaseCryptLib host based unit tests

2022-11-01 Thread Yao, Jiewen
Reviewed-by: Jiewen Yao 

> -Original Message-
> From: Kinney, Michael D 
> Sent: Saturday, October 29, 2022 3:01 AM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen ; Wang, Jian J
> ; Lu, Xiaoyu1 ; Jiang,
> Guomin 
> Subject: [Patch 1/1] CryptoPkg/Test: Simplify BaseCryptLib host based unit
> tests
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4130
> 
> Remove TestBaseCryptLibHostAccel.inf and instead use FILE_GUID
> override in DSC file to run the same unit test INF against
> OpensslLibFull.inf and OpensslLibFullAccel.inf
> 
> Cc: Jiewen Yao 
> Cc: Jian J Wang 
> Cc: Xiaoyu Lu 
> Cc: Guomin Jiang 
> Signed-off-by: Michael D Kinney 
> ---
>  CryptoPkg/Test/CryptoPkgHostUnitTest.dsc  | 10 +++-
>  .../TestBaseCryptLibHostAccel.inf | 56 ---
>  2 files changed, 7 insertions(+), 59 deletions(-)
>  delete mode 100644
> CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHostAccel.i
> nf
> 
> diff --git a/CryptoPkg/Test/CryptoPkgHostUnitTest.dsc
> b/CryptoPkg/Test/CryptoPkgHostUnitTest.dsc
> index 369a1cb69939..3ed3e9b75d84 100644
> --- a/CryptoPkg/Test/CryptoPkgHostUnitTest.dsc
> +++ b/CryptoPkg/Test/CryptoPkgHostUnitTest.dsc
> @@ -20,7 +20,6 @@ [Defines]
>  !include UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
> 
>  [LibraryClasses]
> -  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFull.inf
> 
> BaseCryptLib|CryptoPkg/Library/BaseCryptLib/UnitTestHostBaseCryptLib.in
> f
> 
> MmServicesTableLib|MdePkg/Library/MmServicesTableLib/MmServicesTab
> leLib.inf
> 
> SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchron
> izationLib.inf
> @@ -33,8 +32,13 @@ [Components]
>#
># Build HOST_APPLICATION that tests the SampleUnitTest
>#
> -  CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHost.inf
> -
> CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHostAccel.i
> nf {
> +  CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHost.inf
> {
> +
> +  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFull.inf
> +  }
> +  CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHost.inf
> {
> +
> +  FILE_GUID = 3604CCB8-138C-488F-8045-18704F73E734
>  
>OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf
>}
> diff --git
> a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHostAcc
> el.inf
> b/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHostAcc
> el.inf
> deleted file mode 100644
> index 9d0fcfd3577c..
> ---
> a/CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibHostAcc
> el.inf
> +++ /dev/null
> @@ -1,56 +0,0 @@
> -## @file
> -# Host-based UnitTest for BaseCryptLib
> -#
> -# Copyright (c) Microsoft Corporation.
> -# Copyright (c) 2022, Intel Corporation. All rights reserved.
> -# SPDX-License-Identifier: BSD-2-Clause-Patent
> -##
> -
> -[Defines]
> -  INF_VERSION= 0x00010005
> -  BASE_NAME  = BaseCryptLibUnitTestHostAccel
> -  FILE_GUID  = B1AED64E-B53A-4D69-B0BA-60EEDAC47A6B
> -  MODULE_TYPE= HOST_APPLICATION
> -  VERSION_STRING = 1.0
> -
> -#
> -# The following information is for reference only and not required by the
> build tools.
> -#
> -#  VALID_ARCHITECTURES   = IA32 X64
> -#
> -
> -[Sources]
> -  UnitTestMain.c
> -  BaseCryptLibUnitTests.c
> -  TestBaseCryptLib.h
> -  HashTests.c
> -  HmacTests.c
> -  BlockCipherTests.c
> -  RsaTests.c
> -  RsaPkcs7Tests.c
> -  Pkcs5Pbkdf2Tests.c
> -  AuthenticodeTests.c
> -  TSTests.c
> -  DhTests.c
> -  RandTests.c
> -  Pkcs7EkuTests.c
> -  OaepEncryptTests.c
> -  RsaPssTests.c
> -  ParallelhashTests.c
> -  HkdfTests.c
> -  AeadAesGcmTests.c
> -  BnTests.c
> -  EcTests.c
> -  X509Tests.c
> -
> -[Packages]
> -  MdePkg/MdePkg.dec
> -  CryptoPkg/CryptoPkg.dec
> -
> -[LibraryClasses]
> -  BaseLib
> -  DebugLib
> -  BaseCryptLib
> -  UnitTestLib
> -  MmServicesTableLib
> -  SynchronizationLib
> --
> 2.37.1.windows.1



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




Re: [edk2-devel] [PATCH 1/1] Platform/ARM: Bump Dsdt/Ssdt ACPI table revision

2022-11-01 Thread Sami Mujawar
Pushed as 4bb490aad718..d13436b384fc

Thanks.

Regards,

Sami Mujawar


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




Re: [edk2-devel] [PATCH edk2-platforms 2/2] Maintainers.txt: update email address for Graeme Gregory

2022-11-01 Thread Graeme Gregory
On Thu, Oct 27, 2022 at 12:05:09PM +0100, Leif Lindholm wrote:
> From: Leif Lindholm 
> 
> Signed-off-by: Leif Lindholm 
> Cc: Graeme Gregory 
> Cc: Graeme Gregory 
> Cc: Michael D Kinney 
> Cc: Ard Biesheuvel 
> ---
>  Maintainers.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index 1a5b6828a867..bbf9c00c 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -355,7 +355,7 @@ F: Platform/Qemu/SbsaQemu/
>  F: Silicon/Qemu/SbsaQemu/
>  M: Ard Biesheuvel 
>  M: Leif Lindholm 
> -R: Graeme Gregory 
> +R: Graeme Gregory 
>  R: Radoslaw Biernacki 
>  
>  Raspberry Pi platforms and silicon

Acked-by: Graeme Gregory 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#95819): https://edk2.groups.io/g/devel/message/95819
Mute This Topic: https://groups.io/mt/94601215/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] ShellPkg/AcpiView: APMT Parser

2022-11-01 Thread Sami Mujawar

Hi Jeff,

I have two minor suggestions marked inline as [SAMI].

Other than those this patch looks good to me.

With that updated,

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

On 27/10/2022 03:40 pm, Jeff Brasen via groups.io wrote:

Add a new parser for the Arm Performance Monitoring Unit Table.

The APMT table describes the properties of PMU support

implemented by components in an Arm-based system.



Signed-off-by: Jeff Brasen

---

  .../UefiShellAcpiViewCommandLib/AcpiParser.h  |  21 

  .../Parsers/Apmt/ApmtParser.c | 105 ++

  .../UefiShellAcpiViewCommandLib.c |   1 +

  .../UefiShellAcpiViewCommandLib.inf   |   1 +

  4 files changed, 128 insertions(+)

  create mode 100644 
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Apmt/ApmtParser.c



diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h

index db8c88f6df..6a1de4e12b 100644

--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h

+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h

@@ -531,6 +531,27 @@ ParseAcpiAest (

IN UINT8AcpiTableRevision

);

  


+/**

+  This function parses the ACPI APMT table.

+  When trace is enabled this function parses the APMT table and

+  traces the ACPI table fields.

+

+  This function also performs validation of the ACPI table fields.

+

+  @param [in] Trace  If TRUE, trace the ACPI fields.

+  @param [in] PtrPointer to the start of the buffer.

+  @param [in] AcpiTableLengthLength of the ACPI table.

+  @param [in] AcpiTableRevision  Revision of the ACPI table.

+**/

+VOID

+EFIAPI

+ParseAcpiApmt (

+  IN BOOLEAN  Trace,

+  IN UINT8*Ptr,

+  IN UINT32   AcpiTableLength,

+  IN UINT8AcpiTableRevision

+  );

+

  /**

This function parses the ACPI BGRT table.

When trace is enabled this function parses the BGRT table and

diff --git 
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Apmt/ApmtParser.c 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Apmt/ApmtParser.c

new file mode 100644

index 00..b036cd12d3

--- /dev/null

+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Apmt/ApmtParser.c

@@ -0,0 +1,105 @@

+/** @file

+  APMT table parser

+

+  Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.

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

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

+

+  @par Reference(s):

+- ACPI 6.2 Specification - Errata A, September 2017

+**/

+

+#include 

+#include 

+#include 

+#include "AcpiParser.h"

+#include "AcpiTableParser.h"

+

+// Local variables

+STATIC ACPI_DESCRIPTION_HEADER_INFO  AcpiHdrInfo;

+STATIC CONST UINT16  *NodeLength;

+

+/**

+  An ACPI_PARSER array describing the ACPI APMT Table.

+**/

+STATIC CONST ACPI_PARSER  ApmtParser[] = {

+  PARSE_ACPI_HEADER ()

+};

+

+/**

+  An ACPI_PARSER array describing the ACPI Arm PMU Node.

+**/

+STATIC CONST ACPI_PARSER  ArmPmuNodeParser[] = {

+  { L"Length",   2, 0,  L"0x%x",  NULL, (VOID **), 
NULL, NULL },

+  { L"Node flags",   1, 2,  L"0x%x",  NULL, NULL, 
NULL, NULL },

+  { L"Node type",1, 3,  L"0x%x",  NULL, NULL, 
NULL, NULL },

+  { L"Identifier",   4, 4,  L"0x%x",  NULL, NULL, 
NULL, NULL },

+  { L"Node Instance primary",8, 8,  L"0x%lx", NULL, NULL, 
NULL, NULL },

+  { L"Node Instance secondary",  4, 16, L"0x%x",  NULL, NULL, 
NULL, NULL },

+  { L"Base address 0",   8, 20, L"0x%lx", NULL, NULL, 
NULL, NULL },

+  { L"Base address 1",   8, 28, L"0x%lx", NULL, NULL, 
NULL, NULL },

+  { L"Overflow interrupt",   4, 36, L"0x%x",  NULL, NULL, 
NULL, NULL },

+  { L"Reserved1",4, 40, L"0x%x",  NULL, NULL, 
NULL, NULL },

+  { L"Overflow interrupt flags", 4, 44, L"0x%x",  NULL, NULL, 
NULL, NULL },

+  { L"Processor affinity",   4, 48, L"0x%x",  NULL, NULL, 
NULL, NULL },

+  { L"Implementation ID",4, 52, L"0x%x",  NULL, NULL, 
NULL, NULL }

+};

+

+/**

+  This function parses the ACPI APMT table.

+  When trace is enabled this function parses the APMT table and

+  traces the ACPI table fields.

+

+  This function also performs validation of the ACPI table fields.

+

+  @param [in] Trace  If TRUE, trace the ACPI fields.

+  @param [in] PtrPointer to the start of the buffer.

+  @param [in] AcpiTableLengthLength of the ACPI table.

+  @param [in] AcpiTableRevision  Revision of the ACPI table.

+**/

+VOID

+EFIAPI

+ParseAcpiApmt (

+  IN BOOLEAN  Trace,

+  IN UINT8*Ptr,

+  IN UINT32   AcpiTableLength,

+  IN UINT8AcpiTableRevision

+  )

+{


Re: [edk2-devel] [PATCH 1/2] MdePkg/IndustryStandard: add definitions for ACPI APMT

2022-11-01 Thread Sami Mujawar

Hi Jeff,

Thank you for this patch.

These changes look good to me.

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

On 27/10/2022 03:40 pm, Jeff Brasen via groups.io wrote:

This adds #defines and struct typedefs for the various node types in

the  ACPI Arm Performance Monitoring Unit (APMT) table.



Signed-off-by: Jeff Brasen 

---

  MdePkg/Include/IndustryStandard/Acpi64.h  |  5 ++

  .../ArmPerformanceMonitoringUnitTable.h   | 69 +++

  2 files changed, 74 insertions(+)

  create mode 100644 
MdePkg/Include/IndustryStandard/ArmPerformanceMonitoringUnitTable.h



diff --git a/MdePkg/Include/IndustryStandard/Acpi64.h 
b/MdePkg/Include/IndustryStandard/Acpi64.h

index fe5ebfac2b..575ca0430c 100644

--- a/MdePkg/Include/IndustryStandard/Acpi64.h

+++ b/MdePkg/Include/IndustryStandard/Acpi64.h

@@ -2847,6 +2847,11 @@ typedef struct {

  ///

  #define EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE  
SIGNATURE_32('A', 'P', 'I', 'C')

  


+///

+/// "APMT" Arm Performance Monitoring Unit Table

+///

+#define EFI_ACPI_6_4_ARM_PERFORMANCE_MONITORING_UNIT_TABLE_SIGNATURE  
SIGNATURE_32('A', 'P', 'M', 'T')

+

  ///

  /// "BERT" Boot Error Record Table

  ///

diff --git 
a/MdePkg/Include/IndustryStandard/ArmPerformanceMonitoringUnitTable.h 
b/MdePkg/Include/IndustryStandard/ArmPerformanceMonitoringUnitTable.h

new file mode 100644

index 00..fe7084cffd

--- /dev/null

+++ b/MdePkg/Include/IndustryStandard/ArmPerformanceMonitoringUnitTable.h

@@ -0,0 +1,69 @@

+/** @file

+  ACPI Arm Performance Monitoring Unit (APMT) table

+  as specified in ARM spec DEN0117

+

+  Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.

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

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

+**/

+

+#ifndef ARM_PERFORMANCE_MONITORING_UNIT_TABLE_H_

+#define ARM_PERFORMANCE_MONITORING_UNIT_TABLE_H_

+

+#include 

+

+#pragma pack(1)

+

+///

+/// Arm Performance Monitoring Unit (APMT) tabl

+///

+typedef struct {

+  EFI_ACPI_DESCRIPTION_HEADERHeader;

+} EFI_ACPI_ARM_PERFORMANCE_MONITORING_UNIT_TABLE_HEADER;

+

+///

+/// APMT Revision (as defined in DEN0117.)

+///

+#define EFI_ACPI_ARM_PERFORMANCE_MONITORING_UNIT_TABLE_REVISION  0x00

+

+///

+/// Arm PMU Node Structure

+///

+

+// Node Flags

+#define EFI_ACPI_APMT_DUAL_PAGE_EXTENSION_SUPPORTED  BIT0

+#define EFI_ACPI_APMT_PROCESSOR_AFFINITY_TYPE_CONTAINER  BIT1

+#define EFI_ACPI_APMT_PROCESSOR_AFFINITY_TYPE_PROCESSOR  0 // BIT 1

+#define EFI_ACPI_APMT_64BIT_SINGLE_COPY_ATOMICITY_SUPPORTED  BIT2

+

+// Interrupt Flags

+#define EFI_ACPI_APMT_INTERRUPT_MODE_EDGE_TRIGGERED   BIT0

+#define EFI_ACPI_APMT_INTERRUPT_MODE_LEVEL_TRIGGERED  0 // BIT 0

+#define EFI_ACPI_APMT_INTERRUPT_TYPE_WIRED0 // BIT 1

+

+// Node Type

+#define EFI_ACPI_APMT_NODE_TYPE_MEMORY_CONTROLLER  0x00

+#define EFI_ACPI_APMT_NODE_TYPE_SMMU   0x01

+#define EFI_ACPI_APMT_NODE_TYPE_PCIE_ROOT_COMPLEX  0x02

+#define EFI_ACPI_APMT_NODE_TYPE_ACPI_DEVICE0x03

+#define EFI_ACPI_APMT_NODE_TYPE_CPU_CACHE  0x04

+

+typedef struct {

+  UINT16Length;

+  UINT8 NodeFlags;

+  UINT8 NodeType;

+  UINT32Identifier;

+  UINT64NodeInstancePrimary;

+  UINT32NodeInstanceSecondary;

+  UINT64BaseAddress0;

+  UINT64BaseAddress1;

+  UINT32OverflowInterrupt;

+  UINT32Reserved1;

+  UINT32OverflowInterruptFlags;

+  UINT32ProcessorAffinity;

+  UINT32ImplementationId;

+} EFI_ACPI_ARM_PERFORMANCE_MONITORING_UNIT_NODE;

+

+#pragma pack()

+

+#endif




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




Re: [edk2-devel] [PATCH V5 00/10] Introduce Lazy-accept for Tdx guest

2022-11-01 Thread Yao, Jiewen
Merged https://github.com/tianocore/edk2/pull/3572

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Yao,
> Jiewen
> Sent: Tuesday, November 1, 2022 5:00 PM
> To: Xu, Min M ; devel@edk2.groups.io
> Cc: Gao, Zhichao ; Kinney, Michael D
> ; Liu, Zhiguang ;
> Wang, Jian J ; Gao, Liming
> ; Ni, Ray ; Aktas, Erdem
> ; Gerd Hoffmann ; James
> Bottomley ; Tom Lendacky
> ; Gao, Jiaqi 
> Subject: Re: [edk2-devel] [PATCH V5 00/10] Introduce Lazy-accept for Tdx
> guest
> 
> For OvmfPkg, reviewed-by: Jiewen Yao 
> 
> > -Original Message-
> > From: Xu, Min M 
> > Sent: Tuesday, November 1, 2022 1:14 PM
> > To: devel@edk2.groups.io
> > Cc: Xu, Min M ; Gao, Zhichao
> > ; Kinney, Michael D
> > ; Liu, Zhiguang ;
> > Wang, Jian J ; Gao, Liming
> > ; Ni, Ray ; Aktas, Erdem
> > ; Gerd Hoffmann ;
> James
> > Bottomley ; Yao, Jiewen ;
> > Tom Lendacky ; Gao, Jiaqi
> > 
> > Subject: [PATCH V5 00/10] Introduce Lazy-accept for Tdx guest
> >
> > RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3937
> >
> > UnacceptedMemory is one of the four defined types of TD memory in
> Intel
> > TDX guest. TDVF must invoke TDCALL [TDG.MEM.PAGE.ACCEPT] the
> > unaccepted
> > memory before use it. See [TDVF] Section 7.1.
> > TDVF: https://www.intel.com/content/dam/develop/external/us/en/
> > documents/tdx-virtual-firmware-design-guide-rev-1.01.pdf
> >
> > It is a time-consuming task which impacts the boot performance badly.
> > One of the mitigation is the lazy-accept mechanism. That the whole
> system
> > memory is divided into 2 parts, one is accepted in bios phase, the other
> > is tagged as EfiGcdMemoryTypeUnaccepted and OS will handle these
> > "unaccepted" memories.
> > See "UEFI Spec v2.9 Table 7-5 Memory Type Usage before
> > ExitBootServices()"
> >
> > As the first stage we accept all the memory under 4G. Please see the
> > discussion in https://edk2.groups.io/g/devel/message/93086
> >
> > This patch-set is related to code first, so there is a edk2-staging branch.
> > Please see https://github.com/tianocore/edk2-staging/tree/TDVF
> >
> > Patch 1-4:
> >   Introduce lazy-accept related definitions.
> >
> > Patch 5-6:
> >   Update Dxe and shell for unaccepted memory.
> >
> > Patch 7:
> >   Update OvmfPkg for unaccepted memory.
> >
> > Patch 8 - 10:
> >   Introduce EfiMemoryAcceptProtocol and realize it in TdxDxe.
> >
> > Code: https://github.com/mxu9/edk2/tree/lazyaccept.v5
> >
> > v5 changes:
> >  - Rebase the patch-set to commit df7ce74e6c75.
> >  - Add reviewed-by in MdeModulePkg/MdePkg related
> patches(#1/2/4/5/8).
> >  - Add acked-by in patch#7.
> >
> > v4 changes:
> >  - To follow the name convention of EDKII code first, the name of
> >EFI_RESOURCE_MEMORY_UNACCEPTED is updated to
> >BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED.
> >  - Remove the definition of MaxAcceptedMemoryAddress because in
> > current
> >stage we will accept all the memory under 4G. So
> >MaxAcceptedMemoryAddress is not useable in this assumption.
> >  - Because this is related to code first, there is edk2-staging branch.
> >The branch link is attached.
> >https://github.com/tianocore/edk2-staging/tree/TDVF
> >
> > v3 changes:
> >  - As the first stage we accept all the memory under 4G. See the
> >discussion in https://edk2.groups.io/g/devel/message/93086
> >  - "Pool and page functions accept memory when OOM occurs" is dropped.
> >See the discussion in https://edk2.groups.io/g/devel/message/93086
> >  - PlatformAdjustSystemMemorySizeBelow4gbForLazyAccep is deleted
> >because in current stage we accept all the memory under 4G.
> >
> > v2 changes:
> >  - Fix a typo that change EfiUnacceptedMemory to
> > EfiUnacceptedMemoryType.
> >  - Define EFI_GCD_MEMORY_TYPE_UNACCEPTED in PrePiDxeCis.h because
> it
> > has
> >not been defined in PI spec.
> >  - AllocatePages should return EFI_INVALID_PARAMETERS if input
> > MemoryType
> >is EfiUnacceptedMemoryType.
> >  - Use EDKII_ prefix instead of EFI_ prefix in the protocol name of
> >EDKII_MEMORY_ACCEPT_PROTOCOL_GUID. Because this protocol is not
> > EFI
> >defined.
> >  - Accept memory under 4G even if the PcdLazyAcceptPartialMemorySize
> is
> >bigger than 4G. So with this setting, even if the
> >PcdLazyAcceptPartialMemorySize is 0 (which means to accept all
> >memories), only the memory under 4G will be accepted. This is to
> >optimize the performance.
> >
> > Cc: Zhichao Gao 
> > Cc: Michael D Kinney 
> > Cc: Zhiguang Liu 
> > Cc: Jian J Wang 
> > Cc: Liming Gao 
> > Cc: Ray Ni 
> > Cc: Erdem Aktas 
> > Cc: Gerd Hoffmann 
> > Cc: James Bottomley 
> > Cc: Jiewen Yao 
> > Cc: Tom Lendacky 
> > Signed-off-by: Jiaqi Gao 
> > Signed-off-by: Min Xu 
> >
> > Jiaqi Gao (1):
> >   MdePkg: The prototype definition of EdkiiMemoryAcceptProtocol
> >
> > Min M Xu (9):
> >   MdeModulePkg: Add PrePiHob.h
> >   MdePkg: Increase EFI_RESOURCE_MAX_MEMORY_TYPE
> >   OvmfPkg: Use BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED defined
> in
> > 

Re: [edk2-devel] [PATCH V5 00/10] Introduce Lazy-accept for Tdx guest

2022-11-01 Thread Yao, Jiewen
For OvmfPkg, reviewed-by: Jiewen Yao 

> -Original Message-
> From: Xu, Min M 
> Sent: Tuesday, November 1, 2022 1:14 PM
> To: devel@edk2.groups.io
> Cc: Xu, Min M ; Gao, Zhichao
> ; Kinney, Michael D
> ; Liu, Zhiguang ;
> Wang, Jian J ; Gao, Liming
> ; Ni, Ray ; Aktas, Erdem
> ; Gerd Hoffmann ; James
> Bottomley ; Yao, Jiewen ;
> Tom Lendacky ; Gao, Jiaqi
> 
> Subject: [PATCH V5 00/10] Introduce Lazy-accept for Tdx guest
> 
> RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3937
> 
> UnacceptedMemory is one of the four defined types of TD memory in Intel
> TDX guest. TDVF must invoke TDCALL [TDG.MEM.PAGE.ACCEPT] the
> unaccepted
> memory before use it. See [TDVF] Section 7.1.
> TDVF: https://www.intel.com/content/dam/develop/external/us/en/
> documents/tdx-virtual-firmware-design-guide-rev-1.01.pdf
> 
> It is a time-consuming task which impacts the boot performance badly.
> One of the mitigation is the lazy-accept mechanism. That the whole system
> memory is divided into 2 parts, one is accepted in bios phase, the other
> is tagged as EfiGcdMemoryTypeUnaccepted and OS will handle these
> "unaccepted" memories.
> See "UEFI Spec v2.9 Table 7-5 Memory Type Usage before
> ExitBootServices()"
> 
> As the first stage we accept all the memory under 4G. Please see the
> discussion in https://edk2.groups.io/g/devel/message/93086
> 
> This patch-set is related to code first, so there is a edk2-staging branch.
> Please see https://github.com/tianocore/edk2-staging/tree/TDVF
> 
> Patch 1-4:
>   Introduce lazy-accept related definitions.
> 
> Patch 5-6:
>   Update Dxe and shell for unaccepted memory.
> 
> Patch 7:
>   Update OvmfPkg for unaccepted memory.
> 
> Patch 8 - 10:
>   Introduce EfiMemoryAcceptProtocol and realize it in TdxDxe.
> 
> Code: https://github.com/mxu9/edk2/tree/lazyaccept.v5
> 
> v5 changes:
>  - Rebase the patch-set to commit df7ce74e6c75.
>  - Add reviewed-by in MdeModulePkg/MdePkg related patches(#1/2/4/5/8).
>  - Add acked-by in patch#7.
> 
> v4 changes:
>  - To follow the name convention of EDKII code first, the name of
>EFI_RESOURCE_MEMORY_UNACCEPTED is updated to
>BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED.
>  - Remove the definition of MaxAcceptedMemoryAddress because in
> current
>stage we will accept all the memory under 4G. So
>MaxAcceptedMemoryAddress is not useable in this assumption.
>  - Because this is related to code first, there is edk2-staging branch.
>The branch link is attached.
>https://github.com/tianocore/edk2-staging/tree/TDVF
> 
> v3 changes:
>  - As the first stage we accept all the memory under 4G. See the
>discussion in https://edk2.groups.io/g/devel/message/93086
>  - "Pool and page functions accept memory when OOM occurs" is dropped.
>See the discussion in https://edk2.groups.io/g/devel/message/93086
>  - PlatformAdjustSystemMemorySizeBelow4gbForLazyAccep is deleted
>because in current stage we accept all the memory under 4G.
> 
> v2 changes:
>  - Fix a typo that change EfiUnacceptedMemory to
> EfiUnacceptedMemoryType.
>  - Define EFI_GCD_MEMORY_TYPE_UNACCEPTED in PrePiDxeCis.h because it
> has
>not been defined in PI spec.
>  - AllocatePages should return EFI_INVALID_PARAMETERS if input
> MemoryType
>is EfiUnacceptedMemoryType.
>  - Use EDKII_ prefix instead of EFI_ prefix in the protocol name of
>EDKII_MEMORY_ACCEPT_PROTOCOL_GUID. Because this protocol is not
> EFI
>defined.
>  - Accept memory under 4G even if the PcdLazyAcceptPartialMemorySize is
>bigger than 4G. So with this setting, even if the
>PcdLazyAcceptPartialMemorySize is 0 (which means to accept all
>memories), only the memory under 4G will be accepted. This is to
>optimize the performance.
> 
> Cc: Zhichao Gao 
> Cc: Michael D Kinney 
> Cc: Zhiguang Liu 
> Cc: Jian J Wang 
> Cc: Liming Gao 
> Cc: Ray Ni 
> Cc: Erdem Aktas 
> Cc: Gerd Hoffmann 
> Cc: James Bottomley 
> Cc: Jiewen Yao 
> Cc: Tom Lendacky 
> Signed-off-by: Jiaqi Gao 
> Signed-off-by: Min Xu 
> 
> Jiaqi Gao (1):
>   MdePkg: The prototype definition of EdkiiMemoryAcceptProtocol
> 
> Min M Xu (9):
>   MdeModulePkg: Add PrePiHob.h
>   MdePkg: Increase EFI_RESOURCE_MAX_MEMORY_TYPE
>   OvmfPkg: Use BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED defined in
> MdeModulePkg
>   MdePkg: Add UEFI Unaccepted memory definition
>   MdeModulePkg: Update Dxe to handle unaccepted memory type
>   ShellPkg: Update shell command memmap to show unaccepted memory
>   OvmfPkg: Introduce lazy accept in PlatformInitLib and PlatformPei
>   OvmfPkg: Realize EdkiiMemoryAcceptProtocol in TdxDxe
>   OvmfPkg: Call gEdkiiMemoryAcceptProtocolGuid to accept pages
> 
>  MdeModulePkg/Core/Dxe/Gcd/Gcd.c   |   6 +
>  MdeModulePkg/Core/Dxe/Mem/Page.c  |  63 ---
>  MdeModulePkg/Include/Pi/PrePiDxeCis.h |  25 +
>  MdeModulePkg/Include/Pi/PrePiHob.h|  20 
>  MdePkg/Include/Pi/PiDxeCis.h  |  10 +-
>  MdePkg/Include/Pi/PiHob.h

Re: [edk2-devel] [PATCH v9 00/19] Add Raw algorithm support using Arm TRNG interface

2022-11-01 Thread Yao, Jiewen
Thanks for the update.

For SecurityPkg (11~18), Acked-by: Jiewen Yao 
Since the update is for AARCH64, I recommend to have an ARM people to give 
Reviewed-by.

Thank you
Yao Jiewen


> -Original Message-
> From: pierre.gond...@arm.com 
> Sent: Friday, October 28, 2022 11:33 PM
> To: devel@edk2.groups.io
> Cc: Sami Mujawar ; Leif Lindholm
> ; Ard Biesheuvel
> ; Rebecca Cran ; Kinney,
> Michael D ; Gao, Liming
> ; Yao, Jiewen ; Wang,
> Jian J 
> Subject: [PATCH v9 00/19] Add Raw algorithm support using Arm TRNG
> interface
> 
> From: Pierre Gondois 
> 
> Bugzilla: Bug 3668 (https://bugzilla.tianocore.org/show_bug.cgi?id=3668)
> 
> The Arm True Random Number Generator Firmware, Interface 1.0,
> specification
> defines an interface between an Operating System (OS) executing at EL1 and
> Firmware (FW) exposing a conditioned entropy source that is provided by a
> TRNG back end.
> This patch-set:
> - defines an Arm TRNG library class that provides an interface to access
>   the entropy source on a platform.
> - implements an Arm TRNG library instance that uses the Arm FW-TRNG
>   interface.
> - Adds RawAlgorithm support to RngDxe for Arm architecture using the Arm
>   TRNG interface.
> - Enables RNG support using Arm TRNG interface for Kvmtool Guest/Virtual
>   firmware.
> 
> This patch-set is based on the v2 from Sami Mujawar:
> [PATCH v2 0/8] Add Raw algorithm support using Arm FW-TRNG interface
> v2:
> https://edk2.groups.io/g/devel/message/83775
> v3:
> https://edk2.groups.io/g/devel/message/90845
> https://github.com/PierreARM/edk2/tree/Arm_Trng_v3
> v4:
> https://github.com/PierreARM/edk2/tree/Arm_Trng_v4
> v5:
> https://github.com/PierreARM/edk2/tree/Arm_Trng_v5
> v6:
> https://github.com/PierreARM/edk2/tree/Arm_Trng_v6
> v7:
> https://github.com/PierreARM/edk2/tree/Arm_Trng_v7
> v8:
> https://github.com/PierreARM/edk2/tree/Arm_Trng_v8
> v9:
> https://github.com/PierreARM/edk2/tree/Arm_Trng_v9
> 
> v9:
>  - Added BaseArmTrngLibNull as default in MdePkg/MdeLibs.dsc.inc. [Liming]
>  - Renamed TrngLib to ArmTrngLib and updated documentation, commit
>messages, function names accordingly. [Jiewen, Leif]
> v8:
>  - Added Reviewed-by/Acked-by from Leif on ArmPkg/SecurityPkg
>patches. [Leif]
>  - Renamed FID_TRNG_* macros to ARM_SMC_ID_TRNG_*. [Leif]
> v7:
>  - Removed Reviewed-by from Leif.
>  - Remove Sami's Signed-off.
> V6:
>  - Added my signed-off on patches authored by Sami. [Leif]
>  - New patch to make it easier to add new libraries in alphabetical
>order: ArmPkg: Sort HVC/SMC section alphbetically in ArmPkg.dsc [Leif]
>  - Renmaed ArmHvcNullLib to ArmHvcLibNull. [Leif]
>  - Added RISCV64 to the list of VALID_ARCHITECTURES for BaseTrngLibNull.
> [Leif]
>  - Removed unnecessary space in function parameter documentation
>('[in, out]'). [Rebecca]
>  - Updated INF_VERSION to latest spec (1.29) for new libraries. [Rebecca]
>  - Dropped the following patches [Leif]:
>   - ArmPkg/ArmLib: Add ArmHasRngExt()
>   - ArmPkg/ArmLib: Add ArmReadIdIsar0() helper
>   - MdePkg/BaseRngLib: Rename ArmReadIdIsar0() to ArmGetFeatRng()
> V5:
>  - Removed references in Trnglib.h to 'Special Publication'
>800-90A and 800-90C, and only reference 'Arm True Random
>Number Generator Firmware, Interface 1.0' in the Arm
>implementation of the TrngLib. [Jiewen]
> V4:
>  - Removed dependencies on ArmPkg and dropped patch:
> [PATCH v3 12/22] SecurityPkg: Update Securitypkg.ci.yaml
>[Jiewen]
>  - Use a dynamically allocated array to hold available algorithms.
>The array is freed in a new UNLOAD_IMAGE function and
>allocated in arch specific implementations of
>GetAvailableAlgorithms(), available in AArch64/AArch64Algo.c
>and Arm/ArmAlgo.c.
>  - Correctly reference gEfiRngAlgorithmSp80090Ctr256Guid
>Guid by copying its address (add missing '&'). [Jiewen]
> V3:
>  - Address Leif's comment (moving definitions, optimizations, ...)
>  - Add ArmMonitorLib to choose Hvc/Smc conduit depending on a Pcd.
>  - Re-factor some parts of SecurityPkg/RngDxe/ to ease the addition
>of new algorithms.
>  - Add ArmHasRngExt() function to check Arm's FEAT_RNG extension.
> V2:
>  - Updates TrngLib definitions to use RETURN_STATUS as the return type
>from the interface functions as TrngLib is base type library.
>  - Drops the patch "MdePkg: Add definition for NULL GUID" as there is
>already an equivalent definition provided by gZeroGuid. Thus, the
>use of gNullGuid has been replaced with gZeroGuid.
> 
> Pierre Gondois (11):
>   ArmPkg/ArmMonitorLib: Definition for ArmMonitorLib library class
>   ArmPkg/ArmMonitorLib: Add ArmMonitorLib
>   ArmPkg: Sort HVC/SMC section alphbetically in ArmPkg.dsc
>   ArmPkg/ArmHvcLibNull: Add NULL instance of ArmHvcLib
>   SecurityPkg/RngDxe: Replace Pcd with Sp80090Ctr256Guid
>   SecurityPkg/RngDxe: Remove ArchGetSupportedRngAlgorithms()
>   SecurityPkg/RngDxe: Documentation/include/parameter cleanup
>   SecurityPkg/RngDxe: Check before advertising 

[edk2-devel] [PATCH v3 9/9] UefiCpuLib: Remove UefiCpuLib.

2022-11-01 Thread Zhiguang Liu
From: Yu Pu 

Because UefiCpuPkg/UefiCpuLib is merged to MdePkg/CpuLib and all modules
are updated to not depend on this library, remove it completely.

Cc: Eric Dong 
Cc: Ray Ni 
Cc: Rahul Kumar 
Signed-off-by: Yu Pu 
Reviewed-by: Ray Ni 
Signed-off-by: Zhiguang Liu 
---
 UefiCpuPkg/Include/Library/UefiCpuLib.h   | 16 -
 .../Library/BaseUefiCpuLib/BaseUefiCpuLib.inf | 35 ---
 .../Library/BaseUefiCpuLib/BaseUefiCpuLib.uni | 16 -
 .../BaseUefiCpuLib/BaseUefiCpuLibNull.c   | 16 -
 UefiCpuPkg/UefiCpuPkg.dec |  5 ---
 UefiCpuPkg/UefiCpuPkg.dsc |  2 --
 6 files changed, 90 deletions(-)
 delete mode 100644 UefiCpuPkg/Include/Library/UefiCpuLib.h
 delete mode 100644 UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
 delete mode 100644 UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.uni
 delete mode 100644 UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLibNull.c

diff --git a/UefiCpuPkg/Include/Library/UefiCpuLib.h 
b/UefiCpuPkg/Include/Library/UefiCpuLib.h
deleted file mode 100644
index ab6982db6e..00
--- a/UefiCpuPkg/Include/Library/UefiCpuLib.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file
-  Public header file for UEFI CPU library class.
-
-  This library class defines some routines that are generic for IA32 family CPU
-  to be UEFI specification compliant.
-
-  Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.
-  Copyright (c) 2020, AMD Inc. All rights reserved.
-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __UEFI_CPU_LIB_H__
-#define __UEFI_CPU_LIB_H__
-
-#endif
diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf 
b/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
deleted file mode 100644
index 9f8b62d87a..00
--- a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
+++ /dev/null
@@ -1,35 +0,0 @@
-## @file
-#  This library defines some routines that are generic for IA32 family CPU.
-#
-#  The library routines are UEFI specification compliant.
-#
-#  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
-#  Copyright (c) 2020, AMD Inc. All rights reserved.
-#  SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-##
-
-[Defines]
-  INF_VERSION= 0x00010005
-  BASE_NAME  = BaseUefiCpuLib
-  MODULE_UNI_FILE= BaseUefiCpuLib.uni
-  FILE_GUID  = 34C24FD7-7A90-45c2-89FD-946473D9CE98
-  MODULE_TYPE= BASE
-  VERSION_STRING = 1.0
-  LIBRARY_CLASS  = UefiCpuLib
-
-#
-# The following information is for reference only and not required by the 
build tools.
-#
-#  VALID_ARCHITECTURES   = IA32 X64
-#
-
-[Sources]
-  BaseUefiCpuLibNull.c
-
-[Packages]
-  MdePkg/MdePkg.dec
-  UefiCpuPkg/UefiCpuPkg.dec
-
-[LibraryClasses]
-  BaseLib
diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.uni 
b/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.uni
deleted file mode 100644
index 83c96cea67..00
--- a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.uni
+++ /dev/null
@@ -1,16 +0,0 @@
-// /** @file
-// This library defines some routines that are generic for IA32 family CPU.
-//
-// The library routines are UEFI specification compliant.
-//
-// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
-//
-// SPDX-License-Identifier: BSD-2-Clause-Patent
-//
-// **/
-
-
-#string STR_MODULE_ABSTRACT #language en-US "Defines generic 
routines for IA32 family CPUs."
-
-#string STR_MODULE_DESCRIPTION  #language en-US "The library routines 
comply with the UEFI Specification."
-
diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLibNull.c 
b/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLibNull.c
deleted file mode 100644
index 24693635e4..00
--- a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLibNull.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file
-This library contains a dummy function to pass build.
-
-Copyright (c) 2022, Intel Corporation. All rights reserved.
-
-SPDX-License-Identifier: BSD-2-Clause-Patent
-**/
-#include 
-
-VOID
-Dummy (
-  VOID
-  )
-{
-
-}
diff --git a/UefiCpuPkg/UefiCpuPkg.dec b/UefiCpuPkg/UefiCpuPkg.dec
index 718323d904..73aa2b7017 100644
--- a/UefiCpuPkg/UefiCpuPkg.dec
+++ b/UefiCpuPkg/UefiCpuPkg.dec
@@ -18,11 +18,6 @@
   Include
 
 [LibraryClasses]
-  ##  @libraryclass  Defines some routines that are generic for IA32 family CPU
-  ## to be UEFI specification compliant.
-  ##
-  UefiCpuLib|Include/Library/UefiCpuLib.h
-
   ##  @libraryclass  Defines some routines that are used to 
register/manage/program
   ## CPU features.
   ##
diff --git a/UefiCpuPkg/UefiCpuPkg.dsc b/UefiCpuPkg/UefiCpuPkg.dsc
index 0e1a99ddc0..6aae0cbd75 100644
--- a/UefiCpuPkg/UefiCpuPkg.dsc
+++ b/UefiCpuPkg/UefiCpuPkg.dsc
@@ -31,7 +31,6 @@
   SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
   

[edk2-devel] [PATCH v3 8/9] UefiPayloadPkg: Remove UefiCpuLib from module INFs.

2022-11-01 Thread Zhiguang Liu
From: Yu Pu 

Because UefiCpuPkg/UefiCpuLib is merged to MdePkg/CpuLib, remove the
dependency of UefiCpuLib.

Cc: Guo Dong 
Cc: Ray Ni 
Cc: Maurice Ma 
Cc: Benjamin You 
Cc: Sean Rhodes 
Signed-off-by: Yu Pu 
Reviewed-by: Ray Ni 
---
 UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h| 1 -
 UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf  | 1 -
 UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf | 1 -
 UefiPayloadPkg/UefiPayloadPkg.dsc | 1 -
 4 files changed, 4 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h 
b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
index d1c7425b28..ad8a9fd22b 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
+++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
@@ -24,7 +24,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf 
b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
index 95446dd997..d47e8e76cf 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
+++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
@@ -55,7 +55,6 @@
   PeCoffLib
   PlatformSupportLib
   CpuLib
-  UefiCpuLib
 
 [Guids]
   gEfiMemoryTypeInformationGuid
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf 
b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
index 3b4836042a..c4f4f28eaa 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
+++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.inf
@@ -53,7 +53,6 @@
   HobLib
   PeCoffLib
   CpuLib
-  UefiCpuLib
 
 [Guids]
   gEfiMemoryTypeInformationGuid
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc 
b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 1150be6acd..b7712d4de1 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -221,7 +221,6 @@
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
   
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
-  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
 
   #
-- 
2.31.1.windows.1



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




[edk2-devel] [PATCH v3 6/9] SourceLevelDebugPkg: Remove UefiCpuLib from module INFs.

2022-11-01 Thread Zhiguang Liu
From: Yu Pu 

Because UefiCpuPkg/UefiCpuLib is merged to MdePkg/CpuLib, remove the
dependency of UefiCpuLib.

Cc: Hao A Wu 
Signed-off-by: Yu Pu 
Reviewed-by: Ray Ni 
---
 SourceLevelDebugPkg/SourceLevelDebugPkg.dsc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc 
b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
index eba64a7b78..986dd5a769 100644
--- a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
+++ b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
@@ -35,7 +35,6 @@
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   
SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
   LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
-  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
   
PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
-- 
2.31.1.windows.1



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




[edk2-devel] [PATCH v3 7/9] UefiCpuPkg: Remove UefiCpuLib from module INFs.

2022-11-01 Thread Zhiguang Liu
From: Yu Pu 

Because UefiCpuPkg/UefiCpuLib is merged to MdePkg/CpuLib, remove the
dependency of UefiCpuLib.

Cc: Eric Dong 
Cc: Ray Ni 
Cc: Rahul Kumar 
Signed-off-by: Yu Pu 
Reviewed-by: Ray Ni 
---
 UefiCpuPkg/CpuDxe/CpuDxe.h   | 1 -
 UefiCpuPkg/CpuDxe/CpuDxe.inf | 1 -
 UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c   | 1 -
 UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf | 1 -
 UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c   | 1 -
 UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf | 1 -
 UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf| 1 -
 UefiCpuPkg/Library/MpInitLib/MpLib.h | 1 -
 UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf| 1 -
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h   | 1 -
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 1 -
 UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h   | 1 -
 UefiCpuPkg/SecCore/SecCore.inf   | 1 -
 UefiCpuPkg/SecCore/SecCoreNative.inf | 1 -
 UefiCpuPkg/SecCore/SecMain.h | 1 -
 15 files changed, 15 deletions(-)

diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.h b/UefiCpuPkg/CpuDxe/CpuDxe.h
index 2208671cb9..49a390b4c4 100644
--- a/UefiCpuPkg/CpuDxe/CpuDxe.h
+++ b/UefiCpuPkg/CpuDxe/CpuDxe.h
@@ -28,7 +28,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.inf b/UefiCpuPkg/CpuDxe/CpuDxe.inf
index 2352418992..1d3e9f8cdb 100644
--- a/UefiCpuPkg/CpuDxe/CpuDxe.inf
+++ b/UefiCpuPkg/CpuDxe/CpuDxe.inf
@@ -33,7 +33,6 @@
   UefiBootServicesTableLib
   UefiDriverEntryPoint
   LocalApicLib
-  UefiCpuLib
   UefiLib
   CpuExceptionHandlerLib
   HobLib
diff --git a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c 
b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
index a944c3d01c..008b8a070b 100644
--- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
+++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 
 //
 // Library internal functions
diff --git a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf 
b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
index a85b69e0a1..8c4eb65548 100644
--- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
+++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
@@ -39,7 +39,6 @@
   IoLib
   PcdLib
   CpuLib
-  UefiCpuLib
 
 [Pcd]
   gUefiCpuPkgTokenSpaceGuid.PcdCpuInitIpiDelayInMicroSeconds  ## 
SOMETIMES_CONSUMES
diff --git a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c 
b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
index 1e45ffc318..0ba0499631 100644
--- a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
+++ b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 //
diff --git a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf 
b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
index 31ebdd39c6..713f1859c2 100644
--- a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
+++ b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
@@ -39,7 +39,6 @@
   IoLib
   PcdLib
   CpuLib
-  UefiCpuLib
 
 [Pcd]
   gUefiCpuPkgTokenSpaceGuid.PcdCpuInitIpiDelayInMicroSeconds  ## 
SOMETIMES_CONSUMES
diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf 
b/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
index e1cd0b3500..7450d9c729 100644
--- a/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
+++ b/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
@@ -49,7 +49,6 @@
   HobLib
   MtrrLib
   CpuLib
-  UefiCpuLib
   UefiBootServicesTableLib
   DebugAgentLib
   SynchronizationLib
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h 
b/UefiCpuPkg/Library/MpInitLib/MpLib.h
index f5086e497e..b02645d7d6 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.h
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf 
b/UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
index 5facf4db94..98864c6484 100644
--- a/UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
+++ b/UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
@@ -49,7 +49,6 @@
   HobLib
   MtrrLib
   CpuLib
-  UefiCpuLib
   SynchronizationLib
   PeiServicesLib
   PcdLib
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h 
b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
index ef8bf5947d..abf44c0042 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
@@ -44,7 +44,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf 
b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
index 

[edk2-devel] [PATCH v3 5/9] PcAtChipsetPkg: Remove UefiCpuLib from module INFs.

2022-11-01 Thread Zhiguang Liu
From: Yu Pu 

Because UefiCpuPkg/UefiCpuLib is merged to MdePkg/CpuLib, remove the
dependency of UefiCpuLib.

Cc: Ray Ni 
Signed-off-by: Yu Pu 
Reviewed-by: Ray Ni 
---
 PcAtChipsetPkg/PcAtChipsetPkg.dsc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/PcAtChipsetPkg/PcAtChipsetPkg.dsc 
b/PcAtChipsetPkg/PcAtChipsetPkg.dsc
index 451e60ddc8..2f02ecf6fd 100644
--- a/PcAtChipsetPkg/PcAtChipsetPkg.dsc
+++ b/PcAtChipsetPkg/PcAtChipsetPkg.dsc
@@ -42,7 +42,6 @@
   ResetSystemLib|PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
   IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf
   LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
-  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
   
ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
 
-- 
2.31.1.windows.1



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




[edk2-devel] [PATCH v3 4/9] OvmfPkg: Remove UefiCpuLib from module INFs.

2022-11-01 Thread Zhiguang Liu
From: Yu Pu 

Because UefiCpuPkg/UefiCpuLib is merged to MdePkg/CpuLib, remove the
dependency of UefiCpuLib.

Cc: Ard Biesheuvel 
Cc: Jiewen Yao 
Cc: Jordan Justen 
Cc: Gerd Hoffmann 
Signed-off-by: Yu Pu 
Signed-off-by: Zhiguang Liu 
---
 OvmfPkg/AmdSev/AmdSevX64.dsc   | 1 -
 OvmfPkg/Bhyve/BhyveX64.dsc | 1 -
 OvmfPkg/CloudHv/CloudHvX64.dsc | 1 -
 OvmfPkg/IntelTdx/Sec/SecMain.c | 1 -
 OvmfPkg/Library/TdxMailboxLib/TdxMailbox.c | 1 -
 OvmfPkg/Microvm/MicrovmX64.dsc | 1 -
 OvmfPkg/OvmfPkgIa32.dsc| 1 -
 OvmfPkg/OvmfPkgIa32X64.dsc | 1 -
 OvmfPkg/OvmfPkgX64.dsc | 1 -
 OvmfPkg/OvmfXen.dsc| 1 -
 OvmfPkg/Sec/SecMain.c  | 1 -
 OvmfPkg/Sec/SecMain.inf| 1 -
 12 files changed, 12 deletions(-)

diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc
index 90e8a213ef..b894d710f7 100644
--- a/OvmfPkg/AmdSev/AmdSevX64.dsc
+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc
@@ -154,7 +154,6 @@
   
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
   
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
-  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   
SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf
diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc
index 475b88b21a..9a4b1a3d15 100644
--- a/OvmfPkg/Bhyve/BhyveX64.dsc
+++ b/OvmfPkg/Bhyve/BhyveX64.dsc
@@ -160,7 +160,6 @@
   
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
   NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
-  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   
SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf
diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc b/OvmfPkg/CloudHv/CloudHvX64.dsc
index 10b16104ac..23aa065606 100644
--- a/OvmfPkg/CloudHv/CloudHvX64.dsc
+++ b/OvmfPkg/CloudHv/CloudHvX64.dsc
@@ -181,7 +181,6 @@
   
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
   NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
-  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
   
SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf
   QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibNull.inf
diff --git a/OvmfPkg/IntelTdx/Sec/SecMain.c b/OvmfPkg/IntelTdx/Sec/SecMain.c
index eef47f17e4..3f5c8e82f4 100644
--- a/OvmfPkg/IntelTdx/Sec/SecMain.c
+++ b/OvmfPkg/IntelTdx/Sec/SecMain.c
@@ -16,7 +16,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/OvmfPkg/Library/TdxMailboxLib/TdxMailbox.c 
b/OvmfPkg/Library/TdxMailboxLib/TdxMailbox.c
index 0e2515ca38..8bd6202279 100644
--- a/OvmfPkg/Library/TdxMailboxLib/TdxMailbox.c
+++ b/OvmfPkg/Library/TdxMailboxLib/TdxMailbox.c
@@ -10,7 +10,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc
index 7eff8e2a88..4903712321 100644
--- a/OvmfPkg/Microvm/MicrovmX64.dsc
+++ b/OvmfPkg/Microvm/MicrovmX64.dsc
@@ -179,7 +179,6 @@
   
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
   NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
-  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   
SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index e9ba491237..662a2d9140 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -182,7 +182,6 @@
   
DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
   NvVarsFileLib|OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf
   

[edk2-devel] [PATCH v3 3/9] IntelFsp2Pkg: Remove UefiCpuLib from module INFs.

2022-11-01 Thread Zhiguang Liu
From: Yu Pu 

Because UefiCpuPkg/UefiCpuLib is merged to MdePkg/CpuLib, remove the
dependency of UefiCpuLib.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Star Zeng 
Signed-off-by: Yu Pu 
Reviewed-by: Chasel Chiu 
---
 IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf | 1 -
 IntelFsp2Pkg/FspSecCore/SecMain.h   | 1 -
 IntelFsp2Pkg/IntelFsp2Pkg.dsc   | 1 -
 IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc | 1 -
 IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf | 1 -
 IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf | 1 -
 IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc | 1 -
 7 files changed, 7 deletions(-)

diff --git a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf 
b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
index f920f1f6d0..8029832235 100644
--- a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
+++ b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
@@ -59,7 +59,6 @@
   FspCommonLib
   FspSecPlatformLib
   CpuLib
-  UefiCpuLib
 
 [Pcd]
   gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase  ## CONSUMES
diff --git a/IntelFsp2Pkg/FspSecCore/SecMain.h 
b/IntelFsp2Pkg/FspSecCore/SecMain.h
index a09653da96..023deb7e2b 100644
--- a/IntelFsp2Pkg/FspSecCore/SecMain.h
+++ b/IntelFsp2Pkg/FspSecCore/SecMain.h
@@ -21,7 +21,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 typedef
diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dsc b/IntelFsp2Pkg/IntelFsp2Pkg.dsc
index 0713f0028d..f236a7010b 100644
--- a/IntelFsp2Pkg/IntelFsp2Pkg.dsc
+++ b/IntelFsp2Pkg/IntelFsp2Pkg.dsc
@@ -27,7 +27,6 @@
   PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
-  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
 
   
ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
   
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
diff --git a/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc 
b/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
index 961576c9a7..3155812118 100644
--- a/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
+++ b/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
@@ -107,7 +107,6 @@
   
PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
   
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
-  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
 !if $(TARGET) == DEBUG
   DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
   
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf 
b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
index 332509e0bc..0307ce0acc 100644
--- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
+++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
@@ -38,7 +38,6 @@
   FspWrapperPlatformLib
   FspWrapperHobProcessLib
   CpuLib
-  UefiCpuLib
   PeCoffGetEntryPointLib
   PeCoffExtraActionLib
   PerformanceLib
diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf 
b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
index f9c2ffca1c..a7b28e56b5 100644
--- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
+++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
@@ -39,7 +39,6 @@
   FspWrapperPlatformLib
   FspWrapperHobProcessLib
   CpuLib
-  UefiCpuLib
   PeCoffGetEntryPointLib
   PeCoffExtraActionLib
   PerformanceLib
diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc 
b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
index b1fc2291c8..fe621244a6 100644
--- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
+++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
@@ -41,7 +41,6 @@
   DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
 
   # UefiCpuPkg
-  UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
   LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
 
   # FSP Wrapper Lib
-- 
2.31.1.windows.1



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




[edk2-devel] [PATCH v3 2/9] MdePkg: Move API and implementation from UefiCpuLib to CpuLib

2022-11-01 Thread Zhiguang Liu
From: Yu Pu 

There are two libraries: MdePkg/CpuLib and UefiCpuPkg/UefiCpuLib. This
patch merges UefiCpuPkg/UefiCpuLib to MdePkg/CpuLib.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Eric Dong 
Cc: Ray Ni 
Cc: Rahul Kumar 
Signed-off-by: Yu Pu 
Reviewed-by: Liming Gao 
---
 MdePkg/Include/Library/CpuLib.h   | 48 ++
 MdePkg/Library/BaseCpuLib/BaseCpuLib.inf  |  6 +++
 .../BaseCpuLib}/Ia32/InitializeFpu.nasm   |  0
 .../BaseCpuLib}/X64/InitializeFpu.nasm|  0
 .../Library/BaseCpuLib/X86BaseCpuLib.c|  2 +-
 UefiCpuPkg/Include/Library/UefiCpuLib.h   | 49 ---
 .../Library/BaseUefiCpuLib/BaseUefiCpuLib.inf |  8 +--
 .../BaseUefiCpuLib/BaseUefiCpuLibNull.c   | 16 ++
 8 files changed, 72 insertions(+), 57 deletions(-)
 rename {UefiCpuPkg/Library/BaseUefiCpuLib => 
MdePkg/Library/BaseCpuLib}/Ia32/InitializeFpu.nasm (100%)
 rename {UefiCpuPkg/Library/BaseUefiCpuLib => 
MdePkg/Library/BaseCpuLib}/X64/InitializeFpu.nasm (100%)
 rename UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c => 
MdePkg/Library/BaseCpuLib/X86BaseCpuLib.c (93%)
 create mode 100644 UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLibNull.c

diff --git a/MdePkg/Include/Library/CpuLib.h b/MdePkg/Include/Library/CpuLib.h
index 25f6d9478c..3f29937dc7 100644
--- a/MdePkg/Include/Library/CpuLib.h
+++ b/MdePkg/Include/Library/CpuLib.h
@@ -41,4 +41,52 @@ CpuFlushTlb (
   VOID
   );
 
+#if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64)
+
+/**
+  Initializes floating point units for requirement of UEFI specification.
+  This function initializes floating-point control word to 0x027F (all 
exceptions
+  masked,double-precision, round-to-nearest) and multimedia-extensions control 
word
+  (if supported) to 0x1F80 (all exceptions masked, round-to-nearest, flush to 
zero
+  for masked underflow).
+**/
+VOID
+EFIAPI
+InitializeFloatingPointUnits (
+  VOID
+  );
+
+/**
+  Determine if the standard CPU signature is "AuthenticAMD".
+  @retval TRUE  The CPU signature matches.
+  @retval FALSE The CPU signature does not match.
+**/
+BOOLEAN
+EFIAPI
+StandardSignatureIsAuthenticAMD (
+  VOID
+  );
+
+/**
+  Return the 32bit CPU family and model value.
+  @return CPUID[01h].EAX with Processor Type and Stepping ID cleared.
+**/
+UINT32
+EFIAPI
+GetCpuFamilyModel (
+  VOID
+  );
+
+/**
+  Return the CPU stepping ID.
+  @return CPU stepping ID value in CPUID[01h].EAX.
+**/
+UINT8
+EFIAPI
+GetCpuSteppingId (
+  VOID
+  );
+
+#endif
+
 #endif
diff --git a/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf 
b/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
index 6b230f6e6d..b2bc958ec8 100644
--- a/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
+++ b/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
@@ -29,6 +29,9 @@
 #  VALID_ARCHITECTURES   = IA32 X64 EBC ARM AARCH64 RISCV64 LOONGARCH64
 #
 
+[Sources.IA32, Sources.X64]
+  X86BaseCpuLib.c
+
 [Sources.IA32]
   Ia32/CpuSleep.c | MSFT
   Ia32/CpuFlushTlb.c | MSFT
@@ -39,10 +42,13 @@
   Ia32/CpuSleepGcc.c | GCC
   Ia32/CpuFlushTlbGcc.c | GCC
 
+  Ia32/InitializeFpu.nasm
+
 [Sources.X64]
   X64/CpuFlushTlb.nasm
   X64/CpuSleep.nasm
 
+  X64/InitializeFpu.nasm
 
 [Sources.EBC]
   Ebc/CpuSleepFlushTlb.c
diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm 
b/MdePkg/Library/BaseCpuLib/Ia32/InitializeFpu.nasm
similarity index 100%
rename from UefiCpuPkg/Library/BaseUefiCpuLib/Ia32/InitializeFpu.nasm
rename to MdePkg/Library/BaseCpuLib/Ia32/InitializeFpu.nasm
diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm 
b/MdePkg/Library/BaseCpuLib/X64/InitializeFpu.nasm
similarity index 100%
rename from UefiCpuPkg/Library/BaseUefiCpuLib/X64/InitializeFpu.nasm
rename to MdePkg/Library/BaseCpuLib/X64/InitializeFpu.nasm
diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c 
b/MdePkg/Library/BaseCpuLib/X86BaseCpuLib.c
similarity index 93%
rename from UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c
rename to MdePkg/Library/BaseCpuLib/X86BaseCpuLib.c
index 5d925bc273..1cad32a4be 100644
--- a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c
+++ b/MdePkg/Library/BaseCpuLib/X86BaseCpuLib.c
@@ -13,7 +13,7 @@
 #include 
 
 #include 
-#include 
+#include 
 
 /**
   Determine if the standard CPU signature is "AuthenticAMD".
diff --git a/UefiCpuPkg/Include/Library/UefiCpuLib.h 
b/UefiCpuPkg/Include/Library/UefiCpuLib.h
index 0ff4a35774..ab6982db6e 100644
--- a/UefiCpuPkg/Include/Library/UefiCpuLib.h
+++ b/UefiCpuPkg/Include/Library/UefiCpuLib.h
@@ -13,53 +13,4 @@
 #ifndef __UEFI_CPU_LIB_H__
 #define __UEFI_CPU_LIB_H__
 
-/**
-  Initializes floating point units for requirement of UEFI specification.
-
-  This function initializes floating-point control word to 0x027F (all 
exceptions
-  masked,double-precision, round-to-nearest) and multimedia-extensions control 
word
-  (if supported) to 0x1F80 (all exceptions masked, round-to-nearest, flush to 
zero
-  for masked underflow).
-
-**/
-VOID
-EFIAPI
-InitializeFloatingPointUnits (
-  VOID

[edk2-devel] [PATCH v3 1/9] OvmfPkg: Add CpuLib to module INFs that depend on UefiCpuLib.

2022-11-01 Thread Zhiguang Liu
There are two libraries: MdePkg/CpuLib and UefiCpuPkg/UefiCpuLib and
UefiCpuPkg/UefiCpuLib will be merged to MdePkg/CpuLib. To avoid build
failure, add CpuLib dependency to all modules that depend on UefiCpuLib.

Cc: Ard Biesheuvel 
Cc: Jiewen Yao 
Cc: Jordan Justen 
Cc: Gerd Hoffmann 
Signed-off-by: Zhiguang Liu 
---
 OvmfPkg/IntelTdx/Sec/SecMain.c | 1 +
 OvmfPkg/Library/TdxMailboxLib/TdxMailbox.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/OvmfPkg/IntelTdx/Sec/SecMain.c b/OvmfPkg/IntelTdx/Sec/SecMain.c
index ab01ec9ab1..eef47f17e4 100644
--- a/OvmfPkg/IntelTdx/Sec/SecMain.c
+++ b/OvmfPkg/IntelTdx/Sec/SecMain.c
@@ -17,6 +17,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/OvmfPkg/Library/TdxMailboxLib/TdxMailbox.c 
b/OvmfPkg/Library/TdxMailboxLib/TdxMailbox.c
index 74cb55611f..0e2515ca38 100644
--- a/OvmfPkg/Library/TdxMailboxLib/TdxMailbox.c
+++ b/OvmfPkg/Library/TdxMailboxLib/TdxMailbox.c
@@ -11,6 +11,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
-- 
2.31.1.windows.1



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




[edk2-devel] [PATCH v3 0/9] merge UefiCpuPkg/UefiCpuLib to MdePkg/CpuLib

2022-11-01 Thread Zhiguang Liu
V3:
Months ago, Pu Yu sent this patch serial and get reviewed-by, but some
haven't been merged. Because the code base is changed, to merge the remaining
patches into latest code base, two patches for OvmfPkg are modified.

Please OvmfPkg maintainers and reviewers help review patch #1 and #4.
Other patches keep unchanged and don't need review again.

V2:
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3394
Today lots of duplicated code call CPUID and calculates the address mask.
Adding an API named GetPhysicalAddressBits in UefiCpuLib can solve this
problem, but at the same time cause MdeModulePkg depend on UefiCpuPkg
which does not meet the design spec. So merge UefiCpuLib to CpuLib is a
good way to sovle these problems. To minimize the impact,this change is
carried out in four steps.

Yu Pu (8):
  MdePkg: Move API and implementation from UefiCpuLib to CpuLib
  IntelFsp2Pkg: Remove UefiCpuLib from module INFs.
  OvmfPkg: Remove UefiCpuLib from module INFs.
  PcAtChipsetPkg: Remove UefiCpuLib from module INFs.
  SourceLevelDebugPkg: Remove UefiCpuLib from module INFs.
  UefiCpuPkg: Remove UefiCpuLib from module INFs.
  UefiPayloadPkg: Remove UefiCpuLib from module INFs.
  UefiCpuLib: Remove UefiCpuLib.

Zhiguang Liu (1):
  OvmfPkg: Add CpuLib to module INFs that depend on UefiCpuLib.

 IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf   |  1 -
 IntelFsp2Pkg/FspSecCore/SecMain.h |  1 -
 IntelFsp2Pkg/IntelFsp2Pkg.dsc |  1 -
 IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc   |  1 -
 .../FspmWrapperPeim/FspmWrapperPeim.inf   |  1 -
 .../FspsWrapperPeim/FspsWrapperPeim.inf   |  1 -
 IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc   |  1 -
 MdePkg/Include/Library/CpuLib.h   | 48 ++
 MdePkg/Library/BaseCpuLib/BaseCpuLib.inf  |  6 ++
 .../BaseCpuLib}/Ia32/InitializeFpu.nasm   |  0
 .../BaseCpuLib}/X64/InitializeFpu.nasm|  0
 .../Library/BaseCpuLib/X86BaseCpuLib.c|  2 +-
 OvmfPkg/AmdSev/AmdSevX64.dsc  |  1 -
 OvmfPkg/Bhyve/BhyveX64.dsc|  1 -
 OvmfPkg/CloudHv/CloudHvX64.dsc|  1 -
 OvmfPkg/IntelTdx/Sec/SecMain.c|  2 +-
 OvmfPkg/Library/TdxMailboxLib/TdxMailbox.c|  2 +-
 OvmfPkg/Microvm/MicrovmX64.dsc|  1 -
 OvmfPkg/OvmfPkgIa32.dsc   |  1 -
 OvmfPkg/OvmfPkgIa32X64.dsc|  1 -
 OvmfPkg/OvmfPkgX64.dsc|  1 -
 OvmfPkg/OvmfXen.dsc   |  1 -
 OvmfPkg/Sec/SecMain.c |  1 -
 OvmfPkg/Sec/SecMain.inf   |  1 -
 PcAtChipsetPkg/PcAtChipsetPkg.dsc |  1 -
 SourceLevelDebugPkg/SourceLevelDebugPkg.dsc   |  1 -
 UefiCpuPkg/CpuDxe/CpuDxe.h|  1 -
 UefiCpuPkg/CpuDxe/CpuDxe.inf  |  1 -
 UefiCpuPkg/Include/Library/UefiCpuLib.h   | 65 ---
 .../Library/BaseUefiCpuLib/BaseUefiCpuLib.inf | 41 
 .../Library/BaseUefiCpuLib/BaseUefiCpuLib.uni | 16 -
 .../Library/BaseXApicLib/BaseXApicLib.c   |  1 -
 .../Library/BaseXApicLib/BaseXApicLib.inf |  1 -
 .../BaseXApicX2ApicLib/BaseXApicX2ApicLib.c   |  1 -
 .../BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf |  1 -
 UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |  1 -
 UefiCpuPkg/Library/MpInitLib/MpLib.h  |  1 -
 UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf |  1 -
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h|  1 -
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf  |  1 -
 .../PiSmmCpuDxeSmm/SmmProfileInternal.h   |  1 -
 UefiCpuPkg/SecCore/SecCore.inf|  1 -
 UefiCpuPkg/SecCore/SecCoreNative.inf  |  1 -
 UefiCpuPkg/SecCore/SecMain.h  |  1 -
 UefiCpuPkg/UefiCpuPkg.dec |  5 --
 UefiCpuPkg/UefiCpuPkg.dsc |  2 -
 .../UefiPayloadEntry/UefiPayloadEntry.h   |  1 -
 .../UefiPayloadEntry/UefiPayloadEntry.inf |  1 -
 .../UniversalPayloadEntry.inf |  1 -
 UefiPayloadPkg/UefiPayloadPkg.dsc |  1 -
 50 files changed, 57 insertions(+), 170 deletions(-)
 rename {UefiCpuPkg/Library/BaseUefiCpuLib => 
MdePkg/Library/BaseCpuLib}/Ia32/InitializeFpu.nasm (100%)
 rename {UefiCpuPkg/Library/BaseUefiCpuLib => 
MdePkg/Library/BaseCpuLib}/X64/InitializeFpu.nasm (100%)
 rename UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c => 
MdePkg/Library/BaseCpuLib/X86BaseCpuLib.c (93%)
 delete mode 100644 UefiCpuPkg/Include/Library/UefiCpuLib.h
 delete mode 100644 UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
 delete mode 100644 UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.uni

-- 
2.31.1.windows.1



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