Re: [edk2-devel] [PATCH V1 1/1] OvmfPkg/PlatformInitLib: Add check to NvVarStoreFV HeaderLength

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

> -Original Message-
> From: Xu, Min M 
> Sent: Sunday, November 27, 2022 3:00 PM
> To: devel@edk2.groups.io
> Cc: Xu, Min M ; Aktas, Erdem
> ; James Bottomley ; Yao,
> Jiewen ; Gerd Hoffmann ;
> Tom Lendacky 
> Subject: [PATCH V1 1/1] OvmfPkg/PlatformInitLib: Add check to
> NvVarStoreFV HeaderLength
> 
> From: Min M Xu 
> 
> There should be a check that the FV HeaderLength cannot be an odd
> number. Otherwise in the following CalculateSum16 there would be an
> ASSERT.
> 
> In ValidateFvHeader@QemuFlashFvbServicesRuntimeDxe/FwBlockServices.c
> there a is similar check to the FwVolHeader->HeaderLength.
> 
> Cc: Erdem Aktas 
> Cc: James Bottomley 
> Cc: Jiewen Yao 
> Cc: Gerd Hoffmann 
> Cc: Tom Lendacky 
> Signed-off-by: Min Xu 
> ---
>  OvmfPkg/Library/PlatformInitLib/Platform.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/OvmfPkg/Library/PlatformInitLib/Platform.c
> b/OvmfPkg/Library/PlatformInitLib/Platform.c
> index 2582689ffe35..77f22de046f2 100644
> --- a/OvmfPkg/Library/PlatformInitLib/Platform.c
> +++ b/OvmfPkg/Library/PlatformInitLib/Platform.c
> @@ -653,6 +653,7 @@ PlatformValidateNvVarStore (
>(!CompareGuid (&FvHdrGUID, &NvVarStoreFvHeader->FileSystemGuid))
> ||
>(NvVarStoreFvHeader->Signature != EFI_FVH_SIGNATURE) ||
>(NvVarStoreFvHeader->Attributes != 0x4feff) ||
> +  ((NvVarStoreFvHeader->HeaderLength & 0x01) != 0) ||
>(NvVarStoreFvHeader->Revision != EFI_FVH_REVISION) ||
>(NvVarStoreFvHeader->FvLength != NvVarStoreSize)
>)
> --
> 2.29.2.windows.2



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




[edk2-devel] [PATCH ovmf 2/5] MdePkg: Add AMD SEV features to PcdConfidentialComputingGuestAttr

2022-11-30 Thread Alexey Kardashevskiy via groups.io
PcdConfidentialComputingGuestAttr so far only contained an SEV mode bit
but there are more other features which do not translate to levels
such as DebugSwap or SecureTsc.

This adds the features mask and the DebugSwap feature bit to a PCD.

Signed-off-by: Alexey Kardashevskiy 
---
 MdePkg/Include/ConfidentialComputingGuestAttr.h | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/ConfidentialComputingGuestAttr.h 
b/MdePkg/Include/ConfidentialComputingGuestAttr.h
index 44e6df800207..1fd09a51ea52 100644
--- a/MdePkg/Include/ConfidentialComputingGuestAttr.h
+++ b/MdePkg/Include/ConfidentialComputingGuestAttr.h
@@ -26,12 +26,15 @@ typedef enum {
   CCAttrAmdSev= 0x100,
   CCAttrAmdSevEs  = 0x101,
   CCAttrAmdSevSnp = 0x102,
+  CCAttrAmdSevFeatureMask  = 0x,
+  CCAttrAmdSevFeatureDebugSwap = 0x0001,
 
   /* The guest is running with Intel TDX memory encryption enabled. */
   CCAttrIntelTdx = 0x200,
 } CONFIDENTIAL_COMPUTING_GUEST_ATTR;
 
 #define CC_GUEST_IS_TDX(x)  ((x) == CCAttrIntelTdx)
-#define CC_GUEST_IS_SEV(x)  ((x) == CCAttrAmdSev || (x) == CCAttrAmdSevEs || 
(x) == CCAttrAmdSevSnp)
+#define _CC_GUEST_IS_SEV(x) ((x) == CCAttrAmdSev || (x) == CCAttrAmdSevEs || 
(x) == CCAttrAmdSevSnp)
+#define CC_GUEST_IS_SEV(x)  _CC_GUEST_IS_SEV((x) & ~CCAttrAmdSevFeatureMask)
 
 #endif
-- 
2.38.1



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




[edk2-devel] [PATCH v2] IntelSiliconPkg/VTd: Use 256-bit invaildation queue descriptor

2022-11-30 Thread Sheng Wei
256-bit invaildation queue descriptor could be used for both
abort DMA mode and legacy mode.

Signed-off-by: Sheng Wei 
Cc: Ray Ni 
Cc: Rangasai V Chaganty 
Cc: Jenny Huang 
Cc: Robert Kowalewski 
---
 .../VTd/IntelVTdDmarPei/IntelVTdDmar.c| 179 -
 .../VTd/IntelVTdDmarPei/IntelVTdDmarPei.h |  12 +-
 .../Feature/VTd/IntelVTdDxe/DmaProtection.c   |   3 +
 .../Feature/VTd/IntelVTdDxe/DmaProtection.h   |  12 +-
 .../Feature/VTd/IntelVTdDxe/VtdReg.c  | 235 +++---
 .../Include/IndustryStandard/Vtd.h|  65 -
 6 files changed, 347 insertions(+), 159 deletions(-)

diff --git 
a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c 
b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c
index af85a3d8e..ae9135010 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c
@@ -79,10 +79,9 @@ PerpareCacheInvalidationInterface (
   IN VTD_UNIT_INFO *VTdUnitInfo
   )
 {
-  UINT16 QueueSize;
-  UINT64 Reg64;
   UINT32 Reg32;
   VTD_ECAP_REG   ECapReg;
+  VTD_IQA_REGIqaReg;
   UINTN  VtdUnitBaseAddress;
 
   VtdUnitBaseAddress = VTdUnitInfo->VtdUnitBaseAddress;
@@ -121,20 +120,25 @@ PerpareCacheInvalidationInterface (
   //
   // Setup the IQ address, size and descriptor width through the Invalidation 
Queue Address Register
   //
-  if (VTdUnitInfo->QiDesc == NULL) {
-QueueSize = 0;
-VTdUnitInfo->QiDescLength = 1 << (QueueSize + 8);
-VTdUnitInfo->QiDesc = (QI_DESC *) AllocatePages (EFI_SIZE_TO_PAGES (sizeof 
(QI_DESC) * VTdUnitInfo->QiDescLength));
-if (VTdUnitInfo->QiDesc == NULL) {
+  if (VTdUnitInfo->QiDescBuffer == NULL) {
+VTdUnitInfo->QiDescBufferSize = (sizeof (QI_256_DESC) * ((UINTN) 1 << 
(VTD_INVALIDATION_QUEUE_SIZE + 7)));
+VTdUnitInfo->QiDescBuffer = AllocatePages (EFI_SIZE_TO_PAGES 
(VTdUnitInfo->QiDescBufferSize));
+if (VTdUnitInfo->QiDescBuffer == NULL) {
   DEBUG ((DEBUG_ERROR,"Could not Alloc Invalidation Queue Buffer.\n"));
   return EFI_OUT_OF_RESOURCES;
 }
   }
 
-  DEBUG ((DEBUG_INFO, "Invalidation Queue Length : %d\n", 
VTdUnitInfo->QiDescLength));
-  Reg64 = (UINT64) (UINTN) VTdUnitInfo->QiDesc;
-  Reg64 |= QueueSize;
-  MmioWrite64 (VtdUnitBaseAddress + R_IQA_REG, Reg64);
+  DEBUG ((DEBUG_INFO, "Invalidation Queue Buffer Size : %d\n", 
VTdUnitInfo->QiDescBufferSize));
+  //
+  // 4KB Aligned address
+  //
+  IqaReg.Uint64 = (UINT64) (UINTN) VTdUnitInfo->QiDescBuffer;
+  IqaReg.Bits.DW = VTD_QUEUED_INVALIDATION_DESCRIPTOR_WIDTH;
+  IqaReg.Bits.QS = VTD_INVALIDATION_QUEUE_SIZE;
+  MmioWrite64 (VtdUnitBaseAddress + R_IQA_REG, IqaReg.Uint64);
+  IqaReg.Uint64 = MmioRead64 (VtdUnitBaseAddress + R_IQA_REG);
+  DEBUG ((DEBUG_INFO, "IQA_REG = 0x%lx, IQH_REG = 0x%lx\n", IqaReg.Uint64, 
MmioRead64 (VtdUnitBaseAddress + R_IQH_REG)));
 
   //
   // Enable the queued invalidation interface through the Global Command 
Register.
@@ -148,8 +152,6 @@ PerpareCacheInvalidationInterface (
 Reg32 = MmioRead32 (VtdUnitBaseAddress + R_GSTS_REG);
   } while ((Reg32 & B_GSTS_REG_QIES) == 0);
 
-  VTdUnitInfo->QiFreeHead = 0;
-
   return EFI_SUCCESS;
 }
 
@@ -174,10 +176,10 @@ DisableQueuedInvalidationInterface (
   Reg32 = MmioRead32 (VTdUnitInfo->VtdUnitBaseAddress + R_GSTS_REG);
 } while ((Reg32 & B_GSTS_REG_QIES) != 0);
 
-if (VTdUnitInfo->QiDesc != NULL) {
-  FreePages(VTdUnitInfo->QiDesc, EFI_SIZE_TO_PAGES (sizeof (QI_DESC) * 
VTdUnitInfo->QiDescLength));
-  VTdUnitInfo->QiDesc = NULL;
-  VTdUnitInfo->QiDescLength = 0;
+if (VTdUnitInfo->QiDescBuffer != NULL) {
+  FreePages(VTdUnitInfo->QiDescBuffer, EFI_SIZE_TO_PAGES 
(VTdUnitInfo->QiDescBufferSize));
+  VTdUnitInfo->QiDescBuffer = NULL;
+  VTdUnitInfo->QiDescBufferSize = 0;
 }
 
 VTdUnitInfo->EnableQueuedInvalidation = 0;
@@ -197,12 +199,15 @@ QueuedInvalidationCheckFault (
   IN VTD_UNIT_INFO *VTdUnitInfo
   )
 {
-  UINT32 FaultReg;
+  UINT32FaultReg;
+  VTD_IQERCD_REGIqercdReg;
 
   FaultReg = MmioRead32 (VTdUnitInfo->VtdUnitBaseAddress + R_FSTS_REG);
   if (FaultReg & (B_FSTS_REG_IQE | B_FSTS_REG_ITE | B_FSTS_REG_ICE)) {
-DEBUG((DEBUG_ERROR, "Detect Queue Invalidation Error [0x%08x]\n", 
FaultReg));
-FaultReg |= (B_FSTS_REG_IQE | B_FSTS_REG_ITE | B_FSTS_REG_ICE);
+IqercdReg.Uint64 = MmioRead64 (VTdUnitInfo->VtdUnitBaseAddress + 
R_IQERCD_REG);
+
+DEBUG((DEBUG_ERROR, "Detect Queue Invalidation Error [0x%08x] - IQERCD 
[0x%016lx]\n", FaultReg, IqercdReg.Uint64));
+
 MmioWrite32 (VTdUnitInfo->VtdUnitBaseAddress + R_FSTS_REG, FaultReg);
 return RETURN_DEVICE_ERROR;
   }
@@ -223,37 +228,83 @@ QueuedInvalidationCheckFault (
 **/
 EFI_STATUS
 SubmitQueuedInvalidationDescriptor (
-  IN VTD_UNIT_INFO *VTdUnitInfo,
-  IN QI_DESC   *Desc
+  IN VTD_UNIT_INFO *VTdUnitInfo,
+  IN QI_256_DESC   *De

[edk2-devel] [PATCH ovmf 5/5] OvmfPkf: Enable AMD SEV-ES DebugSwap for DXE

2022-11-30 Thread Alexey Kardashevskiy via groups.io
This writes the feature bit into PcdConfidentialComputingGuestAttr
and enables DebugSwap for the DXE stage too.

Signed-off-by: Alexey Kardashevskiy 
---
 OvmfPkg/PlatformPei/AmdSev.c | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/OvmfPkg/PlatformPei/AmdSev.c b/OvmfPkg/PlatformPei/AmdSev.c
index e1b9fd9b7f68..479f898adff4 100644
--- a/OvmfPkg/PlatformPei/AmdSev.c
+++ b/OvmfPkg/PlatformPei/AmdSev.c
@@ -324,6 +324,7 @@ AmdSevInitialize (
   )
 {
   UINT64 EncryptionMask;
+  UINT64 CCGuestAttr;
   RETURN_STATUS  PcdStatus;
 
   //
@@ -407,13 +408,19 @@ AmdSevInitialize (
   // technology is active.
   //
   if (MemEncryptSevSnpIsEnabled ()) {
-PcdStatus = PcdSet64S (PcdConfidentialComputingGuestAttr, CCAttrAmdSevSnp);
+CCGuestAttr = CCAttrAmdSevSnp;
   } else if (MemEncryptSevEsIsEnabled ()) {
-PcdStatus = PcdSet64S (PcdConfidentialComputingGuestAttr, CCAttrAmdSevEs);
+CCGuestAttr = CCAttrAmdSevEs;
   } else {
-PcdStatus = PcdSet64S (PcdConfidentialComputingGuestAttr, CCAttrAmdSev);
+CCGuestAttr = CCAttrAmdSev;
   }
 
+  if (MemEncryptSevEsDebugSwapIsEnabled ()) {
+CCGuestAttr |= CCAttrAmdSevFeatureDebugSwap;
+  }
+
+  PcdStatus = PcdSet64S (PcdConfidentialComputingGuestAttr, CCGuestAttr);
+
   ASSERT_RETURN_ERROR (PcdStatus);
 }
 
-- 
2.38.1



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




[edk2-devel] [PATCH ovmf 4/5] UefiCpuPkg: Add AMD SEV-ES features support

2022-11-30 Thread Alexey Kardashevskiy via groups.io
CONFIDENTIAL_COMPUTING_GUEST_ATTR is not a simple SEV level anymore
and includes a feature mask since a previous commit.

This fixes AmdMemEncryptionAttrCheck to check the level and feature
correctly and adds DebugSwap support.

Since the actual feature flag is not set yet, this should cause
no behavioral change.

Signed-off-by: Alexey Kardashevskiy 
---
 UefiCpuPkg/Library/MpInitLib/MpLib.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c 
b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index e5dc852ed95f..26e763295a7e 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
@@ -2849,19 +2849,23 @@ AmdMemEncryptionAttrCheck (
   IN  CONFIDENTIAL_COMPUTING_GUEST_ATTR  Attr
   )
 {
+  UINT64 CurrentLevel = CurrentAttr & ~CCAttrAmdSevFeatureMask;
+
   switch (Attr) {
 case CCAttrAmdSev:
   //
   // SEV is automatically enabled if SEV-ES or SEV-SNP is active.
   //
-  return CurrentAttr >= CCAttrAmdSev;
+  return CurrentLevel >= CCAttrAmdSev;
 case CCAttrAmdSevEs:
   //
   // SEV-ES is automatically enabled if SEV-SNP is active.
   //
-  return CurrentAttr >= CCAttrAmdSevEs;
+  return CurrentLevel >= CCAttrAmdSevEs;
 case CCAttrAmdSevSnp:
-  return CurrentAttr == CCAttrAmdSevSnp;
+  return CurrentLevel == CCAttrAmdSevSnp;
+case CCAttrAmdSevFeatureDebugSwap:
+  return !!(CurrentAttr & CCAttrAmdSevFeatureDebugSwap);
 default:
   return FALSE;
   }
-- 
2.38.1



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




[edk2-devel] [PATCH ovmf 1/5] MdePkg/Register/Amd: Define all bits from MSR_SEV_STATUS_REGISTER

2022-11-30 Thread Alexey Kardashevskiy via groups.io
We will need soon DebugSwap but others likely too.

Signed-off-by: Alexey Kardashevskiy 
---
 MdePkg/Include/Register/Amd/Fam17Msr.h | 57 +++-
 1 file changed, 56 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/Register/Amd/Fam17Msr.h 
b/MdePkg/Include/Register/Amd/Fam17Msr.h
index bb4e143e2456..f9474e6776f2 100644
--- a/MdePkg/Include/Register/Amd/Fam17Msr.h
+++ b/MdePkg/Include/Register/Amd/Fam17Msr.h
@@ -121,7 +121,62 @@ typedef union {
 ///
 UINT32SevSnpBit : 1;
 
-UINT32Reserved2 : 29;
+///
+/// [Bit 3] The guest was run with the Virtual TOM feature enabled in 
SEV_FEATURES[1]
+///
+UINT32vTOM_Enabled : 1;
+
+///
+/// [Bit 4] The guest was run with the ReflectVC feature enabled in 
SEV_FEATURES[2]
+///
+UINT32ReflectVC : 1;
+
+///
+/// [Bit 5] The guest was run with the Restricted Injection feature 
enabled in SEV_FEATURES[3]
+///
+UINT32RestrictedInjection : 1;
+
+///
+/// [Bit 6] The guest was run with the Alternate Injection feature enabled 
in SEV_FEATURES[4]
+///
+UINT32AlternateInjection : 1;
+
+///
+/// [Bit 7] This guest was run with debug register swapping enabled in 
SEV_FEATURES[5]
+///
+UINT32DebugSwap : 1;
+
+///
+/// [Bit 8]  This guest was run with the PreventHostIBS feature enabled in 
SEV_FEATURES[6]
+///
+UINT32PreventHostIBS : 1;
+
+///
+/// [Bit 9] The guest was run with the BTB isolation feature enabled in 
SEV_FEATURES[7]
+///
+UINT32SNPBTBIsolation : 1;
+
+///
+/// [Bit 10]
+///
+UINT32Reserved0 : 1;
+
+///
+/// [Bit 11] The guest was run with the Secure TSC feature enabled in 
SEV_FEATURES[9]
+///
+UINT32SecureTsc : 1;
+
+///
+/// [Bits 12 13 14 15]
+///
+UINT32Reserved1 : 4;
+
+///
+/// [Bit 16] The guest was run with the VMSA Register Protection feature 
enabled in SEV_FEATURES[14]
+///
+UINT32VmsaRegProt_Enabled : 1;
+
+UINT32Reserved2 : 15;
   } Bits;
   ///
   /// All bit fields as a 32-bit value
-- 
2.38.1



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




[edk2-devel] [PATCH ovmf 0/5] Enable AMD SEV-ES DebugSwap

2022-11-30 Thread Alexey Kardashevskiy via groups.io
This is to prevent #DB interception on SEV-ES VM with
enabled DebugSwap feature, more details in 3/5.

This is based on sha1 dd3ba82d31a6 and pushed out at
https://github.com/aik/edk2/commits/debugswap

The corresponding Linux change (HV and VM) is here:
https://github.com/aik/linux/commits/debugswap
and has just been posted to lkml/etc as
"[PATCH kernel 0/3] KVM: SEV: Enable AMD SEV-ES DebugSwap"

Please comment. Thanks.



Alexey Kardashevskiy (5):
  MdePkg/Register/Amd: Define all bits from MSR_SEV_STATUS_REGISTER
  MdePkg: Add AMD SEV features to PcdConfidentialComputingGuestAttr
  OvmfPkg: Add AMD SEV-ES DebugSwap feature support
  UefiCpuPkg: Add AMD SEV-ES features support
  OvmfPkf: Enable AMD SEV-ES DebugSwap for DXE

 MdePkg/Include/ConfidentialComputingGuestAttr.h|  5 +-
 MdePkg/Include/Register/Amd/Fam17Msr.h | 57 
+++-
 OvmfPkg/Include/Library/MemEncryptSevLib.h | 12 +
 OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c | 25 
+++--
 OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c | 19 +++
 OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c | 20 +++
 OvmfPkg/Library/CcExitLib/CcExitVcHandler.c|  8 +++
 OvmfPkg/PlatformPei/AmdSev.c   | 13 +++--
 UefiCpuPkg/Library/MpInitLib/MpLib.c   | 10 ++--
 9 files changed, 158 insertions(+), 11 deletions(-)

-- 
2.38.1



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




[edk2-devel] [PATCH ovmf 3/5] OvmfPkg: Add AMD SEV-ES DebugSwap feature support

2022-11-30 Thread Alexey Kardashevskiy via groups.io
The SEV-ES DebugSwap feature enables type B swaping of debug registers
on #VMEXIT and makes #DB and DR7 intercepts unnecessary and unwanted.

When DebugSwap is enabled, this stops booting if #VC for #DB or
DB7 read/write occurs as this signals unwanted interaction from the HV.

This adds new API which uses SEV-ES working area in PEI and SEC.

This does not change the existing behavour for DXE just yet but soon.

Signed-off-by: Alexey Kardashevskiy 
---
 OvmfPkg/Include/Library/MemEncryptSevLib.h | 12 
++
 OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c | 25 
+---
 OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c | 19 
+++
 OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c | 20 

 OvmfPkg/Library/CcExitLib/CcExitVcHandler.c|  8 +++
 5 files changed, 81 insertions(+), 3 deletions(-)

diff --git a/OvmfPkg/Include/Library/MemEncryptSevLib.h 
b/OvmfPkg/Include/Library/MemEncryptSevLib.h
index 4fa9c0d70083..0fa86aecc38c 100644
--- a/OvmfPkg/Include/Library/MemEncryptSevLib.h
+++ b/OvmfPkg/Include/Library/MemEncryptSevLib.h
@@ -166,6 +166,18 @@ MemEncryptSevGetEncryptionMask (
   VOID
   );
 
+/**
+  Returns a boolean to indicate whether DebugSwap is enabled.
+
+  @retval TRUE   DebugSwap is enabled
+  @retval FALSE  DebugSwap is not enabled
+**/
+BOOLEAN
+EFIAPI
+MemEncryptSevEsDebugSwapIsEnabled (
+  VOID
+  );
+
 /**
   Returns the encryption state of the specified virtual address range.
 
diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c 
b/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c
index 4aba0075b9e2..ffe5399c73ca 100644
--- a/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c
+++ b/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c
@@ -40,19 +40,23 @@ AmdMemEncryptionAttrCheck (
   IN  CONFIDENTIAL_COMPUTING_GUEST_ATTR  Attr
   )
 {
+  UINT64 CurrentLevel = CurrentAttr & ~CCAttrAmdSevFeatureMask;
+
   switch (Attr) {
 case CCAttrAmdSev:
   //
   // SEV is automatically enabled if SEV-ES or SEV-SNP is active.
   //
-  return CurrentAttr >= CCAttrAmdSev;
+  return CurrentLevel >= CCAttrAmdSev;
 case CCAttrAmdSevEs:
   //
   // SEV-ES is automatically enabled if SEV-SNP is active.
   //
-  return CurrentAttr >= CCAttrAmdSevEs;
+  return CurrentLevel >= CCAttrAmdSevEs;
 case CCAttrAmdSevSnp:
-  return CurrentAttr == CCAttrAmdSevSnp;
+  return CurrentLevel == CCAttrAmdSevSnp;
+case CCAttrAmdSevFeatureDebugSwap:
+  return !!(CurrentAttr & CCAttrAmdSevFeatureDebugSwap);
 default:
   return FALSE;
   }
@@ -159,3 +163,18 @@ MemEncryptSevGetEncryptionMask (
 
   return mSevEncryptionMask;
 }
+
+/**
+  Returns a boolean to indicate whether DebugSwap is enabled.
+
+  @retval TRUE   DebugSwap is enabled
+  @retval FALSE  DebugSwap is not enabled
+**/
+BOOLEAN
+EFIAPI
+MemEncryptSevEsDebugSwapIsEnabled (
+  VOID
+  )
+{
+  return ConfidentialComputingGuestHas (CCAttrAmdSevFeatureDebugSwap);
+}
diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c 
b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c
index 41d1246a5b31..e2ebc8afcaee 100644
--- a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c
+++ b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c
@@ -141,3 +141,22 @@ MemEncryptSevGetEncryptionMask (
 
   return SevEsWorkArea->EncryptionMask;
 }
+
+/**
+  Returns a boolean to indicate whether DebugSwap is enabled.
+
+  @retval TRUE   DebugSwap is enabled
+  @retval FALSE  DebugSwap is not enabled
+**/
+BOOLEAN
+EFIAPI
+MemEncryptSevEsDebugSwapIsEnabled (
+  VOID
+  )
+{
+  MSR_SEV_STATUS_REGISTER  Msr;
+
+  Msr.Uint32 = InternalMemEncryptSevStatus ();
+
+  return Msr.Bits.DebugSwap ? TRUE : FALSE;
+}
diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c 
b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c
index 27148c7e337a..974be9555296 100644
--- a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c
+++ b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c
@@ -142,6 +142,26 @@ MemEncryptSevGetEncryptionMask (
   return SevEsWorkArea->EncryptionMask;
 }
 
+
+/**
+  Returns a boolean to indicate whether DebugSwap is enabled.
+
+  @retval TRUE   DebugSwap is enabled
+  @retval FALSE  DebugSwap is not enabled
+**/
+BOOLEAN
+EFIAPI
+MemEncryptSevEsDebugSwapIsEnabled (
+  VOID
+  )
+{
+  MSR_SEV_STATUS_REGISTER  Msr;
+
+  Msr.Uint32 = InternalMemEncryptSevStatus ();
+
+  return Msr.Bits.DebugSwap ? TRUE : FALSE;
+}
+
 /**
   Locate the page range that covers the initial (pre-SMBASE-relocation) SMRAM
   Save State Map.
diff --git a/OvmfPkg/Library/CcExitLib/CcExitVcHandler.c 
b/OvmfPkg/Library/CcExitLi

[edk2-devel] Sct: SetDataFunction Check fail only occur when first run after by program Bios By DediProg Tool

2022-11-30 Thread Wang, Terry via groups.io
[AMD Official Use Only - General]

Hi Sir,
   I meet fail when do SetDataFunction Test and this only occurred on the first 
time after program Bios by DediProg
   The Function location :
  HIITest -> ConfigKeywordHandlerTest -> SetDataFunction

   I check the code flow and the result as below:
  The Function(BBTestSetDataFunctionTest) which is under 
ConfigKeywordHandlerBBTestFunction.c

  1.  The function call SetData with KeywordString1  and this would return 
NOT_FOUND (which is caused by ChipsetSATAPortDisable  Not Define in Vfr)
  2.  Then the function would call GetData with KeywordString2
  3.  The value is default define in 
"SctPkg\TestCase\UEFI\EFI\Protocol\ConfigKeywordHandler\BlackBoxTest\Dependency\SampleDriver\Vfr.vfr"

QuestionAboutTreeHugging and the value is "1"

Debug log as below:

GetData Results: 
NAMESPACE=x-UEFI-ns&PATH=01041400f4274aa000df424db55239511302113d7fff0400&KEYWORD=iSCSIBootEnable&VALUE=01

RespOfKeywordString2 = 
L"NAMESPACE=x-UEFI-ns&PATH=01041400f4274aa000df424db55239511302113d7fff0400&KEYWORD=iSCSIBootEnable&VALUE=00"

That's going to cause this condition to fail (0 == 
SctStrCmp(RespOfKeywordString2, Results))

Then fail occurred .

Fail Log as below:

[cid:image001.png@01D90585.26BC8AA0]


Please give you suggestion .

Best Regards
Terry Wang


















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


<>

Re: [edk2-devel] [PATCH] MdeModulePkg/RegularExpressionDxe: Fix GCC build error

2022-11-30 Thread Nickle Wang via groups.io
Hi Mike,

Thanks for your review.

> Or it may be simpler to only check for 32-bit archs and assume all others are 
> 64-bit.

I like this one. I will provide version 2 patch later.

Regards,
Nickle

-Original Message-
From: Kinney, Michael D  
Sent: Thursday, December 1, 2022 12:28 AM
To: devel@edk2.groups.io; Nickle Wang ; Kinney, Michael D 

Cc: Wang, Jian J ; Gao, Liming 
; Nick Ramirez 
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg/RegularExpressionDxe: Fix GCC 
build error

External email: Use caution opening links or attachments


Hi,

I see the following pattern in the RedfishPkg to cover all CPUs

#if defined (MDE_CPU_X64) || defined (MDE_CPU_AARCH64) || defined 
(MDE_CPU_RISCV64)
//
// With GCC we would normally use SIXTY_FOUR_BIT_LONG, but MSVC needs
// SIXTY_FOUR_BIT, because 'long' is 32-bit and only 'long long' is
// 64-bit. Since using 'long long' works fine on GCC too, just do that.
//
#define SIXTY_FOUR_BIT
#elif defined (MDE_CPU_IA32) || defined (MDE_CPU_ARM) || defined 
(MDE_CPU_EBC)
#define THIRTY_TWO_BIT
#endif

Can we apply the same pattern to OnigurumaUefiPort.h to define SIZEOF_VOIDP and 
add LOONGARCH64?

#if defined (MDE_CPU_X64) || defined (MDE_CPU_AARCH64) || defined 
(MDE_CPU_RISCV64) || defined (MDE_CPU_LOONGARCH64) #define SIZEOF_VOIDP  8 
#elif defined (MDE_CPU_IA32) || defined (MDE_CPU_ARM) || defined (MDE_CPU_EBC) 
#define SIZEOF_VOIDP  4 #endif

Or it may be simpler to only check for 32-bit archs and assume all others are 
64-bit.

#if defined (MDE_CPU_IA32) || defined (MDE_CPU_ARM) || defined (MDE_CPU_EBC) 
#define SIZEOF_VOIDP  4 #else #define SIZEOF_VOIDP  8 #endif


Thanks,

Mike

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Nickle 
> Wang via groups.io
> Sent: Wednesday, November 30, 2022 7:28 AM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J ; Gao, Liming 
> ; Nick Ramirez 
> Subject: [edk2-devel] [PATCH] MdeModulePkg/RegularExpressionDxe: Fix 
> GCC build error
>
> Fix GCC build error on AARCH64 system.
>
> Signed-off-by: Nickle Wang 
> Cc: Jian J Wang 
> Cc: Liming Gao 
> Cc: Nick Ramirez 
> ---
>  .../Universal/RegularExpressionDxe/OnigurumaUefiPort.h   | 5 +
>  1 file changed, 5 insertions(+)
>
> diff --git 
> a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
> b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
> index 3dc207da3e..e9dfd6de06 100644
> --- a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
> +++ b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
> @@ -4,6 +4,7 @@
>
>(C) Copyright 2014-2021 Hewlett Packard Enterprise Development LP
>Copyright (c) 2020, Intel Corporation. All rights reserved.
> +  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
>
>SPDX-License-Identifier: BSD-2-Clause-Patent  **/
> @@ -44,6 +45,10 @@ typedef INTNintptr_t;
>  #define SIZEOF_VOIDP  8
>  #endif
>
> +#ifdef MDE_CPU_AARCH64
> +#define SIZEOF_VOIDP  8
> +#endif
> +
>  #define calloc(n, s)AllocateZeroPool((n)*(s))
>  #define xmemmove(Dest, Src, Length) CopyMem(Dest,Src,Length)
>  #define xmemcpy(Dest, Src, Length)  CopyMem(Dest,Src,Length)
> --
> 2.38.1.windows.1
>
>
>
> 
>



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




Re: [edk2-devel] [edk2-staging][PATCH V2] edk2-staging/RedfishClientPkg: Fix typo

2022-11-30 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

Reviewed-by: Abner Chang 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Nickle
> Wang via groups.io
> Sent: Thursday, December 1, 2022 11:29 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner ; Igor Kulchytskyy
> ; Nick Ramirez 
> Subject: [edk2-devel] [edk2-staging][PATCH V2] edk2-
> staging/RedfishClientPkg: Fix typo
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> Fix typo in RedfishPlatformConfigImpl.c
> 
> Signed-off-by: Nickle Wang 
> Cc: Abner Chang 
> Cc: Igor Kulchytskyy 
> Cc: Nick Ramirez 
> ---
>  RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git
> a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c
> b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c
> index 525e666b6c..b2bb5f64e4 100644
> --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c
> +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c
> @@ -1,6 +1,6 @@
>  /** @file
> 
> -  The implementation of EDKII Redfidh Platform Config Protocol.
> +  The implementation of EDKII Redfish Platform Config Protocol.
> 
>(C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
> 
> --
> 2.38.1.windows.1
> 
> 
> 
> 
> 


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


<>

[edk2-devel] [edk2-staging][PATCH V2] edk2-staging/RedfishClientPkg: Fix typo

2022-11-30 Thread Nickle Wang via groups.io
Fix typo in RedfishPlatformConfigImpl.c

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
Cc: Nick Ramirez 
---
 RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c 
b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c
index 525e666b6c..b2bb5f64e4 100644
--- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c
+++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c
@@ -1,6 +1,6 @@
 /** @file
 
-  The implementation of EDKII Redfidh Platform Config Protocol.
+  The implementation of EDKII Redfish Platform Config Protocol.
 
   (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
 
-- 
2.38.1.windows.1



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




Re: [edk2-devel] Edk2 support MIPI SyS-T TraceHub Debug Library [TraceHubDebugLibSysT]

2022-11-30 Thread Guo, Gua
@Kinney, Michael D

As we offline sync, there are below opens like below. Have any open, please 
also share for us.


  1.  Need to add TraceHub PCD into edk2/MdeModulePkg.uni at master * 
tianocore/edk2 * 
GitHub

Answer: Will update it in next patch

  1.  What about the license ?

Answer: It's BSD license, based on public-mipi-sys-t/LICENSE at master * 
MIPI-Alliance/public-mipi-sys-t 
(github.com)

  1.  Is PcdTraceHubDebugAddress MMIO address ? If yes, why we use UINT32

Answer: It's MMIO address, we can change it to UINT64, it make sense to let the 
PCH more generic. Will update it in next patch.

  1.  For TraceHubWriteCataLog64_[0-6] try to use below macro to implement it.

#define VA_START va_start

#define VA_ARG   va_arg

#define VA_END   va_end

#define VA_LIST  va_list

Answer: Will update it in next patch

  1.  Is have SMM or MM version ?

Answer: MdeModulePkg/Library/TraceHubDebugLibSysT/DxeTraceHubDebugLibSyst.inf 
can take care for SMM case. We can rename it like below to make it more clearly.

MdeModulePkg/Library/TraceHubDebugLibSysT/DxeSmmTraceHubDebugLibSyst.inf

  1.  Whether have any chance to use .gitsubmodule to leverage 
https://github.com/MIPI-Alliance/public-mipi-sys-t.

Answer: Will draft another PR and try to use gitsubmodule to check whether 
exist any predicament.

Thanks
Gua

From: Guo, Gua
Sent: Wednesday, November 23, 2022 3:29 PM
To: Kinney, Michael D ; gaoliming 
; devel@edk2.groups.io
Cc: Chan, Laura ; Prakashan, Krishnadas Veliyathuparambil 
; K N, Karthik 
; Lu, James ; Chen, Arthur G 
; Chiu, Chasel ; Zimmer, 
Vincent ; Hsu, VictorX 
Subject: Edk2 support MIPI SyS-T TraceHub Debug Library [TraceHubDebugLibSysT]


@Kinney, Michael D and 
@gaoliming

We want to add TraceHubDebug library support on Edk2. It's new added library on 
Edk2, so it doesn't have any backward and forward issue.

May I know have any process we may need to follow up. Have any comment or 
concern please also share for me.



Reviewers/Maintainers: @Prakashan, Krishnadas 
Veliyathuparambil, 
@Chan, Laura, @K N, 
Karthik.



USF UPL spec update: 
https://github.com/UniversalScalableFirmware/documentation/pull/52 (Done)

Edk2 Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=4144 (On-Going)

Edk2 PR: https://github.com/tianocore/edk2/pull/3613 (On-Going)



Background:

  * Problem: In the UPL (Universal Payload) binary which contains only the 
Edk2 drivers, Tracehub debug message are missing during the execution of early 
DXE Core modules (before ReportStatusCode is ready).
  * Solution: Add TraceHub lib on Edk2, to be consumed by the UPL.


About TraceHubDebugLibSysT:

  *   Library is consumed by the DebugLib and StatusCodeHandler to send the 
PostCodes, ProgressCodes and DEBUG messages to the TraceHub/NPK in MIPI SyS-T 
format.
  *   The MIPI SyS-T APIs in this library are taken from the OpenSource 
implementation: https://github.com/MIPI-Alliance/public-mipi-sys-t.
  *   Library changes done for upstreaming:  MipiSystLib is rewritten to comply 
EDK2 coding standards and changed ways to pass trace address/verbosity with HOB 
directly instead of calling into TraceHubHookLib to get these info.
  *   Proposal With UPL: consume HOB gUniversalPayloadTraceHubDebugInfoGuid to 
print TraceHub Debug message in DXE Core

Thanks,
Gua


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




Re: [edk2-devel] [PATCH 0/3] Add reset support in Emulator/WinHost PEI

2022-11-30 Thread Ni, Ray
Andrew,
Can you please help to review or ACK the 3 patches (url listed as below):
https://edk2.groups.io/g/devel/message/96320
https://edk2.groups.io/g/devel/message/96319
https://edk2.groups.io/g/devel/message/96321

It's to support a need when some PEIMs want to reset the Emulator.

Thanks,
Ray

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Ni, Ray
> Sent: Saturday, November 12, 2022 12:01 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH 0/3] Add reset support in Emulator/WinHost
> PEI
> 
> Ray Ni (3):
>   EmulatorPkg/WinHost: pre-allocate "physical" RAM
>   EmulatorPkg/WinHost: XIP for SEC and PEI_CORE
>   EmulatorPkg/WinHost: Add Reset2 PPI
> 
>  EmulatorPkg/Win/Host/WinHost.c   | 139 ---
>  EmulatorPkg/Win/Host/WinHost.h   |   3 +-
>  EmulatorPkg/Win/Host/WinHost.inf |   3 +-
>  3 files changed, 93 insertions(+), 52 deletions(-)
> 
> --
> 2.37.2.windows.2
> 
> 
> 
> 
> 



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




Re: [edk2-devel] [PATCH v8 09/12] EmulatorPkg: CI: Use Fedora 35 container (Linux only)

2022-11-30 Thread Ni, Ray
Acked-by: Ray Ni 

> -Original Message-
> From: Oliver Steffen 
> Sent: Thursday, December 1, 2022 4:01 AM
> To: devel@edk2.groups.io
> Cc: Andrew Fish ; Ard Biesheuvel
> ; Feng, Bob C ; Daniel
> Schaefer ; Gerd Hoffmann ;
> Yao, Jiewen ; Justen, Jordan L
> ; Leif Lindholm ;
> Gao, Liming ; Kinney, Michael D
> ; Michael Kubacki
> ; Ni, Ray ; Sami
> Mujawar ; Sean Brogan
> ; Sunil V L ;
> Chen, Christine ; Liu, Zhiguang
> ; Pawel Polawski ; fernald,
> chris ; Oliver Steffen 
> Subject: [PATCH v8 09/12] EmulatorPkg: CI: Use Fedora 35 container (Linux
> only)
> 
> Run all Linux based jobs in a container, using a custom Fedora 35 image
> (gcc 11). The image is hosted on ghcr.io and the Dockerfiles are
> here: https://github.com/tianocore/containers
> The version numbers of gcc, iasl, and nasm are pinned to avoid
> unintended upgrades during image rebuild.
> 
> Use Python from the container image, do not download at runtime.
> 
> Signed-off-by: Oliver Steffen 
> ---
>  EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> index 416c15e70840..e58bb5b55245 100644
> --- a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> +++ b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> @@ -75,6 +75,8 @@ jobs:
>  pool:
>vmImage: $(vm_image)
> 
> +container: 'ghcr.io/tianocore/containers/fedora-35-test:2113a0e'
> +
>  steps:
>  - template: ../../../.azurepipelines/templates/platform-build-run-
> steps.yml
>parameters:
> @@ -85,3 +87,4 @@ jobs:
>  build_file: $(Build.File)
>  build_flags: $(Build.Flags)
>  run_flags: $(Run.Flags)
> +usePythonVersion: '' # use Python from the container image
> --
> 2.38.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#96801): https://edk2.groups.io/g/devel/message/96801
Mute This Topic: https://groups.io/mt/95366771/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] UnitTestFrameworkPkg: Library classes private to public

2022-11-30 Thread Ni, Ray
Reviewed-by: Ray Ni 

> -Original Message-
> From: Kinney, Michael D 
> Sent: Thursday, December 1, 2022 5:20 AM
> To: devel@edk2.groups.io
> Cc: Michael Kubacki ; Sean Brogan
> ; Ni, Ray ; Liu, Zhiguang
> 
> Subject: [Patch 1/1] UnitTestFrameworkPkg: Library classes private to public
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4178
> 
> * Change GoogleTestLib class from private to public.
> * Change UnitTestPersistenceLib class from private to public.
> 
> Cc: Michael Kubacki 
> Cc: Sean Brogan 
> Cc: Ray Ni 
> Cc: Zhiguang Liu 
> Signed-off-by: Michael D Kinney 
> ---
>  .../Library/UnitTestPersistenceLib.h|  0
>  UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec   | 13 +++--
>  2 files changed, 7 insertions(+), 6 deletions(-)
>  rename UnitTestFrameworkPkg/{PrivateInclude =>
> Include}/Library/UnitTestPersistenceLib.h (100%)
> 
> diff --git
> a/UnitTestFrameworkPkg/PrivateInclude/Library/UnitTestPersistenceLib.h
> b/UnitTestFrameworkPkg/Include/Library/UnitTestPersistenceLib.h
> similarity index 100%
> rename from
> UnitTestFrameworkPkg/PrivateInclude/Library/UnitTestPersistenceLib.h
> rename to UnitTestFrameworkPkg/Include/Library/UnitTestPersistenceLib.h
> diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
> b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
> index ed12f32009d8..14e387d63a0f 100644
> --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
> +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
> @@ -26,11 +26,16 @@ [Includes.Common.Private]
>Library/CmockaLib/cmocka/include/cmockery
>Library/GoogleTestLib/googletest/googletest
> 
> -[LibraryClasses.Common.Private]
> +[LibraryClasses]
>## @libraryclass Allows save and restore unit test internal state
>#
> -  UnitTestPersistenceLib|PrivateInclude/Library/UnitTestPersistenceLib.h
> +  UnitTestPersistenceLib|Include/Library/UnitTestPersistenceLib.h
> 
> +  ## @libraryclass GoogleTest infrastructure
> +  #
> +  GoogleTestLib|Include/Library/GoogleTestLib.h
> +
> +[LibraryClasses.Common.Private]
>## @libraryclass Provides a unit test result report
>#
>UnitTestResultReportLib|PrivateInclude/Library/UnitTestResultReportLib.h
> @@ -39,10 +44,6 @@ [LibraryClasses.Common.Private]
>#
>UnitTestBootLib|PrivateInclude/Library/UnitTestBootLib.h
> 
> -  ## @libraryclass GoogleTest infrastructure
> -  #
> -  GoogleTestLib|Include/Library/GoogleTestLib.h
> -
>  [Guids]
>gUnitTestFrameworkPkgTokenSpaceGuid = { 0x833d3aba, 0x39b4, 0x43a2,
> { 0xb9, 0x30, 0x7a, 0x34, 0x53, 0x39, 0x31, 0xb3 } }
> 
> --
> 2.37.1.windows.1



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




Re: [edk2-devel] [PATCH] UefiPayloadPkg: Define default values for the DynamicEX PCDs

2022-11-30 Thread Guo, Gua
@jdzh...@kunluntech.com.cn

Edk2 hardware freeze in unlock, Could you help send the Edk2 PR for it ? We can 
help to check in it to unlock the ECC failure.

Thanks
Gua
From: Guo, Gua
Sent: Friday, November 11, 2022 9:40 AM
To: devel@edk2.groups.io; jdzh...@kunluntech.com.cn
Subject: RE: [edk2-devel] [PATCH] UefiPayloadPkg: Define default values for the 
DynamicEX PCDs

Due to hardware freeze, it needs to wait after hardware freeze.

Reviewed-by: Gua Guo mailto:gua@intel.com>>

From: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>> On Behalf Of Jiading Zhang
Sent: Friday, November 11, 2022 8:56 AM
To: devel@edk2.groups.io
Subject: [edk2-devel] [PATCH] UefiPayloadPkg: Define default values for the 
DynamicEX PCDs

The following PCDs have no value in UefiPayloadPkg.dsc,and they can not pass 
the Ecc tool check, so assign the default values the same as they are in *.dec 
file.
  gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport
  gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport
  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport
  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize
  gUefiCpuPkgTokenSpaceGuid.PcdCpuApInitTimeOutInMicroSeconds
  gUefiCpuPkgTokenSpaceGuid.PcdCpuApLoopMode
  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress
  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize

Signed-off-by: jdzhang 
mailto:jdzh...@kunluntech.com.cn>>
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc 
b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 1150be6acd..ce7d3a7f89 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -530,14 +530,14 @@
   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|$(UART_DEFAULT_PARITY)
   gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|$(UART_DEFAULT_STOP_BITS)
   gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|$(DEFAULT_TERMINAL_TYPE)
-  gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport
-  gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize
-  gUefiCpuPkgTokenSpaceGuid.PcdCpuApInitTimeOutInMicroSeconds
-  gUefiCpuPkgTokenSpaceGuid.PcdCpuApLoopMode
-  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress
-  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport|TRUE
+  gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport|FALSE
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport|TRUE
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSystemPageSize|0x1
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuApInitTimeOutInMicroSeconds|5
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuApLoopMode|1
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress|0x0
+  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize|0x0
 !if ($(TARGET) == DEBUG || $(USE_CBMEM_FOR_CONSOLE) == TRUE)
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
 !else
--
2.38.1.windows.1




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




Re: [edk2-devel] [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: Fix GCC build error

2022-11-30 Thread Igor Kulchytskyy via groups.io
Reviewed-by: Igor Kulchytskyy 

-Original Message-
From: Chang, Abner 
Sent: Wednesday, November 30, 2022 7:53 PM
To: Nickle Wang ; devel@edk2.groups.io
Cc: Igor Kulchytskyy ; Nick Ramirez 
Subject: [EXTERNAL] RE: [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: 
Fix GCC build error


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

[AMD Official Use Only - General]

Reviewed-by: Abner Chang 

> -Original Message-
> From: Nickle Wang 
> Sent: Wednesday, November 30, 2022 11:24 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner ; Igor Kulchytskyy
> ; Nick Ramirez 
> Subject: [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: Fix GCC
> build error
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> Fix below GCC build error:
> 1) "Head" dereference issue.
> 2) "BooleanArrayBuffer" uninitialized variable issue.
> 3) Multiple definition of mRedfishVariableGuid.
> 4) Multiple definition of medfishResourceConfigProtocolHandle.
>
> Signed-off-by: Nickle Wang 
> Cc: Abner Chang 
> Cc: Igor Kulchytskyy 
> Cc: Nick Ramirez 
> ---
>  RedfishClientPkg/Include/RedfishBase.h   | 3 ++-
>  .../EdkIIRedfishResourceConfigLib.c  | 9 +
>  .../RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c  | 5 +++--
>  RedfishClientPkg/RedfishClientPkg.dec| 4 
>  .../RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c| 9 +
>  .../RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf  | 2 ++
>  RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c | 9 +
>  RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.inf   | 2 ++
>  8 files changed, 28 insertions(+), 15 deletions(-)
>
> diff --git a/RedfishClientPkg/Include/RedfishBase.h
> b/RedfishClientPkg/Include/RedfishBase.h
> index cf320bb0eb..ea716d7054 100644
> --- a/RedfishClientPkg/Include/RedfishBase.h
> +++ b/RedfishClientPkg/Include/RedfishBase.h
> @@ -2,6 +2,7 @@
>Redfish base header file.
>
>(C) Copyright 2022 Hewlett Packard Enterprise Development LP
> +  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
>
>SPDX-License-Identifier: BSD-2-Clause-Patent
>
> @@ -16,6 +17,6 @@
>  ///
>  /// This GUID is used for an EFI Variable that stores the Redfish data.
>  ///
> -EFI_GUID mRedfishVariableGuid = {0x91c46a3d, 0xed1a, 0x477b, {0xa5,
> 0x33, 0x87, 0x2d, 0xcd, 0xb0, 0xfc, 0xc1}};
> +extern EFI_GUID gEfiRedfishClientVariableGuid;
>
>  #endif
> diff --git
> a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishR
> esourc
> eConfigLib.c
> b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishR
> esourc
> eConfigLib.c
> index 0d733bc6d2..c1598ffda6 100644
> ---
> a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishR
> esourc
> eConfigLib.c
> +++ b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedf
> +++ is
> +++ hResourceConfigLib.c
> @@ -2,6 +2,7 @@
>Redfish resource config library implementation
>
>(C) Copyright 2022 Hewlett Packard Enterprise Development LP
> +  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
>
>SPDX-License-Identifier: BSD-2-Clause-Patent
>
> @@ -17,7 +18,7 @@
>  #include 
>
>  EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL
> *mRedfishResourceConfigProtocol = NULL;
> -EFI_HANDLE medfishResourceConfigProtocolHandle;
> +EFI_HANDLE mCachedHandle;
>  EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL
> mRedfishFeatureInterchangeData;
>  REDFISH_SCHEMA_INFOmSchemaInfoCache;
>
> @@ -254,7 +255,7 @@ GetRedfishResourceConfigProtocol (
>  AsciiStrCmp (Schema->Minor, mSchemaInfoCache.Minor) == 0 &&
>  AsciiStrCmp (Schema->Errata, mSchemaInfoCache.Errata) == 0) {
>if (Handle != NULL) {
> -*Handle = medfishResourceConfigProtocolHandle;
> +*Handle = mCachedHandle;
>}
>return mRedfishResourceConfigProtocol;
>  }
> @@ -298,7 +299,7 @@ GetRedfishResourceConfigProtocol (
>}
>
>if (Found) {
> -medfishResourceConfigProtocolHandle = HandleBuffer[Index];
> +mCachedHandle = HandleBuffer[Index];
>  mRedfishResourceConfigProtocol = Protocol;
>  CopyMem (&mSchemaInfoCache, Schema, sizeof (REDFISH_SCHEMA_INFO));
>  if (Handle != NULL) {
> @@ -372,7 +373,7 @@ EdkIIRedfishResourceSetConfigureLang (
>EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL *Interface;
>
>Status = gBS->HandleProtocol (
> -  medfishResourceConfigProtocolHandle,
> +  mCachedHandle,
>&gEdkIIRedfishFeatureInterchangeDataProtocolGuid,
>(VOID **)&Interface
>  );
> diff --git
> a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/Redfish

回复: [edk2-devel] [PATCH] MdeModulePkg: Disable PciDegrade support for LoongArch64

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

 

发件人: devel@edk2.groups.io  代表 Chao Li
发送时间: 2022年11月21日 14:40
收件人: devel@edk2.groups.io; lic...@loongson.cn
抄送: " devel@edk2.groups.io " ; " qiandong...@loongson.cn 
" ; Jian J Wang ; Liming Gao 
; Ray Ni ; Bo Zhu 

主题: Re: [edk2-devel] [PATCH] MdeModulePkg: Disable PciDegrade support for 
LoongArch64

 

Hi Liming, Jian and Ray,

Please help to review this change, thanks!

 


Thanks,
Chao


On 11月 17 2022, at 7:59 晚上, "Chao Li" mailto:lic...@loongson.cn> > wrote:

Reviewed-by: Chao Li mailto:lic...@loongson.cn> >

 

 

Thanks,

Chao



 

On 11月 17 2022, at 4:47 下午, "Dongyan Qian" mailto:qiandong...@loongson.cn> > wrote:

LoongArch64: Pcie devices that come with OPROM may require large Mem Space,

and downgrading all 64 Bit Bars may result in insufficient space.

 

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

 

Cc: Jian J Wang mailto:jian.j.w...@intel.com> >

Cc: Liming Gao mailto:gaolim...@byosoft.com.cn> >

Cc: Ray Ni mailto:ray...@intel.com> >

Cc: Chao Li mailto:lic...@loongson.cn> >

Signed-off-by: Dongyan Qian mailto:qiandong...@loongson.cn> >

Co-authored-by: Bo Zhu mailto:zh...@loongson.cn> >

---

MdeModulePkg/MdeModulePkg.dec | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

 

diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec

index 58e6ab0048..be5e829ca9 100644

--- a/MdeModulePkg/MdeModulePkg.dec

+++ b/MdeModulePkg/MdeModulePkg.dec

@@ -917,7 +917,7 @@

# @Prompt Enable process non-reset capsule image at runtime.

 

gEfiMdeModulePkgTokenSpaceGuid.PcdSupportProcessCapsuleAtRuntime|FALSE|BOOLEAN|0x00010079





-[PcdsFeatureFlag.IA32, PcdsFeatureFlag.ARM, PcdsFeatureFlag.AARCH64]

 

+[PcdsFeatureFlag.IA32, PcdsFeatureFlag.ARM, PcdsFeatureFlag.AARCH64, 
PcdsFeatureFlag.LOONGARCH64]

 

gEfiMdeModulePkgTokenSpaceGuid.PcdPciDegradeResourceForOptionRom|FALSE|BOOLEAN|0x0001003a





[PcdsFeatureFlag.IA32, PcdsFeatureFlag.X64]

 

--

2.36.1.windows.1





- - - - - -

Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#96470): https://edk2.groups.io/g/devel/message/96470

Mute This Topic: https://groups.io/mt/95087855/6496846

Group Owner: devel+ow...@edk2.groups.io  

Unsubscribe: https://edk2.groups.io/g/devel/unsub [lic...@loongson.cn]

- - - - - -





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




Re: [edk2-devel] [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: Fix GCC build error

2022-11-30 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

Reviewed-by: Abner Chang 

> -Original Message-
> From: Nickle Wang 
> Sent: Wednesday, November 30, 2022 11:24 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner ; Igor Kulchytskyy
> ; Nick Ramirez 
> Subject: [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: Fix GCC build
> error
> 
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
> 
> 
> Fix below GCC build error:
> 1) "Head" dereference issue.
> 2) "BooleanArrayBuffer" uninitialized variable issue.
> 3) Multiple definition of mRedfishVariableGuid.
> 4) Multiple definition of medfishResourceConfigProtocolHandle.
> 
> Signed-off-by: Nickle Wang 
> Cc: Abner Chang 
> Cc: Igor Kulchytskyy 
> Cc: Nick Ramirez 
> ---
>  RedfishClientPkg/Include/RedfishBase.h   | 3 ++-
>  .../EdkIIRedfishResourceConfigLib.c  | 9 +
>  .../RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c  | 5 +++--
>  RedfishClientPkg/RedfishClientPkg.dec| 4 
>  .../RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c| 9 +
>  .../RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf  | 2 ++
>  RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c | 9 +
>  RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.inf   | 2 ++
>  8 files changed, 28 insertions(+), 15 deletions(-)
> 
> diff --git a/RedfishClientPkg/Include/RedfishBase.h
> b/RedfishClientPkg/Include/RedfishBase.h
> index cf320bb0eb..ea716d7054 100644
> --- a/RedfishClientPkg/Include/RedfishBase.h
> +++ b/RedfishClientPkg/Include/RedfishBase.h
> @@ -2,6 +2,7 @@
>Redfish base header file.
> 
>(C) Copyright 2022 Hewlett Packard Enterprise Development LP
> +  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
> 
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> @@ -16,6 +17,6 @@
>  ///
>  /// This GUID is used for an EFI Variable that stores the Redfish data.
>  ///
> -EFI_GUID mRedfishVariableGuid = {0x91c46a3d, 0xed1a, 0x477b, {0xa5, 0x33,
> 0x87, 0x2d, 0xcd, 0xb0, 0xfc, 0xc1}};
> +extern EFI_GUID gEfiRedfishClientVariableGuid;
> 
>  #endif
> diff --git
> a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourc
> eConfigLib.c
> b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourc
> eConfigLib.c
> index 0d733bc6d2..c1598ffda6 100644
> ---
> a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourc
> eConfigLib.c
> +++ b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfis
> +++ hResourceConfigLib.c
> @@ -2,6 +2,7 @@
>Redfish resource config library implementation
> 
>(C) Copyright 2022 Hewlett Packard Enterprise Development LP
> +  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
> 
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> @@ -17,7 +18,7 @@
>  #include 
> 
>  EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL
> *mRedfishResourceConfigProtocol = NULL;
> -EFI_HANDLE medfishResourceConfigProtocolHandle;
> +EFI_HANDLE mCachedHandle;
>  EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL
> mRedfishFeatureInterchangeData;
>  REDFISH_SCHEMA_INFOmSchemaInfoCache;
> 
> @@ -254,7 +255,7 @@ GetRedfishResourceConfigProtocol (
>  AsciiStrCmp (Schema->Minor, mSchemaInfoCache.Minor) == 0 &&
>  AsciiStrCmp (Schema->Errata, mSchemaInfoCache.Errata) == 0) {
>if (Handle != NULL) {
> -*Handle = medfishResourceConfigProtocolHandle;
> +*Handle = mCachedHandle;
>}
>return mRedfishResourceConfigProtocol;
>  }
> @@ -298,7 +299,7 @@ GetRedfishResourceConfigProtocol (
>}
> 
>if (Found) {
> -medfishResourceConfigProtocolHandle = HandleBuffer[Index];
> +mCachedHandle = HandleBuffer[Index];
>  mRedfishResourceConfigProtocol = Protocol;
>  CopyMem (&mSchemaInfoCache, Schema, sizeof (REDFISH_SCHEMA_INFO));
>  if (Handle != NULL) {
> @@ -372,7 +373,7 @@ EdkIIRedfishResourceSetConfigureLang (
>EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL *Interface;
> 
>Status = gBS->HandleProtocol (
> -  medfishResourceConfigProtocolHandle,
> +  mCachedHandle,
>&gEdkIIRedfishFeatureInterchangeDataProtocolGuid,
>(VOID **)&Interface
>  );
> diff --git
> a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
> b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
> index 61383e2310..bfd6fff2a7 100644
> ---
> a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
> +++ b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUt
> +++ ilityLib.c
> @@ -2,6 +2,7 @@
>Redfish feature utility library implementation
> 
>(C) Copyright 2020-2022 Hewlett Packard Enterprise De

Re: [edk2-devel] [PATCH v9 06/12] BaseTools: CI: Use Fedora 35 container (Linux only)

2022-11-30 Thread Michael Kubacki
The changes in .azurepipelines and BaseTools need to be split up into 
separate patches.


On 11/30/2022 5:01 PM, Oliver Steffen wrote:

Run all Linux based jobs in a container, using a custom Fedora 35 image
(gcc 11). The image is hosted on ghcr.io and the Dockerfiles are
here: https://github.com/tianocore/containers
The version numbers of gcc, iasl, and nasm are pinned to avoid
unintended upgrades during image rebuild.

Do not run apt-get in CI jobs to install qemu and gcc dependencies.
Assume the container image provides these.

Use Python from the container image, do not download at runtime.

Remove BaseTools/Bin/gcc_*_ext_dep.yaml to stop
downloading gcc from external locations; use the
gcc provided by the container image instead.
The container image sets the variable GCC5_*_PREFIX accordingly.

Signed-off-by: Oliver Steffen 
---
  .azurepipelines/Ubuntu-GCC5.yml   |  2 ++
  .../templates/basetools-build-steps.yml   |  9 
  BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml  | 21 --
  BaseTools/Bin/gcc_arm_linux_ext_dep.yaml  | 21 --
  ...gcc_loongarch64_unknown_linux_ext_dep.yaml | 22 ---
  .../Bin/gcc_riscv64_unknown_ext_dep.yaml  | 22 ---
  6 files changed, 2 insertions(+), 95 deletions(-)
  delete mode 100644 BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
  delete mode 100644 BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
  delete mode 100644 BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml
  delete mode 100644 BaseTools/Bin/gcc_riscv64_unknown_ext_dep.yaml

diff --git a/.azurepipelines/Ubuntu-GCC5.yml b/.azurepipelines/Ubuntu-GCC5.yml
index 1acd8d2a46a7..0dd9b74de57a 100644
--- a/.azurepipelines/Ubuntu-GCC5.yml
+++ b/.azurepipelines/Ubuntu-GCC5.yml
@@ -18,5 +18,7 @@ jobs:
parameters:
  tool_chain_tag: 'GCC5'
  vm_image: 'ubuntu-latest'
+container: 'ghcr.io/tianocore/containers/fedora-35-build:2113a0e'
+usePythonVersion: ''  # use Python from the container image
  arch_list: "IA32,X64,ARM,AARCH64,RISCV64,LOONGARCH64"

diff --git a/.azurepipelines/templates/basetools-build-steps.yml
b/.azurepipelines/templates/basetools-build-steps.yml
index d8c108c6e212..a72758bc3395 100644
--- a/.azurepipelines/templates/basetools-build-steps.yml
+++ b/.azurepipelines/templates/basetools-build-steps.yml
@@ -10,15 +10,6 @@ parameters:
tool_chain_tag: ''

  steps:
-- ${{ if contains(parameters.tool_chain_tag, 'GCC') }}:
-  - bash: sudo apt-get update
-displayName: Update apt
-condition: and(gt(variables.pkg_count, 0), succeeded())
-
-  - bash: sudo apt-get install gcc g++ make uuid-dev
-displayName: Install required tools
-condition: and(gt(variables.pkg_count, 0), succeeded())
-
  - task: CmdLine@1
displayName: Build Base Tools from source
inputs:
diff --git a/BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
b/BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
deleted file mode 100644
index ff8a9e868100..
--- a/BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-## @file
-# Download GCC AARCH64 compiler from Arm's release site
-# Set shell variable GCC5_AARCH64_INSTALL to this folder
-#
-# This is only downloaded when a build activates scope gcc_aarch64_linux
-#
-# Copyright (c) Microsoft Corporation.
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-##
-{
-  "scope": "gcc_aarch64_linux",
-  "type": "web",
-  "name": "gcc_aarch64_linux",
-  "source": 
"https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu.tar.xz";,
-  "version": "11.2-2022.02",
-  "sha256": "52dbac3eb71dbe0916f60a8c5ab9b7dc9b66b3ce513047baa09fae56234e53f3",
-  "compression_type": "tar",
-  "internal_path": "/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/",
-  "flags": ["set_shell_var", ],
-  "var_name": "GCC5_AARCH64_INSTALL"
-}
diff --git a/BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
b/BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
deleted file mode 100644
index 151cbfa4b532..
--- a/BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-## @file
-# Download GCC ARM compiler from Arm's release site
-# Set shell variable GCC5_ARM_INSTALL to this folder
-#
-# This is only downloaded when a build activates scope gcc_arm_linux
-#
-# Copyright (c) Microsoft Corporation.
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-##
-{
-  "scope": "gcc_arm_linux",
-  "type": "web",
-  "name": "gcc_arm_linux",
-  "source": 
"https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf.tar.xz";,
-  "version": "11.2-2022.02",
-  "sha256": "c254f7199261fe76c32ef42187502839bda7efad0a66646cf739d074eff45fad",
-  "compression_type": "tar",
-  "internal_path": "/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf/",
-  "flags": ["set_shell_var", ],
-  "var_name": "GCC5_ARM_INSTALL"
-}
diff --git a/BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_de

Re: [edk2-devel] [PATCH v9 05/12] CI: Allow running in a container.

2022-11-30 Thread Michael Kubacki

Reviewed-by: Michael Kubacki 

On 11/30/2022 5:01 PM, Oliver Steffen wrote:

Add a parameter of the pr-gate-build-job template to specify a
container image URL.  If the value is not '' (default), then the
jobs will be run inside a container based on that image.

Signed-off-by: Oliver Steffen 
---
  .azurepipelines/templates/pr-gate-build-job.yml | 4 
  1 file changed, 4 insertions(+)

diff --git a/.azurepipelines/templates/pr-gate-build-job.yml
b/.azurepipelines/templates/pr-gate-build-job.yml
index f0ef1142da49..5ffcaca7b591 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -12,6 +12,7 @@ parameters:
tool_chain_tag: ''
vm_image: ''
arch_list: ''
+  container: ''
usePythonVersion: ''

  # Build step
@@ -71,6 +72,9 @@ jobs:
pool:
  vmImage: ${{ parameters.vm_image }}

+  ${{ if not(eq(parameters.container, '')) }}:
+container: ${{ parameters.container }}
+
steps:
- template: pr-gate-steps.yml
  parameters:



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




Re: [edk2-devel] [PATCH v9 04/12] CI: add ~/.local/bin to PATH (Linux only)

2022-11-30 Thread Michael Kubacki

Hi Oliver,

I think the commit message is too vague. Can you please add a bit more 
context?


With that:

Reviewed-by: Michael Kubacki 

On 11/30/2022 5:01 PM, Oliver Steffen wrote:

Fix pip install under certain conditions.

Signed-off-by: Oliver Steffen 
---
  .azurepipelines/templates/platform-build-run-steps.yml | 6 ++
  .azurepipelines/templates/pr-gate-steps.yml| 6 ++
  2 files changed, 12 insertions(+)

diff --git a/.azurepipelines/templates/platform-build-run-steps.yml
b/.azurepipelines/templates/platform-build-run-steps.yml
index 8803d80cf51c..087f460d7fec 100644
--- a/.azurepipelines/templates/platform-build-run-steps.yml
+++ b/.azurepipelines/templates/platform-build-run-steps.yml
@@ -39,6 +39,12 @@ parameters:
default: ''

  steps:
+- bash: |
+echo "##vso[task.prependpath]${HOME}/.local/bin"
+echo "new PATH=${PATH}"
+  displayName: Set PATH
+  condition: eq('${{ parameters.tool_chain_tag }}', 'GCC5')
+
  - checkout: self
clean: true
fetchDepth: 1
diff --git a/.azurepipelines/templates/pr-gate-steps.yml
b/.azurepipelines/templates/pr-gate-steps.yml
index 27a44c06011c..99d52cfa0605 100644
--- a/.azurepipelines/templates/pr-gate-steps.yml
+++ b/.azurepipelines/templates/pr-gate-steps.yml
@@ -15,6 +15,12 @@ parameters:
usePythonVersion: ''

  steps:
+- bash: |
+echo "##vso[task.prependpath]${HOME}/.local/bin"
+echo "new PATH=${PATH}"
+  displayName: Set PATH
+  condition: eq('${{ parameters.tool_chain_tag }}', 'GCC5')
+
  - checkout: self
clean: true
fetchDepth: 1



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




Re: [edk2-devel] [PATCH v9 03/12] EmulatorPkg: CI: use Python version from defaults template

2022-11-30 Thread Michael Kubacki
Like patch v9 1/12 & v9 2/12, I suggest updating Ubuntu-GCC5.yml in 
EmulatorPkg/PlatformCI/.azurepipelines to use the template in this patch.


On 11/30/2022 5:01 PM, Oliver Steffen wrote:

Use the default Python version from the defaults template
(.azurepipelines/templates/defaults.yml) in the Windows
CI jobs.

Previous changes to the CI job templates make it necessary
to specify a version number, if Python shall be pulled
at CI runtime.

The Linux CI jobs will use Python from the container image,
so these changes are for Windows only.

Signed-off-by: Oliver Steffen 
---
  EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml | 4 
  1 file changed, 4 insertions(+)

diff --git a/EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
b/EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
index e7ead06ae266..09960e7c7a6e 100644
--- a/EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
+++ b/EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
@@ -16,6 +16,9 @@ pr:
- master
- stable/*

+variables:
+  - template: ../../../.azurepipelines/templates/defaults.yml
+
  jobs:
- job: Platform_CI
  variables:
@@ -128,3 +131,4 @@ jobs:
  build_file: $(Build.File)
  build_flags: $(Build.Flags)
  run_flags: $(Run.Flags)
+usePythonVersion: ${{ variables.default_python_version }}



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




Re: [edk2-devel] [PATCH v9 02/12] OvmfPkg: CI: use Python version from defaults template

2022-11-30 Thread Michael Kubacki
Like patch v9 1/12, I suggest updating Ubuntu-GCC5.yml in 
OvmfPkg/PlatformCI/.azurepipelines to use the template in this patch.


On 11/30/2022 5:01 PM, Oliver Steffen wrote:

Use the default Python version from the defaults template
(.azurepipelines/templates/defaults.yml) in the Windows
CI jobs.

Previous changes to the CI job templates make it necessary
to specify a version number, if Python shall be pulled
at CI runtime.

The Linux CI jobs will use Python from the container image,
so these changes are for Windows only.

Signed-off-by: Oliver Steffen 
---
  OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml | 5 +
  1 file changed, 5 insertions(+)

diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
b/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
index 7d6344d6383d..7e63f419b26b 100644
--- a/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
+++ b/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
@@ -14,6 +14,10 @@ trigger:
  pr:
- master
- stable/*
+
+variables:
+  - template: ../../../.azurepipelines/templates/defaults.yml
+
  jobs:
- job: Platform_CI
  variables:
@@ -133,6 +137,7 @@ jobs:
  build_file: $(Build.File)
  build_flags: $(Build.Flags)
  run_flags: $(Run.Flags)
+usePythonVersion: ${{ variables.default_python_version }}
  extra_install_step:
  - powershell: choco install qemu --version=2021.5.5;
Write-Host "##vso[task.prependpath]c:\Program Files\qemu"
displayName: Install QEMU and Set QEMU on path # friendly
name displayed in the UI



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




Re: [edk2-devel] [PATCH v9 11/12] CI: use latest vm_image (Linux only)

2022-11-30 Thread Michael Kubacki
Please update the commit message to `ubuntu-22.04` instead of 
`ubuntu-latest` since you updated in the image in the file from the 
original patch.


Reviewed-by: Michael Kubacki 

On 11/30/2022 5:01 PM, Oliver Steffen wrote:

Switch over to `ubuntu-latest` as the vm_image for Linux
CI jobs (EmulatorPkg, ArmVirtPkg, OvmfPkg).
The previously used ubuntu-18.04 will not be available
after Dec 1st 2022.

Signed-off-by: Oliver Steffen 
---
  ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml  | 2 +-
  EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 2 +-
  OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index 6d75502b5628..568b61768d67 100644
--- a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -19,7 +19,7 @@ jobs:
- job: Platform_CI
  variables:
package: 'ArmVirtPkg'
-  vm_image: 'ubuntu-18.04'
+  vm_image: 'ubuntu-22.04'
should_run: true
run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"

diff --git a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index e58bb5b55245..4d92f5fd5478 100644
--- a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -19,7 +19,7 @@ jobs:
- job: Platform_CI
  variables:
package: 'EmulatorPkg'
-  vm_image: 'ubuntu-18.04'
+  vm_image: 'ubuntu-22.04'
should_run: false
run_flags: "MAKE_STARTUP_NSH=TRUE"

diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index 984782aa7d19..865a7458e971 100644
--- a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -19,7 +19,7 @@ jobs:
- job: Platform_CI
  variables:
package: 'OvmfPkg'
-  vm_image: 'ubuntu-18.04'
+  vm_image: 'ubuntu-22.04'
should_run: true
run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"




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




Re: [edk2-devel] [PATCH v9 10/12] .pytool: CISettings.py: don't add scopes for GCC

2022-11-30 Thread Michael Kubacki
Not a big deal but I think it would be cleaner to remove the scopes in a 
commit before the ext_dep files are actually removed.


For the changes in this patch:

Reviewed-by: Michael Kubacki 

On 11/30/2022 5:01 PM, Oliver Steffen wrote:

All ext_dep.yml files for gcc have been removed and gcc
is expected to be installed on the system (GCC5_*_PREFIX
may indicate the location).
No need to adjust the toolchain scopes for Linux builds
anymore.

Signed-off-by: Oliver Steffen 
---
  .pytool/CISettings.py | 9 -
  1 file changed, 9 deletions(-)

diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py
index 76ac2b09dba6..d87c8e838e61 100644
--- a/.pytool/CISettings.py
+++ b/.pytool/CISettings.py
@@ -169,15 +169,6 @@ class Settings(CiBuildSettingsManager,
UpdateSettingsManager, SetupSettingsManag
  else:
  logging.warning("Falling back to using in-tree BaseTools")

-if is_linux and self.ActualToolChainTag.upper().startswith("GCC"):
-if "AARCH64" in self.ActualArchitectures:
-scopes += ("gcc_aarch64_linux",)
-if "ARM" in self.ActualArchitectures:
-scopes += ("gcc_arm_linux",)
-if "RISCV64" in self.ActualArchitectures:
-scopes += ("gcc_riscv64_unknown",)
-if "LOONGARCH64" in self.ActualArchitectures:
-scopes += ("gcc_loongarch64_unknown_linux",)
  self.ActualScopes = scopes
  return self.ActualScopes




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




Re: [edk2-devel] [PATCH v9 01/12] CI: make Python version configurable

2022-11-30 Thread Michael Kubacki
I think you should update Ubuntu-GCC5.yml to use templates/defaults.yml 
in this commit since at this point in time containers are not used yet.


Can you also add a copyright header to defaults.yml? Then it will be 
consistent with other yaml files and in place as the file grows in the 
future.


Thanks,
Michael

On 11/30/2022 5:01 PM, Oliver Steffen wrote:

Add a new parameter "usePythonVersion" to the CI job templates.
This makes it possible to specify the version of Python to use.
The default value is '', in which case Python will not be downloaded
at runtime and the one provided by the VM/container image will be used.

Additionally, add a template .azurepipelines/templates/defaults.yml,
from which the default Pyhton version string can be obtained.

Signed-off-by: Oliver Steffen 
---
  .azurepipelines/Windows-VS2019.yml | 4 
  .azurepipelines/templates/defaults.yml | 3 +++
  .azurepipelines/templates/platform-build-run-steps.yml | 6 +-
  .azurepipelines/templates/pr-gate-build-job.yml| 2 ++
  .azurepipelines/templates/pr-gate-steps.yml| 6 --
  5 files changed, 18 insertions(+), 3 deletions(-)
  create mode 100644 .azurepipelines/templates/defaults.yml

diff --git a/.azurepipelines/Windows-VS2019.yml
b/.azurepipelines/Windows-VS2019.yml
index e4bd4b1d2283..89bccde82575 100644
--- a/.azurepipelines/Windows-VS2019.yml
+++ b/.azurepipelines/Windows-VS2019.yml
@@ -12,9 +12,13 @@ pr:
  - master
  - stable/*

+variables:
+  - template: templates/defaults.yml
+
  jobs:
  - template: templates/pr-gate-build-job.yml
parameters:
  tool_chain_tag: 'VS2019'
  vm_image: 'windows-2019'
  arch_list: "IA32,X64"
+usePythonVersion: ${{ variables.default_python_version }}
diff --git a/.azurepipelines/templates/defaults.yml
b/.azurepipelines/templates/defaults.yml
new file mode 100644
index ..314d03e33af8
--- /dev/null
+++ b/.azurepipelines/templates/defaults.yml
@@ -0,0 +1,3 @@
+
+variables:
+  default_python_version: ">=3.10.6"
diff --git a/.azurepipelines/templates/platform-build-run-steps.yml
b/.azurepipelines/templates/platform-build-run-steps.yml
index 40a31a509fc5..8803d80cf51c 100644
--- a/.azurepipelines/templates/platform-build-run-steps.yml
+++ b/.azurepipelines/templates/platform-build-run-steps.yml
@@ -34,6 +34,9 @@ parameters:
  - name: extra_install_step
type: stepList
default: []
+- name: usePythonVersion
+  type: string
+  default: ''

  steps:
  - checkout: self
@@ -42,8 +45,9 @@ steps:

  - task: UsePythonVersion@0
inputs:
-versionSpec: ">=3.10.6"
+versionSpec: ${{ parameters.usePythonVersion }}
  architecture: "x64"
+  condition: ne('${{ parameters.usePythonVersion }}', '')

  - script: pip install -r pip-requirements.txt --upgrade
displayName: 'Install/Upgrade pip modules'
diff --git a/.azurepipelines/templates/pr-gate-build-job.yml
b/.azurepipelines/templates/pr-gate-build-job.yml
index 7f88b41dc8d3..f0ef1142da49 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -12,6 +12,7 @@ parameters:
tool_chain_tag: ''
vm_image: ''
arch_list: ''
+  usePythonVersion: ''

  # Build step
  jobs:
@@ -77,3 +78,4 @@ jobs:
build_pkgs: $(Build.Pkgs)
build_targets: $(Build.Targets)
build_archs: ${{ parameters.arch_list }}
+  usePythonVersion: ${{ parameters.usePythonVersion }}
diff --git a/.azurepipelines/templates/pr-gate-steps.yml
b/.azurepipelines/templates/pr-gate-steps.yml
index cb431e53fcd1..27a44c06011c 100644
--- a/.azurepipelines/templates/pr-gate-steps.yml
+++ b/.azurepipelines/templates/pr-gate-steps.yml
@@ -12,6 +12,7 @@ parameters:
build_pkgs: ''
build_targets: ''
build_archs: ''
+  usePythonVersion: ''

  steps:
  - checkout: self
@@ -20,8 +21,9 @@ steps:

  - task: UsePythonVersion@0
inputs:
-versionSpec: '>=3.10.6'
-architecture: 'x64'
+versionSpec: ${{ parameters.usePythonVersion }}
+architecture: "x64"
+  condition: ne('${{ parameters.usePythonVersion }}', '')

  - script: pip install -r pip-requirements.txt --upgrade
displayName: 'Install/Upgrade pip modules'



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




Re: [edk2-devel] [PATCH v9 11/12] CI: use latest vm_image (Linux only)

2022-11-30 Thread Michael Kubacki

Hi Oliver,

This patch is still touching several packages in one commit.

Thanks,
Michael

On 11/30/2022 5:01 PM, Oliver Steffen wrote:

Switch over to `ubuntu-latest` as the vm_image for Linux
CI jobs (EmulatorPkg, ArmVirtPkg, OvmfPkg).
The previously used ubuntu-18.04 will not be available
after Dec 1st 2022.

Signed-off-by: Oliver Steffen 
---
  ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml  | 2 +-
  EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 2 +-
  OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index 6d75502b5628..568b61768d67 100644
--- a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -19,7 +19,7 @@ jobs:
- job: Platform_CI
  variables:
package: 'ArmVirtPkg'
-  vm_image: 'ubuntu-18.04'
+  vm_image: 'ubuntu-22.04'
should_run: true
run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"

diff --git a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index e58bb5b55245..4d92f5fd5478 100644
--- a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -19,7 +19,7 @@ jobs:
- job: Platform_CI
  variables:
package: 'EmulatorPkg'
-  vm_image: 'ubuntu-18.04'
+  vm_image: 'ubuntu-22.04'
should_run: false
run_flags: "MAKE_STARTUP_NSH=TRUE"

diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index 984782aa7d19..865a7458e971 100644
--- a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -19,7 +19,7 @@ jobs:
- job: Platform_CI
  variables:
package: 'OvmfPkg'
-  vm_image: 'ubuntu-18.04'
+  vm_image: 'ubuntu-22.04'
should_run: true
run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#96787): https://edk2.groups.io/g/devel/message/96787
Mute This Topic: https://groups.io/mt/95369399/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] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail

2022-11-30 Thread Michael Kubacki

Reviewed-by: Michael Kubacki 

On 11/30/2022 6:02 PM, Jeshua Smith via groups.io wrote:

Update the UnitTestAssertStatusEqual error message to print out the
expected value in addition to the seen value.

Signed-off-by: Jeshua Smith 
---
  UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c 
b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
index dc05bbd438..0d8e36c938 100644
--- a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
+++ b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
@@ -290,7 +290,7 @@ UnitTestAssertStatusEqual (
  {
CHAR8  TempStr[MAX_STRING_SIZE];
  
-  snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p)", Description, (VOID *)Status);

+  snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p 
expected:%p)", Description, (VOID *)Status, (VOID *)Expected);
_assert_true ((Status == Expected), TempStr, FileName, (INT32)LineNumber);
  
return (Status == Expected);



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




Re: [edk2-devel] [PATCH v2] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail

2022-11-30 Thread Michael D Kinney
Reviewed-by: Michael D Kinney 

Mike

> -Original Message-
> From: Jeshua Smith 
> Sent: Wednesday, November 30, 2022 2:59 PM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D ; 
> mikub...@linux.microsoft.com; sean.bro...@microsoft.com; Jeshua Smith
> 
> Subject: [PATCH v2] UnitTestFrameworkPkg/UnitTestLib: Print expected Status 
> on ASSERT fail
> 
> Update the UnitTestAssertStatusEqual error message to print out the
> expected value in addition to the seen value.
> 
> Change-Id: Ic651584dcdbcf1f8cd8166ad8058744fc0587d72
> Signed-off-by: Jeshua Smith 
> ---
>  UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> index dc05bbd438..0d8e36c938 100644
> --- a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> @@ -290,7 +290,7 @@ UnitTestAssertStatusEqual (
>  {
> 
>CHAR8  TempStr[MAX_STRING_SIZE];
> 
> 
> 
> -  snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p)", 
> Description, (VOID *)Status);
> 
> +  snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p 
> expected:%p)", Description, (VOID *)Status, (VOID
> *)Expected);
> 
>_assert_true ((Status == Expected), TempStr, FileName, (INT32)LineNumber);
> 
> 
> 
>return (Status == Expected);
> 
> --
> 2.25.1



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




[edk2-devel] [PATCH v3] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail

2022-11-30 Thread Jeshua Smith via groups.io
Update the UnitTestAssertStatusEqual error message to print out the
expected value in addition to the seen value.

Signed-off-by: Jeshua Smith 
---
 UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c 
b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
index dc05bbd438..0d8e36c938 100644
--- a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
+++ b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
@@ -290,7 +290,7 @@ UnitTestAssertStatusEqual (
 {
   CHAR8  TempStr[MAX_STRING_SIZE];
 
-  snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p)", 
Description, (VOID *)Status);
+  snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p 
expected:%p)", Description, (VOID *)Status, (VOID *)Expected);
   _assert_true ((Status == Expected), TempStr, FileName, (INT32)LineNumber);
 
   return (Status == Expected);
-- 
2.25.1



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




[edk2-devel] [PATCH v2] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail

2022-11-30 Thread Jeshua Smith via groups.io
Update the UnitTestAssertStatusEqual error message to print out the
expected value in addition to the seen value.

Change-Id: Ic651584dcdbcf1f8cd8166ad8058744fc0587d72
Signed-off-by: Jeshua Smith 
---
 UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c 
b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
index dc05bbd438..0d8e36c938 100644
--- a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
+++ b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
@@ -290,7 +290,7 @@ UnitTestAssertStatusEqual (
 {

   CHAR8  TempStr[MAX_STRING_SIZE];

 

-  snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p)", 
Description, (VOID *)Status);

+  snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p 
expected:%p)", Description, (VOID *)Status, (VOID *)Expected);

   _assert_true ((Status == Expected), TempStr, FileName, (INT32)LineNumber);

 

   return (Status == Expected);

-- 
2.25.1



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




Re: [edk2-devel] [PATCH] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail

2022-11-30 Thread Jeshua Smith via groups.io
Hi Mike,

Thanks for the explanation. That makes sense.

I think Option 1 is the simplest in this case, and I'll resubmit the patch with 
that.
Option 2 seems like an unnecessary workaround, since I can't think of a good 
reason to make the printed value a 64 bit value on 32-bit platforms.
Option 3 is interesting. The similar implementation of the function in Assert.c 
already uses the %r capability of PrintLib, but since this is the 
AssertCmocka.c implementation I assume the intent is to stick with only libc as 
a dependency.
Option 4 would perhaps be nicest, but has the downside of becoming an 
additional place to maintain the EFI_STATUS codes. I suppose the status codes 
will likely never change value, but if for some reason they did I can image 
that updating this lookup table might end up being missed, resulting in a very 
frustrating debug for someone who finds that the error message told them the 
wrong status code.

Jeshua

-Original Message-
From: Kinney, Michael D  
Sent: Wednesday, November 30, 2022 1:57 PM
To: devel@edk2.groups.io; Jeshua Smith ; Kinney, Michael D 

Cc: mikub...@linux.microsoft.com; sean.bro...@microsoft.com
Subject: RE: [edk2-devel] [PATCH] UnitTestFrameworkPkg/UnitTestLib: Print 
expected Status on ASSERT fail

External email: Use caution opening links or attachments


Hi Jeshuas,

This is a good idea to show the expected value.

%p was used on purpose because unit tests can be built for 32-bit or 64-bit and 
the EFI_STATUS is same as RETURN_STATUS which is same as UINTN.  UINTN is 
32-bits for 32-bit unit test apps and 64-bit for 64-bit unit test apps.  %p 
prints a pointer sized value, which happens to match the UINTN for support CPU 
archs.

A couple options to consider:
1) Keep using %p instead of %llx.
2) Use UINT64 local variables to hold Status and Expected values and use %llx.
3) Use the MdePkg PrintLib to convert Status and Expected to string names and
   update message to show the name of the status value instead of the hex value.
4) Don't add a dependency on PrintLib and instead convert to string names in
   this same C file.

Best regards,

Mike


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Jeshua 
> Smith via groups.io
> Sent: Wednesday, November 30, 2022 12:39 PM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D ; 
> mikub...@linux.microsoft.com; sean.bro...@microsoft.com; Jeshua Smith 
> 
> Subject: [edk2-devel] [PATCH] UnitTestFrameworkPkg/UnitTestLib: Print 
> expected Status on ASSERT fail
>
> Update the UnitTestAssertStatusEqual error message to print out the 
> expected value in addition to the seen value.
>
> Signed-off-by: Jeshua Smith 
> ---
>  UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> index dc05bbd438..322daf318a 100644
> --- a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> @@ -290,7 +290,7 @@ UnitTestAssertStatusEqual (  {
>CHAR8  TempStr[MAX_STRING_SIZE];
>
> -  snprintf (TempStr, sizeof (TempStr), 
> "UT_ASSERT_STATUS_EQUAL(%s:%p)", Description, (VOID *)Status);
> +  snprintf (TempStr, sizeof (TempStr), 
> + "UT_ASSERT_STATUS_EQUAL(%s:0x%llx expected:0x%llx)", Description, 
> + Status,
> Expected);
>_assert_true ((Status == Expected), TempStr, FileName, 
> (INT32)LineNumber);
>
>return (Status == Expected);
> --
> 2.25.1
>
>
>
> 
>



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




Re: [edk2-devel] [PATCH v9 12/12] do not merge: modify *.dsc to trigger CI

2022-11-30 Thread Oliver Steffen
Please ignore this patch. I did not intend to send it.

-Oliver

On Wed, Nov 30, 2022 at 11:01 PM Oliver Steffen  wrote:
>
> Modify all *.dsc files to make sure all parts of the CI actually run.
> This is only needed to trigger the CI in the PR and shall not be merged.
>
> Signed-off-by: Oliver Steffen 
> ---
>  ArmPkg/ArmPkg.dsc  | 1 +
>  ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc | 1 +
>  ArmPlatformPkg/ArmPlatformPkg.dsc  | 1 +
>  ArmVirtPkg/ArmVirtCloudHv.dsc  | 1 +
>  ArmVirtPkg/ArmVirtKvmTool.dsc  | 1 +
>  ArmVirtPkg/ArmVirtQemu.dsc | 1 +
>  ArmVirtPkg/ArmVirtQemuKernel.dsc   | 1 +
>  ArmVirtPkg/ArmVirtXen.dsc  | 1 +
>  CryptoPkg/CryptoPkg.dsc| 1 +
>  CryptoPkg/Test/CryptoPkgHostUnitTest.dsc   | 1 +
>  DynamicTablesPkg/DynamicTablesPkg.dsc  | 1 +
>  EmbeddedPkg/EmbeddedPkg.dsc| 1 +
>  EmulatorPkg/EmulatorPkg.dsc| 1 +
>  FatPkg/FatPkg.dsc  | 1 +
>  FmpDevicePkg/FmpDevicePkg.dsc  | 1 +
>  FmpDevicePkg/Test/FmpDeviceHostPkgTest.dsc | 1 +
>  IntelFsp2Pkg/IntelFsp2Pkg.dsc  | 1 +
>  IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc| 1 +
>  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc| 1 +
>  MdeModulePkg/MdeModulePkg.dsc  | 1 +
>  MdeModulePkg/Test/MdeModulePkgHostTest.dsc | 1 +
>  MdePkg/MdePkg.dsc  | 1 +
>  MdePkg/Test/MdePkgHostTest.dsc | 1 +
>  NetworkPkg/NetworkPkg.dsc  | 1 +
>  OvmfPkg/AmdSev/AmdSevX64.dsc   | 1 +
>  OvmfPkg/Bhyve/BhyveX64.dsc | 1 +
>  OvmfPkg/CloudHv/CloudHvX64.dsc | 1 +
>  OvmfPkg/IntelTdx/IntelTdxX64.dsc   | 1 +
>  OvmfPkg/Microvm/MicrovmX64.dsc | 1 +
>  OvmfPkg/OvmfPkgIa32.dsc| 1 +
>  OvmfPkg/OvmfPkgIa32X64.dsc | 1 +
>  OvmfPkg/OvmfPkgX64.dsc | 1 +
>  OvmfPkg/OvmfXen.dsc| 1 +
>  PcAtChipsetPkg/PcAtChipsetPkg.dsc  | 1 +
>  PrmPkg/PrmPkg.dsc  | 1 +
>  PrmPkg/Test/PrmPkgHostTest.dsc | 1 +
>  RedfishPkg/RedfishPkg.dsc  | 1 +
>  SecurityPkg/SecurityPkg.dsc| 1 +
>  SecurityPkg/Test/SecurityPkgHostTest.dsc   | 1 +
>  ShellPkg/ShellPkg.dsc  | 1 +
>  SignedCapsulePkg/SignedCapsulePkg.dsc  | 1 +
>  SourceLevelDebugPkg/SourceLevelDebugPkg.dsc| 1 +
>  StandaloneMmPkg/StandaloneMmPkg.dsc| 1 +
>  UefiCpuPkg/Test/UefiCpuPkgHostTest.dsc | 1 +
>  UefiCpuPkg/UefiCpuPkg.dsc  | 1 +
>  UefiPayloadPkg/UefiPayloadPkg.dsc  | 1 +
>  UnitTestFrameworkPkg/Test/UnitTestFrameworkPkgHostTest.dsc | 1 +
>  UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc  | 1 +
>  48 files changed, 48 insertions(+)
>
> diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc
> index ac24ebce4892..69bead376e41 100644
> --- a/ArmPkg/ArmPkg.dsc
> +++ b/ArmPkg/ArmPkg.dsc
> @@ -169,3 +169,4 @@ [Components.AARCH64]
>
>  [Components.AARCH64, Components.ARM]
>ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf
> +# modified
> diff --git a/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc 
> b/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc
> index 2818ce65db98..afab1f8617f0 100644
> --- a/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc
> +++ b/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc
> @@ -48,3 +48,4 @@ [LibraryClasses]
>
>  [Components.common]
>ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.inf
> +# modified
> diff --git a/ArmPlatformPkg/ArmPlatformPkg.dsc 
> b/ArmPlatformPkg/ArmPlatformPkg.dsc
> index ddd128f9e606..cfb5fcf19f0f 100644
> --- a/ArmPlatformPkg/ArmPlatformPkg.dsc
> +++ b/ArmPlatformPkg/ArmPlatformPkg.dsc
> @@ -127,3 +127,4 @@ [Components.common]
>ArmPlatformPkg/PrePi/PeiUniCore.inf
>
>ArmPlatformPkg/Library/ArmMaliDp/ArmMaliDp.inf
> +# modified
> diff --git a/ArmVirtPkg/ArmVirtCloudHv.dsc b/ArmVirtPkg/ArmVirtCloudHv.dsc
> index 7ca7a391d9cf..03db645de2b9 100644
> --- a/ArmVirtPkg/ArmVirtCloudHv.dsc
> +++ b/ArmVirtPkg/ArmVirtCloudHv.dsc
> @@ -363,3 +363,4 @@ [Components.AARCH64]
>  
>NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/F

[edk2-devel] [PATCH v9 00/12] CI: Use Fedora 35 container for Linux jobs

2022-11-30 Thread Oliver Steffen
Update CI, run all Linux (aka Ubuntu-GCC5) based jobs in custom
containers.  This decouples the CI environment from the virtual machine
images that Azure DevOps provides.  The currently used ubuntu-18.04 image
has been deprecated for a while now and will finally be removed on
Dec 1st 2022.

The container image provides the required compiler toolchains and Qemu
for the supported architectures. These are then no longer downloaded at
runtime, avoiding CI failures due to download errors. This approach also
makes it easier to switch to other or newer compilers. It makes the CI
setup independent from the default images that Azure DevOps provides.
It can also help debugging CI problems, because the CI environment
can be reproduced on a local machine.

The container images are hosted on ghcr.io and are automatically
generated using GitHub Actions. The Dockerfiles are maintained in the
Tianocore "containers" repository:
https://github.com/tianocore/containers.

The current image is based on Fedora 35, with gcc 11. Fedora was chosen
because of its fast release cycle which makes it easy to keep the
toolchains up-to-date.

Some further possible changes not included in this series:
- The Tianocore/containers repository provides stack of layered images.
  One image for general purpose (build+test) and build-only jobs.
  The build+test image is based on the build-only one and adds Qemu,
  for the testing job that involve Qemu.  The work in the image side
  is done, we just need to change the CI setup accordingly.
  This patch set uses the build+test images for all jobs.
- Further reduce the number of external dependencies that need to be
  downloaded at runtime. Candidates are iasl and nasm, which are already
  included in the image but not used yet.

PR: https://github.com/tianocore/edk2/pull/3687

v9:
- Drop the "Don't install cspell" patch
- Use explicitly use ubuntu-22.04 as vm_image

v8:
- Use updated container image that contains gcc for LoongArch64.
- Remove ext_dep files for the LoongArch64 gcc.
- Don't change the scopes in .pytool/CISettings.py if running Linux CI
  it.
- Split commits that touch multiple packages.
- Use the smaller "build" image for jobs that allow it.
- Add a CI template file as a central place to define the default Python version
  and use it where needed.

v7:
- Rebase to latest master branch.
- Use latest Fedora 35 CI image.
- Stop using the ubuntu-18.04 vm_image since this will no longer be available
  after Dec 1st.  Use ubuntu-latest instead.

v6:
- Include suggestions by Chris Fernald.
- Added a parameter for the container image to the job template, makes usage
  of containers optional.
- Added a parameter to configure the Python version to download. Allows
  using Python from the VM/container image also.
- Restructure the commits (no further functional changes).

v5:
- Update image

v4:
- Use the latest image from the tianocode/containers repository which
  - does not include acpica-tools
  - includes Pyhton 3.10

v3:
- Use the latest image from the tianocode/containers repository which
  pins down version numbers of gcc, iasl, and nasm in the Dockerfile.

v2:
- Images are now hosted under the Tianocore Organization
  https://github.com/tianocore/containers

v1:
- Thread: https://edk2.groups.io/g/devel/message/89058
- Images were hosted at https://github.com/osteffenrh/edk2-build-images

Signed-off-by: Oliver Steffen 
Acked-by: Ard Biesheuvel 
Acked-by: Gerd Hoffmann 
Reviewed-by: Chris Fernald 

Oliver Steffen (12):
  CI: make Python version configurable
  OvmfPkg: CI: use Python version from defaults template
  EmulatorPkg: CI: use Python version from defaults template
  CI: add ~/.local/bin to PATH (Linux only)
  CI: Allow running in a container.
  BaseTools: CI: Use Fedora 35 container (Linux only)
  ArmVirtPkg: CI: Use Fedora 35 container (Linux only)
  OvmfPkg: CI: Use Fedora 35 container (Linux only)
  EmulatorPkg: CI: Use Fedora 35 container (Linux only)
  .pytool: CISettings.py: don't add scopes for GCC
  CI: use latest vm_image (Linux only)
  do not merge: modify *.dsc to trigger CI

 ArmPkg/ArmPkg.dsc |  1 +
 .../ArmCrashDumpDxe/ArmCrashDumpDxe.dsc   |  1 +
 ArmPlatformPkg/ArmPlatformPkg.dsc |  1 +
 ArmVirtPkg/ArmVirtCloudHv.dsc |  1 +
 ArmVirtPkg/ArmVirtKvmTool.dsc |  1 +
 ArmVirtPkg/ArmVirtQemu.dsc|  1 +
 ArmVirtPkg/ArmVirtQemuKernel.dsc  |  1 +
 ArmVirtPkg/ArmVirtXen.dsc |  1 +
 CryptoPkg/CryptoPkg.dsc   |  1 +
 CryptoPkg/Test/CryptoPkgHostUnitTest.dsc  |  1 +
 DynamicTablesPkg/DynamicTablesPkg.dsc |  1 +
 EmbeddedPkg/EmbeddedPkg.dsc   |  1 +
 EmulatorPkg/EmulatorPkg.dsc   |  1 +
 FatPkg/FatPkg.dsc |  1 +
 FmpDevicePkg/FmpDevicePkg.dsc |  1 +
 FmpDevicePkg/Test/FmpDeviceHostPkgTest.dsc|  1 +
 IntelFsp2Pkg/IntelFsp2Pkg.dsc   

[edk2-devel] [PATCH v9 12/12] do not merge: modify *.dsc to trigger CI

2022-11-30 Thread Oliver Steffen
Modify all *.dsc files to make sure all parts of the CI actually run.
This is only needed to trigger the CI in the PR and shall not be merged.

Signed-off-by: Oliver Steffen 
---
 ArmPkg/ArmPkg.dsc  | 1 +
 ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc | 1 +
 ArmPlatformPkg/ArmPlatformPkg.dsc  | 1 +
 ArmVirtPkg/ArmVirtCloudHv.dsc  | 1 +
 ArmVirtPkg/ArmVirtKvmTool.dsc  | 1 +
 ArmVirtPkg/ArmVirtQemu.dsc | 1 +
 ArmVirtPkg/ArmVirtQemuKernel.dsc   | 1 +
 ArmVirtPkg/ArmVirtXen.dsc  | 1 +
 CryptoPkg/CryptoPkg.dsc| 1 +
 CryptoPkg/Test/CryptoPkgHostUnitTest.dsc   | 1 +
 DynamicTablesPkg/DynamicTablesPkg.dsc  | 1 +
 EmbeddedPkg/EmbeddedPkg.dsc| 1 +
 EmulatorPkg/EmulatorPkg.dsc| 1 +
 FatPkg/FatPkg.dsc  | 1 +
 FmpDevicePkg/FmpDevicePkg.dsc  | 1 +
 FmpDevicePkg/Test/FmpDeviceHostPkgTest.dsc | 1 +
 IntelFsp2Pkg/IntelFsp2Pkg.dsc  | 1 +
 IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc| 1 +
 IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc| 1 +
 MdeModulePkg/MdeModulePkg.dsc  | 1 +
 MdeModulePkg/Test/MdeModulePkgHostTest.dsc | 1 +
 MdePkg/MdePkg.dsc  | 1 +
 MdePkg/Test/MdePkgHostTest.dsc | 1 +
 NetworkPkg/NetworkPkg.dsc  | 1 +
 OvmfPkg/AmdSev/AmdSevX64.dsc   | 1 +
 OvmfPkg/Bhyve/BhyveX64.dsc | 1 +
 OvmfPkg/CloudHv/CloudHvX64.dsc | 1 +
 OvmfPkg/IntelTdx/IntelTdxX64.dsc   | 1 +
 OvmfPkg/Microvm/MicrovmX64.dsc | 1 +
 OvmfPkg/OvmfPkgIa32.dsc| 1 +
 OvmfPkg/OvmfPkgIa32X64.dsc | 1 +
 OvmfPkg/OvmfPkgX64.dsc | 1 +
 OvmfPkg/OvmfXen.dsc| 1 +
 PcAtChipsetPkg/PcAtChipsetPkg.dsc  | 1 +
 PrmPkg/PrmPkg.dsc  | 1 +
 PrmPkg/Test/PrmPkgHostTest.dsc | 1 +
 RedfishPkg/RedfishPkg.dsc  | 1 +
 SecurityPkg/SecurityPkg.dsc| 1 +
 SecurityPkg/Test/SecurityPkgHostTest.dsc   | 1 +
 ShellPkg/ShellPkg.dsc  | 1 +
 SignedCapsulePkg/SignedCapsulePkg.dsc  | 1 +
 SourceLevelDebugPkg/SourceLevelDebugPkg.dsc| 1 +
 StandaloneMmPkg/StandaloneMmPkg.dsc| 1 +
 UefiCpuPkg/Test/UefiCpuPkgHostTest.dsc | 1 +
 UefiCpuPkg/UefiCpuPkg.dsc  | 1 +
 UefiPayloadPkg/UefiPayloadPkg.dsc  | 1 +
 UnitTestFrameworkPkg/Test/UnitTestFrameworkPkgHostTest.dsc | 1 +
 UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc  | 1 +
 48 files changed, 48 insertions(+)

diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc
index ac24ebce4892..69bead376e41 100644
--- a/ArmPkg/ArmPkg.dsc
+++ b/ArmPkg/ArmPkg.dsc
@@ -169,3 +169,4 @@ [Components.AARCH64]

 [Components.AARCH64, Components.ARM]
   ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf
+# modified
diff --git a/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc
b/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc
index 2818ce65db98..afab1f8617f0 100644
--- a/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc
+++ b/ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.dsc
@@ -48,3 +48,4 @@ [LibraryClasses]

 [Components.common]
   ArmPkg/Drivers/ArmCrashDumpDxe/ArmCrashDumpDxe.inf
+# modified
diff --git a/ArmPlatformPkg/ArmPlatformPkg.dsc
b/ArmPlatformPkg/ArmPlatformPkg.dsc
index ddd128f9e606..cfb5fcf19f0f 100644
--- a/ArmPlatformPkg/ArmPlatformPkg.dsc
+++ b/ArmPlatformPkg/ArmPlatformPkg.dsc
@@ -127,3 +127,4 @@ [Components.common]
   ArmPlatformPkg/PrePi/PeiUniCore.inf

   ArmPlatformPkg/Library/ArmMaliDp/ArmMaliDp.inf
+# modified
diff --git a/ArmVirtPkg/ArmVirtCloudHv.dsc b/ArmVirtPkg/ArmVirtCloudHv.dsc
index 7ca7a391d9cf..03db645de2b9 100644
--- a/ArmVirtPkg/ArmVirtCloudHv.dsc
+++ b/ArmVirtPkg/ArmVirtCloudHv.dsc
@@ -363,3 +363,4 @@ [Components.AARCH64]
 
   NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   }
+# modified
diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc
index 2ba00bd08ff1..a881a64cf59d 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.dsc
+++ b/ArmVirtPkg/ArmVirtKvmTool.dsc
@@ -378,3 +378,4 @@ [Components.common]
   #
   ArmVirtPkg/KvmtoolCfgMgrDx

[edk2-devel] [PATCH v9 11/12] CI: use latest vm_image (Linux only)

2022-11-30 Thread Oliver Steffen
Switch over to `ubuntu-latest` as the vm_image for Linux
CI jobs (EmulatorPkg, ArmVirtPkg, OvmfPkg).
The previously used ubuntu-18.04 will not be available
after Dec 1st 2022.

Signed-off-by: Oliver Steffen 
---
 ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml  | 2 +-
 EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 2 +-
 OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index 6d75502b5628..568b61768d67 100644
--- a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -19,7 +19,7 @@ jobs:
   - job: Platform_CI
 variables:
   package: 'ArmVirtPkg'
-  vm_image: 'ubuntu-18.04'
+  vm_image: 'ubuntu-22.04'
   should_run: true
   run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"

diff --git a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index e58bb5b55245..4d92f5fd5478 100644
--- a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -19,7 +19,7 @@ jobs:
   - job: Platform_CI
 variables:
   package: 'EmulatorPkg'
-  vm_image: 'ubuntu-18.04'
+  vm_image: 'ubuntu-22.04'
   should_run: false
   run_flags: "MAKE_STARTUP_NSH=TRUE"

diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index 984782aa7d19..865a7458e971 100644
--- a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -19,7 +19,7 @@ jobs:
   - job: Platform_CI
 variables:
   package: 'OvmfPkg'
-  vm_image: 'ubuntu-18.04'
+  vm_image: 'ubuntu-22.04'
   should_run: true
   run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"

-- 
2.38.1



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




[edk2-devel] [PATCH v9 10/12] .pytool: CISettings.py: don't add scopes for GCC

2022-11-30 Thread Oliver Steffen
All ext_dep.yml files for gcc have been removed and gcc
is expected to be installed on the system (GCC5_*_PREFIX
may indicate the location).
No need to adjust the toolchain scopes for Linux builds
anymore.

Signed-off-by: Oliver Steffen 
---
 .pytool/CISettings.py | 9 -
 1 file changed, 9 deletions(-)

diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py
index 76ac2b09dba6..d87c8e838e61 100644
--- a/.pytool/CISettings.py
+++ b/.pytool/CISettings.py
@@ -169,15 +169,6 @@ class Settings(CiBuildSettingsManager,
UpdateSettingsManager, SetupSettingsManag
 else:
 logging.warning("Falling back to using in-tree BaseTools")

-if is_linux and self.ActualToolChainTag.upper().startswith("GCC"):
-if "AARCH64" in self.ActualArchitectures:
-scopes += ("gcc_aarch64_linux",)
-if "ARM" in self.ActualArchitectures:
-scopes += ("gcc_arm_linux",)
-if "RISCV64" in self.ActualArchitectures:
-scopes += ("gcc_riscv64_unknown",)
-if "LOONGARCH64" in self.ActualArchitectures:
-scopes += ("gcc_loongarch64_unknown_linux",)
 self.ActualScopes = scopes
 return self.ActualScopes

-- 
2.38.1



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




[edk2-devel] [PATCH v9 09/12] EmulatorPkg: CI: Use Fedora 35 container (Linux only)

2022-11-30 Thread Oliver Steffen
Run all Linux based jobs in a container, using a custom Fedora 35 image
(gcc 11). The image is hosted on ghcr.io and the Dockerfiles are
here: https://github.com/tianocore/containers
The version numbers of gcc, iasl, and nasm are pinned to avoid
unintended upgrades during image rebuild.

Use Python from the container image, do not download at runtime.

Signed-off-by: Oliver Steffen 
---
 EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index 416c15e70840..e58bb5b55245 100644
--- a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -75,6 +75,8 @@ jobs:
 pool:
   vmImage: $(vm_image)

+container: 'ghcr.io/tianocore/containers/fedora-35-test:2113a0e'
+
 steps:
 - template: ../../../.azurepipelines/templates/platform-build-run-steps.yml
   parameters:
@@ -85,3 +87,4 @@ jobs:
 build_file: $(Build.File)
 build_flags: $(Build.Flags)
 run_flags: $(Run.Flags)
+usePythonVersion: '' # use Python from the container image
-- 
2.38.1



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




[edk2-devel] [PATCH v9 08/12] OvmfPkg: CI: Use Fedora 35 container (Linux only)

2022-11-30 Thread Oliver Steffen
Run all Linux based jobs in a container, using a custom Fedora 35 image
(gcc 11). The image is hosted on ghcr.io and the Dockerfiles are
here: https://github.com/tianocore/containers
The version numbers of gcc, iasl, and nasm are pinned to avoid
unintended upgrades during image rebuild.

Do not run apt-get in CI jobs to install qemu and gcc dependencies.
Assume the container image provides these.

Use Python from the container image, do not download at runtime.

Signed-off-by: Oliver Steffen 
---
 OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index 7160d95f7e04..984782aa7d19 100644
--- a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -177,6 +177,8 @@ jobs:
 pool:
   vmImage: $(vm_image)

+container: 'ghcr.io/tianocore/containers/fedora-35-test:2113a0e'
+
 steps:
 - template: ../../../.azurepipelines/templates/platform-build-run-steps.yml
   parameters:
@@ -187,7 +189,4 @@ jobs:
 build_file: $(Build.File)
 build_flags: $(Build.Flags)
 run_flags: $(Run.Flags)
-extra_install_step:
-- bash: sudo apt-get install qemu
-  displayName: Install qemu
-  condition: and(gt(variables.pkg_count, 0), succeeded())
+usePythonVersion: '' # use Python from the container image
-- 
2.38.1



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




[edk2-devel] [PATCH v9 07/12] ArmVirtPkg: CI: Use Fedora 35 container (Linux only)

2022-11-30 Thread Oliver Steffen
Run all Linux based jobs in a container, using a custom Fedora 35 image
(gcc 11). The image is hosted on ghcr.io and the Dockerfiles are
here: https://github.com/tianocore/containers
The version numbers of gcc, iasl, and nasm are pinned to avoid
unintended upgrades during image rebuild.

Do not run apt-get in CI jobs to install qemu and gcc dependencies.
Assume the container image provides these.

Use Python from the container image, do not download at runtime.

Signed-off-by: Oliver Steffen 
---
 ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index b07e3199f143..6d75502b5628 100644
--- a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -75,6 +75,8 @@ jobs:
 pool:
   vmImage: $(vm_image)

+container: 'ghcr.io/tianocore/containers/fedora-35-test:2113a0e'
+
 steps:
 - template: ../../../.azurepipelines/templates/platform-build-run-steps.yml
   parameters:
@@ -85,7 +87,4 @@ jobs:
 build_file: $(Build.File)
 build_flags: $(Build.Flags)
 run_flags: $(Run.Flags)
-extra_install_step:
-- bash: sudo apt-get install qemu
-  displayName: Install qemu
-  condition: and(gt(variables.pkg_count, 0), succeeded())
+usePythonVersion: '' # use Python from the container image
-- 
2.38.1



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




[edk2-devel] [PATCH v9 06/12] BaseTools: CI: Use Fedora 35 container (Linux only)

2022-11-30 Thread Oliver Steffen
Run all Linux based jobs in a container, using a custom Fedora 35 image
(gcc 11). The image is hosted on ghcr.io and the Dockerfiles are
here: https://github.com/tianocore/containers
The version numbers of gcc, iasl, and nasm are pinned to avoid
unintended upgrades during image rebuild.

Do not run apt-get in CI jobs to install qemu and gcc dependencies.
Assume the container image provides these.

Use Python from the container image, do not download at runtime.

Remove BaseTools/Bin/gcc_*_ext_dep.yaml to stop
downloading gcc from external locations; use the
gcc provided by the container image instead.
The container image sets the variable GCC5_*_PREFIX accordingly.

Signed-off-by: Oliver Steffen 
---
 .azurepipelines/Ubuntu-GCC5.yml   |  2 ++
 .../templates/basetools-build-steps.yml   |  9 
 BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml  | 21 --
 BaseTools/Bin/gcc_arm_linux_ext_dep.yaml  | 21 --
 ...gcc_loongarch64_unknown_linux_ext_dep.yaml | 22 ---
 .../Bin/gcc_riscv64_unknown_ext_dep.yaml  | 22 ---
 6 files changed, 2 insertions(+), 95 deletions(-)
 delete mode 100644 BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
 delete mode 100644 BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
 delete mode 100644 BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml
 delete mode 100644 BaseTools/Bin/gcc_riscv64_unknown_ext_dep.yaml

diff --git a/.azurepipelines/Ubuntu-GCC5.yml b/.azurepipelines/Ubuntu-GCC5.yml
index 1acd8d2a46a7..0dd9b74de57a 100644
--- a/.azurepipelines/Ubuntu-GCC5.yml
+++ b/.azurepipelines/Ubuntu-GCC5.yml
@@ -18,5 +18,7 @@ jobs:
   parameters:
 tool_chain_tag: 'GCC5'
 vm_image: 'ubuntu-latest'
+container: 'ghcr.io/tianocore/containers/fedora-35-build:2113a0e'
+usePythonVersion: ''  # use Python from the container image
 arch_list: "IA32,X64,ARM,AARCH64,RISCV64,LOONGARCH64"

diff --git a/.azurepipelines/templates/basetools-build-steps.yml
b/.azurepipelines/templates/basetools-build-steps.yml
index d8c108c6e212..a72758bc3395 100644
--- a/.azurepipelines/templates/basetools-build-steps.yml
+++ b/.azurepipelines/templates/basetools-build-steps.yml
@@ -10,15 +10,6 @@ parameters:
   tool_chain_tag: ''

 steps:
-- ${{ if contains(parameters.tool_chain_tag, 'GCC') }}:
-  - bash: sudo apt-get update
-displayName: Update apt
-condition: and(gt(variables.pkg_count, 0), succeeded())
-
-  - bash: sudo apt-get install gcc g++ make uuid-dev
-displayName: Install required tools
-condition: and(gt(variables.pkg_count, 0), succeeded())
-
 - task: CmdLine@1
   displayName: Build Base Tools from source
   inputs:
diff --git a/BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
b/BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
deleted file mode 100644
index ff8a9e868100..
--- a/BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-## @file
-# Download GCC AARCH64 compiler from Arm's release site
-# Set shell variable GCC5_AARCH64_INSTALL to this folder
-#
-# This is only downloaded when a build activates scope gcc_aarch64_linux
-#
-# Copyright (c) Microsoft Corporation.
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-##
-{
-  "scope": "gcc_aarch64_linux",
-  "type": "web",
-  "name": "gcc_aarch64_linux",
-  "source": 
"https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu.tar.xz";,
-  "version": "11.2-2022.02",
-  "sha256": "52dbac3eb71dbe0916f60a8c5ab9b7dc9b66b3ce513047baa09fae56234e53f3",
-  "compression_type": "tar",
-  "internal_path": "/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/",
-  "flags": ["set_shell_var", ],
-  "var_name": "GCC5_AARCH64_INSTALL"
-}
diff --git a/BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
b/BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
deleted file mode 100644
index 151cbfa4b532..
--- a/BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-## @file
-# Download GCC ARM compiler from Arm's release site
-# Set shell variable GCC5_ARM_INSTALL to this folder
-#
-# This is only downloaded when a build activates scope gcc_arm_linux
-#
-# Copyright (c) Microsoft Corporation.
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-##
-{
-  "scope": "gcc_arm_linux",
-  "type": "web",
-  "name": "gcc_arm_linux",
-  "source": 
"https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf.tar.xz";,
-  "version": "11.2-2022.02",
-  "sha256": "c254f7199261fe76c32ef42187502839bda7efad0a66646cf739d074eff45fad",
-  "compression_type": "tar",
-  "internal_path": "/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf/",
-  "flags": ["set_shell_var", ],
-  "var_name": "GCC5_ARM_INSTALL"
-}
diff --git a/BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml
b/BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml
deleted file mode 100644
index fe9a2448531a..
--- a/BaseTools/Bin/gcc_loongarch

[edk2-devel] [PATCH v9 05/12] CI: Allow running in a container.

2022-11-30 Thread Oliver Steffen
Add a parameter of the pr-gate-build-job template to specify a
container image URL.  If the value is not '' (default), then the
jobs will be run inside a container based on that image.

Signed-off-by: Oliver Steffen 
---
 .azurepipelines/templates/pr-gate-build-job.yml | 4 
 1 file changed, 4 insertions(+)

diff --git a/.azurepipelines/templates/pr-gate-build-job.yml
b/.azurepipelines/templates/pr-gate-build-job.yml
index f0ef1142da49..5ffcaca7b591 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -12,6 +12,7 @@ parameters:
   tool_chain_tag: ''
   vm_image: ''
   arch_list: ''
+  container: ''
   usePythonVersion: ''

 # Build step
@@ -71,6 +72,9 @@ jobs:
   pool:
 vmImage: ${{ parameters.vm_image }}

+  ${{ if not(eq(parameters.container, '')) }}:
+container: ${{ parameters.container }}
+
   steps:
   - template: pr-gate-steps.yml
 parameters:
-- 
2.38.1



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




[edk2-devel] [PATCH v9 04/12] CI: add ~/.local/bin to PATH (Linux only)

2022-11-30 Thread Oliver Steffen
Fix pip install under certain conditions.

Signed-off-by: Oliver Steffen 
---
 .azurepipelines/templates/platform-build-run-steps.yml | 6 ++
 .azurepipelines/templates/pr-gate-steps.yml| 6 ++
 2 files changed, 12 insertions(+)

diff --git a/.azurepipelines/templates/platform-build-run-steps.yml
b/.azurepipelines/templates/platform-build-run-steps.yml
index 8803d80cf51c..087f460d7fec 100644
--- a/.azurepipelines/templates/platform-build-run-steps.yml
+++ b/.azurepipelines/templates/platform-build-run-steps.yml
@@ -39,6 +39,12 @@ parameters:
   default: ''

 steps:
+- bash: |
+echo "##vso[task.prependpath]${HOME}/.local/bin"
+echo "new PATH=${PATH}"
+  displayName: Set PATH
+  condition: eq('${{ parameters.tool_chain_tag }}', 'GCC5')
+
 - checkout: self
   clean: true
   fetchDepth: 1
diff --git a/.azurepipelines/templates/pr-gate-steps.yml
b/.azurepipelines/templates/pr-gate-steps.yml
index 27a44c06011c..99d52cfa0605 100644
--- a/.azurepipelines/templates/pr-gate-steps.yml
+++ b/.azurepipelines/templates/pr-gate-steps.yml
@@ -15,6 +15,12 @@ parameters:
   usePythonVersion: ''

 steps:
+- bash: |
+echo "##vso[task.prependpath]${HOME}/.local/bin"
+echo "new PATH=${PATH}"
+  displayName: Set PATH
+  condition: eq('${{ parameters.tool_chain_tag }}', 'GCC5')
+
 - checkout: self
   clean: true
   fetchDepth: 1
-- 
2.38.1



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




[edk2-devel] [PATCH v9 03/12] EmulatorPkg: CI: use Python version from defaults template

2022-11-30 Thread Oliver Steffen
Use the default Python version from the defaults template
(.azurepipelines/templates/defaults.yml) in the Windows
CI jobs.

Previous changes to the CI job templates make it necessary
to specify a version number, if Python shall be pulled
at CI runtime.

The Linux CI jobs will use Python from the container image,
so these changes are for Windows only.

Signed-off-by: Oliver Steffen 
---
 EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml | 4 
 1 file changed, 4 insertions(+)

diff --git a/EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
b/EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
index e7ead06ae266..09960e7c7a6e 100644
--- a/EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
+++ b/EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
@@ -16,6 +16,9 @@ pr:
   - master
   - stable/*

+variables:
+  - template: ../../../.azurepipelines/templates/defaults.yml
+
 jobs:
   - job: Platform_CI
 variables:
@@ -128,3 +131,4 @@ jobs:
 build_file: $(Build.File)
 build_flags: $(Build.Flags)
 run_flags: $(Run.Flags)
+usePythonVersion: ${{ variables.default_python_version }}
-- 
2.38.1



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




[edk2-devel] [PATCH v9 02/12] OvmfPkg: CI: use Python version from defaults template

2022-11-30 Thread Oliver Steffen
Use the default Python version from the defaults template
(.azurepipelines/templates/defaults.yml) in the Windows
CI jobs.

Previous changes to the CI job templates make it necessary
to specify a version number, if Python shall be pulled
at CI runtime.

The Linux CI jobs will use Python from the container image,
so these changes are for Windows only.

Signed-off-by: Oliver Steffen 
---
 OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml | 5 +
 1 file changed, 5 insertions(+)

diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
b/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
index 7d6344d6383d..7e63f419b26b 100644
--- a/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
+++ b/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
@@ -14,6 +14,10 @@ trigger:
 pr:
   - master
   - stable/*
+
+variables:
+  - template: ../../../.azurepipelines/templates/defaults.yml
+
 jobs:
   - job: Platform_CI
 variables:
@@ -133,6 +137,7 @@ jobs:
 build_file: $(Build.File)
 build_flags: $(Build.Flags)
 run_flags: $(Run.Flags)
+usePythonVersion: ${{ variables.default_python_version }}
 extra_install_step:
 - powershell: choco install qemu --version=2021.5.5;
Write-Host "##vso[task.prependpath]c:\Program Files\qemu"
   displayName: Install QEMU and Set QEMU on path # friendly
name displayed in the UI
-- 
2.38.1



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




[edk2-devel] [PATCH v9 01/12] CI: make Python version configurable

2022-11-30 Thread Oliver Steffen
Add a new parameter "usePythonVersion" to the CI job templates.
This makes it possible to specify the version of Python to use.
The default value is '', in which case Python will not be downloaded
at runtime and the one provided by the VM/container image will be used.

Additionally, add a template .azurepipelines/templates/defaults.yml,
from which the default Pyhton version string can be obtained.

Signed-off-by: Oliver Steffen 
---
 .azurepipelines/Windows-VS2019.yml | 4 
 .azurepipelines/templates/defaults.yml | 3 +++
 .azurepipelines/templates/platform-build-run-steps.yml | 6 +-
 .azurepipelines/templates/pr-gate-build-job.yml| 2 ++
 .azurepipelines/templates/pr-gate-steps.yml| 6 --
 5 files changed, 18 insertions(+), 3 deletions(-)
 create mode 100644 .azurepipelines/templates/defaults.yml

diff --git a/.azurepipelines/Windows-VS2019.yml
b/.azurepipelines/Windows-VS2019.yml
index e4bd4b1d2283..89bccde82575 100644
--- a/.azurepipelines/Windows-VS2019.yml
+++ b/.azurepipelines/Windows-VS2019.yml
@@ -12,9 +12,13 @@ pr:
 - master
 - stable/*

+variables:
+  - template: templates/defaults.yml
+
 jobs:
 - template: templates/pr-gate-build-job.yml
   parameters:
 tool_chain_tag: 'VS2019'
 vm_image: 'windows-2019'
 arch_list: "IA32,X64"
+usePythonVersion: ${{ variables.default_python_version }}
diff --git a/.azurepipelines/templates/defaults.yml
b/.azurepipelines/templates/defaults.yml
new file mode 100644
index ..314d03e33af8
--- /dev/null
+++ b/.azurepipelines/templates/defaults.yml
@@ -0,0 +1,3 @@
+
+variables:
+  default_python_version: ">=3.10.6"
diff --git a/.azurepipelines/templates/platform-build-run-steps.yml
b/.azurepipelines/templates/platform-build-run-steps.yml
index 40a31a509fc5..8803d80cf51c 100644
--- a/.azurepipelines/templates/platform-build-run-steps.yml
+++ b/.azurepipelines/templates/platform-build-run-steps.yml
@@ -34,6 +34,9 @@ parameters:
 - name: extra_install_step
   type: stepList
   default: []
+- name: usePythonVersion
+  type: string
+  default: ''

 steps:
 - checkout: self
@@ -42,8 +45,9 @@ steps:

 - task: UsePythonVersion@0
   inputs:
-versionSpec: ">=3.10.6"
+versionSpec: ${{ parameters.usePythonVersion }}
 architecture: "x64"
+  condition: ne('${{ parameters.usePythonVersion }}', '')

 - script: pip install -r pip-requirements.txt --upgrade
   displayName: 'Install/Upgrade pip modules'
diff --git a/.azurepipelines/templates/pr-gate-build-job.yml
b/.azurepipelines/templates/pr-gate-build-job.yml
index 7f88b41dc8d3..f0ef1142da49 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -12,6 +12,7 @@ parameters:
   tool_chain_tag: ''
   vm_image: ''
   arch_list: ''
+  usePythonVersion: ''

 # Build step
 jobs:
@@ -77,3 +78,4 @@ jobs:
   build_pkgs: $(Build.Pkgs)
   build_targets: $(Build.Targets)
   build_archs: ${{ parameters.arch_list }}
+  usePythonVersion: ${{ parameters.usePythonVersion }}
diff --git a/.azurepipelines/templates/pr-gate-steps.yml
b/.azurepipelines/templates/pr-gate-steps.yml
index cb431e53fcd1..27a44c06011c 100644
--- a/.azurepipelines/templates/pr-gate-steps.yml
+++ b/.azurepipelines/templates/pr-gate-steps.yml
@@ -12,6 +12,7 @@ parameters:
   build_pkgs: ''
   build_targets: ''
   build_archs: ''
+  usePythonVersion: ''

 steps:
 - checkout: self
@@ -20,8 +21,9 @@ steps:

 - task: UsePythonVersion@0
   inputs:
-versionSpec: '>=3.10.6'
-architecture: 'x64'
+versionSpec: ${{ parameters.usePythonVersion }}
+architecture: "x64"
+  condition: ne('${{ parameters.usePythonVersion }}', '')

 - script: pip install -r pip-requirements.txt --upgrade
   displayName: 'Install/Upgrade pip modules'
-- 
2.38.1



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




Re: [edk2-devel] [PATCH v8 12/12] CI: use latest vm_image (Linux only)

2022-11-30 Thread Oliver Steffen
On Wed, Nov 30, 2022 at 9:39 PM Kinney, Michael D
 wrote:
>
> I know we have run into issues before when using ubuntu-latest when
> a change was made to the latest image that broke CI.
>
> I would prefer to always set this to a specific version, so we can
> choose to move to a newer one with a PR that can run through CI.
>
> I am ok with selecting the highest version available that matches
> current ubuntu-latest version number.

I'll set it to ubuntu-22.04.
Although the actual VM does not do much anymore except
spawning a container, which I would assume to "always" work.
But better be safe than sorry.

-Oliver

>
> Thanks,
>
> Mike
>
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of Oliver 
> > Steffen
> > Sent: Wednesday, November 30, 2022 12:01 PM
> > To: devel@edk2.groups.io
> > Cc: Andrew Fish ; Ard Biesheuvel 
> > ; Feng, Bob C ; Daniel
> > Schaefer ; Gerd Hoffmann ; Yao, 
> > Jiewen ; Justen, Jordan L
> > ; Leif Lindholm ; 
> > Gao, Liming ; Kinney,
> > Michael D ; Michael Kubacki 
> > ; Ni, Ray ; Sami
> > Mujawar ; Sean Brogan ; 
> > Sunil V L ; Chen,
> > Christine ; Liu, Zhiguang ; 
> > Pawel Polawski ; fernald,
> > chris ; Oliver Steffen 
> > Subject: [edk2-devel] [PATCH v8 12/12] CI: use latest vm_image (Linux only)
> >
> > Switch over to `ubuntu-latest` as the vm_image for Linux
> > CI jobs (EmulatorPkg, ArmVirtPkg, OvmfPkg).
> > The previously used ubuntu-18.04 will not be available
> > after Dec 1st 2022.
> >
> > Signed-off-by: Oliver Steffen 
> > ---
> >  ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml  | 2 +-
> >  EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 2 +-
> >  OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 2 +-
> >  3 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> > b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> > index 6d75502b5628..f7844229e60c 100644
> > --- a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> > +++ b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> > @@ -19,7 +19,7 @@ jobs:
> >- job: Platform_CI
> >  variables:
> >package: 'ArmVirtPkg'
> > -  vm_image: 'ubuntu-18.04'
> > +  vm_image: 'ubuntu-latest'
> >should_run: true
> >run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"
> >
> > diff --git a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> > b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> > index e58bb5b55245..3124de6634b2 100644
> > --- a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> > +++ b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> > @@ -19,7 +19,7 @@ jobs:
> >- job: Platform_CI
> >  variables:
> >package: 'EmulatorPkg'
> > -  vm_image: 'ubuntu-18.04'
> > +  vm_image: 'ubuntu-latest'
> >should_run: false
> >run_flags: "MAKE_STARTUP_NSH=TRUE"
> >
> > diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> > b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> > index 984782aa7d19..831b0eb254b4 100644
> > --- a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> > +++ b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> > @@ -19,7 +19,7 @@ jobs:
> >- job: Platform_CI
> >  variables:
> >package: 'OvmfPkg'
> > -  vm_image: 'ubuntu-18.04'
> > +  vm_image: 'ubuntu-latest'
> >should_run: true
> >run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"
> >
> > --
> > 2.38.1
> >
> >
> >
> > 
> >
>



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




Re: [edk2-devel] [PATCH v8 10/12] CI: Don't install cspell

2022-11-30 Thread Oliver Steffen
On Wed, Nov 30, 2022 at 9:45 PM Chris Fernald  wrote:
>
> I apologize as I think I mislead you on this. I think we can only remove
> this operation for the builds using the container. I believe Windows
> builds will still require this step for the time being. The Windows
> pipeline on your PR is currently failing to find cspell. Sorry for not
> being clear on this originally.

No worries. Sorry for misunderstanding.

I'll drop this patch for now. Don't have a simple and good way to
skip this on Linux only. I also don't think this is too critical now,
the install should not do much if cspell is already there.
We can clean this up later, and track this in an issue / BZ.

- Oliver
> On 11/30/2022 12:01 PM, Oliver Steffen wrote:
> > cspell is already included in the container image.
> >
> > Signed-off-by: Oliver Steffen 
> > ---
> >   .azurepipelines/templates/spell-check-prereq-steps.yml | 4 
> >   1 file changed, 4 deletions(-)
> >
> > diff --git a/.azurepipelines/templates/spell-check-prereq-steps.yml
> > b/.azurepipelines/templates/spell-check-prereq-steps.yml
> > index 226909d54c4e..66354ad78b5c 100644
> > --- a/.azurepipelines/templates/spell-check-prereq-steps.yml
> > +++ b/.azurepipelines/templates/spell-check-prereq-steps.yml
> > @@ -16,7 +16,3 @@ steps:
> >   versionSpec: '14.x'
> >   #checkLatest: false # Optional
> > condition: and(gt(variables.pkg_count, 0), succeeded())
> > -
> > -- script: npm install -g cspell@5.20.0
> > -  displayName: 'Install cspell npm'
> > -  condition: and(gt(variables.pkg_count, 0), succeeded())
>



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




[edk2-devel] [Patch 1/1] UnitTestFrameworkPkg: Library classes private to public

2022-11-30 Thread Michael D Kinney
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4178

* Change GoogleTestLib class from private to public.
* Change UnitTestPersistenceLib class from private to public.

Cc: Michael Kubacki 
Cc: Sean Brogan 
Cc: Ray Ni 
Cc: Zhiguang Liu 
Signed-off-by: Michael D Kinney 
---
 .../Library/UnitTestPersistenceLib.h|  0
 UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec   | 13 +++--
 2 files changed, 7 insertions(+), 6 deletions(-)
 rename UnitTestFrameworkPkg/{PrivateInclude => 
Include}/Library/UnitTestPersistenceLib.h (100%)

diff --git 
a/UnitTestFrameworkPkg/PrivateInclude/Library/UnitTestPersistenceLib.h 
b/UnitTestFrameworkPkg/Include/Library/UnitTestPersistenceLib.h
similarity index 100%
rename from UnitTestFrameworkPkg/PrivateInclude/Library/UnitTestPersistenceLib.h
rename to UnitTestFrameworkPkg/Include/Library/UnitTestPersistenceLib.h
diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec 
b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
index ed12f32009d8..14e387d63a0f 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
@@ -26,11 +26,16 @@ [Includes.Common.Private]
   Library/CmockaLib/cmocka/include/cmockery
   Library/GoogleTestLib/googletest/googletest
 
-[LibraryClasses.Common.Private]
+[LibraryClasses]
   ## @libraryclass Allows save and restore unit test internal state
   #
-  UnitTestPersistenceLib|PrivateInclude/Library/UnitTestPersistenceLib.h
+  UnitTestPersistenceLib|Include/Library/UnitTestPersistenceLib.h
 
+  ## @libraryclass GoogleTest infrastructure
+  #
+  GoogleTestLib|Include/Library/GoogleTestLib.h
+
+[LibraryClasses.Common.Private]
   ## @libraryclass Provides a unit test result report
   #
   UnitTestResultReportLib|PrivateInclude/Library/UnitTestResultReportLib.h
@@ -39,10 +44,6 @@ [LibraryClasses.Common.Private]
   #
   UnitTestBootLib|PrivateInclude/Library/UnitTestBootLib.h
 
-  ## @libraryclass GoogleTest infrastructure
-  #
-  GoogleTestLib|Include/Library/GoogleTestLib.h
-
 [Guids]
   gUnitTestFrameworkPkgTokenSpaceGuid = { 0x833d3aba, 0x39b4, 0x43a2, { 0xb9, 
0x30, 0x7a, 0x34, 0x53, 0x39, 0x31, 0xb3 } }
 
-- 
2.37.1.windows.1



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




Re: [edk2-devel] [PATCH] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail

2022-11-30 Thread Michael D Kinney
Hi Jeshuas,

This is a good idea to show the expected value.

%p was used on purpose because unit tests can be built for 32-bit or 64-bit and
the EFI_STATUS is same as RETURN_STATUS which is same as UINTN.  UINTN is 
32-bits
for 32-bit unit test apps and 64-bit for 64-bit unit test apps.  %p prints a 
pointer sized value, which happens to match the UINTN for support CPU archs.

A couple options to consider:
1) Keep using %p instead of %llx.
2) Use UINT64 local variables to hold Status and Expected values and use %llx.
3) Use the MdePkg PrintLib to convert Status and Expected to string names and
   update message to show the name of the status value instead of the hex value.
4) Don't add a dependency on PrintLib and instead convert to string names in
   this same C file.

Best regards,

Mike


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Jeshua Smith 
> via groups.io
> Sent: Wednesday, November 30, 2022 12:39 PM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D ; 
> mikub...@linux.microsoft.com; sean.bro...@microsoft.com; Jeshua Smith
> 
> Subject: [edk2-devel] [PATCH] UnitTestFrameworkPkg/UnitTestLib: Print 
> expected Status on ASSERT fail
> 
> Update the UnitTestAssertStatusEqual error message to print out the
> expected value in addition to the seen value.
> 
> Signed-off-by: Jeshua Smith 
> ---
>  UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> index dc05bbd438..322daf318a 100644
> --- a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> @@ -290,7 +290,7 @@ UnitTestAssertStatusEqual (
>  {
>CHAR8  TempStr[MAX_STRING_SIZE];
> 
> -  snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p)", 
> Description, (VOID *)Status);
> +  snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:0x%llx 
> expected:0x%llx)", Description, Status,
> Expected);
>_assert_true ((Status == Expected), TempStr, FileName, (INT32)LineNumber);
> 
>return (Status == Expected);
> --
> 2.25.1
> 
> 
> 
> 
> 



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




Re: [edk2-devel] [PATCH v8 10/12] CI: Don't install cspell

2022-11-30 Thread Chris Fernald
I apologize as I think I mislead you on this. I think we can only remove 
this operation for the builds using the container. I believe Windows 
builds will still require this step for the time being. The Windows 
pipeline on your PR is currently failing to find cspell. Sorry for not 
being clear on this originally.


On 11/30/2022 12:01 PM, Oliver Steffen wrote:

cspell is already included in the container image.

Signed-off-by: Oliver Steffen 
---
  .azurepipelines/templates/spell-check-prereq-steps.yml | 4 
  1 file changed, 4 deletions(-)

diff --git a/.azurepipelines/templates/spell-check-prereq-steps.yml
b/.azurepipelines/templates/spell-check-prereq-steps.yml
index 226909d54c4e..66354ad78b5c 100644
--- a/.azurepipelines/templates/spell-check-prereq-steps.yml
+++ b/.azurepipelines/templates/spell-check-prereq-steps.yml
@@ -16,7 +16,3 @@ steps:
  versionSpec: '14.x'
  #checkLatest: false # Optional
condition: and(gt(variables.pkg_count, 0), succeeded())
-
-- script: npm install -g cspell@5.20.0
-  displayName: 'Install cspell npm'
-  condition: and(gt(variables.pkg_count, 0), succeeded())



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




[edk2-devel] [PATCH] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail

2022-11-30 Thread Jeshua Smith via groups.io
Update the UnitTestAssertStatusEqual error message to print out the
expected value in addition to the seen value.

Signed-off-by: Jeshua Smith 
---
 UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c 
b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
index dc05bbd438..322daf318a 100644
--- a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
+++ b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
@@ -290,7 +290,7 @@ UnitTestAssertStatusEqual (
 {
   CHAR8  TempStr[MAX_STRING_SIZE];
 
-  snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p)", 
Description, (VOID *)Status);
+  snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:0x%llx 
expected:0x%llx)", Description, Status, Expected);
   _assert_true ((Status == Expected), TempStr, FileName, (INT32)LineNumber);
 
   return (Status == Expected);
-- 
2.25.1



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




Re: [edk2-devel] [PATCH v8 12/12] CI: use latest vm_image (Linux only)

2022-11-30 Thread Michael D Kinney
I know we have run into issues before when using ubuntu-latest when
a change was made to the latest image that broke CI.

I would prefer to always set this to a specific version, so we can 
choose to move to a newer one with a PR that can run through CI.

I am ok with selecting the highest version available that matches
current ubuntu-latest version number.

Thanks,

Mike

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Oliver Steffen
> Sent: Wednesday, November 30, 2022 12:01 PM
> To: devel@edk2.groups.io
> Cc: Andrew Fish ; Ard Biesheuvel 
> ; Feng, Bob C ; Daniel
> Schaefer ; Gerd Hoffmann ; Yao, 
> Jiewen ; Justen, Jordan L
> ; Leif Lindholm ; Gao, 
> Liming ; Kinney,
> Michael D ; Michael Kubacki 
> ; Ni, Ray ; Sami
> Mujawar ; Sean Brogan ; 
> Sunil V L ; Chen,
> Christine ; Liu, Zhiguang ; 
> Pawel Polawski ; fernald,
> chris ; Oliver Steffen 
> Subject: [edk2-devel] [PATCH v8 12/12] CI: use latest vm_image (Linux only)
> 
> Switch over to `ubuntu-latest` as the vm_image for Linux
> CI jobs (EmulatorPkg, ArmVirtPkg, OvmfPkg).
> The previously used ubuntu-18.04 will not be available
> after Dec 1st 2022.
> 
> Signed-off-by: Oliver Steffen 
> ---
>  ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml  | 2 +-
>  EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 2 +-
>  OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> index 6d75502b5628..f7844229e60c 100644
> --- a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> +++ b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> @@ -19,7 +19,7 @@ jobs:
>- job: Platform_CI
>  variables:
>package: 'ArmVirtPkg'
> -  vm_image: 'ubuntu-18.04'
> +  vm_image: 'ubuntu-latest'
>should_run: true
>run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"
> 
> diff --git a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> index e58bb5b55245..3124de6634b2 100644
> --- a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> +++ b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> @@ -19,7 +19,7 @@ jobs:
>- job: Platform_CI
>  variables:
>package: 'EmulatorPkg'
> -  vm_image: 'ubuntu-18.04'
> +  vm_image: 'ubuntu-latest'
>should_run: false
>run_flags: "MAKE_STARTUP_NSH=TRUE"
> 
> diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> index 984782aa7d19..831b0eb254b4 100644
> --- a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> +++ b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
> @@ -19,7 +19,7 @@ jobs:
>- job: Platform_CI
>  variables:
>package: 'OvmfPkg'
> -  vm_image: 'ubuntu-18.04'
> +  vm_image: 'ubuntu-latest'
>should_run: true
>run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"
> 
> --
> 2.38.1
> 
> 
> 
> 
> 



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




[edk2-devel] [PATCH v8 10/12] CI: Don't install cspell

2022-11-30 Thread Oliver Steffen
cspell is already included in the container image.

Signed-off-by: Oliver Steffen 
---
 .azurepipelines/templates/spell-check-prereq-steps.yml | 4 
 1 file changed, 4 deletions(-)

diff --git a/.azurepipelines/templates/spell-check-prereq-steps.yml
b/.azurepipelines/templates/spell-check-prereq-steps.yml
index 226909d54c4e..66354ad78b5c 100644
--- a/.azurepipelines/templates/spell-check-prereq-steps.yml
+++ b/.azurepipelines/templates/spell-check-prereq-steps.yml
@@ -16,7 +16,3 @@ steps:
 versionSpec: '14.x'
 #checkLatest: false # Optional
   condition: and(gt(variables.pkg_count, 0), succeeded())
-
-- script: npm install -g cspell@5.20.0
-  displayName: 'Install cspell npm'
-  condition: and(gt(variables.pkg_count, 0), succeeded())
-- 
2.38.1



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




[edk2-devel] [PATCH v8 11/12] .pytool: CISettings.py: don't add scopes for GCC

2022-11-30 Thread Oliver Steffen
All ext_dep.yml files for gcc have been removed and gcc
is expected to be installed on the system (GCC5_*_PREFIX
may indicate the location).
No need to adjust the toolchain scopes for Linux builds
anymore.

Signed-off-by: Oliver Steffen 
---
 .pytool/CISettings.py | 9 -
 1 file changed, 9 deletions(-)

diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py
index 76ac2b09dba6..d87c8e838e61 100644
--- a/.pytool/CISettings.py
+++ b/.pytool/CISettings.py
@@ -169,15 +169,6 @@ class Settings(CiBuildSettingsManager,
UpdateSettingsManager, SetupSettingsManag
 else:
 logging.warning("Falling back to using in-tree BaseTools")

-if is_linux and self.ActualToolChainTag.upper().startswith("GCC"):
-if "AARCH64" in self.ActualArchitectures:
-scopes += ("gcc_aarch64_linux",)
-if "ARM" in self.ActualArchitectures:
-scopes += ("gcc_arm_linux",)
-if "RISCV64" in self.ActualArchitectures:
-scopes += ("gcc_riscv64_unknown",)
-if "LOONGARCH64" in self.ActualArchitectures:
-scopes += ("gcc_loongarch64_unknown_linux",)
 self.ActualScopes = scopes
 return self.ActualScopes

-- 
2.38.1



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




[edk2-devel] [PATCH v8 12/12] CI: use latest vm_image (Linux only)

2022-11-30 Thread Oliver Steffen
Switch over to `ubuntu-latest` as the vm_image for Linux
CI jobs (EmulatorPkg, ArmVirtPkg, OvmfPkg).
The previously used ubuntu-18.04 will not be available
after Dec 1st 2022.

Signed-off-by: Oliver Steffen 
---
 ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml  | 2 +-
 EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 2 +-
 OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index 6d75502b5628..f7844229e60c 100644
--- a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -19,7 +19,7 @@ jobs:
   - job: Platform_CI
 variables:
   package: 'ArmVirtPkg'
-  vm_image: 'ubuntu-18.04'
+  vm_image: 'ubuntu-latest'
   should_run: true
   run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"

diff --git a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index e58bb5b55245..3124de6634b2 100644
--- a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -19,7 +19,7 @@ jobs:
   - job: Platform_CI
 variables:
   package: 'EmulatorPkg'
-  vm_image: 'ubuntu-18.04'
+  vm_image: 'ubuntu-latest'
   should_run: false
   run_flags: "MAKE_STARTUP_NSH=TRUE"

diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index 984782aa7d19..831b0eb254b4 100644
--- a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -19,7 +19,7 @@ jobs:
   - job: Platform_CI
 variables:
   package: 'OvmfPkg'
-  vm_image: 'ubuntu-18.04'
+  vm_image: 'ubuntu-latest'
   should_run: true
   run_flags: "MAKE_STARTUP_NSH=TRUE QEMU_HEADLESS=TRUE"

-- 
2.38.1



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




[edk2-devel] [PATCH v8 09/12] EmulatorPkg: CI: Use Fedora 35 container (Linux only)

2022-11-30 Thread Oliver Steffen
Run all Linux based jobs in a container, using a custom Fedora 35 image
(gcc 11). The image is hosted on ghcr.io and the Dockerfiles are
here: https://github.com/tianocore/containers
The version numbers of gcc, iasl, and nasm are pinned to avoid
unintended upgrades during image rebuild.

Use Python from the container image, do not download at runtime.

Signed-off-by: Oliver Steffen 
---
 EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index 416c15e70840..e58bb5b55245 100644
--- a/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/EmulatorPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -75,6 +75,8 @@ jobs:
 pool:
   vmImage: $(vm_image)

+container: 'ghcr.io/tianocore/containers/fedora-35-test:2113a0e'
+
 steps:
 - template: ../../../.azurepipelines/templates/platform-build-run-steps.yml
   parameters:
@@ -85,3 +87,4 @@ jobs:
 build_file: $(Build.File)
 build_flags: $(Build.Flags)
 run_flags: $(Run.Flags)
+usePythonVersion: '' # use Python from the container image
-- 
2.38.1



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




[edk2-devel] [PATCH v8 06/12] BaseTools: CI: Use Fedora 35 container (Linux only)

2022-11-30 Thread Oliver Steffen
Run all Linux based jobs in a container, using a custom Fedora 35 image
(gcc 11). The image is hosted on ghcr.io and the Dockerfiles are
here: https://github.com/tianocore/containers
The version numbers of gcc, iasl, and nasm are pinned to avoid
unintended upgrades during image rebuild.

Do not run apt-get in CI jobs to install qemu and gcc dependencies.
Assume the container image provides these.

Use Python from the container image, do not download at runtime.

Remove BaseTools/Bin/gcc_*_ext_dep.yaml to stop
downloading gcc from external locations; use the
gcc provided by the container image instead.
The container image sets the variable GCC5_*_PREFIX accordingly.

Signed-off-by: Oliver Steffen 
---
 .azurepipelines/Ubuntu-GCC5.yml   |  2 ++
 .../templates/basetools-build-steps.yml   |  9 
 BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml  | 21 --
 BaseTools/Bin/gcc_arm_linux_ext_dep.yaml  | 21 --
 ...gcc_loongarch64_unknown_linux_ext_dep.yaml | 22 ---
 .../Bin/gcc_riscv64_unknown_ext_dep.yaml  | 22 ---
 6 files changed, 2 insertions(+), 95 deletions(-)
 delete mode 100644 BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
 delete mode 100644 BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
 delete mode 100644 BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml
 delete mode 100644 BaseTools/Bin/gcc_riscv64_unknown_ext_dep.yaml

diff --git a/.azurepipelines/Ubuntu-GCC5.yml b/.azurepipelines/Ubuntu-GCC5.yml
index 1acd8d2a46a7..0dd9b74de57a 100644
--- a/.azurepipelines/Ubuntu-GCC5.yml
+++ b/.azurepipelines/Ubuntu-GCC5.yml
@@ -18,5 +18,7 @@ jobs:
   parameters:
 tool_chain_tag: 'GCC5'
 vm_image: 'ubuntu-latest'
+container: 'ghcr.io/tianocore/containers/fedora-35-build:2113a0e'
+usePythonVersion: ''  # use Python from the container image
 arch_list: "IA32,X64,ARM,AARCH64,RISCV64,LOONGARCH64"

diff --git a/.azurepipelines/templates/basetools-build-steps.yml
b/.azurepipelines/templates/basetools-build-steps.yml
index d8c108c6e212..a72758bc3395 100644
--- a/.azurepipelines/templates/basetools-build-steps.yml
+++ b/.azurepipelines/templates/basetools-build-steps.yml
@@ -10,15 +10,6 @@ parameters:
   tool_chain_tag: ''

 steps:
-- ${{ if contains(parameters.tool_chain_tag, 'GCC') }}:
-  - bash: sudo apt-get update
-displayName: Update apt
-condition: and(gt(variables.pkg_count, 0), succeeded())
-
-  - bash: sudo apt-get install gcc g++ make uuid-dev
-displayName: Install required tools
-condition: and(gt(variables.pkg_count, 0), succeeded())
-
 - task: CmdLine@1
   displayName: Build Base Tools from source
   inputs:
diff --git a/BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
b/BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
deleted file mode 100644
index ff8a9e868100..
--- a/BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-## @file
-# Download GCC AARCH64 compiler from Arm's release site
-# Set shell variable GCC5_AARCH64_INSTALL to this folder
-#
-# This is only downloaded when a build activates scope gcc_aarch64_linux
-#
-# Copyright (c) Microsoft Corporation.
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-##
-{
-  "scope": "gcc_aarch64_linux",
-  "type": "web",
-  "name": "gcc_aarch64_linux",
-  "source": 
"https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu.tar.xz";,
-  "version": "11.2-2022.02",
-  "sha256": "52dbac3eb71dbe0916f60a8c5ab9b7dc9b66b3ce513047baa09fae56234e53f3",
-  "compression_type": "tar",
-  "internal_path": "/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/",
-  "flags": ["set_shell_var", ],
-  "var_name": "GCC5_AARCH64_INSTALL"
-}
diff --git a/BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
b/BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
deleted file mode 100644
index 151cbfa4b532..
--- a/BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-## @file
-# Download GCC ARM compiler from Arm's release site
-# Set shell variable GCC5_ARM_INSTALL to this folder
-#
-# This is only downloaded when a build activates scope gcc_arm_linux
-#
-# Copyright (c) Microsoft Corporation.
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-##
-{
-  "scope": "gcc_arm_linux",
-  "type": "web",
-  "name": "gcc_arm_linux",
-  "source": 
"https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf.tar.xz";,
-  "version": "11.2-2022.02",
-  "sha256": "c254f7199261fe76c32ef42187502839bda7efad0a66646cf739d074eff45fad",
-  "compression_type": "tar",
-  "internal_path": "/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf/",
-  "flags": ["set_shell_var", ],
-  "var_name": "GCC5_ARM_INSTALL"
-}
diff --git a/BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml
b/BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml
deleted file mode 100644
index fe9a2448531a..
--- a/BaseTools/Bin/gcc_loongarch

[edk2-devel] [PATCH v8 08/12] OvmfPkg: CI: Use Fedora 35 container (Linux only)

2022-11-30 Thread Oliver Steffen
Run all Linux based jobs in a container, using a custom Fedora 35 image
(gcc 11). The image is hosted on ghcr.io and the Dockerfiles are
here: https://github.com/tianocore/containers
The version numbers of gcc, iasl, and nasm are pinned to avoid
unintended upgrades during image rebuild.

Do not run apt-get in CI jobs to install qemu and gcc dependencies.
Assume the container image provides these.

Use Python from the container image, do not download at runtime.

Signed-off-by: Oliver Steffen 
---
 OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index 7160d95f7e04..984782aa7d19 100644
--- a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -177,6 +177,8 @@ jobs:
 pool:
   vmImage: $(vm_image)

+container: 'ghcr.io/tianocore/containers/fedora-35-test:2113a0e'
+
 steps:
 - template: ../../../.azurepipelines/templates/platform-build-run-steps.yml
   parameters:
@@ -187,7 +189,4 @@ jobs:
 build_file: $(Build.File)
 build_flags: $(Build.Flags)
 run_flags: $(Run.Flags)
-extra_install_step:
-- bash: sudo apt-get install qemu
-  displayName: Install qemu
-  condition: and(gt(variables.pkg_count, 0), succeeded())
+usePythonVersion: '' # use Python from the container image
-- 
2.38.1



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




[edk2-devel] [PATCH v8 04/12] CI: add ~/.local/bin to PATH (Linux only)

2022-11-30 Thread Oliver Steffen
Fix pip install under certain conditions.

Signed-off-by: Oliver Steffen 
---
 .azurepipelines/templates/platform-build-run-steps.yml | 6 ++
 .azurepipelines/templates/pr-gate-steps.yml| 6 ++
 2 files changed, 12 insertions(+)

diff --git a/.azurepipelines/templates/platform-build-run-steps.yml
b/.azurepipelines/templates/platform-build-run-steps.yml
index 8803d80cf51c..087f460d7fec 100644
--- a/.azurepipelines/templates/platform-build-run-steps.yml
+++ b/.azurepipelines/templates/platform-build-run-steps.yml
@@ -39,6 +39,12 @@ parameters:
   default: ''

 steps:
+- bash: |
+echo "##vso[task.prependpath]${HOME}/.local/bin"
+echo "new PATH=${PATH}"
+  displayName: Set PATH
+  condition: eq('${{ parameters.tool_chain_tag }}', 'GCC5')
+
 - checkout: self
   clean: true
   fetchDepth: 1
diff --git a/.azurepipelines/templates/pr-gate-steps.yml
b/.azurepipelines/templates/pr-gate-steps.yml
index 27a44c06011c..99d52cfa0605 100644
--- a/.azurepipelines/templates/pr-gate-steps.yml
+++ b/.azurepipelines/templates/pr-gate-steps.yml
@@ -15,6 +15,12 @@ parameters:
   usePythonVersion: ''

 steps:
+- bash: |
+echo "##vso[task.prependpath]${HOME}/.local/bin"
+echo "new PATH=${PATH}"
+  displayName: Set PATH
+  condition: eq('${{ parameters.tool_chain_tag }}', 'GCC5')
+
 - checkout: self
   clean: true
   fetchDepth: 1
-- 
2.38.1



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




[edk2-devel] [PATCH v8 07/12] ArmVirtPkg: CI: Use Fedora 35 container (Linux only)

2022-11-30 Thread Oliver Steffen
Run all Linux based jobs in a container, using a custom Fedora 35 image
(gcc 11). The image is hosted on ghcr.io and the Dockerfiles are
here: https://github.com/tianocore/containers
The version numbers of gcc, iasl, and nasm are pinned to avoid
unintended upgrades during image rebuild.

Do not run apt-get in CI jobs to install qemu and gcc dependencies.
Assume the container image provides these.

Use Python from the container image, do not download at runtime.

Signed-off-by: Oliver Steffen 
---
 ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
index b07e3199f143..6d75502b5628 100644
--- a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
+++ b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
@@ -75,6 +75,8 @@ jobs:
 pool:
   vmImage: $(vm_image)

+container: 'ghcr.io/tianocore/containers/fedora-35-test:2113a0e'
+
 steps:
 - template: ../../../.azurepipelines/templates/platform-build-run-steps.yml
   parameters:
@@ -85,7 +87,4 @@ jobs:
 build_file: $(Build.File)
 build_flags: $(Build.Flags)
 run_flags: $(Run.Flags)
-extra_install_step:
-- bash: sudo apt-get install qemu
-  displayName: Install qemu
-  condition: and(gt(variables.pkg_count, 0), succeeded())
+usePythonVersion: '' # use Python from the container image
-- 
2.38.1



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




[edk2-devel] [PATCH v8 01/12] CI: make Python version configurable

2022-11-30 Thread Oliver Steffen
Add a new parameter "usePythonVersion" to the CI job templates.
This makes it possible to specify the version of Python to use.
The default value is '', in which case Python will not be downloaded
at runtime and the one provided by the VM/container image will be used.

Additionally, add a template .azurepipelines/templates/defaults.yml,
from which the default Pyhton version string can be obtained.

Signed-off-by: Oliver Steffen 
---
 .azurepipelines/Windows-VS2019.yml | 4 
 .azurepipelines/templates/defaults.yml | 3 +++
 .azurepipelines/templates/platform-build-run-steps.yml | 6 +-
 .azurepipelines/templates/pr-gate-build-job.yml| 2 ++
 .azurepipelines/templates/pr-gate-steps.yml| 6 --
 5 files changed, 18 insertions(+), 3 deletions(-)
 create mode 100644 .azurepipelines/templates/defaults.yml

diff --git a/.azurepipelines/Windows-VS2019.yml
b/.azurepipelines/Windows-VS2019.yml
index e4bd4b1d2283..89bccde82575 100644
--- a/.azurepipelines/Windows-VS2019.yml
+++ b/.azurepipelines/Windows-VS2019.yml
@@ -12,9 +12,13 @@ pr:
 - master
 - stable/*

+variables:
+  - template: templates/defaults.yml
+
 jobs:
 - template: templates/pr-gate-build-job.yml
   parameters:
 tool_chain_tag: 'VS2019'
 vm_image: 'windows-2019'
 arch_list: "IA32,X64"
+usePythonVersion: ${{ variables.default_python_version }}
diff --git a/.azurepipelines/templates/defaults.yml
b/.azurepipelines/templates/defaults.yml
new file mode 100644
index ..314d03e33af8
--- /dev/null
+++ b/.azurepipelines/templates/defaults.yml
@@ -0,0 +1,3 @@
+
+variables:
+  default_python_version: ">=3.10.6"
diff --git a/.azurepipelines/templates/platform-build-run-steps.yml
b/.azurepipelines/templates/platform-build-run-steps.yml
index 40a31a509fc5..8803d80cf51c 100644
--- a/.azurepipelines/templates/platform-build-run-steps.yml
+++ b/.azurepipelines/templates/platform-build-run-steps.yml
@@ -34,6 +34,9 @@ parameters:
 - name: extra_install_step
   type: stepList
   default: []
+- name: usePythonVersion
+  type: string
+  default: ''

 steps:
 - checkout: self
@@ -42,8 +45,9 @@ steps:

 - task: UsePythonVersion@0
   inputs:
-versionSpec: ">=3.10.6"
+versionSpec: ${{ parameters.usePythonVersion }}
 architecture: "x64"
+  condition: ne('${{ parameters.usePythonVersion }}', '')

 - script: pip install -r pip-requirements.txt --upgrade
   displayName: 'Install/Upgrade pip modules'
diff --git a/.azurepipelines/templates/pr-gate-build-job.yml
b/.azurepipelines/templates/pr-gate-build-job.yml
index 7f88b41dc8d3..f0ef1142da49 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -12,6 +12,7 @@ parameters:
   tool_chain_tag: ''
   vm_image: ''
   arch_list: ''
+  usePythonVersion: ''

 # Build step
 jobs:
@@ -77,3 +78,4 @@ jobs:
   build_pkgs: $(Build.Pkgs)
   build_targets: $(Build.Targets)
   build_archs: ${{ parameters.arch_list }}
+  usePythonVersion: ${{ parameters.usePythonVersion }}
diff --git a/.azurepipelines/templates/pr-gate-steps.yml
b/.azurepipelines/templates/pr-gate-steps.yml
index cb431e53fcd1..27a44c06011c 100644
--- a/.azurepipelines/templates/pr-gate-steps.yml
+++ b/.azurepipelines/templates/pr-gate-steps.yml
@@ -12,6 +12,7 @@ parameters:
   build_pkgs: ''
   build_targets: ''
   build_archs: ''
+  usePythonVersion: ''

 steps:
 - checkout: self
@@ -20,8 +21,9 @@ steps:

 - task: UsePythonVersion@0
   inputs:
-versionSpec: '>=3.10.6'
-architecture: 'x64'
+versionSpec: ${{ parameters.usePythonVersion }}
+architecture: "x64"
+  condition: ne('${{ parameters.usePythonVersion }}', '')

 - script: pip install -r pip-requirements.txt --upgrade
   displayName: 'Install/Upgrade pip modules'
-- 
2.38.1



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




[edk2-devel] [PATCH v8 03/12] EmulatorPkg: CI: use Python version from defaults template

2022-11-30 Thread Oliver Steffen
Use the default Python version from the defaults template
(.azurepipelines/templates/defaults.yml) in the Windows
CI jobs.

Previous changes to the CI job templates make it necessary
to specify a version number, if Python shall be pulled
at CI runtime.

The Linux CI jobs will use Python from the container image,
so these changes are for Windows only.

Signed-off-by: Oliver Steffen 
---
 EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml | 4 
 1 file changed, 4 insertions(+)

diff --git a/EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
b/EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
index e7ead06ae266..09960e7c7a6e 100644
--- a/EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
+++ b/EmulatorPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
@@ -16,6 +16,9 @@ pr:
   - master
   - stable/*

+variables:
+  - template: ../../../.azurepipelines/templates/defaults.yml
+
 jobs:
   - job: Platform_CI
 variables:
@@ -128,3 +131,4 @@ jobs:
 build_file: $(Build.File)
 build_flags: $(Build.Flags)
 run_flags: $(Run.Flags)
+usePythonVersion: ${{ variables.default_python_version }}
-- 
2.38.1



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




[edk2-devel] [PATCH v8 05/12] CI: Allow running in a container.

2022-11-30 Thread Oliver Steffen
Add a parameter of the pr-gate-build-job template to specify a
container image URL.  If the value is not '' (default), then the
jobs will be run inside a container based on that image.

Signed-off-by: Oliver Steffen 
---
 .azurepipelines/templates/pr-gate-build-job.yml | 4 
 1 file changed, 4 insertions(+)

diff --git a/.azurepipelines/templates/pr-gate-build-job.yml
b/.azurepipelines/templates/pr-gate-build-job.yml
index f0ef1142da49..5ffcaca7b591 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -12,6 +12,7 @@ parameters:
   tool_chain_tag: ''
   vm_image: ''
   arch_list: ''
+  container: ''
   usePythonVersion: ''

 # Build step
@@ -71,6 +72,9 @@ jobs:
   pool:
 vmImage: ${{ parameters.vm_image }}

+  ${{ if not(eq(parameters.container, '')) }}:
+container: ${{ parameters.container }}
+
   steps:
   - template: pr-gate-steps.yml
 parameters:
-- 
2.38.1



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




[edk2-devel] [PATCH v8 02/12] OvmfPkg: CI: use Python version from defaults template

2022-11-30 Thread Oliver Steffen
Use the default Python version from the defaults template
(.azurepipelines/templates/defaults.yml) in the Windows
CI jobs.

Previous changes to the CI job templates make it necessary
to specify a version number, if Python shall be pulled
at CI runtime.

The Linux CI jobs will use Python from the container image,
so these changes are for Windows only.

Signed-off-by: Oliver Steffen 
---
 OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml | 5 +
 1 file changed, 5 insertions(+)

diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
b/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
index 7d6344d6383d..7e63f419b26b 100644
--- a/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
+++ b/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
@@ -14,6 +14,10 @@ trigger:
 pr:
   - master
   - stable/*
+
+variables:
+  - template: ../../../.azurepipelines/templates/defaults.yml
+
 jobs:
   - job: Platform_CI
 variables:
@@ -133,6 +137,7 @@ jobs:
 build_file: $(Build.File)
 build_flags: $(Build.Flags)
 run_flags: $(Run.Flags)
+usePythonVersion: ${{ variables.default_python_version }}
 extra_install_step:
 - powershell: choco install qemu --version=2021.5.5;
Write-Host "##vso[task.prependpath]c:\Program Files\qemu"
   displayName: Install QEMU and Set QEMU on path # friendly
name displayed in the UI
-- 
2.38.1



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




[edk2-devel] [PATCH v8 00/12] CI: Use Fedora 35 container for Linux jobs

2022-11-30 Thread Oliver Steffen
Update CI, run all Linux (aka Ubuntu-GCC5) based jobs in custom
containers.  This decouples the CI environment from the virtual machine
images that Azure DevOps provides.  The currently used ubuntu-18.04 image
has been deprecated for a while now and will finally be removed on
Dec 1st 2022.

The container image provides the required compiler toolchains and Qemu
for the supported architectures. These are then no longer downloaded at
runtime, avoiding CI failures due to download errors. This approach also
makes it easier to switch to other or newer compilers. It makes the CI
setup independent from the default images that Azure DevOps provides.
It can also help debugging CI problems, because the CI environment
can be reproduced on a local machine.

The container images are hosted on ghcr.io and are automatically
generated using GitHub Actions. The Dockerfiles are maintained in the
Tianocore "containers" repository:
https://github.com/tianocore/containers.

The current image is based on Fedora 35, with gcc 11. Fedora was chosen
because of its fast release cycle which makes it easy to keep the
toolchains up-to-date.

Some further possible changes not included in this series:
- The Tianocore/containers repository provides stack of layered images.
  One image for general purpose (build+test) and build-only jobs.
  The build+test image is based on the build-only one and adds Qemu,
  for the testing job that involve Qemu.  The work in the image side
  is done, we just need to change the CI setup accordingly.
  This patch set uses the build+test images for all jobs.
- Further reduce the number of external dependencies that need to be
  downloaded at runtime. Candidates are iasl and nasm, which are already
  included in the image but not used yet.

PR: https://github.com/tianocore/edk2/pull/3685

v8:
- Use updated container image that contains gcc for LoongArch64.
- Remove ext_dep files for the LoongArch64 gcc.
- Don't change the scopes in .pytool/CISettings.py if running Linux CI
  it.
- Split commits that touch multiple packages.
- Use the smaller "build" image for jobs that allow it.
- Add a CI template file as a central place to define the default Python version
  and use it where needed.

v7:
- Rebase to latest master branch.
- Use latest Fedora 35 CI image.
- Stop using the ubuntu-18.04 vm_image since this will no longer be available
  after Dec 1st.  Use ubuntu-latest instead.

v6:
- Include suggestions by Chris Fernald.
- Added a parameter for the container image to the job template, makes usage
  of containers optional.
- Added a parameter to configure the Python version to download. Allows
  using Python from the VM/container image also.
- Restructure the commits (no further functional changes).

v5:
- Update image

v4:
- Use the latest image from the tianocode/containers repository which
  - does not include acpica-tools
  - includes Pyhton 3.10

v3:
- Use the latest image from the tianocode/containers repository which
  pins down version numbers of gcc, iasl, and nasm in the Dockerfile.

v2:
- Images are now hosted under the Tianocore Organization
  https://github.com/tianocore/containers

v1:
- Thread: https://edk2.groups.io/g/devel/message/89058
- Images were hosted at https://github.com/osteffenrh/edk2-build-images

Signed-off-by: Oliver Steffen 
Acked-by: Ard Biesheuvel 
Acked-by: Gerd Hoffmann 
Reviewed-by: Chris Fernald 

Oliver Steffen (12):
  CI: make Python version configurable
  OvmfPkg: CI: use Python version from defaults template
  EmulatorPkg: CI: use Python version from defaults template
  CI: add ~/.local/bin to PATH (Linux only)
  CI: Allow running in a container.
  BaseTools: CI: Use Fedora 35 container (Linux only)
  ArmVirtPkg: CI: Use Fedora 35 container (Linux only)
  OvmfPkg: CI: Use Fedora 35 container (Linux only)
  EmulatorPkg: CI: Use Fedora 35 container (Linux only)
  CI: Don't install cspell
  .pytool: CISettings.py: don't add scopes for GCC
  CI: use latest vm_image (Linux only)

 .azurepipelines/Ubuntu-GCC5.yml   |  2 ++
 .azurepipelines/Windows-VS2019.yml|  4 
 .../templates/basetools-build-steps.yml   |  9 
 .azurepipelines/templates/defaults.yml|  3 +++
 .../templates/platform-build-run-steps.yml| 12 +-
 .../templates/pr-gate-build-job.yml   |  6 +
 .azurepipelines/templates/pr-gate-steps.yml   | 12 --
 .../templates/spell-check-prereq-steps.yml|  4 
 .pytool/CISettings.py |  9 
 .../.azurepipelines/Ubuntu-GCC5.yml   |  9 
 BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml  | 21 --
 BaseTools/Bin/gcc_arm_linux_ext_dep.yaml  | 21 --
 ...gcc_loongarch64_unknown_linux_ext_dep.yaml | 22 ---
 .../Bin/gcc_riscv64_unknown_ext_dep.yaml  | 22 ---
 .../.azurepipelines/Ubuntu-GCC5.yml   |  5 -
 .../.azurepipelines/Windows-VS2019.yml|  4 
 .../.azurepipelines/Ub

Re: [edk2-devel] [PATCH v7 2/2] tools_def: add -fno-omit-frame-pointer to GCC48_{IA32,X64}_CC_FLAGS

2022-11-30 Thread Brian J. Johnson

Gerd,

Sorry, gotta ask:  does this make much difference in the size of the 
compiled code?  That's a constraint on many real-hardware X64 platforms, 
especially for 32-bit code.


Brian J. Johnson

 Original Message 
From: Gerd Hoffmann [mailto:kra...@redhat.com]
Sent: Wednesday, November 30, 2022 at 3:44 AM
To: devel@edk2.groups.io
Cc: Alexey Kardashevskiy , Liming Gao 
, Erdem Aktas , Pawel 
Polawski , Jordan Justen 
, Ard Biesheuvel , 
Yuwei Chen , Tom Lendacky 
, James Bottomley , Gerd 
Hoffmann , Oliver Steffen , 
Jiewen Yao , Min Xu , Brijesh 
Singh , Bob Feng 
Subject: [edk2-devel] [PATCH v7 2/2] tools_def: add 
-fno-omit-frame-pointer to GCC48_{IA32,X64}_CC_FLAGS


Fixes problems due to code assuming it runs with frame pointers and thus
updates rbp / ebp registers when switching stacks.

Signed-off-by: Gerd Hoffmann 
---
  BaseTools/Conf/tools_def.template | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template

index 73f95b2a3a9f..f1fd6a003062 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1888,8 +1888,8 @@ DEFINE GCC_DEPS_FLAGS  = -MMD -MF $@.deps

  DEFINE GCC48_ALL_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) 
-ffunction-sections -fdata-sections -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
  DEFINE GCC48_IA32_X64_DLINK_COMMON   = -nostdlib 
-Wl,-n,-q,--gc-sections -z common-page-size=0x20
-DEFINE GCC48_IA32_CC_FLAGS   = DEF(GCC48_ALL_CC_FLAGS) -m32 
-march=i586 -malign-double -fno-stack-protector -D EFI32 
-fno-asynchronous-unwind-tables -Wno-address
-DEFINE GCC48_X64_CC_FLAGS= DEF(GCC48_ALL_CC_FLAGS) -m64 
-fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" 
-maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small 
-fpie -fno-asynchronous-unwind-tables -Wno-address
+DEFINE GCC48_IA32_CC_FLAGS   = DEF(GCC48_ALL_CC_FLAGS) -m32 
-march=i586 -malign-double -fno-stack-protector -D EFI32 
-fno-asynchronous-unwind-tables -Wno-address -fno-omit-frame-pointer
+DEFINE GCC48_X64_CC_FLAGS= DEF(GCC48_ALL_CC_FLAGS) -m64 
-fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" 
-maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small 
-fpie -fno-asynchronous-unwind-tables -Wno-address  -fno-omit-frame-pointer
  DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = 
DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u 
ReferenceAcpiTable
  DEFINE GCC48_IA32_X64_DLINK_FLAGS= 
DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u 
$(IMAGE_ENTRY_POINT) 
-Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive
  DEFINE GCC48_IA32_DLINK2_FLAGS   = 
-Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON)


--

Brian



   "I love deadlines. I like the whooshing sound they make as they fly by."
   -- Douglas Adams



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




[edk2-devel] TFTP download of 1.7 MB file generates 20GB Traffic under imperfect network conditions

2022-11-30 Thread Muehle
Hi Team,
I'm reaching out to you since I want to share an observation we have made while
doing PXE boot of client notebooks. One of the first steps while doing Network
Boot is to download an image by TFTP. This image has a size of 1.7 MB. While
the client is downloading this we have observed 1Gbit/s or even 10 Gbit/s links
are suddenly saturated with TFTP traffic. So we started doing tcpdumps and
tried to understand the trigger.
Finally it turned out, that reordering of IP packets or packetloss can trigger
this. We are now able to reproduce anytime by simulating packetloss or
reordering.

What happens (all good)
- Client and server are negotiating to TFTP transfer with window size 4
- Server is sending DATA 1,2,3,4
- Client is receiving 1,2,3,4 and sends an ACK for packet 4
- Server is receiving ACK for packet and sends out DATA 5,6,7,8

Now reordering / loss kicks in
Loss of DATA 6
- Client is receiving DATA 5,7,8 and therefore it sends ACK for DATA 5
- Server is receiving ACK for DATA 5 and sends out DATA 6,7,8,9

Loss of DATA 7
- Client is receiving data 6,8,9 and sends out ACK for DATA 6
- Server is receiving ACK for DATA 6 and sends out DATA 7,8,9,10

Reordering of DATA 7,8
- Client is receiving data 8,7,9,10 and sends out ACK for DATA 6
- Server is receiving ACK for DATA 6 and sends out DATA 7,8,9,10

This finally ends in a TFTP "Storm" which is filling up almost any link within
milliseconds. Once the image is successfully downloaded after sometimes
5 minutes, the client is booting into it. There it does other TFTP downloads,
which are not showing this kind of behavior in same network conditions. So it
seems to be specific to the TFTP client implementation in the BIOS of the
clients.

After opening cases at our notebook vendors it turned out, that they use EDK2
code in their BIOS actually doing the TFTP transfer. After some digging in the
code, bugs and feature requests, we finally found
"Bug 886 - RFC 7440 - TFTP windowsize option support" [1]

It looks like this implementation is covering the parameter negotiation, but
not the management of the receive window and retransmission behavior.
While window size 1 has retransmission timeouts and network latency as
"congestion avoidance", window size 4 seems to bypass all those barriers.
ACKs are immediately sent out, if an expected packet is not there.

I hope we can discuss this here and find a way to fix this.

Thanks in advance and kind regards,
Thomas

[1] https://bugzilla.tianocore.org/show_bug.cgi?id=886


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




[edk2-devel] [PATCH] ShellPkg/AcpiView: ERST Parser

2022-11-30 Thread Jeshua Smith via groups.io
Add a new parser for the Error Record Serialization Table.

The ERST table describes how an OS can save and retrieve

hardware error information to and from a persistent store.



Signed-off-by: Jeshua Smith 

---

 .../UefiShellAcpiViewCommandLib/AcpiParser.h  |  22 ++

 .../Parsers/Erst/ErstParser.c | 278 ++

 .../UefiShellAcpiViewCommandLib.c |   2 +

 .../UefiShellAcpiViewCommandLib.inf   |   2 +

 4 files changed, 304 insertions(+)

 create mode 100644 
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Erst/ErstParser.c



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

index db8c88f6df..66c992c55c 100644

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

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

@@ -1,6 +1,7 @@

 /** @file

   Header file for ACPI parser

 

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

   Copyright (c) 2016 - 2020, Arm Limited. All rights reserved.

   Copyright (c) 2022, AMD Incorporated. All rights reserved.

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

@@ -594,6 +595,27 @@ ParseAcpiDsdt (

   IN UINT8AcpiTableRevision

   );

 

+/**

+  This function parses the ACPI ERST table.

+  When trace is enabled this function parses the ERST 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

+ParseAcpiErst (

+  IN BOOLEAN  Trace,

+  IN UINT8*Ptr,

+  IN UINT32   AcpiTableLength,

+  IN UINT8AcpiTableRevision

+  );

+

 /**

   This function parses the ACPI FACS table.

   When trace is enabled this function parses the FACS table and

diff --git 
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Erst/ErstParser.c 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Erst/ErstParser.c

new file mode 100644

index 00..e2af0c44b4

--- /dev/null

+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Erst/ErstParser.c

@@ -0,0 +1,278 @@

+/** @file

+  ERST table parser

+

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

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

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

+

+  @par Reference(s):

+- ACPI 6.5 Specification - August 2022

+**/

+

+#include 

+#include 

+#include "AcpiParser.h"

+#include "AcpiTableParser.h"

+

+// Local variables

+STATIC ACPI_DESCRIPTION_HEADER_INFO  AcpiHdrInfo;

+STATIC UINT32*InstructionEntryCount;

+

+/**

+  An array of strings describing the Erst actions

+**/

+STATIC CONST CHAR16  *ErstActionTable[] = {

+  L"BEGIN_WRITE_OPERATION",

+  L"BEGIN_READ_OPERATION",

+  L"BEGIN_CLEAR_OPERATION",

+  L"END_OPERATION",

+  L"SET_RECORD_OFFSET",

+  L"EXECUTE_OPERATION",

+  L"CHECK_BUSY_STATUS",

+  L"GET_COMMAND_STATUS",

+  L"GET_RECORD_IDENTIFIER",

+  L"SET_RECORD_IDENTIFIER",

+  L"GET_RECORD_COUNT",

+  L"BEGIN_DUMMY_WRITE_OPERATION",

+  L"RESERVED",

+  L"GET_ERROR_LOG_ADDRESS_RANGE",

+  L"GET_ERROR_LOG_ADDRESS_RANGE_LENGTH",

+  L"GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES",

+  L"GET_EXECUTE_OPERATION_TIMINGS"

+};

+

+/**

+  An array of strings describing the Erst instructions

+**/

+STATIC CONST CHAR16  *ErstInstructionTable[] = {

+  L"READ_REGISTER",

+  L"READ_REGISTER_VALUE",

+  L"WRITE_REGISTER",

+  L"WRITE_REGISTER_VALUE",

+  L"NOOP",

+  L"LOAD_VAR1",

+  L"LOAD_VAR2",

+  L"STORE_VAR1",

+  L"ADD",

+  L"SUBTRACT",

+  L"ADD_VALUE",

+  L"SUBTRACT_VALUE",

+  L"STALL",

+  L"STALL_WHILE_TRUE",

+  L"SKIP_NEXT_INSTRUCTION_IF_TRUE",

+  L"GOTO",

+  L"SET_SRC_ADDRESS_BASE",

+  L"SET_DST_ADDRESS_BASE",

+  L"MOVE_DATA"

+};

+

+/**

+  Validate Erst action.

+

+  @param [in] Ptr   Pointer to the start of the field data.

+  @param [in] Context   Pointer to context specific information e.g. this

+could be a pointer to the ACPI table header.

+**/

+STATIC

+VOID

+EFIAPI

+ValidateErstAction (

+  IN UINT8  *Ptr,

+  IN VOID   *Context

+  )

+{

+  if (*Ptr > EFI_ACPI_6_4_ERST_GET_EXECUTE_OPERATION_TIMINGS) {

+IncrementErrorCount ();

+Print (L"\nError: 0x%02x is not a valid action encoding", *Ptr);

+  }

+}

+

+/**

+  Validate Erst instruction.

+

+  @param [in] Ptr   Pointer to the start of the field data.

+  @param [in] Context   Pointer to context specific information e.g. this

+could be a pointer to the ACPI table header.

+**/

+STATIC

+VOID

+EFIAPI

+ValidateErstInstruction (

+  IN UINT8  *Ptr,

+  IN VOID   *Context

+  )

+{

+  if (*Ptr > EFI_ACPI_6_4_ERST_MOVE_DATA)

Re: [edk2-devel] [PATCH v7 0/6] CI: Use Fedora 35 container for Linux jobs

2022-11-30 Thread Oliver Steffen
Sean,


Quoting Sean Brogan (2022-11-30 01:28:45)
> Oliver,
>
> Thanks for this changeset and i think this is getting closer but over the past
> few months there have been a few changes that I don't think this series takes
> into account.
>
> A few comments i hope we can address quickly (since 18.04 is going offline
> tomorrow).
>
> 1. Can the whole block at [1]https://github.com/tianocore/edk2/blob/
> dd3ba82d31a6d3cc4564dc83c9229e13773b55da/.pytool/CISettings.py#L172 be
> removed.  The only reason these exist is to pick up and download the
> compilers.

Yes. Done.

>
> 2. what about supporting the loongarch64 compiler? Can we add to container?

Added the gcc release from the LoongSon GitHub page.
This is a 13.0.0 20220906 (experimental), and not yet available via
regular repositories.  I opted for the "c-only" package which is only
70MB instead of the "full" one which was used in the ext_dep file
(921MB).

>
> 3. If loongarch64 is included in container should you delete this file too: 
> [2]
> edk2/gcc_loongarch64_unknown_linux_ext_dep.yaml at master   tianocore/edk2
> (github.com)
>
Deleted.

> 4.  Patch 4 has changes in multiple packages.  I believe it is a requirement 
> in
> edk2 to only change a single package per commit.  It makes reviews and
> cherry-picking/bisection easier.

Commit is now split by package.

> 5. Since only Core CI as controlled by  file .azurepipelines/Ubuntu_GCC5.yml
> why not use the base container instead of test container?  The Core CI Process
> will not use qemu.  The platform Ci files have their own yml with container
> specifier.

Changed.

>
> 6. what about removing the steps for installing node and cspell from the
> container build?  Since these are managed in the container they should be
> skipped.

I do not know what exactly what is was added for.  I'll open an issue on
the containers github for that.  I think this is not critical at the
moment.  We can still thin out the image after tomorrow.

>
> Thanks
>
> Sean
>

We'll need to merge the changes for the docker file and let the new
image be generated.  Then I can prepare the next version of the patches.


Thanks,
  Oliver



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




Re: [edk2-devel] [PATCH v7 1/6] CI: make Python version configurable

2022-11-30 Thread Oliver Steffen
Hi Michael

On Wed, Nov 30, 2022 at 3:13 PM Michael Kubacki
 wrote:
>
> This distributes the Python version (as a default value) across several
> files - ">=3.10.6". For maintainability, we'd like to manage versioning
> more centrally to reduce likelihood of misses on updates.
>
> You could potentially adjust it such that the default does not specify a
> version, put the Python version in a template and call that when needed,
> etc.
Yes, it sounds like a good idea.

Can we work on this in a separate patch set?
I am experimenting with this now, but I fear this might delay
these patches too much and go for a minimal version for now.
Maybe we have a chance to merge something before the CI stops
working tomorrow.

Thanks,
  Oliver

> Thanks,
> Michael
>
> On 11/29/2022 2:26 PM, Oliver Steffen wrote:
> > Add a new parameter "usePythonVersion" to the CI job templates.
> > This makes it possible to specify the version of Python to use.
> > The default value is ">=3.10.6".
> > If '' is specified, Python will not be downloaded at runtime and
> > the one provided by the VM/container image will be used.
> >
> > Signed-off-by: Oliver Steffen 
> > ---
> >   .azurepipelines/templates/platform-build-run-steps.yml | 6 +-
> >   .azurepipelines/templates/pr-gate-build-job.yml| 2 ++
> >   .azurepipelines/templates/pr-gate-steps.yml| 6 --
> >   3 files changed, 11 insertions(+), 3 deletions(-)
> >
> > diff --git a/.azurepipelines/templates/platform-build-run-steps.yml
> > b/.azurepipelines/templates/platform-build-run-steps.yml
> > index 40a31a509fc5..6c9189a20fde 100644
> > --- a/.azurepipelines/templates/platform-build-run-steps.yml
> > +++ b/.azurepipelines/templates/platform-build-run-steps.yml
> > @@ -34,6 +34,9 @@ parameters:
> >   - name: extra_install_step
> > type: stepList
> > default: []
> > +- name: usePythonVersion
> > +  type: string
> > +  default: ">=3.10.6"
> >
> >   steps:
> >   - checkout: self
> > @@ -42,8 +45,9 @@ steps:
> >
> >   - task: UsePythonVersion@0
> > inputs:
> > -versionSpec: ">=3.10.6"
> > +versionSpec: ${{ parameters.usePythonVersion }}
> >   architecture: "x64"
> > +  condition: ne('${{ parameters.usePythonVersion }}', '')
> >
> >   - script: pip install -r pip-requirements.txt --upgrade
> > displayName: 'Install/Upgrade pip modules'
> > diff --git a/.azurepipelines/templates/pr-gate-build-job.yml
> > b/.azurepipelines/templates/pr-gate-build-job.yml
> > index 7f88b41dc8d3..d0a6ccd10700 100644
> > --- a/.azurepipelines/templates/pr-gate-build-job.yml
> > +++ b/.azurepipelines/templates/pr-gate-build-job.yml
> > @@ -12,6 +12,7 @@ parameters:
> > tool_chain_tag: ''
> > vm_image: ''
> > arch_list: ''
> > +  usePythonVersion: '>=3.10.6'
> >
> >   # Build step
> >   jobs:
> > @@ -77,3 +78,4 @@ jobs:
> > build_pkgs: $(Build.Pkgs)
> > build_targets: $(Build.Targets)
> > build_archs: ${{ parameters.arch_list }}
> > +  usePythonVersion: ${{ parameters.usePythonVersion }}
> > diff --git a/.azurepipelines/templates/pr-gate-steps.yml
> > b/.azurepipelines/templates/pr-gate-steps.yml
> > index cb431e53fcd1..bf6574b33692 100644
> > --- a/.azurepipelines/templates/pr-gate-steps.yml
> > +++ b/.azurepipelines/templates/pr-gate-steps.yml
> > @@ -12,6 +12,7 @@ parameters:
> > build_pkgs: ''
> > build_targets: ''
> > build_archs: ''
> > +  usePythonVersion: '>=3.10.6'
> >
> >   steps:
> >   - checkout: self
> > @@ -20,8 +21,9 @@ steps:
> >
> >   - task: UsePythonVersion@0
> > inputs:
> > -versionSpec: '>=3.10.6'
> > -architecture: 'x64'
> > +versionSpec: ${{ parameters.usePythonVersion }}
> > +architecture: "x64"
> > +  condition: ne('${{ parameters.usePythonVersion }}', '')
> >
> >   - script: pip install -r pip-requirements.txt --upgrade
> > displayName: 'Install/Upgrade pip modules'
>



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




Re: [edk2-devel] [PATCH] MdeModulePkg/RegularExpressionDxe: Fix GCC build error

2022-11-30 Thread Michael D Kinney
Hi,

I see the following pattern in the RedfishPkg to cover all CPUs 

#if defined (MDE_CPU_X64) || defined (MDE_CPU_AARCH64) || defined 
(MDE_CPU_RISCV64)
//
// With GCC we would normally use SIXTY_FOUR_BIT_LONG, but MSVC needs
// SIXTY_FOUR_BIT, because 'long' is 32-bit and only 'long long' is
// 64-bit. Since using 'long long' works fine on GCC too, just do that.
//
#define SIXTY_FOUR_BIT
#elif defined (MDE_CPU_IA32) || defined (MDE_CPU_ARM) || defined 
(MDE_CPU_EBC)
#define THIRTY_TWO_BIT
#endif

Can we apply the same pattern to OnigurumaUefiPort.h to define SIZEOF_VOIDP and 
add LOONGARCH64?

#if defined (MDE_CPU_X64) || defined (MDE_CPU_AARCH64) || defined 
(MDE_CPU_RISCV64) || defined (MDE_CPU_LOONGARCH64)
#define SIZEOF_VOIDP  8
#elif defined (MDE_CPU_IA32) || defined (MDE_CPU_ARM) || defined (MDE_CPU_EBC)
#define SIZEOF_VOIDP  4
#endif

Or it may be simpler to only check for 32-bit archs and assume all others are 
64-bit.

#if defined (MDE_CPU_IA32) || defined (MDE_CPU_ARM) || defined (MDE_CPU_EBC)
#define SIZEOF_VOIDP  4
#else
#define SIZEOF_VOIDP  8
#endif


Thanks,

Mike

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Nickle Wang 
> via groups.io
> Sent: Wednesday, November 30, 2022 7:28 AM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J ; Gao, Liming 
> ; Nick Ramirez 
> Subject: [edk2-devel] [PATCH] MdeModulePkg/RegularExpressionDxe: Fix GCC 
> build error
> 
> Fix GCC build error on AARCH64 system.
> 
> Signed-off-by: Nickle Wang 
> Cc: Jian J Wang 
> Cc: Liming Gao 
> Cc: Nick Ramirez 
> ---
>  .../Universal/RegularExpressionDxe/OnigurumaUefiPort.h   | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
> b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
> index 3dc207da3e..e9dfd6de06 100644
> --- a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
> +++ b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
> @@ -4,6 +4,7 @@
> 
>(C) Copyright 2014-2021 Hewlett Packard Enterprise Development LP
>Copyright (c) 2020, Intel Corporation. All rights reserved.
> +  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
> 
>SPDX-License-Identifier: BSD-2-Clause-Patent
>  **/
> @@ -44,6 +45,10 @@ typedef INTNintptr_t;
>  #define SIZEOF_VOIDP  8
>  #endif
> 
> +#ifdef MDE_CPU_AARCH64
> +#define SIZEOF_VOIDP  8
> +#endif
> +
>  #define calloc(n, s)AllocateZeroPool((n)*(s))
>  #define xmemmove(Dest, Src, Length) CopyMem(Dest,Src,Length)
>  #define xmemcpy(Dest, Src, Length)  CopyMem(Dest,Src,Length)
> --
> 2.38.1.windows.1
> 
> 
> 
> 
> 



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




[edk2-devel] [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: Fix typo

2022-11-30 Thread Nickle Wang via groups.io
Fix typo in RedfishPlatformConfigImpl.c

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
Cc: Nick Ramirez 
---
 .../RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c 
b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c
index 525e666b6c..24b7165840 100644
--- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c
+++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c
@@ -1,8 +1,9 @@
 /** @file
 
-  The implementation of EDKII Redfidh Platform Config Protocol.
+  The implementation of EDKII Redfish Platform Config Protocol.
 
   (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
+  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
-- 
2.38.1.windows.1



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




[edk2-devel] [PATCH] MdeModulePkg/RegularExpressionDxe: Fix GCC build error

2022-11-30 Thread Nickle Wang via groups.io
Fix GCC build error on AARCH64 system.

Signed-off-by: Nickle Wang 
Cc: Jian J Wang 
Cc: Liming Gao 
Cc: Nick Ramirez 
---
 .../Universal/RegularExpressionDxe/OnigurumaUefiPort.h   | 5 +
 1 file changed, 5 insertions(+)

diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h 
b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
index 3dc207da3e..e9dfd6de06 100644
--- a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
+++ b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
@@ -4,6 +4,7 @@
 
   (C) Copyright 2014-2021 Hewlett Packard Enterprise Development LP
   Copyright (c) 2020, Intel Corporation. All rights reserved.
+  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
@@ -44,6 +45,10 @@ typedef INTNintptr_t;
 #define SIZEOF_VOIDP  8
 #endif
 
+#ifdef MDE_CPU_AARCH64
+#define SIZEOF_VOIDP  8
+#endif
+
 #define calloc(n, s)AllocateZeroPool((n)*(s))
 #define xmemmove(Dest, Src, Length) CopyMem(Dest,Src,Length)
 #define xmemcpy(Dest, Src, Length)  CopyMem(Dest,Src,Length)
-- 
2.38.1.windows.1



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




[edk2-devel] [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: Fix GCC build error

2022-11-30 Thread Nickle Wang via groups.io
Fix below GCC build error:
1) "Head" dereference issue.
2) "BooleanArrayBuffer" uninitialized variable issue.
3) Multiple definition of mRedfishVariableGuid.
4) Multiple definition of medfishResourceConfigProtocolHandle.

Signed-off-by: Nickle Wang 
Cc: Abner Chang 
Cc: Igor Kulchytskyy 
Cc: Nick Ramirez 
---
 RedfishClientPkg/Include/RedfishBase.h   | 3 ++-
 .../EdkIIRedfishResourceConfigLib.c  | 9 +
 .../RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c  | 5 +++--
 RedfishClientPkg/RedfishClientPkg.dec| 4 
 .../RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c| 9 +
 .../RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf  | 2 ++
 RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c | 9 +
 RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.inf   | 2 ++
 8 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/RedfishClientPkg/Include/RedfishBase.h 
b/RedfishClientPkg/Include/RedfishBase.h
index cf320bb0eb..ea716d7054 100644
--- a/RedfishClientPkg/Include/RedfishBase.h
+++ b/RedfishClientPkg/Include/RedfishBase.h
@@ -2,6 +2,7 @@
   Redfish base header file.
 
   (C) Copyright 2022 Hewlett Packard Enterprise Development LP
+  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -16,6 +17,6 @@
 ///
 /// This GUID is used for an EFI Variable that stores the Redfish data.
 ///
-EFI_GUID mRedfishVariableGuid = {0x91c46a3d, 0xed1a, 0x477b, {0xa5, 0x33, 
0x87, 0x2d, 0xcd, 0xb0, 0xfc, 0xc1}};
+extern EFI_GUID gEfiRedfishClientVariableGuid;
 
 #endif
diff --git 
a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
 
b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
index 0d733bc6d2..c1598ffda6 100644
--- 
a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
+++ 
b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
@@ -2,6 +2,7 @@
   Redfish resource config library implementation
 
   (C) Copyright 2022 Hewlett Packard Enterprise Development LP
+  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -17,7 +18,7 @@
 #include 
 
 EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *mRedfishResourceConfigProtocol = NULL;
-EFI_HANDLE medfishResourceConfigProtocolHandle;
+EFI_HANDLE mCachedHandle;
 EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL mRedfishFeatureInterchangeData;
 REDFISH_SCHEMA_INFOmSchemaInfoCache;
 
@@ -254,7 +255,7 @@ GetRedfishResourceConfigProtocol (
 AsciiStrCmp (Schema->Minor, mSchemaInfoCache.Minor) == 0 &&
 AsciiStrCmp (Schema->Errata, mSchemaInfoCache.Errata) == 0) {
   if (Handle != NULL) {
-*Handle = medfishResourceConfigProtocolHandle;
+*Handle = mCachedHandle;
   }
   return mRedfishResourceConfigProtocol;
 }
@@ -298,7 +299,7 @@ GetRedfishResourceConfigProtocol (
   }
 
   if (Found) {
-medfishResourceConfigProtocolHandle = HandleBuffer[Index];
+mCachedHandle = HandleBuffer[Index];
 mRedfishResourceConfigProtocol = Protocol;
 CopyMem (&mSchemaInfoCache, Schema, sizeof (REDFISH_SCHEMA_INFO));
 if (Handle != NULL) {
@@ -372,7 +373,7 @@ EdkIIRedfishResourceSetConfigureLang (
   EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL *Interface;
 
   Status = gBS->HandleProtocol (
-  medfishResourceConfigProtocolHandle,
+  mCachedHandle,
   &gEdkIIRedfishFeatureInterchangeDataProtocolGuid,
   (VOID **)&Interface
 );
diff --git 
a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c 
b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
index 61383e2310..bfd6fff2a7 100644
--- 
a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
+++ 
b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
@@ -2,6 +2,7 @@
   Redfish feature utility library implementation
 
   (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP
+  Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -1932,7 +1933,7 @@ RedfishGetUri (
   //
   // String which has no ConfigLang remaining
   //
-  if (Head != '\0') {
+  if (Head[0] != '\0') {
 StrCatS (ResultStr, MAX_REDFISH_URL_LEN, Head);
   }
 
@@ -3173,7 +3174,7 @@ AddRedfishBooleanArray (
   RedfishCS_bool_Array *BooleanArrayBuffer;
   RedfishCS_bool_Array *PreArrayBuffer;
 
-  if (Head == NULL || BooleanArrayBuffer == NULL || ArraySize == 0) {
+  if (Head == NULL || BooleanArray == NULL || ArraySize == 0) {
 return EFI_INVALID_PARAMETER;
  

[edk2-devel] [PATCH v1 1/1] CryptPkg: Enable CryptoPkg BaseCryptLib ParallelHash for PEI and DXE

2022-11-30 Thread Li, Zhihao
From: Zhihao Li 

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

The BaseCryptLib in the CryptoPkg currently supports ParallelHash
algorithm for SMM. The MP Services PPI and MP Services Protocol
could be used to enable ParallelHash in PEI and DXE
versions of the BaseCryptLib.

Cc: Jiewen Yao 
Cc: Jian J Wang 

Signed-off-by: Zhihao Li 
---
 CryptoPkg/Library/BaseCryptLib/Hash/CryptDispatchApDxe.c | 49 
++
 CryptoPkg/Library/BaseCryptLib/Hash/CryptDispatchApMm.c  | 35 +
 CryptoPkg/Library/BaseCryptLib/Hash/CryptDispatchApPei.c | 54 

 CryptoPkg/Library/BaseCryptLib/Hash/CryptParallelHash.c  | 26 +-
 CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf  | 11 +++-
 CryptoPkg/Library/BaseCryptLib/Hash/CryptParallelHash.h  | 23 +
 CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf   | 11 +++-
 CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf   |  1 +
 8 files changed, 183 insertions(+), 27 deletions(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/Hash/CryptDispatchApDxe.c 
b/CryptoPkg/Library/BaseCryptLib/Hash/CryptDispatchApDxe.c
new file mode 100644
index ..607aa7cd48d2
--- /dev/null
+++ b/CryptoPkg/Library/BaseCryptLib/Hash/CryptDispatchApDxe.c
@@ -0,0 +1,49 @@
+/** @file
+  Dispatch Block to Aps in Dxe phase for parallelhash algorithm.
+
+Copyright (c) 2022, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "CryptParallelHash.h"
+#include 
+#include 
+
+/**
+  Dispatch the block task to each AP in PEI phase.
+
+**/
+VOID
+EFIAPI
+DispatchBlockToAp (
+  VOID
+  )
+{
+  EFI_STATUSStatus;
+  EFI_MP_SERVICES_PROTOCOL  *MpServices;
+
+  Status = gBS->LocateProtocol (
+  &gEfiMpServiceProtocolGuid,
+  NULL,
+  (VOID **)&MpServices
+  );
+  if (EFI_ERROR (Status)) {
+//
+// Failed to locate MpServices Protocol, do parallel hash by one core.
+//
+DEBUG ((DEBUG_ERROR, "[DispatchBlockToApDxe] Failed to locate MpServices 
Protocol. Status = %r\n", Status));
+return;
+  }
+
+  Status = MpServices->StartupAllAPs (
+ MpServices,
+ ParallelHashApExecute,
+ FALSE,
+ NULL,
+ 0,
+ NULL,
+ NULL
+ );
+  return;
+}
diff --git a/CryptoPkg/Library/BaseCryptLib/Hash/CryptDispatchApMm.c 
b/CryptoPkg/Library/BaseCryptLib/Hash/CryptDispatchApMm.c
new file mode 100644
index ..0237fb38bcb6
--- /dev/null
+++ b/CryptoPkg/Library/BaseCryptLib/Hash/CryptDispatchApMm.c
@@ -0,0 +1,35 @@
+/** @file
+  Dispatch the block task to each AP in Smm mode for parallelhash algorithm.
+
+Copyright (c) 2022, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "CryptParallelHash.h"
+#include 
+
+/**
+  Dispatch the block task to each AP in SMM mode.
+
+**/
+VOID
+EFIAPI
+DispatchBlockToAp (
+  VOID
+  )
+{
+  UINTN  Index;
+
+  if (gMmst == NULL) {
+return;
+  }
+
+  for (Index = 0; Index < gMmst->NumberOfCpus; Index++) {
+if (Index != gMmst->CurrentlyExecutingCpu) {
+  gMmst->MmStartupThisAp (ParallelHashApExecute, Index, NULL);
+}
+  }
+
+  return;
+}
diff --git a/CryptoPkg/Library/BaseCryptLib/Hash/CryptDispatchApPei.c 
b/CryptoPkg/Library/BaseCryptLib/Hash/CryptDispatchApPei.c
new file mode 100644
index ..9ddd23d32048
--- /dev/null
+++ b/CryptoPkg/Library/BaseCryptLib/Hash/CryptDispatchApPei.c
@@ -0,0 +1,54 @@
+/** @file
+  Dispatch Block to Aps in Pei phase for parallelhash algorithm.
+
+Copyright (c) 2022, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "CryptParallelHash.h"
+#include 
+#include 
+#include 
+#include 
+
+/**
+  Dispatch the block task to each AP in PEI phase.
+
+**/
+VOID
+EFIAPI
+DispatchBlockToAp (
+  VOID
+  )
+{
+  EFI_STATUS   Status;
+  CONST EFI_PEI_SERVICES   **PeiServices;
+  EFI_PEI_MP_SERVICES_PPI  *MpServicesPpi;
+
+  PeiServices = GetPeiServicesTablePointer ();
+  Status  = (*PeiServices)->LocatePpi (
+  PeiServices,
+  &gEfiPeiMpServicesPpiGuid,
+  0,
+  NULL,
+  (VOID **)&MpServicesPpi
+  );
+  if (EFI_ERROR (Status)) {
+//
+// Failed to locate MpServices Ppi, do parallel hash by one core.
+//
+DEBUG ((DEBUG_ERROR, "[DispatchBlockToApPei] Failed to locate MpServices 
Ppi. Status = %r\n", Status));
+return;
+  }
+
+  Status = MpServicesPpi->StartupAllAPs (
+(CONST EFI_PEI_SERVICES **)PeiServices,
+MpServicesPpi,
+ParallelHashA

Re: [edk2-devel] [PATCH v7 1/6] CI: make Python version configurable

2022-11-30 Thread Michael Kubacki
This distributes the Python version (as a default value) across several 
files - ">=3.10.6". For maintainability, we'd like to manage versioning 
more centrally to reduce likelihood of misses on updates.


You could potentially adjust it such that the default does not specify a 
version, put the Python version in a template and call that when needed, 
etc.



Thanks,
Michael

On 11/29/2022 2:26 PM, Oliver Steffen wrote:

Add a new parameter "usePythonVersion" to the CI job templates.
This makes it possible to specify the version of Python to use.
The default value is ">=3.10.6".
If '' is specified, Python will not be downloaded at runtime and
the one provided by the VM/container image will be used.

Signed-off-by: Oliver Steffen 
---
  .azurepipelines/templates/platform-build-run-steps.yml | 6 +-
  .azurepipelines/templates/pr-gate-build-job.yml| 2 ++
  .azurepipelines/templates/pr-gate-steps.yml| 6 --
  3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/.azurepipelines/templates/platform-build-run-steps.yml
b/.azurepipelines/templates/platform-build-run-steps.yml
index 40a31a509fc5..6c9189a20fde 100644
--- a/.azurepipelines/templates/platform-build-run-steps.yml
+++ b/.azurepipelines/templates/platform-build-run-steps.yml
@@ -34,6 +34,9 @@ parameters:
  - name: extra_install_step
type: stepList
default: []
+- name: usePythonVersion
+  type: string
+  default: ">=3.10.6"

  steps:
  - checkout: self
@@ -42,8 +45,9 @@ steps:

  - task: UsePythonVersion@0
inputs:
-versionSpec: ">=3.10.6"
+versionSpec: ${{ parameters.usePythonVersion }}
  architecture: "x64"
+  condition: ne('${{ parameters.usePythonVersion }}', '')

  - script: pip install -r pip-requirements.txt --upgrade
displayName: 'Install/Upgrade pip modules'
diff --git a/.azurepipelines/templates/pr-gate-build-job.yml
b/.azurepipelines/templates/pr-gate-build-job.yml
index 7f88b41dc8d3..d0a6ccd10700 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -12,6 +12,7 @@ parameters:
tool_chain_tag: ''
vm_image: ''
arch_list: ''
+  usePythonVersion: '>=3.10.6'

  # Build step
  jobs:
@@ -77,3 +78,4 @@ jobs:
build_pkgs: $(Build.Pkgs)
build_targets: $(Build.Targets)
build_archs: ${{ parameters.arch_list }}
+  usePythonVersion: ${{ parameters.usePythonVersion }}
diff --git a/.azurepipelines/templates/pr-gate-steps.yml
b/.azurepipelines/templates/pr-gate-steps.yml
index cb431e53fcd1..bf6574b33692 100644
--- a/.azurepipelines/templates/pr-gate-steps.yml
+++ b/.azurepipelines/templates/pr-gate-steps.yml
@@ -12,6 +12,7 @@ parameters:
build_pkgs: ''
build_targets: ''
build_archs: ''
+  usePythonVersion: '>=3.10.6'

  steps:
  - checkout: self
@@ -20,8 +21,9 @@ steps:

  - task: UsePythonVersion@0
inputs:
-versionSpec: '>=3.10.6'
-architecture: 'x64'
+versionSpec: ${{ parameters.usePythonVersion }}
+architecture: "x64"
+  condition: ne('${{ parameters.usePythonVersion }}', '')

  - script: pip install -r pip-requirements.txt --upgrade
displayName: 'Install/Upgrade pip modules'



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




[edk2-devel] Event: TianoCore edk2-test Bug Triage Meeting - Thursday, December 1, 2022 #cal-reminder

2022-11-30 Thread Group Notification
*Reminder: TianoCore edk2-test Bug Triage Meeting*

*When:*
Thursday, December 1, 2022
10:00pm to 11:00pm
(UTC+08:00) Asia/Shanghai

*Where:*
https://armltd.zoom.us/j/91247522013?pwd=ei9nUndTbG9oWEROS2M1aVREZkpiQT09&from=addon

*Organizer:* Edhaya Chandran edhaya.chand...@arm.com ( 
edhaya.chand...@arm.com?subject=Re:%20Event:%20TianoCore%20edk2-test%20Bug%20Triage%20Meeting
 )

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

*Description:*


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




Re: [edk2-devel] [edk2-platforms][PATCH V2 1/1] Silicon/ARM/NeoverseN1Soc: Update CCIX PNP ID

2022-11-30 Thread Samer El-Haj-Mahmoud
Acked-by: Samer El-Haj-Mahmoud 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of sahil via
> groups.io
> Sent: Wednesday, November 30, 2022 5:29 AM
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel ; Leif Lindholm
> ; Sami Mujawar ; Sahil
> 
> Subject: [edk2-devel] [edk2-platforms][PATCH V2 1/1]
> Silicon/ARM/NeoverseN1Soc: Update CCIX PNP ID
>
> There is no need for a separate ID for CCIX host bridge,
> therefore reusing PCIe PNP ID for CCIX.
>
> Signed-off-by: sahil 
> ---
>
> Notes:
> v2:
> - removed licence fix, to be pushed separately [Leif Lindholm]
>
>  Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c | 4
> ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git
> a/Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c
> b/Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c
> index 1f38f654a8ce..6a154d771126 100644
> --- a/Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c
> +++ b/Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c
> @@ -65,8 +65,8 @@ STATIC EFI_PCI_ROOT_BRIDGE_DEVICE_PATH
> mEfiPciRootBridgeDevicePath[ROOT_COMPLEX_
>(UINT8)(sizeof (ACPI_HID_DEVICE_PATH) >> 8)
>
>  }
>
>},
>
> -  EISA_PNP_ID(0x0A09), // CCIX
>
> -  0
>
> +  EISA_PNP_ID(0x0A08), // CCIX
>
> +  1
>
>  },
>
>  {
>
>END_DEVICE_PATH_TYPE,
>
> --
> 2.25.1
>
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#96732): https://edk2.groups.io/g/devel/message/96732
> Mute This Topic: https://groups.io/mt/95355253/1945644
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [samer.el-haj-
> mahm...@arm.com]
> -=-=-=-=-=-=
>

IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.


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




[edk2-devel] [edk2-platforms][PATCH V2 1/1] Silicon/ARM/NeoverseN1Soc: Update CCIX PNP ID

2022-11-30 Thread sahil
There is no need for a separate ID for CCIX host bridge,
therefore reusing PCIe PNP ID for CCIX.

Signed-off-by: sahil 
---

Notes:
v2:
- removed licence fix, to be pushed separately [Leif Lindholm]

 Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c 
b/Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c
index 1f38f654a8ce..6a154d771126 100644
--- a/Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c
+++ b/Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c
@@ -65,8 +65,8 @@ STATIC EFI_PCI_ROOT_BRIDGE_DEVICE_PATH 
mEfiPciRootBridgeDevicePath[ROOT_COMPLEX_
   (UINT8)(sizeof (ACPI_HID_DEVICE_PATH) >> 8)
 }
   },
-  EISA_PNP_ID(0x0A09), // CCIX
-  0
+  EISA_PNP_ID(0x0A08), // CCIX
+  1
 },
 {
   END_DEVICE_PATH_TYPE,
-- 
2.25.1



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




[edk2-devel] [PATCH v7 1/2] tools_def: remove GCC_IA32_CC_FLAGS/GCC_X64_CC_FLAGS

2022-11-30 Thread Gerd Hoffmann
They are not used anywhere.  Remove them.

Signed-off-by: Gerd Hoffmann 
---
 BaseTools/Conf/tools_def.template | 2 --
 1 file changed, 2 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index c4e4c7ded0af..73f95b2a3a9f 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1850,8 +1850,6 @@ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = 
--add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_N
 *_*_*_DTC_PATH = DEF(DTC_BIN)
 
 DEFINE GCC_ALL_CC_FLAGS= -g -Os -fshort-wchar -fno-builtin 
-fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h 
-fno-common
-DEFINE GCC_IA32_CC_FLAGS   = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double 
-freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe
-DEFINE GCC_X64_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) -mno-red-zone 
-Wno-address -mno-stack-arg-probe
 DEFINE GCC_ARM_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) -mlittle-endian 
-mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections 
-fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft 
-fno-pic -fno-pie
 DEFINE GCC_LOONGARCH64_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) -mabi=lp64d 
-fno-asynchronous-unwind-tables -fno-plt -Wno-address -fno-short-enums 
-fsigned-char -ffunction-sections -fdata-sections
 DEFINE GCC_ARM_CC_XIPFLAGS = -mno-unaligned-access
-- 
2.38.1



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




[edk2-devel] [PATCH v7 2/2] tools_def: add -fno-omit-frame-pointer to GCC48_{IA32,X64}_CC_FLAGS

2022-11-30 Thread Gerd Hoffmann
Fixes problems due to code assuming it runs with frame pointers and thus
updates rbp / ebp registers when switching stacks.

Signed-off-by: Gerd Hoffmann 
---
 BaseTools/Conf/tools_def.template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index 73f95b2a3a9f..f1fd6a003062 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1888,8 +1888,8 @@ DEFINE GCC_DEPS_FLAGS  = -MMD -MF $@.deps
 
 DEFINE GCC48_ALL_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) 
-ffunction-sections -fdata-sections -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
 DEFINE GCC48_IA32_X64_DLINK_COMMON   = -nostdlib -Wl,-n,-q,--gc-sections -z 
common-page-size=0x20
-DEFINE GCC48_IA32_CC_FLAGS   = DEF(GCC48_ALL_CC_FLAGS) -m32 
-march=i586 -malign-double -fno-stack-protector -D EFI32 
-fno-asynchronous-unwind-tables -Wno-address
-DEFINE GCC48_X64_CC_FLAGS= DEF(GCC48_ALL_CC_FLAGS) -m64 
-fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" 
-maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie 
-fno-asynchronous-unwind-tables -Wno-address
+DEFINE GCC48_IA32_CC_FLAGS   = DEF(GCC48_ALL_CC_FLAGS) -m32 
-march=i586 -malign-double -fno-stack-protector -D EFI32 
-fno-asynchronous-unwind-tables -Wno-address -fno-omit-frame-pointer
+DEFINE GCC48_X64_CC_FLAGS= DEF(GCC48_ALL_CC_FLAGS) -m64 
-fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" 
-maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie 
-fno-asynchronous-unwind-tables -Wno-address  -fno-omit-frame-pointer
 DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) 
-Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
 DEFINE GCC48_IA32_X64_DLINK_FLAGS= DEF(GCC48_IA32_X64_DLINK_COMMON) 
-Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) 
-Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive
 DEFINE GCC48_IA32_DLINK2_FLAGS   = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 
DEF(GCC_DLINK2_FLAGS_COMMON)
-- 
2.38.1



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




[edk2-devel] [PATCH v7 0/2] Fix stack switching.

2022-11-30 Thread Gerd Hoffmann



Gerd Hoffmann (2):
  tools_def: remove GCC_IA32_CC_FLAGS/GCC_X64_CC_FLAGS
  tools_def: add -fno-omit-frame-pointer to GCC48_{IA32,X64}_CC_FLAGS

 BaseTools/Conf/tools_def.template | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

-- 
2.38.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#96730): https://edk2.groups.io/g/devel/message/96730
Mute This Topic: https://groups.io/mt/95354913/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] From: Mateusz Mówka Subject: [edk2-libc] Add strnlen function wrapper

2022-11-30 Thread mateusz-mowka
Hi,
I'd like to know what's the status of the review?
Mateusz


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