[edk2-devel] [PATCH v1] Maintainers.txt: Update StandaloneMmPkg and UefiCpuPkg Reviewer

2024-04-28 Thread Wu, Jiaxin
This is to update StandaloneMmPkg and UefiCpuPkg Reviewer.

Cc: Ray Ni 
Cc: Ard Biesheuvel 
Cc: Sami Mujawar 
Cc: Rahul Kumar 
Cc: Gerd Hoffmann 
Signed-off-by: Jiaxin Wu 
---
 Maintainers.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Maintainers.txt b/Maintainers.txt
index 7d9cdca611..6fccbb6788 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -624,17 +624,19 @@ W: 
https://github.com/tianocore/tianocore.github.io/wiki/SourceLevelDebugPkg
 StandaloneMmPkg
 F: StandaloneMmPkg/
 M: Ard Biesheuvel  [ardbiesheuvel]
 M: Sami Mujawar  [samimujawar]
 M: Ray Ni  [niruiyu]
+R: Jiaxin Wu  [jiaxinwu]
 
 UefiCpuPkg
 F: UefiCpuPkg/
 W: https://github.com/tianocore/tianocore.github.io/wiki/UefiCpuPkg
 M: Ray Ni  [niruiyu]
 R: Rahul Kumar  [rahul1-kumar]
 R: Gerd Hoffmann  [kraxel]
+R: Jiaxin Wu  [jiaxinwu]
 
 UefiCpuPkg: Sec related modules
 F: UefiCpuPkg/SecCore/
 F: UefiCpuPkg/ResetVector/
 R: Catharine West  [catharine-intl]
-- 
2.16.2.windows.1



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




[edk2-devel] [PATCH v1] UefiCpuPkg/Library: Cleanup debug message in LmceSupport

2024-04-28 Thread Wu, Jiaxin
ProcessorNumber 0 is not always BSP. Debug message based on 0
of ProcessorNumber is incorrect.

This patch is to clean the debug message in LmceSupport
directly.

Cc: Ray Ni 
Cc: Zeng Star 
Cc: Gerd Hoffmann 
Cc: Rahul Kumar 
Signed-off-by: Jiaxin Wu 
---
 UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c 
b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
index d8b070d9f1..cb569769a1 100644
--- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
+++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
@@ -1,9 +1,9 @@
 /** @file
   Machine Check features.
 
-  Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+  Copyright (c) 2017 - 2024, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 #include "CpuCommonFeatures.h"
@@ -287,13 +287,10 @@ LmceSupport (
   if (!McaSupport (ProcessorNumber, CpuInfo, ConfigData)) {
 return FALSE;
   }
 
   McgCap.Uint64 = AsmReadMsr64 (MSR_IA32_MCG_CAP);
-  if (ProcessorNumber == 0) {
-DEBUG ((DEBUG_INFO, "LMCE enable = %x\n", (BOOLEAN)(McgCap.Bits.MCG_LMCE_P 
!= 0)));
-  }
 
   return (BOOLEAN)(McgCap.Bits.MCG_LMCE_P != 0);
 }
 
 /**
-- 
2.16.2.windows.1



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




[edk2-devel] [PATCH v1] UefiCpuPkg/Library: Cleanup debug message in LmceSupport

2024-04-28 Thread Wu, Jiaxin
ProcessorNumber 0 is not always BSP. Debug message based on 0
of ProcessorNumber is incorrect.

This patch is to clean the debug message in LmceSupport
directly.

Cc: Ray Ni 
Cc: Zeng Star 
Cc: Gerd Hoffmann 
Cc: Rahul Kumar 
Signed-off-by: Jiaxin Wu 
---
 UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c 
b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
index d8b070d9f1..cb569769a1 100644
--- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
+++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
@@ -1,9 +1,9 @@
 /** @file
   Machine Check features.
 
-  Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+  Copyright (c) 2017 - 2024, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 #include "CpuCommonFeatures.h"
@@ -287,13 +287,10 @@ LmceSupport (
   if (!McaSupport (ProcessorNumber, CpuInfo, ConfigData)) {
 return FALSE;
   }
 
   McgCap.Uint64 = AsmReadMsr64 (MSR_IA32_MCG_CAP);
-  if (ProcessorNumber == 0) {
-DEBUG ((DEBUG_INFO, "LMCE enable = %x\n", (BOOLEAN)(McgCap.Bits.MCG_LMCE_P 
!= 0)));
-  }
 
   return (BOOLEAN)(McgCap.Bits.MCG_LMCE_P != 0);
 }
 
 /**
-- 
2.16.2.windows.1



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

2024-04-28 Thread Chang, Abner via groups.io
From: Abner Chang 

BZ# 4695

Signed-off-by: Abner Chang 
Cc: Abdul Lateef Attar 
Cc: Nickle Wang 
---
 .../ManageabilityPkg/ManageabilityPkg.dsc | 72 ++-
 1 file changed, 56 insertions(+), 16 deletions(-)

diff --git a/Features/ManageabilityPkg/ManageabilityPkg.dsc 
b/Features/ManageabilityPkg/ManageabilityPkg.dsc
index 87b32f1182..8608450a3b 100644
--- a/Features/ManageabilityPkg/ManageabilityPkg.dsc
+++ b/Features/ManageabilityPkg/ManageabilityPkg.dsc
@@ -3,7 +3,7 @@
 # This is the package provides edk2 drivers and libraries
 # those are related to the platform management.
 #
-# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+# Copyright (C) 2023-2024 Advanced Micro Devices, Inc. All rights reserved.
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -18,15 +18,7 @@
   BUILD_TARGETS  = DEBUG|RELEASE|NOOPT
   SKUID_IDENTIFIER   = DEFAULT
 
-[Packages]
-  MinPlatformPkg/MinPlatformPkg.dec
-
 [PcdsFeatureFlag]
-  #
-  # MinPlatform common include currently required PCD
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable   
|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable  
|FALSE
 
   #
   # Manageability modules
@@ -45,19 +37,67 @@
   gManageabilityPkgTokenSpaceGuid.PcdManageabilityPeiIpmiFrb 
|TRUE
   gManageabilityPkgTokenSpaceGuid.PcdManageabilityDxeIpmiBmcAcpi 
|TRUE
 
-#
-# Include common libraries
-#
-!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
-!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
-!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
-
 [Components]
   
ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/DxeManageabilityTransportKcs.inf
   
ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/DxeManageabilityTransportMctp.inf
   ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtocolLib.inf
   ManageabilityPkg/Library/IpmiCommandLib/IpmiCommandLib.inf
 
+  #
+  # Generic EDKII Lib
+  #
+
+!include MdePkg/MdeLibs.dsc.inc
+
+[LibraryClasses.common]
+
+  #
+  # Entry point
+  #
+  
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
+  PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
+  #
+  # Basic
+  #
+  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
+  BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
+  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+  IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
+  #
+  # UEFI & PI
+  #
+  
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
+  
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
+  
PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
+  PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
+  DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
+  
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
+  #
+  # Misc
+  #
+  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+  
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
+  
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+  
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+  
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
+
+[LibraryClasses.common.DXE_SMM_DRIVER]
+  
SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf
+  MmServicesTableLib|MdePkg/Library/MmServicesTableLib/MmServicesTableLib.inf
+  
ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLib.inf
+  
MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf
+
+[LibraryClasses.common.SEC, LibraryClasses.common.PEI_CORE, 
LibraryClasses.common.PEIM]
+  
S3BootScriptLib|MdePkg/Library/BaseS3BootScriptLibNull/BaseS3BootScriptLibNull.inf
+  PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
+  HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
+  
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
+  
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
+  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibBase.inf
+
 [LibraryClasses]
   
ManageabilityTransportLib|ManageabilityPkg/Library/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.inf
   IpmiLib|MdeModulePkg/Library/BaseIpmiLibNull/BaseIpmiLibNull.inf
-- 
2.37.1.windows.1



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

[edk2-devel] [PATCH v1 2/2] IntelFsp2WrapperPkg/FspmWrapperPeim: Migrate FspT/M to permanent memory

2024-04-28 Thread Li, Zhihao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4716

Migrate FSP-T/M binary from temporary RAM to permanent RAM before NEM
tear down. Tcg module will use permanent address of FSP-T/M for
measurement.
1. PeiCore installs mMigrateTempRamPpi if
PcdMigrateTemporaryRamFirmwareVolumes is True
2. FspmWrapperPeim migrate FspT/M binary to permanent
memory and build MigatedFvInfoHob
3. TCG notification checks MigatedFvInfoHob and transmits
DRAM address for measurement

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Duggapu Chinni B 
Cc: Chen Gang C 
Cc: Liming Gao 

Signed-off-by: Zhihao Li 
---
 IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c   | 181 
+++-
 IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf |   4 +-
 2 files changed, 177 insertions(+), 8 deletions(-)

diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c 
b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
index 7f1deb95426f..101514ee4d17 100644
--- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
+++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
@@ -3,7 +3,7 @@
   register TemporaryRamDonePpi to call TempRamExit API, and register 
MemoryDiscoveredPpi
   notify to call FspSiliconInit API.
 
-  Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.
+  Copyright (c) 2014 - 2024, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -33,14 +33,19 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 extern EFI_GUID  gFspHobGuid;
 
+#define FSP_MIGRATED_FSPT  BIT0
+#define FSP_MIGRATED_FSPM  BIT1
+
 /**
   Get the FSP M UPD Data address
 
@@ -260,6 +265,30 @@ EFI_PEI_NOTIFY_DESCRIPTOR  mTcgPpiNotifyDesc = {
   TcgPpiNotify
 };
 
+/**
+  This function is called after temporary ram migration.
+
+  @param[in] PeiServicesPointer to PEI Services Table.
+  @param[in] NotifyDesc Pointer to the descriptor for the Notification 
event that
+caused this function to execute.
+  @param[in] PpiPointer to the PPI data associated with this 
function.
+
+  @retval EFI_STATUSAlways return EFI_SUCCESS
+**/
+EFI_STATUS
+EFIAPI
+MigrateTempRamNotify (
+  IN EFI_PEI_SERVICES   **PeiServices,
+  IN EFI_PEI_NOTIFY_DESCRIPTOR  *NotifyDesc,
+  IN VOID   *Ppi
+  );
+
+EFI_PEI_NOTIFY_DESCRIPTOR  mMigrateTempRamNotifyDesc = {
+  (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | 
EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
+  ,
+  MigrateTempRamNotify
+};
+
 /**
   This function is called after TCG installed PPI.
 
@@ -278,18 +307,41 @@ TcgPpiNotify (
   IN VOID   *Ppi
   )
 {
-  UINT32  FspMeasureMask;
+  UINT32  FspMeasureMask;
+  EFI_PHYSICAL_ADDRESSFsptBaseAddress;
+  EFI_PHYSICAL_ADDRESSFspmBaseAddress;
+  EDKII_MIGRATED_FV_INFO  *MigratedFvInfo;
+  EFI_PEI_HOB_POINTERSHob;
 
   DEBUG ((DEBUG_INFO, "TcgPpiNotify FSPM\n"));
 
-  FspMeasureMask = PcdGet32 (PcdFspMeasurementConfig);
+  FspMeasureMask  = PcdGet32 (PcdFspMeasurementConfig);
+  FsptBaseAddress = (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFsptBaseAddress);
+  FspmBaseAddress = (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFspmBaseAddress);
+  Hob.Raw = GetFirstGuidHob ();
+  while (Hob.Raw != NULL) {
+MigratedFvInfo = GET_GUID_HOB_DATA (Hob);
+if ((MigratedFvInfo->FvOrgBase == (UINT32)(UINTN)PcdGet32 
(PcdFsptBaseAddress)) && (MigratedFvInfo->FvDataBase != 0)) {
+  //
+  // Found the migrated FspT raw data
+  //
+  FsptBaseAddress = MigratedFvInfo->FvDataBase;
+}
+
+if ((MigratedFvInfo->FvOrgBase == (UINT32)(UINTN)PcdGet32 
(PcdFspmBaseAddress)) && (MigratedFvInfo->FvDataBase != 0)) {
+  FspmBaseAddress = MigratedFvInfo->FvDataBase;
+}
+
+Hob.Raw = GET_NEXT_HOB (Hob);
+Hob.Raw = GetNextGuidHob (, Hob.Raw);
+  }
 
   if ((FspMeasureMask & FSP_MEASURE_FSPT) != 0) {
 MeasureFspFirmwareBlob (
   0,
   "FSPT",
-  PcdGet32 (PcdFsptBaseAddress),
-  (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 
(PcdFsptBaseAddress))->FvLength
+  FsptBaseAddress,
+  (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FsptBaseAddress)->FvLength
   );
   }
 
@@ -297,14 +349,126 @@ TcgPpiNotify (
 MeasureFspFirmwareBlob (
   0,
   "FSPM",
-  PcdGet32 (PcdFspmBaseAddress),
-  (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)PcdGet32 
(PcdFspmBaseAddress))->FvLength
+  FspmBaseAddress,
+  (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FspmBaseAddress)->FvLength
   );
   }
 
   return EFI_SUCCESS;
 }
 
+/**
+  This function is called after temporary ram migration.
+
+  @param[in] PeiServicesPointer to PEI Services Table.
+  @param[in] NotifyDesc Pointer to the descriptor for the Notification 
event that
+caused this function to execute.
+  @param[in] PpiPointer to the PPI data associated with this 
function.
+

[edk2-devel] [PATCH v1 1/2] MdeModulePkg/Core/Pei: Install MigrateTempRamPpi

2024-04-28 Thread Li, Zhihao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4716

Migrate FSP-T/M binary from temporary RAM to permanent RAM before NEM
tear down. Tcg module will use permanent address of FSP-T/M for
measurement.
1. PeiCore installs mMigrateTempRamPpi if
PcdMigrateTemporaryRamFirmwareVolumes is True
2. FspmWrapperPeim migrate FspT/M binary to permanent
memory and build MigatedFvInfoHob
3. TCG notification checks MigatedFvInfoHob and transmits
DRAM address for measurement

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Duggapu Chinni B 
Cc: Chen Gang C 
Cc: Liming Gao 

Signed-off-by: Zhihao Li 
---
 MdeModulePkg/Core/Pei/PeiMain/PeiMain.c| 10 -
 MdeModulePkg/Core/Pei/PeiMain.h|  3 ++-
 MdeModulePkg/Core/Pei/PeiMain.inf  |  3 ++-
 MdeModulePkg/Include/Guid/MigratedFvInfo.h |  4 ++--
 MdeModulePkg/Include/Ppi/MigrateTempRam.h  | 23 
 MdeModulePkg/MdeModulePkg.dec  |  5 -
 6 files changed, 42 insertions(+), 6 deletions(-)

diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c 
b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
index bf1719d7941a..0e3d9a843816 100644
--- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
+++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c
@@ -1,7 +1,7 @@
 /** @file
   Pei Core Main Entry Point
 
-Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -13,6 +13,11 @@ EFI_PEI_PPI_DESCRIPTOR  mMemoryDiscoveredPpi = {
   ,
   NULL
 };
+EFI_PEI_PPI_DESCRIPTOR  mMigrateTempRamPpi = {
+  (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
+  ,
+  NULL
+};
 
 ///
 /// Pei service instance
@@ -449,6 +454,9 @@ PeiCore (
   //
   EvacuateTempRam (, SecCoreData);
 
+  Status = PeiServicesInstallPpi ();
+  ASSERT_EFI_ERROR (Status);
+
   DEBUG ((DEBUG_VERBOSE, "PPI lists after temporary RAM evacuation:\n"));
   DumpPpiList ();
 }
diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h
index 46b6c23014a3..8df0c2d561f7 100644
--- a/MdeModulePkg/Core/Pei/PeiMain.h
+++ b/MdeModulePkg/Core/Pei/PeiMain.h
@@ -1,7 +1,7 @@
 /** @file
   Definition of Pei Core Structures and Services
 
-Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/MdeModulePkg/Core/Pei/PeiMain.inf 
b/MdeModulePkg/Core/Pei/PeiMain.inf
index 893bdc052798..4e545ddab2ab 100644
--- a/MdeModulePkg/Core/Pei/PeiMain.inf
+++ b/MdeModulePkg/Core/Pei/PeiMain.inf
@@ -6,7 +6,7 @@
 # 2) Dispatch PEIM from discovered FV.
 # 3) Handoff control to DxeIpl to load DXE core and enter DXE phase.
 #
-# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -101,6 +101,7 @@
   gEfiPeiReset2PpiGuid  ## SOMETIMES_CONSUMES
   gEfiSecHobDataPpiGuid ## SOMETIMES_CONSUMES
   gEfiPeiCoreFvLocationPpiGuid  ## SOMETIMES_CONSUMES
+  gEdkiiPeiMigrateTempRamPpiGuid## PRODUCES
 
 [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeiStackSize  ## 
CONSUMES
diff --git a/MdeModulePkg/Include/Guid/MigratedFvInfo.h 
b/MdeModulePkg/Include/Guid/MigratedFvInfo.h
index 1c8b0dfefc49..255e278235b1 100644
--- a/MdeModulePkg/Include/Guid/MigratedFvInfo.h
+++ b/MdeModulePkg/Include/Guid/MigratedFvInfo.h
@@ -1,7 +1,7 @@
 /** @file
   Migrated FV information
 
-Copyright (c) 2020, Intel Corporation. All rights reserved.
+Copyright (c) 2020 - 2024, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -50,7 +50,7 @@ typedef struct {
 
 typedef struct {
   UINT32FvOrgBase; // original FV address
-  UINT32FvNewBase; // new FV address
+  UINT32FvNewBase; // new FV address, 0 means rebased data is not 
copied
   UINT32FvDataBase;// original FV data, 0 means raw data is not 
copied
   UINT32FvLength;  // Fv Length
 } EDKII_MIGRATED_FV_INFO;
diff --git a/MdeModulePkg/Include/Ppi/MigrateTempRam.h 
b/MdeModulePkg/Include/Ppi/MigrateTempRam.h
new file mode 100644
index ..9bbb55d5cf86
--- /dev/null
+++ b/MdeModulePkg/Include/Ppi/MigrateTempRam.h
@@ -0,0 +1,23 @@
+/** @file
+  This file declares Migrate Temporary Memory PPI.
+
+  This PPI is published by the PEI Foundation when temporary RAM needs to 
evacuate.
+  Its purpose is to be used as a signal for other PEIMs who can register for a
+  notification on its installation.
+
+  Copyright (c) 2024, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: 

Re: [edk2-devel] [PATCH v1] Add MmUnblockMemoryLib to MdeLibs.dsc

2024-04-28 Thread Wu, Jiaxin
Reviewed-by: Jiaxin Wu 


> -Original Message-
> From: Zhang, Hongbin1 
> Sent: Monday, April 29, 2024 11:08 AM
> To: devel@edk2.groups.io
> Cc: Zhang, Hongbin1 ; Kinney, Michael D
> ; Ni, Ray ; Liming Gao
> ; Liu, Zhiguang ; Wu,
> Jiaxin ; Xie, Yuanhao 
> Subject: [PATCH v1] Add MmUnblockMemoryLib to MdeLibs.dsc
> 
> It is for unblocking certain data pages to be accessible inside MM environment
> 
> Cc: Michael D Kinney 
> Cc: Ray Ni 
> Cc: Liming Gao 
> Cc: Zhiguang Liu 
> Cc: Jiaxin Wu 
> Cc: Yuanhao Xie 
> ---
>  MdePkg/MdeLibs.dsc.inc | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/MdePkg/MdeLibs.dsc.inc b/MdePkg/MdeLibs.dsc.inc
> index d782dbf4ff..ddd27115f5 100644
> --- a/MdePkg/MdeLibs.dsc.inc
> +++ b/MdePkg/MdeLibs.dsc.inc
> @@ -5,7 +5,7 @@
>  # by using "!include MdePkg/MdeLibs.dsc.inc" to specify the library instances
>  # of some EDKII basic/common library classes.
>  #
> -# Copyright (c) 2021 - 2022, Intel Corporation. All rights reserved.
> +# Copyright (c) 2021 - 2024, Intel Corporation. All rights reserved.
>  #
>  #SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -18,3 +18,4 @@
> 
> SmmCpuRendezvousLib|MdePkg/Library/SmmCpuRendezvousLibNull/SmmC
> puRendezvousLibNull.inf
>SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
> 
> SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchroniz
> ationLib.inf
> +
> MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblo
> ckMemoryLibNull.inf
> --
> 2.37.0.windows.1



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




Re: [edk2-devel] [PATCH v4 0/8] Adjust the QemuFwCfgLibMmio and add PEI stage

2024-04-28 Thread Chao Li

Hi Ard and Gerd and other maintainers,

Could you review this version and give your suggestions?


Thanks,
Chao
On 2024/4/26 16:28, Chao Li wrote:

Patch1: Added three PCDs for QemuFwCfgLibMmio
Patch2: Sparate QemuFwCfgLibMmio.c into two files and default as DXE
stage library.
Patch3: Added QemuFwCfgMmiLib PEI version
Patch4: Rename QemuFwCfgLibMmio.inf to QemuFwCfgMmioDxeLib.inf and
enable it in AARCH64 and RISCV64.

V1 -> V2:
1. Use HOBs instead of PCD.
2. The old patch2 is divided into two parts, one is code splitting, and
the other is functional changes.
3. add two patches to keep the safe when change the platform DSC file.

V2 -> V3:
1. Merge three HOBs into a single HOB.
2. Remove the dynamic global variables in PEI.

V3 -> V4:
1. Adjust the HOB content, this version saves all of structual contents
in HOB.
2. Remove the Loongson copyright in separation patch, and add it in the
funciton change patch.
3. Restored some variables as static in DXE version.
4. Added the HOB GUID in OvmfPkg.dec.

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

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

Cc: Ard Biesheuvel
Cc: Jiewen Yao
Cc: Gerd Hoffmann
Cc: Leif Lindholm
Cc: Sami Mujawar
Cc: Sunil V L
Cc: Andrei Warkentin

Chao Li (8):
   OvmfPkg: Add a GUID for QemuFwCfgLib
   OvmfPkg: Separate QemuFwCfgLibMmio.c into two files
   OvmfPkg: Add the way of HOBs in QemuFwCfgLibMmio
   OvmfPkg: Add the QemuFwCfgMmioLib PEI stage version
   OvmfPkg: Copy the same new INF as QemuFwCfgLibMmio.inf
   ArmVirtPkg: Enable QemuFwCfgMmioDxeLib.inf
   OvmfPkg/RiscVVirt: Enable QemuFwCfgMmioDxeLib.inf
   OvmfPkg: Remove QemuFwCfgLibMmio.inf

  ArmVirtPkg/ArmVirtQemu.dsc|   2 +-
  ArmVirtPkg/ArmVirtQemuKernel.dsc  |   2 +-
  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   | 243 +
  .../QemuFwCfgLib/QemuFwCfgLibMmioInternal.h   | 244 ++
  .../Library/QemuFwCfgLib/QemuFwCfgMmioDxe.c   | 214 +++
  ...CfgLibMmio.inf => QemuFwCfgMmioDxeLib.inf} |   8 +-
  .../Library/QemuFwCfgLib/QemuFwCfgMmioPei.c   | 235 +
  .../QemuFwCfgLib/QemuFwCfgMmioPeiLib.inf  |  52 
  OvmfPkg/OvmfPkg.dec   |   1 +
  OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc   |   2 +-
  10 files changed, 814 insertions(+), 189 deletions(-)
  create mode 100644 OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmioInternal.h
  create mode 100644 OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgMmioDxe.c
  rename OvmfPkg/Library/QemuFwCfgLib/{QemuFwCfgLibMmio.inf => 
QemuFwCfgMmioDxeLib.inf} (78%)
  create mode 100644 OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgMmioPei.c
  create mode 100644 OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgMmioPeiLib.inf




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




[edk2-devel] 回复: [PATCH v6 3/4] MdePkg: Adding support for EFI_CONFORMANCE_PROFILE_TABLE

2024-04-28 Thread gaoliming via groups.io
Sam:
  I don't find EFI_CONFORMANCE_PROFILE_EBBR_2_1_GUID definition in UEFI 2.10
spec. So, what's its definition from?

Thanks
Liming
> -邮件原件-
> 发件人: Sam Kaynor 
> 发送时间: 2024年4月27日 1:53
> 收件人: devel@edk2.groups.io
> 抄送: Michael D Kinney ; Liming Gao
> ; Zhiguang Liu 
> 主题: [PATCH v6 3/4] MdePkg: Adding support for
> EFI_CONFORMANCE_PROFILE_TABLE
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352
> 
> Adding support for EFI_CONFORMANCE_PROFILE_TABLE by adding an
> associated header file and relevant GUIDs to MdePkg.dec as defined
> in the UEFI 2.10 spec.
> This table is needed to address changes being made within ShellPkg.
> 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Zhiguang Liu 
> Signed-off-by: Sam Kaynor 
> ---
> 
> Notes:
> v6:
> - Added patch to address MdePkg changes separately
> 
>  MdePkg/MdePkg.dec |  5 ++
>  MdePkg/Include/Guid/ConformanceProfiles.h | 56 
>  2 files changed, 61 insertions(+)
> 
> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
> index bf94549cbfbd..2c053a7459f3 100644
> --- a/MdePkg/MdePkg.dec
> +++ b/MdePkg/MdePkg.dec
> @@ -746,6 +746,11 @@ [Guids]
>## Include/Guid/DeviceAuthentication.h
>gEfiDeviceSignatureDatabaseGuid  = { 0xb9c2b4f4, 0xbf5f, 0x462d, {0x8a,
> 0xdf, 0xc5, 0xc7, 0xa, 0xc3, 0x5d, 0xad }}
> 
> +  ## Include/Guid/ConformanceProfiles.h
> +  gEfiConfProfilesTableGuid= { 0x36122546, 0xf7e7, 0x4c8f, {
0xbd,
> 0x9b, 0xeb, 0x85, 0x25, 0xb5, 0x0c, 0x0b }}
> +  gEfiConfProfilesUefiSpecGuid = { 0x523c91af, 0xa195, 0x4382, {
0x81,
> 0x8d, 0x29, 0x5f, 0xe4, 0x00, 0x64, 0x65 }}
> +  gEfiConfProfilesEbbrSpecGuid = { 0xcce33c35, 0x74ac, 0x4087,
> { 0xbc, 0xe7, 0x8b, 0x29, 0xb0, 0x2e, 0xeb, 0x27 }}
> +
>#
># GUID defined in PI1.0
>#
> diff --git a/MdePkg/Include/Guid/ConformanceProfiles.h
> b/MdePkg/Include/Guid/ConformanceProfiles.h
> new file mode 100644
> index ..c6211d63d79c
> --- /dev/null
> +++ b/MdePkg/Include/Guid/ConformanceProfiles.h
> @@ -0,0 +1,56 @@
> +/** @file
> +  Legal information
> +
> +**/
> +
> +#ifndef __CONFORMANCE_PROFILES_TABLE_GUID_H__
> +#define __CONFORMANCE_PROFILES_TABLE_GUID_H__
> +
> +
> +//
> +// This table allows the platform to advertise its UEFI specification
> conformance
> +// in the form of pre-defined profiles. Each profile is identified by a
GUID,
> with
> +// known profiles listed in the section below.
> +// The absence of this table shall indicate that the platform
implementation
> is
> +// conformant with the UEFI specification requirements, as defined in
> Section 2.6.
> +// This is equivalent to publishing this configuration table with the
> +// EFI_CONFORMANCE_PROFILES_UEFI_SPEC_GUID conformance profile.
> +//
> +#define EFI_CONFORMANCE_PROFILES_TABLE_GUID \
> +  { \
> +0x36122546, 0xf7e7, 0x4c8f, { 0xbd, 0x9b, 0xeb, 0x85, 0x25, 0xb5,
0x0c,
> 0x0b } \
> +  }
> +
> +#pragma pack(1)
> +
> +typedef struct {
> +  ///
> +  /// Version of the table must be 0x1
> +  ///
> +  UINT16 Version;
> +  ///
> +  /// The number of profiles GUIDs present in ConformanceProfiles
> +  ///
> +  UINT16 NumberOfProfiles;
> +  ///
> +  /// An array of conformance profile GUIDs that are supported by this
> system.
> +  /// EFI_GUIDConformanceProfiles[];
> +  ///
> +} EFI_CONFORMANCE_PROFILES_TABLE;
> +
> +#define EFI_CONFORMANCE_PROFILES_TABLE_VERSION 0x1
> +
> +//
> +// GUID defined in spec.
> +//
> +#define EFI_CONFORMANCE_PROFILES_UEFI_SPEC_GUID \
> +{ 0x523c91af, 0xa195, 0x4382, \
> +{ 0x81, 0x8d, 0x29, 0x5f, 0xe4, 0x00, 0x64, 0x65 }}
> +#define EFI_CONFORMANCE_PROFILE_EBBR_2_1_GUID \
> +{ 0xcce33c35, 0x74ac, 0x4087, \
> +{ 0xbc, 0xe7, 0x8b, 0x29, 0xb0, 0x2e, 0xeb, 0x27 }}
> +
> +extern EFI_GUID  gEfiConfProfilesTableGuid;
> +extern EFI_GUID  gEfiConfProfilesUefiSpecGuid;
> +
> +#endif
> --
> 2.34.1





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




回复: [edk2-devel] 回复: [PATCH v2 1/1] Subject: [PATCH] MdePkg:Added new SPCR table stucture members as in Rev4.

2024-04-28 Thread gaoliming via groups.io
Praveen:
  I want to know what will happen if the platform doesn't make changes with the 
updated table. 

  According to its impact, we can make direction how and when to merge this 
patch. 

Thanks
Liming
> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Praveen
> Sankar N via groups.io
> 发送时间: 2024年4月26日 12:58
> 收件人: gaoliming ; devel@edk2.groups.io
> 抄送: michael.d.kin...@intel.com; zhiguang@intel.com; Felix Polyudov
> ; Srinivasan Mani ; Sundaresan S
> 
> 主题: Re: [edk2-devel] 回复: [PATCH v2 1/1] Subject: [PATCH]
> MdePkg:Added new SPCR table stucture members as in Rev4.
> 
> Hi Liming,
> I am about to resubmit the patch with the changes in the files
> SpcrGenerator.c and Spcr.aslc which are consuming the SPCR structure from
> SerialPortConsoleRedirectionTable.h file and these files seemingly initializes
> the SPCR structure members. So please let me know about your opinion on
> this and I think you mean the incompatible change as these files are affected
> with the initial patch.
> 
> Thanks,
> Praveen Sankar N
> 
> -Original Message-
> From: gaoliming 
> Sent: Tuesday, April 23, 2024 6:47 PM
> To: Praveen Sankar N ; devel@edk2.groups.io
> Cc: michael.d.kin...@intel.com; zhiguang@intel.com; Felix Polyudov
> ; Srinivasan Mani ; Sundaresan S
> 
> Subject: [EXTERNAL] 回复: [PATCH v2 1/1] Subject: [PATCH] MdePkg:Added
> new SPCR table stucture members as in Rev4.
> 
> 
> **CAUTION: The e-mail below is from an external source. Please exercise
> caution before opening attachments, clicking links, or following guidance.**
> 
> Seemly, this is an incompatible change. What's impact with this change?
> 
> Thanks
> Liming
> > -邮件原件-
> > 发件人: Praveen Sankar N 
> > 发送时间: 2024年4月22日 19:26
> > 收件人: devel@edk2.groups.io
> > 抄送: michael.d.kin...@intel.com; gaolim...@byosoft.com.cn;
> > zhiguang@intel.com; Felix Polyudov ; Srinivasan
> > Mani ; Sundaresan S 
> > 主题: [PATCH v2 1/1] Subject: [PATCH] MdePkg:Added new SPCR table
> > stucture members as in Rev4.
> >
> > In SPCR table, 4 structure members have been added newly as per SPCR
> > table Rev4, which has to be added in
> > MdePkg/SerialPortConsoleRedirectionTable.h file.
> >
> > Signed-off-by: Praveen Sankar N praveensank...@ami.com
> > Cc: michael.d.kin...@intel.com
> > Cc: gaolim...@byosoft.com.cn
> > Cc: zhiguang@intel.com
> > Cc: fel...@ami.com
> > Cc: srinivas...@ami.com
> > Cc: sundares...@ami.com
> > ---
> >  .../IndustryStandard/SerialPortConsoleRedirectionTable.h| 6 +-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git
> > a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h
> > b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h
> > index eb5ae28390..f0001ab137 100644
> > ---
> > a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h
> > +++
> > b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h
> > @@ -47,7 +47,11 @@ typedef struct {
> >UINT8
> PciFunctionNumber;
> >
> >UINT32PciFlags;
> >
> >UINT8 PciSegment;
> >
> > -  UINT32Reserved3;
> >
> > +  UINT32
> UartClockFrequency;
> >
> > +  UINT32PreciseBaudRate;
> >
> > +  UINT16
> > NameSpaceStrLength;
> >
> > +  UINT16
> > NameSpaceStrOffset;
> >
> > +  CHAR8
> > NameSpaceString[0];
> >
> >  } EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE;
> >
> >
> >
> >  #pragma pack()
> >
> > --
> > 2.38.1.windows.1
> > -The information contained in this message may be confidential and
> > proprietary to American Megatrends (AMI). This communication is
> > intended
> to
> > be read only by the individual or entity to whom it is addressed or by
> their
> > designee. If the reader of this message is not the intended recipient,
> > you
> are
> > on notice that any distribution of this message, in any form, is
> > strictly prohibited. Please promptly notify the sender by reply e-mail
> > or by
> telephone
> > at 770-246-8600, and then delete or destroy all copies of the
> transmission=
> 
> 
> -The information contained in this message may be confidential and
> proprietary to American Megatrends (AMI). This communication is intended to
> be read only by the individual or entity to whom it is addressed or by their
> designee. If the reader of this message is not the intended recipient, you are
> on notice that any distribution of this message, in any form, is strictly
> prohibited. Please promptly notify the sender by reply e-mail or by telephone
> at 770-246-8600, and then delete or destroy all copies of the transmission.
> 
> 
> 
> 





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

Re: [edk2-devel] [PATCH v4 00/10] Add DeviceSecurity feature based on PFP 1.06 spec

2024-04-28 Thread Michael D Kinney
No objections.

For all patches related to adding libspdm submodule:

Reviewed-by: Michael D Kinney 

Mike

> -Original Message-
> From: Yao, Jiewen 
> Sent: Sunday, April 28, 2024 5:33 PM
> To: Hou, Wenxing ; devel@edk2.groups.io; Andrew
> Fish ; Leif Lindholm ;
> Kinney, Michael D ; Liming Gao
> ; Sean Brogan ;
> Joey Vagedes ; Liu, Zhiguang
> ; Kumar, Rahul R 
> Subject: RE: [edk2-devel] [PATCH v4 00/10] Add DeviceSecurity feature
> based on PFP 1.06 spec
> 
> Hi All
> It has been 4 work weeks and this V4 patch resolved previous comments
> and feedbacks.
> 
> If there is no further objection, I plan to merge it tomorrow.
> 
> Thank you
> Yao, Jiewen
> 
> 
> > -Original Message-
> > From: Hou, Wenxing 
> > Sent: Friday, April 26, 2024 9:52 AM
> > To: Yao, Jiewen ; devel@edk2.groups.io; Andrew
> Fish
> > ; Leif Lindholm ; Kinney,
> Michael
> > D ; Liming Gao ;
> > Sean Brogan ; Joey Vagedes
> > ; Liu, Zhiguang ;
> Kumar,
> > Rahul R 
> > Subject: RE: [edk2-devel] [PATCH v4 00/10] Add DeviceSecurity feature
> based on
> > PFP 1.06 spec
> >
> > Hi EDKII stewards,
> >
> > Could you please review the libspdm license?
> >
> > The libspdm(https://github.com/DMTF/libspdm) is a implementation that
> follows
> > the DMTF SPDM(https://www.dmtf.org/standards/spdm) spec.
> >
> > And the libspdm library is under DMTF repo.
> > The license is: https://github.com/DMTF/libspdm/blob/main/LICENSE.md
> >
> >
> >
> > Thanks,
> > Wenxing
> >
> >
> > -Original Message-
> > From: Yao, Jiewen 
> > Sent: Sunday, April 21, 2024 10:31 AM
> > To: Hou, Wenxing ; devel@edk2.groups.io; Andrew
> Fish
> > ; Leif Lindholm ; Kinney,
> Michael
> > D ; Liming Gao ;
> > Sean Brogan ; Joey Vagedes
> > ; Liu, Zhiguang ;
> Kumar,
> > Rahul R 
> > Subject: RE: [edk2-devel] [PATCH v4 00/10] Add DeviceSecurity feature
> based on
> > PFP 1.06 spec
> >
> > All series: Reviewed-by: Jiewen Yao 
> >
> > Dear Steward member
> > Do you have any concern on adding libspdm
> (https://github.com/DMTF/libspdm)
> > as one more submodule?
> >
> > Thank you
> > Yao, Jiewen
> >
> > > -Original Message-
> > > From: Hou, Wenxing 
> > > Sent: Thursday, April 18, 2024 6:16 PM
> > > To: devel@edk2.groups.io; Andrew Fish ; Leif
> Lindholm
> > > ; Kinney, Michael D
> > > ; Liming Gao ;
> > > Sean Brogan ; Joey Vagedes
> > > ; Liu, Zhiguang ;
> > > Kumar, Rahul R ; Yao, Jiewen
> > > 
> > > Subject: RE: [edk2-devel] [PATCH v4 00/10] Add DeviceSecurity
> feature
> > > based on PFP 1.06 spec
> > >
> > > Dear EDKII reviewers:
> > >
> > > Thank you for your previous review of this patch set.
> > > Currently, five patches have been reviewed by.
> > >
> > > But there are five patches need review.
> > >   Patch1:  MdePkg: Add SPDM1.2 support.
> > >   Patch2:  MdePkg: Add TCG PFP 1.06 support.
> > >   Patch4:  MdeModulePkg/Variable: Add TCG SPDM device measurement
> > > update
> > >   Patch8:  .gitmodule: Add libspdm submodule for EDKII
> > >   Patch10: ReadMe.rst: Add libspdm submodule license
> > >
> > > Could you please review the PATCH v4?
> > >
> > > PS: Jiewen has reviewed all the PATCH. And I have fixed his feedback
> in PATCH
> > v4.
> > > Jiewen has no questions about all the patches anymore.
> > >
> > > Thanks,
> > > Wenxing
> > >
> > >
> > > -Original Message-
> > > From: devel@edk2.groups.io  On Behalf Of
> Wenxing
> > > Hou
> > > Sent: Thursday, April 18, 2024 5:28 PM
> > > To: devel@edk2.groups.io
> > > Cc: Andrew Fish ; Leif Lindholm
> > > ; Kinney, Michael D
> > > ; Liming Gao ;
> > > Sean Brogan ; Joey Vagedes
> > > ; Liu, Zhiguang ;
> > > Kumar, Rahul R ; Yao, Jiewen
> > > 
> > > Subject: [edk2-devel] [PATCH v4 00/10] Add DeviceSecurity feature
> > > based on PFP
> > > 1.06 spec
> > >
> > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2479
> > >
> > > In PFP spec 1.06, platform firmware records the device certificate
> and
> > > device measurement for each SPDM responder.
> > > This PATCH set implement the DeviceSecurityLib to support spdm
> device
> > > Authentication and Measurement.
> > >
> > > Libspdm as submodule is to support DeviceSecurity feature:
> > > https://github.com/DMTF/libspdm
> > >
> > > TCG PFP spec 1.06:
> > > https://trustedcomputinggroup.org/resource/pc-client-specific-
> platform
> > > -
> > > firmware-profile-specification/
> > >
> > > The POC branch:
> > > https://github.com/tianocore/edk2-staging/tree/DeviceSecurity
> > >
> > > And the PATCH set has passed the EDKII CI:
> > > https://github.com/tianocore/edk2/pull/5508
> > >
> > > v2 changes:
> > >  - Fix typo: PcdEnableSpdmDeviceAuthenticaion ->
> > > PcdEnableSpdmDeviceAuthentication
> > > v3 changes:
> > >  - Add new patch 10: Update ReadMe.rst for libspdm submodule license
> > > v4 changes:
> > >  - Update submodule libspdm to latest tag
> > >
> > > PATCH 3: Reviewed-by: Liming Gao  PATCH 5:
> > > Reviewed-by: Jiewen Yao  PATCH 6: Reviewed-by:
> > > Jiewen Yao  PATCH 7: Reviewed-by: Joey Vagedes
> > >  PATCH 9: Reviewed-by: Jiewen 

Re: [edk2-devel] [PATCH v4 00/10] Add DeviceSecurity feature based on PFP 1.06 spec

2024-04-28 Thread Yao, Jiewen
Hi All
It has been 4 work weeks and this V4 patch resolved previous comments and 
feedbacks.

If there is no further objection, I plan to merge it tomorrow.

Thank you
Yao, Jiewen


> -Original Message-
> From: Hou, Wenxing 
> Sent: Friday, April 26, 2024 9:52 AM
> To: Yao, Jiewen ; devel@edk2.groups.io; Andrew Fish
> ; Leif Lindholm ; Kinney, Michael
> D ; Liming Gao ;
> Sean Brogan ; Joey Vagedes
> ; Liu, Zhiguang ; Kumar,
> Rahul R 
> Subject: RE: [edk2-devel] [PATCH v4 00/10] Add DeviceSecurity feature based on
> PFP 1.06 spec
> 
> Hi EDKII stewards,
> 
> Could you please review the libspdm license?
> 
> The libspdm(https://github.com/DMTF/libspdm) is a implementation that follows
> the DMTF SPDM(https://www.dmtf.org/standards/spdm) spec.
> 
> And the libspdm library is under DMTF repo.
> The license is: https://github.com/DMTF/libspdm/blob/main/LICENSE.md
> 
> 
> 
> Thanks,
> Wenxing
> 
> 
> -Original Message-
> From: Yao, Jiewen 
> Sent: Sunday, April 21, 2024 10:31 AM
> To: Hou, Wenxing ; devel@edk2.groups.io; Andrew Fish
> ; Leif Lindholm ; Kinney, Michael
> D ; Liming Gao ;
> Sean Brogan ; Joey Vagedes
> ; Liu, Zhiguang ; Kumar,
> Rahul R 
> Subject: RE: [edk2-devel] [PATCH v4 00/10] Add DeviceSecurity feature based on
> PFP 1.06 spec
> 
> All series: Reviewed-by: Jiewen Yao 
> 
> Dear Steward member
> Do you have any concern on adding libspdm (https://github.com/DMTF/libspdm)
> as one more submodule?
> 
> Thank you
> Yao, Jiewen
> 
> > -Original Message-
> > From: Hou, Wenxing 
> > Sent: Thursday, April 18, 2024 6:16 PM
> > To: devel@edk2.groups.io; Andrew Fish ; Leif Lindholm
> > ; Kinney, Michael D
> > ; Liming Gao ;
> > Sean Brogan ; Joey Vagedes
> > ; Liu, Zhiguang ;
> > Kumar, Rahul R ; Yao, Jiewen
> > 
> > Subject: RE: [edk2-devel] [PATCH v4 00/10] Add DeviceSecurity feature
> > based on PFP 1.06 spec
> >
> > Dear EDKII reviewers:
> >
> > Thank you for your previous review of this patch set.
> > Currently, five patches have been reviewed by.
> >
> > But there are five patches need review.
> > Patch1:  MdePkg: Add SPDM1.2 support.
> > Patch2:  MdePkg: Add TCG PFP 1.06 support.
> > Patch4:  MdeModulePkg/Variable: Add TCG SPDM device measurement
> > update
> > Patch8:  .gitmodule: Add libspdm submodule for EDKII
> > Patch10: ReadMe.rst: Add libspdm submodule license
> >
> > Could you please review the PATCH v4?
> >
> > PS: Jiewen has reviewed all the PATCH. And I have fixed his feedback in 
> > PATCH
> v4.
> > Jiewen has no questions about all the patches anymore.
> >
> > Thanks,
> > Wenxing
> >
> >
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of Wenxing
> > Hou
> > Sent: Thursday, April 18, 2024 5:28 PM
> > To: devel@edk2.groups.io
> > Cc: Andrew Fish ; Leif Lindholm
> > ; Kinney, Michael D
> > ; Liming Gao ;
> > Sean Brogan ; Joey Vagedes
> > ; Liu, Zhiguang ;
> > Kumar, Rahul R ; Yao, Jiewen
> > 
> > Subject: [edk2-devel] [PATCH v4 00/10] Add DeviceSecurity feature
> > based on PFP
> > 1.06 spec
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2479
> >
> > In PFP spec 1.06, platform firmware records the device certificate and
> > device measurement for each SPDM responder.
> > This PATCH set implement the DeviceSecurityLib to support spdm device
> > Authentication and Measurement.
> >
> > Libspdm as submodule is to support DeviceSecurity feature:
> > https://github.com/DMTF/libspdm
> >
> > TCG PFP spec 1.06:
> > https://trustedcomputinggroup.org/resource/pc-client-specific-platform
> > -
> > firmware-profile-specification/
> >
> > The POC branch:
> > https://github.com/tianocore/edk2-staging/tree/DeviceSecurity
> >
> > And the PATCH set has passed the EDKII CI:
> > https://github.com/tianocore/edk2/pull/5508
> >
> > v2 changes:
> >  - Fix typo: PcdEnableSpdmDeviceAuthenticaion ->
> > PcdEnableSpdmDeviceAuthentication
> > v3 changes:
> >  - Add new patch 10: Update ReadMe.rst for libspdm submodule license
> > v4 changes:
> >  - Update submodule libspdm to latest tag
> >
> > PATCH 3: Reviewed-by: Liming Gao  PATCH 5:
> > Reviewed-by: Jiewen Yao  PATCH 6: Reviewed-by:
> > Jiewen Yao  PATCH 7: Reviewed-by: Joey Vagedes
> >  PATCH 9: Reviewed-by: Jiewen Yao
> > 
> >
> > Cc: Andrew Fish 
> > Cc: Leif Lindholm 
> > Cc: Michael D Kinney 
> > Cc: Liming Gao 
> > Cc: Sean Brogan 
> > Cc: Joey Vagedes 
> > Cc: Zhiguang Liu 
> > Cc: Rahul Kumar 
> > Cc: Jiewen Yao 
> > Signed-off-by: Wenxing Hou 
> >
> > Wenxing Hou (10):
> >   MdePkg: Add SPDM1.2 support.
> >   MdePkg: Add TCG PFP 1.06 support.
> >   MdePkg: Add devAuthBoot GlobalVariable
> >   MdeModulePkg/Variable: Add TCG SPDM device measurement update
> >   SecurityPkg: Add TCG PFP 1.06 support.
> >   SecurityPkg: add DeviceSecurity support
> >   .pytool/CISettings.py: add libspdm submodule.
> >   .gitmodule: Add libspdm submodule for EDKII
> >   SecurityPkg: Add libspdm submodule
> >   ReadMe.rst: Add libspdm submodule license
> >
> >  .gitmodules  

[edk2-devel] [Patch V2 1/1] UefiCpuPkg/SmmCpuSyncLib: Add MM_STANDALONE tag.

2024-04-28 Thread Yuanhao Xie
Declares in the .inf file that the current component is an MM_STANDALONE

Signed-off-by: Yuanhao Xie 
Cc: Eric Dong 
Cc: Ray Ni 
Cc: Rahul Kumar 
Cc: Gerd Hoffmann 
Cc: Jiaxin Wu 
Reviewed-by: Jiaxin Wu 
---
 UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf 
b/UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf
index 6b0d49c30a..2199b7948d 100644
--- a/UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf
+++ b/UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf
@@ -3,7 +3,7 @@
 #
 # This is SMM CPU Synchronization lib used for SMM CPU sync operations.
 #
-# Copyright (c) 2023, Intel Corporation. All rights reserved.
+# Copyright (c) 2023 - 2024, Intel Corporation. All rights reserved.
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -13,7 +13,7 @@
   BASE_NAME  = SmmCpuSyncLib
   FILE_GUID  = 1ca1bc1a-16a4-46ef-956a-ca500fd3381f
   MODULE_TYPE= DXE_SMM_DRIVER
-  LIBRARY_CLASS  = SmmCpuSyncLib|DXE_SMM_DRIVER
+  LIBRARY_CLASS  = SmmCpuSyncLib|DXE_SMM_DRIVER MM_STANDALONE
 
 [Sources]
   SmmCpuSyncLib.c
-- 
2.39.1.windows.1



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




[edk2-devel] [Patch V2 0/1] Add MM_STANDALONE tag.

2024-04-28 Thread Yuanhao Xie
Declares in the .inf file that the current component is an MM_STANDALONE

xieyuanh (1):
  UefiCpuPkg/SmmCpuSyncLib: Add MM_STANDALONE tag.

 UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.39.1.windows.1



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




[edk2-devel] Event: Tools, CI, Code base construction meeting series - Monday, April 29, 2024 #cal-reminder

2024-04-28 Thread Group Notification
*Reminder: Tools, CI, Code base construction meeting series*

*When:*
Monday, April 29, 2024
4:30pm to 5:30pm
(UTC-07:00) America/Los Angeles

*Where:*
https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4NmMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2223af6561-6e1c-450d-b917-d9d674eb3cb6%22%7d

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

*Description:*

TianoCore community,

Microsoft and Intel will be hosting a series of open meetings to discuss build, 
CI, tools, and other related topics. If you are interested, have ideas/opinions 
please join us. These meetings will be Monday 4:30pm Pacific Time on Microsoft 
Teams.

MS Teams Link in following discussion: * 
https://github.com/tianocore/edk2/discussions/2614

Anyone is welcome to join.

* tianocore/edk2: EDK II (github.com)
* tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP module 
(github.com) https://github.com/tianocore/edk2-basetools
* tianocore/edk2-pytool-extensions: Extensions to the edk2 build system 
allowing for a more robust and plugin based build system and tool execution 
environment (github.com) https://github.com/tianocore/edk2-pytool-extensions
* tianocore/edk2-pytool-library: Python library package that supports UEFI 
development (github.com) https://github.com/tianocore/edk2-pytool-library

MS Teams Browser Clients * 
https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client


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




[edk2-devel] [PATCH 1/1] MdeModulePkg/RamDiskDxe: fix memory leak.

2024-04-28 Thread Mike Maslenkin
Cc: Ray Ni 
Cc: Zhichao Gao 
Cc: Liming Gao 
Signed-off-by: Mike Maslenkin 
---
 MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskImpl.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskImpl.c 
b/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskImpl.c
index 60cf3c8c4a79..2dac121c478c 100644
--- a/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskImpl.c
+++ b/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskImpl.c
@@ -404,7 +404,8 @@ HiiCreateRamDisk (
   );
   } while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
 
-  return EFI_DEVICE_ERROR;
+  Status = EFI_DEVICE_ERROR;
+  goto ErrorExit;
 }
   }
 
@@ -431,7 +432,7 @@ HiiCreateRamDisk (
 );
 } while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
 
-return Status;
+goto ErrorExit;
   }
 
   //
@@ -442,6 +443,10 @@ HiiCreateRamDisk (
   PrivateData->CreateMethod = RamDiskCreateHii;
 
   return EFI_SUCCESS;
+
+ErrorExit:
+  gBS->FreePool (StartingAddr);
+  return Status;
 }
 
 /**
-- 
2.32.0 (Apple Git-132)



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