Date   

Re: [PATCH 1/1] MdeModulePkg: Move PiSmmCoreMemoryAllocationLib into PiSmmCore

Marvin Häuser <mhaeuser@...>
 

On 02/09/2021 12:53, Ni, Ray wrote:
Overall, the patch looks good to me.
Thanks!

Can you remove the "CONSTRUCTOR = PiSmmCoreMemoryAllocationLibConstructor" from PiSmmCoreMemoryAllocationProfileLib.inf?
And "LIBRARY_CLASS                  = MemoryAllocationLib|SMM_CORE" too? Otherwise this is a broken MemoryAllocationLib implementation. Removing this will break any platform that uses this implementation, but I cannot see any in the edk2 tree.

Best regards,
Marvin

With that change, Reviewed-by: Ray Ni <ray.ni@...>

More replies started with "[ray]".

-----Original Message-----
From: Marvin Häuser <mhaeuser@...>
Sent: Wednesday, September 1, 2021 3:18 PM
To: Ni, Ray <ray.ni@...>; devel@edk2.groups.io
Cc: Wang, Jian J <jian.j.wang@...>; Wu, Hao A <hao.a.wu@...>; Dong, Eric <eric.dong@...>; Vitaly Cheptsov <vit9696@...>
Subject: Re: [PATCH 1/1] MdeModulePkg: Move PiSmmCoreMemoryAllocationLib into PiSmmCore

Hey Ray,

Thanks for your response!

1) It would disrupt platform builds that use this INF.
[ray] I see:) I agree we cannot break platforms that list the INF path in DSC.


2) We'd need a new library to satisfy MemoryAllocationLib dependencies.
If using the generic SMM one, libraries linked against the core would start using the indirect table calls over the direct calls for practically no reason, at least I see none at the moment.
[ray] I see:) For example. UefiLib linked by PiSmmCore depends on MemoryAllocationLib. We need to at least provide a dummy lib for it to pass the dependency check from base tools.

[ray] I thought you could let PiSmmCore directly call the PiSmmCoreMemoryAllocationLibConstructor () in entrypoint to eliminate the needs of referring the constructor in PiSmmCoreMemoryAllocationLib.inf.
But then I realized that constructors of other libraries may call AllocatePages/Pool(). Calling PiSmmCoreMemoryAllocationLibConstructor() in entrypoint forbids those memory lib API calls from constructors.

More or less I saw no reason to do it, as this is a change that needs no platform maintainer attention, but if you have suggestion on how to improve the patch, I'd be open to it of course.

Best regards,
Marvin

On 01/09/2021 06:21, Ni, Ray wrote:
Marvin,
Your patch moves the memory allocation lib implementation to PiSmmCore.
Can you remove the PiSmmCoreMemoryAllocationLib.inf completely? (or
what forbids you remove this lib instance?)

Thanks,
Ray

-----Original Message-----
From: Marvin Häuser <mhaeuser@...>
Sent: Sunday, August 22, 2021 3:56 AM
To: devel@edk2.groups.io
Cc: Wang, Jian J <jian.j.wang@...>; Wu, Hao A
<hao.a.wu@...>; Dong, Eric <eric.dong@...>; Ni, Ray
<ray.ni@...>; Vitaly Cheptsov <vit9696@...>
Subject: [PATCH 1/1] MdeModulePkg: Move PiSmmCoreMemoryAllocationLib
into PiSmmCore

PiSmmCoreMemoryAllocationLib duplicates private definitions of
PiSmmCore, namely the SMM_CORE_PRIVATE_DATA structure. Move this code
into PiSmmCore, so that the struct definition can be consumed directly
instead.

Cc: Jian J Wang <jian.j.wang@...>
Cc: Hao A Wu <hao.a.wu@...>
Cc: Eric Dong <eric.dong@...>
Cc: Ray Ni <ray.ni@...>
Cc: Vitaly Cheptsov <vit9696@...>
Signed-off-by: Marvin Häuser <mhaeuser@...>
---
MdeModulePkg/{Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c => Core/PiSmmCore/MemoryAllocation.c} | 3 +-
MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf | 1 +
MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf | 5 +-
MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationProfileLib.inf | 6 +-
MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationServices.h | 185 --------------------
5 files changed, 10 insertions(+), 190 deletions(-)

diff --git
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLi
b.c b/MdeModulePkg/Core/PiSmmCore/MemoryAllocation.c
similarity index 96%
rename from
MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.
c rename to MdeModulePkg/Core/PiSmmCore/MemoryAllocation.c
index fd20a779cdcc..fb99174c9d8d 100644
---
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLi
b.c
+++ b/MdeModulePkg/Core/PiSmmCore/MemoryAllocation.c
@@ -22,7 +22,8 @@
#include <Library/UefiBootServicesTableLib.h>

#include <Library/BaseMemoryLib.h>

#include <Library/DebugLib.h>

-#include "PiSmmCoreMemoryAllocationServices.h"

+#include "PiSmmCore.h"

+#include "PiSmmCorePrivateData.h"


#include <Library/MemoryProfileLib.h>


diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
index c8bfae3860fc..85628f927134 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
@@ -37,6 +37,7 @@ [Sources]
SmiHandlerProfile.c

HeapGuard.c

HeapGuard.h

+ MemoryAllocation.c


[Packages]

MdePkg/MdePkg.dec

diff --git
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationLib.inf
b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationLib.inf index 5c51c48b0b1e..8812c9604103 100644
---
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationLib.inf
+++ b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemor
+++ yAllocationLib.inf
@@ -19,6 +19,9 @@ [Defines]
VERSION_STRING = 1.0

PI_SPECIFICATION_VERSION = 0x0001000A

LIBRARY_CLASS = MemoryAllocationLib|SMM_CORE

+ #

+ # This function is defined in PiSmmCore.

+ #

CONSTRUCTOR = PiSmmCoreMemoryAllocationLibConstructor


#

@@ -28,8 +31,6 @@ [Defines]
#


[Sources]

- MemoryAllocationLib.c

- PiSmmCoreMemoryAllocationServices.h

PiSmmCoreMemoryProfileLibNull.c


[Packages]

diff --git
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationProfileLib.inf
b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationProfileLib.inf index 89658c0f6ccb..c3b8a4fdce7b 100644
---
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationProfileLib.inf
+++ b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemor
+++ yAllocationProfileLib.inf
@@ -19,6 +19,9 @@ [Defines]
VERSION_STRING = 1.0

PI_SPECIFICATION_VERSION = 0x0001000A

LIBRARY_CLASS = MemoryAllocationLib|SMM_CORE

+ #

+ # This function is defined in PiSmmCore.

+ #

CONSTRUCTOR = PiSmmCoreMemoryAllocationLibConstructor

LIBRARY_CLASS = MemoryProfileLib|SMM_CORE

CONSTRUCTOR = PiSmmCoreMemoryProfileLibConstructor

@@ -30,8 +33,6 @@ [Defines]
#


[Sources]

- MemoryAllocationLib.c

- PiSmmCoreMemoryAllocationServices.h

PiSmmCoreMemoryProfileLib.c

PiSmmCoreMemoryProfileServices.h


@@ -43,6 +44,7 @@ [LibraryClasses]
DebugLib

BaseMemoryLib

UefiBootServicesTableLib

+ MemoryAllocationLib


[Guids]

gEdkiiMemoryProfileGuid ## SOMETIMES_CONSUMES ## GUID # Locate protocol

diff --git
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationServices.h
b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationServices.h
deleted file mode 100644
index 789fcf2c01ea..000000000000
---
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationServices.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/** @file

- Contains function prototypes for Memory Services in the SMM Core.

-

- This header file borrows the PiSmmCore Memory Allocation services
as the primitive

- for memory allocation.

-

- Copyright (c) 2008 - 2018, Intel Corporation. All rights
reserved.<BR>

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

-

-**/

-

-#ifndef _PI_SMM_CORE_MEMORY_ALLOCATION_SERVICES_H_

-#define _PI_SMM_CORE_MEMORY_ALLOCATION_SERVICES_H_

-

-//

-// It should be aligned with the definition in PiSmmCore.

-//

-typedef struct {

- UINTN Signature;

-

- ///

- /// The ImageHandle passed into the entry point of the SMM IPL.
This ImageHandle

- /// is used by the SMM Core to fill in the ParentImageHandle field
of the Loaded

- /// Image Protocol for each SMM Driver that is dispatched by the SMM Core.

- ///

- EFI_HANDLE SmmIplImageHandle;

-

- ///

- /// The number of SMRAM ranges passed from the SMM IPL to the SMM
Core. The SMM

- /// Core uses these ranges of SMRAM to initialize the SMM Core memory manager.

- ///

- UINTN SmramRangeCount;

-

- ///

- /// A table of SMRAM ranges passed from the SMM IPL to the SMM
Core. The SMM

- /// Core uses these ranges of SMRAM to initialize the SMM Core memory manager.

- ///

- EFI_SMRAM_DESCRIPTOR *SmramRanges;

-

- ///

- /// The SMM Foundation Entry Point. The SMM Core fills in this
field when the

- /// SMM Core is initialized. The SMM IPL is responsbile for
registering this entry

- /// point with the SMM Configuration Protocol. The SMM
Configuration Protocol may

- /// not be available at the time the SMM IPL and SMM Core are
started, so the SMM IPL

- /// sets up a protocol notification on the SMM Configuration
Protocol and registers

- /// the SMM Foundation Entry Point as soon as the SMM Configuration
Protocol is

- /// available.

- ///

- EFI_SMM_ENTRY_POINT SmmEntryPoint;

-

- ///

- /// Boolean flag set to TRUE while an SMI is being processed by the SMM Core.

- ///

- BOOLEAN SmmEntryPointRegistered;

-

- ///

- /// Boolean flag set to TRUE while an SMI is being processed by the SMM Core.

- ///

- BOOLEAN InSmm;

-

- ///

- /// This field is set by the SMM Core then the SMM Core is
initialized. This field is

- /// used by the SMM Base 2 Protocol and SMM Communication Protocol
implementations in

- /// the SMM IPL.

- ///

- EFI_SMM_SYSTEM_TABLE2 *Smst;

-

- ///

- /// This field is used by the SMM Communicatioon Protocol to pass a
buffer into

- /// a software SMI handler and for the software SMI handler to pass
a buffer back to

- /// the caller of the SMM Communication Protocol.

- ///

- VOID *CommunicationBuffer;

-

- ///

- /// This field is used by the SMM Communicatioon Protocol to pass
the size of a buffer,

- /// in bytes, into a software SMI handler and for the software SMI
handler to pass the

- /// size, in bytes, of a buffer back to the caller of the SMM Communication Protocol.

- ///

- UINTN BufferSize;

-

- ///

- /// This field is used by the SMM Communication Protocol to pass
the return status from

- /// a software SMI handler back to the caller of the SMM Communication Protocol.

- ///

- EFI_STATUS ReturnStatus;

-

- EFI_PHYSICAL_ADDRESS PiSmmCoreImageBase;

- UINT64 PiSmmCoreImageSize;

- EFI_PHYSICAL_ADDRESS PiSmmCoreEntryPoint;

-} SMM_CORE_PRIVATE_DATA;

-

-/**

- Called to initialize the memory service.

-

- @param SmramRangeCount Number of SMRAM Regions

- @param SmramRanges Pointer to SMRAM Descriptors

-

-**/

-VOID

-SmmInitializeMemoryServices (

- IN UINTN SmramRangeCount,

- IN EFI_SMRAM_DESCRIPTOR *SmramRanges

- );

-

-/**

- Allocates pages from the memory map.

-

- @param Type The type of allocation to perform

- @param MemoryType The type of memory to turn the allocated pages

- into

- @param NumberOfPages The number of pages to allocate

- @param Memory A pointer to receive the base allocated memory

- address

-

- @retval EFI_INVALID_PARAMETER Parameters violate checking rules defined in spec.

- @retval EFI_NOT_FOUND Could not allocate pages match the requirement.

- @retval EFI_OUT_OF_RESOURCES No enough pages to allocate.

- @retval EFI_SUCCESS Pages successfully allocated.

-

-**/

-EFI_STATUS

-EFIAPI

-SmmAllocatePages (

- IN EFI_ALLOCATE_TYPE Type,

- IN EFI_MEMORY_TYPE MemoryType,

- IN UINTN NumberOfPages,

- OUT EFI_PHYSICAL_ADDRESS *Memory

- );

-

-/**

- Frees previous allocated pages.

-

- @param Memory Base address of memory being freed

- @param NumberOfPages The number of pages to free

-

- @retval EFI_NOT_FOUND Could not find the entry that covers the range

- @retval EFI_INVALID_PARAMETER Address not aligned

- @return EFI_SUCCESS Pages successfully freed.

-

-**/

-EFI_STATUS

-EFIAPI

-SmmFreePages (

- IN EFI_PHYSICAL_ADDRESS Memory,

- IN UINTN NumberOfPages

- );

-

-/**

- Allocate pool of a particular type.

-

- @param PoolType Type of pool to allocate

- @param Size The amount of pool to allocate

- @param Buffer The address to return a pointer to the allocated

- pool

-

- @retval EFI_INVALID_PARAMETER PoolType not valid

- @retval EFI_OUT_OF_RESOURCES Size exceeds max pool size or allocation failed.

- @retval EFI_SUCCESS Pool successfully allocated.

-

-**/

-EFI_STATUS

-EFIAPI

-SmmAllocatePool (

- IN EFI_MEMORY_TYPE PoolType,

- IN UINTN Size,

- OUT VOID **Buffer

- );

-

-/**

- Frees pool.

-

- @param Buffer The allocated pool entry to free

-

- @retval EFI_INVALID_PARAMETER Buffer is not a valid value.

- @retval EFI_SUCCESS Pool successfully freed.

-

-**/

-EFI_STATUS

-EFIAPI

-SmmFreePool (

- IN VOID *Buffer

- );

-

-#endif



Cancelled Event: TianoCore Design Meeting - APAC/NAMO - Friday, September 3, 2021 #cal-cancelled

devel@edk2.groups.io Calendar <noreply@...>
 

Cancelled: TianoCore Design Meeting - APAC/NAMO

This event has been cancelled.

When:
Friday, September 3, 2021
9:30am to 10:30am
(UTC+08:00) Asia/Shanghai

Where:
Microsoft Teams

Organizer: Ray Ni ray.ni@...

Description:

TOPIC

  1. NA

For more info, see here: https://www.tianocore.org/design-meeting/


Microsoft Teams meeting

Join on your computer or mobile app

Click here to join the meeting

Join with a video conferencing device

teams@...

Video Conference ID: 119 715 416 0

Alternate VTC dialing instructions

Learn More | Meeting options


Re: [PATCH v6 02/29] OvmfPkg: reserve CPUID page for SEV-SNP

Brijesh Singh
 

Hi Gerd,

On 9/2/21 3:04 AM, Gerd Hoffmann wrote:
On Wed, Sep 01, 2021 at 11:16:19AM -0500, Brijesh Singh wrote:
BZ: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3275&;data=04%7C01%7Cbrijesh.singh%40amd.com%7C13c81a39aa2e4f22430e08d96de85a69%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637661666978547521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=4b22Sv6xoUGQ3xutPYdsqb4cNh1SS9Z8MOQG7dHiqYU%3D&amp;reserved=0

Platform features and capabilities are traditionally discovered via the
CPUID instruction. Hypervisors typically trap and emulate the CPUID
instruction for a variety of reasons. There are some cases where incorrect
CPUID information can potentially lead to a security issue. The SEV-SNP
firmware provides a feature to filter the CPUID results through the PSP.
The filtered CPUID values are saved on a special page for the guest to
consume. Reserve a page in MEMFD that will contain the results of
filtered CPUID values.
Is the format of the page documented somewhere?
Yes, it is documented in the SEV-SNP spec [1] section 7.1 and the checks
performed by the SEV-SNP firmware are documented in the PPR [2] section
2.1.5.3. I will document these link in the commit message.

[1] https://www.amd.com/system/files/TechDocs/56860.pdf

[2]
https://www.amd.com/en/support/tech-docs/processor-programming-reference-ppr-for-amd-family-19h-model-01h-revision-b1


Is this snp-specific? Or could this also be used without snp?
This is SNP specific format and cannot be used without SNP.

thanks

Brijesh


Re: [PATCH 2/2] UefiPayloadPkg: Include Network modules in UefiPayloadPkg.

Ni, Ray
 

Shall you put PcdAllowHttpConnections in dynamic PCD section?

-----Original Message-----
From: Sravanthi, K KavyaX <k.kavyax.sravanthi@...>
Sent: Thursday, September 2, 2021 2:18 PM
To: devel@edk2.groups.io
Cc: Sravanthi, K KavyaX <k.kavyax.sravanthi@...>; Dong, Guo <guo.dong@...>; Ni, Ray <ray.ni@...>; Ma, Maurice <maurice.ma@...>; You, Benjamin <benjamin.you@...>
Subject: [PATCH 2/2] UefiPayloadPkg: Include Network modules in UefiPayloadPkg.

From: Sravanthi <k.kavyax.sravanthi@...>

Include Network modules in UefiPayloadPkg.dsc and UefiPayloadPkg.fdf

Cc: Guo Dong <guo.dong@...>
Cc: Ray Ni <ray.ni@...>
Cc: Maurice Ma <maurice.ma@...>
Cc: Benjamin You <benjamin.you@...>
Signed-off-by: Sravanthi <k.kavyax.sravanthi@...>
---
UefiPayloadPkg/UefiPayloadPkg.dsc | 14 ++++++++++++++ UefiPayloadPkg/UefiPayloadPkg.fdf | 11 +++++++++--
2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 6859d2aeb8..b0054c8914 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -90,6 +90,7 @@

DEFINE EMU_VARIABLE_ENABLE = TRUE
DEFINE DISABLE_RESET_SYSTEM = FALSE
+ DEFINE NETWORK_DRIVER_ENABLE = FALSE

# Dfine the maximum size of the capsule image without a reset flag that the platform can support.
DEFINE MAX_SIZE_NON_POPULATE_CAPSULE = 0xa00000 @@ -161,6 +162,11 @@
CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
DxeHobListLib|UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf
+ BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+ TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
+ IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
+ OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
+ RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf

!if $(UNIVERSAL_PAYLOAD) == TRUE
HobLib|UefiPayloadPkg/Library/DxeHobLib/DxeHobLib.inf
@@ -316,6 +322,7 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE

gUefiPayloadPkgTokenSpaceGuid.PcdPcdDriverFile|{ 0x57, 0x72, 0xcf, 0x80, 0xab, 0x87, 0xf9, 0x47, 0xa3, 0xfe, 0xD5, 0x0B, 0x76, 0xd8, 0x95, 0x41 }
+ gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE

!if $(SOURCE_DEBUG_ENABLE)
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
@@ -431,6 +438,13 @@
!endif
!endif

+#
+# UEFI network modules
+#
+!if $(NETWORK_DRIVER_ENABLE) == TRUE
+ !include NetworkPkg/Network.dsc.inc
+!endif
+
[Components.X64]
#
# DXE Core
diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index bb6279bead..a089892d03 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -17,8 +17,8 @@ DEFINE FD_SIZE = 0x00850000
DEFINE NUM_BLOCKS = 0x850
!else

-DEFINE FD_SIZE = 0x00410000
-DEFINE NUM_BLOCKS = 0x410
+DEFINE FD_SIZE = 0x00590000
+DEFINE NUM_BLOCKS = 0x590
!endif

################################################################################
@@ -198,6 +198,13 @@ INF MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf
#
INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf

+#
+# UEFI network modules
+#
+!if $(NETWORK_DRIVER_ENABLE) == TRUE
+ !include NetworkPkg/Network.fdf.inc
+!endif
+
#
# Shell
#
--
2.30.2.windows.1


Re: [PATCH 1/2] UefiPayloadPkg: Include more modules in UefiPayloadPkg.

Ni, Ray
 

Reviewed-by: Ray Ni <ray.ni@...>

-----Original Message-----
From: Sravanthi, K KavyaX <k.kavyax.sravanthi@...>
Sent: Thursday, September 2, 2021 2:15 PM
To: devel@edk2.groups.io
Cc: Sravanthi, K KavyaX <k.kavyax.sravanthi@...>; Dong, Guo <guo.dong@...>; Ni, Ray <ray.ni@...>; Ma, Maurice <maurice.ma@...>; You, Benjamin <benjamin.you@...>
Subject: [PATCH 1/2] UefiPayloadPkg: Include more modules in UefiPayloadPkg.

From: Sravanthi <k.kavyax.sravanthi@...>

Include core modules in UefiPayloadPkg.dsc and UefiPayloadPkg.fdf

Cc: Guo Dong <guo.dong@...>
Cc: Ray Ni <ray.ni@...>
Cc: Maurice Ma <maurice.ma@...>
Cc: Benjamin You <benjamin.you@...>
Signed-off-by: Sravanthi <k.kavyax.sravanthi@...>
---
UefiPayloadPkg/UefiPayloadPkg.dsc | 6 ++++++
UefiPayloadPkg/UefiPayloadPkg.fdf | 6 ++++++
2 files changed, 12 insertions(+)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index b4a30be381..6859d2aeb8 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -452,6 +452,7 @@
NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf
NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
}
+ MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf

PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
MdeModulePkg/Universal/Metronome/Metronome.inf
@@ -482,6 +483,8 @@
MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
+ MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.inf
+ MdeModulePkg/Universal/EbcDxe/EbcDxe.inf

UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf

@@ -517,6 +520,7 @@
MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
+ MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf

#
# SD/eMMC Support
@@ -534,6 +538,7 @@
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
+ MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf

#
# ISA Support
@@ -545,6 +550,7 @@
OvmfPkg/SioBusDxe/SioBusDxe.inf
MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
!endif
+ MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf

#
# Console Support
diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index b2cfb6b405..bb6279bead 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -101,6 +101,7 @@ INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
INF UefiCpuPkg/CpuDxe/CpuDxe.inf
INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
INF MdeModulePkg/Application/UiApp/UiApp.inf
+INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
INF PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
INF MdeModulePkg/Universal/Metronome/Metronome.inf
INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
@@ -124,6 +125,8 @@ INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
+INF MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.inf
+INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
INF UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf

INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
@@ -143,6 +146,7 @@ INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
INF OvmfPkg/SioBusDxe/SioBusDxe.inf
INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
!endif
+INF MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf

#
# Console Support
@@ -167,6 +171,7 @@ INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
+INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf

INF FatPkg/EnhancedFatDxe/Fat.inf

@@ -186,6 +191,7 @@ INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
+INF MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf

#
# ACPI Support
--
2.30.2.windows.1


Re: [PATCH 1/1] MdeModulePkg: Move PiSmmCoreMemoryAllocationLib into PiSmmCore

Ni, Ray
 

Overall, the patch looks good to me.
Can you remove the "CONSTRUCTOR = PiSmmCoreMemoryAllocationLibConstructor" from PiSmmCoreMemoryAllocationProfileLib.inf?
With that change, Reviewed-by: Ray Ni <ray.ni@...>

More replies started with "[ray]".

-----Original Message-----
From: Marvin Häuser <mhaeuser@...>
Sent: Wednesday, September 1, 2021 3:18 PM
To: Ni, Ray <ray.ni@...>; devel@edk2.groups.io
Cc: Wang, Jian J <jian.j.wang@...>; Wu, Hao A <hao.a.wu@...>; Dong, Eric <eric.dong@...>; Vitaly Cheptsov <vit9696@...>
Subject: Re: [PATCH 1/1] MdeModulePkg: Move PiSmmCoreMemoryAllocationLib into PiSmmCore

Hey Ray,

Thanks for your response!

1) It would disrupt platform builds that use this INF.
[ray] I see:) I agree we cannot break platforms that list the INF path in DSC.


2) We'd need a new library to satisfy MemoryAllocationLib dependencies.
If using the generic SMM one, libraries linked against the core would start using the indirect table calls over the direct calls for practically no reason, at least I see none at the moment.
[ray] I see:) For example. UefiLib linked by PiSmmCore depends on MemoryAllocationLib. We need to at least provide a dummy lib for it to pass the dependency check from base tools.

[ray] I thought you could let PiSmmCore directly call the PiSmmCoreMemoryAllocationLibConstructor () in entrypoint to eliminate the needs of referring the constructor in PiSmmCoreMemoryAllocationLib.inf.
But then I realized that constructors of other libraries may call AllocatePages/Pool(). Calling PiSmmCoreMemoryAllocationLibConstructor() in entrypoint forbids those memory lib API calls from constructors.

More or less I saw no reason to do it, as this is a change that needs no platform maintainer attention, but if you have suggestion on how to improve the patch, I'd be open to it of course.

Best regards,
Marvin

On 01/09/2021 06:21, Ni, Ray wrote:
Marvin,
Your patch moves the memory allocation lib implementation to PiSmmCore.
Can you remove the PiSmmCoreMemoryAllocationLib.inf completely? (or
what forbids you remove this lib instance?)

Thanks,
Ray

-----Original Message-----
From: Marvin Häuser <mhaeuser@...>
Sent: Sunday, August 22, 2021 3:56 AM
To: devel@edk2.groups.io
Cc: Wang, Jian J <jian.j.wang@...>; Wu, Hao A
<hao.a.wu@...>; Dong, Eric <eric.dong@...>; Ni, Ray
<ray.ni@...>; Vitaly Cheptsov <vit9696@...>
Subject: [PATCH 1/1] MdeModulePkg: Move PiSmmCoreMemoryAllocationLib
into PiSmmCore

PiSmmCoreMemoryAllocationLib duplicates private definitions of
PiSmmCore, namely the SMM_CORE_PRIVATE_DATA structure. Move this code
into PiSmmCore, so that the struct definition can be consumed directly
instead.

Cc: Jian J Wang <jian.j.wang@...>
Cc: Hao A Wu <hao.a.wu@...>
Cc: Eric Dong <eric.dong@...>
Cc: Ray Ni <ray.ni@...>
Cc: Vitaly Cheptsov <vit9696@...>
Signed-off-by: Marvin Häuser <mhaeuser@...>
---
MdeModulePkg/{Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c => Core/PiSmmCore/MemoryAllocation.c} | 3 +-
MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf | 1 +
MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf | 5 +-
MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationProfileLib.inf | 6 +-
MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationServices.h | 185 --------------------
5 files changed, 10 insertions(+), 190 deletions(-)

diff --git
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLi
b.c b/MdeModulePkg/Core/PiSmmCore/MemoryAllocation.c
similarity index 96%
rename from
MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.
c rename to MdeModulePkg/Core/PiSmmCore/MemoryAllocation.c
index fd20a779cdcc..fb99174c9d8d 100644
---
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLi
b.c
+++ b/MdeModulePkg/Core/PiSmmCore/MemoryAllocation.c
@@ -22,7 +22,8 @@
#include <Library/UefiBootServicesTableLib.h>

#include <Library/BaseMemoryLib.h>

#include <Library/DebugLib.h>

-#include "PiSmmCoreMemoryAllocationServices.h"

+#include "PiSmmCore.h"

+#include "PiSmmCorePrivateData.h"



#include <Library/MemoryProfileLib.h>



diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
index c8bfae3860fc..85628f927134 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
@@ -37,6 +37,7 @@ [Sources]
SmiHandlerProfile.c

HeapGuard.c

HeapGuard.h

+ MemoryAllocation.c



[Packages]

MdePkg/MdePkg.dec

diff --git
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationLib.inf
b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationLib.inf index 5c51c48b0b1e..8812c9604103 100644
---
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationLib.inf
+++ b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemor
+++ yAllocationLib.inf
@@ -19,6 +19,9 @@ [Defines]
VERSION_STRING = 1.0

PI_SPECIFICATION_VERSION = 0x0001000A

LIBRARY_CLASS = MemoryAllocationLib|SMM_CORE

+ #

+ # This function is defined in PiSmmCore.

+ #

CONSTRUCTOR = PiSmmCoreMemoryAllocationLibConstructor



#

@@ -28,8 +31,6 @@ [Defines]
#



[Sources]

- MemoryAllocationLib.c

- PiSmmCoreMemoryAllocationServices.h

PiSmmCoreMemoryProfileLibNull.c



[Packages]

diff --git
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationProfileLib.inf
b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationProfileLib.inf index 89658c0f6ccb..c3b8a4fdce7b 100644
---
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationProfileLib.inf
+++ b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemor
+++ yAllocationProfileLib.inf
@@ -19,6 +19,9 @@ [Defines]
VERSION_STRING = 1.0

PI_SPECIFICATION_VERSION = 0x0001000A

LIBRARY_CLASS = MemoryAllocationLib|SMM_CORE

+ #

+ # This function is defined in PiSmmCore.

+ #

CONSTRUCTOR = PiSmmCoreMemoryAllocationLibConstructor

LIBRARY_CLASS = MemoryProfileLib|SMM_CORE

CONSTRUCTOR = PiSmmCoreMemoryProfileLibConstructor

@@ -30,8 +33,6 @@ [Defines]
#



[Sources]

- MemoryAllocationLib.c

- PiSmmCoreMemoryAllocationServices.h

PiSmmCoreMemoryProfileLib.c

PiSmmCoreMemoryProfileServices.h



@@ -43,6 +44,7 @@ [LibraryClasses]
DebugLib

BaseMemoryLib

UefiBootServicesTableLib

+ MemoryAllocationLib



[Guids]

gEdkiiMemoryProfileGuid ## SOMETIMES_CONSUMES ## GUID # Locate protocol

diff --git
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationServices.h
b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationServices.h
deleted file mode 100644
index 789fcf2c01ea..000000000000
---
a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAll
ocationServices.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/** @file

- Contains function prototypes for Memory Services in the SMM Core.

-

- This header file borrows the PiSmmCore Memory Allocation services
as the primitive

- for memory allocation.

-

- Copyright (c) 2008 - 2018, Intel Corporation. All rights
reserved.<BR>

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

-

-**/

-

-#ifndef _PI_SMM_CORE_MEMORY_ALLOCATION_SERVICES_H_

-#define _PI_SMM_CORE_MEMORY_ALLOCATION_SERVICES_H_

-

-//

-// It should be aligned with the definition in PiSmmCore.

-//

-typedef struct {

- UINTN Signature;

-

- ///

- /// The ImageHandle passed into the entry point of the SMM IPL.
This ImageHandle

- /// is used by the SMM Core to fill in the ParentImageHandle field
of the Loaded

- /// Image Protocol for each SMM Driver that is dispatched by the SMM Core.

- ///

- EFI_HANDLE SmmIplImageHandle;

-

- ///

- /// The number of SMRAM ranges passed from the SMM IPL to the SMM
Core. The SMM

- /// Core uses these ranges of SMRAM to initialize the SMM Core memory manager.

- ///

- UINTN SmramRangeCount;

-

- ///

- /// A table of SMRAM ranges passed from the SMM IPL to the SMM
Core. The SMM

- /// Core uses these ranges of SMRAM to initialize the SMM Core memory manager.

- ///

- EFI_SMRAM_DESCRIPTOR *SmramRanges;

-

- ///

- /// The SMM Foundation Entry Point. The SMM Core fills in this
field when the

- /// SMM Core is initialized. The SMM IPL is responsbile for
registering this entry

- /// point with the SMM Configuration Protocol. The SMM
Configuration Protocol may

- /// not be available at the time the SMM IPL and SMM Core are
started, so the SMM IPL

- /// sets up a protocol notification on the SMM Configuration
Protocol and registers

- /// the SMM Foundation Entry Point as soon as the SMM Configuration
Protocol is

- /// available.

- ///

- EFI_SMM_ENTRY_POINT SmmEntryPoint;

-

- ///

- /// Boolean flag set to TRUE while an SMI is being processed by the SMM Core.

- ///

- BOOLEAN SmmEntryPointRegistered;

-

- ///

- /// Boolean flag set to TRUE while an SMI is being processed by the SMM Core.

- ///

- BOOLEAN InSmm;

-

- ///

- /// This field is set by the SMM Core then the SMM Core is
initialized. This field is

- /// used by the SMM Base 2 Protocol and SMM Communication Protocol
implementations in

- /// the SMM IPL.

- ///

- EFI_SMM_SYSTEM_TABLE2 *Smst;

-

- ///

- /// This field is used by the SMM Communicatioon Protocol to pass a
buffer into

- /// a software SMI handler and for the software SMI handler to pass
a buffer back to

- /// the caller of the SMM Communication Protocol.

- ///

- VOID *CommunicationBuffer;

-

- ///

- /// This field is used by the SMM Communicatioon Protocol to pass
the size of a buffer,

- /// in bytes, into a software SMI handler and for the software SMI
handler to pass the

- /// size, in bytes, of a buffer back to the caller of the SMM Communication Protocol.

- ///

- UINTN BufferSize;

-

- ///

- /// This field is used by the SMM Communication Protocol to pass
the return status from

- /// a software SMI handler back to the caller of the SMM Communication Protocol.

- ///

- EFI_STATUS ReturnStatus;

-

- EFI_PHYSICAL_ADDRESS PiSmmCoreImageBase;

- UINT64 PiSmmCoreImageSize;

- EFI_PHYSICAL_ADDRESS PiSmmCoreEntryPoint;

-} SMM_CORE_PRIVATE_DATA;

-

-/**

- Called to initialize the memory service.

-

- @param SmramRangeCount Number of SMRAM Regions

- @param SmramRanges Pointer to SMRAM Descriptors

-

-**/

-VOID

-SmmInitializeMemoryServices (

- IN UINTN SmramRangeCount,

- IN EFI_SMRAM_DESCRIPTOR *SmramRanges

- );

-

-/**

- Allocates pages from the memory map.

-

- @param Type The type of allocation to perform

- @param MemoryType The type of memory to turn the allocated pages

- into

- @param NumberOfPages The number of pages to allocate

- @param Memory A pointer to receive the base allocated memory

- address

-

- @retval EFI_INVALID_PARAMETER Parameters violate checking rules defined in spec.

- @retval EFI_NOT_FOUND Could not allocate pages match the requirement.

- @retval EFI_OUT_OF_RESOURCES No enough pages to allocate.

- @retval EFI_SUCCESS Pages successfully allocated.

-

-**/

-EFI_STATUS

-EFIAPI

-SmmAllocatePages (

- IN EFI_ALLOCATE_TYPE Type,

- IN EFI_MEMORY_TYPE MemoryType,

- IN UINTN NumberOfPages,

- OUT EFI_PHYSICAL_ADDRESS *Memory

- );

-

-/**

- Frees previous allocated pages.

-

- @param Memory Base address of memory being freed

- @param NumberOfPages The number of pages to free

-

- @retval EFI_NOT_FOUND Could not find the entry that covers the range

- @retval EFI_INVALID_PARAMETER Address not aligned

- @return EFI_SUCCESS Pages successfully freed.

-

-**/

-EFI_STATUS

-EFIAPI

-SmmFreePages (

- IN EFI_PHYSICAL_ADDRESS Memory,

- IN UINTN NumberOfPages

- );

-

-/**

- Allocate pool of a particular type.

-

- @param PoolType Type of pool to allocate

- @param Size The amount of pool to allocate

- @param Buffer The address to return a pointer to the allocated

- pool

-

- @retval EFI_INVALID_PARAMETER PoolType not valid

- @retval EFI_OUT_OF_RESOURCES Size exceeds max pool size or allocation failed.

- @retval EFI_SUCCESS Pool successfully allocated.

-

-**/

-EFI_STATUS

-EFIAPI

-SmmAllocatePool (

- IN EFI_MEMORY_TYPE PoolType,

- IN UINTN Size,

- OUT VOID **Buffer

- );

-

-/**

- Frees pool.

-

- @param Buffer The allocated pool entry to free

-

- @retval EFI_INVALID_PARAMETER Buffer is not a valid value.

- @retval EFI_SUCCESS Pool successfully freed.

-

-**/

-EFI_STATUS

-EFIAPI

-SmmFreePool (

- IN VOID *Buffer

- );

-

-#endif


Re: [PATCH EDK2 v1 1/1] MdeModulePkg/HiiDatabaseDxe:remove dead code block

Dandan Bi
 

PR is created for this change:
https://github.com/tianocore/edk2/pull/1945




Thanks,
Dandan

-----Original Message-----
From: Bi, Dandan
Sent: Friday, August 27, 2021 11:58 AM
To: Wenyi Xie <xiewenyi2@...>; devel@edk2.groups.io; Wang, Jian
J <jian.j.wang@...>; Wu, Hao A <hao.a.wu@...>; Dong, Eric
<eric.dong@...>
Cc: songdongkuang@...
Subject: RE: [PATCH EDK2 v1 1/1] MdeModulePkg/HiiDatabaseDxe:remove
dead code block

Reviewed-by: Dandan Bi <dandan.bi@...>


Thanks,
Dandan

-----Original Message-----
From: Wenyi Xie <xiewenyi2@...>
Sent: Thursday, August 26, 2021 9:16 AM
To: devel@edk2.groups.io; Wang, Jian J <jian.j.wang@...>; Wu,
Hao A <hao.a.wu@...>; Bi, Dandan <dandan.bi@...>; Dong,
Eric <eric.dong@...>
Cc: songdongkuang@...; xiewenyi2@...
Subject: [PATCH EDK2 v1 1/1] MdeModulePkg/HiiDatabaseDxe:remove
dead
code block

As the if statement outside has confirmed that
BlockData->Name == NULL, so the if statement inside
is always false.

Cc: Jian J Wang <jian.j.wang@...>
Cc: Hao A Wu <hao.a.wu@...>
Cc: Dandan Bi <dandan.bi@...>
Cc: Eric Dong <eric.dong@...>
Signed-off-by: Wenyi Xie <xiewenyi2@...>
---
MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index d492b769d51c..17a914208c6d 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -2871,9 +2871,6 @@ ParseIfrData (
//
if ((BlockData->Name == NULL) && ((BlockData->Offset +
BlockData-
Width) > VarStorageData->Size)) {
Status = EFI_INVALID_PARAMETER;
- if (BlockData->Name != NULL) {
- FreePool (BlockData->Name);
- }
FreePool (BlockData);
goto Done;
}
--
2.20.1.windows.1


Re: [PATCH v6 15/29] OvmfPkg/MemEncryptSevLib: add support to validate system RAM

Gerd Hoffmann
 

Hi,

During the guest creation, the boot ROM memory is pre-validated by the
AMD-SEV firmware. The MemEncryptSevSnpValidateSystemRam() can be called
during the SEC and PEI phase to validate the detected system RAM.
[ for this and the following few patches ]

So, sev-snp and tdx have the same fundamental requirement here. Both
must track what the state of page ranges is. Both must talk to the vmm
before they can actually use pages. snp calls this "validate", tdx
"accept", but the underlying concept should be roughly comparable.

The vmm part obviously needs to be different. I can't see any good
reason why the state tracking and the state hand over from one boot
stage to the next (vmm -> sec -> pei -> dxe -> os) should be different
though. Having a common workflow makes long-term maintenance and
testing easier.

So, can you all look at each others patches and find common ground
here? It worked out well for the WorkArea, so *please* continue
that way.

This series seems to side-step most of this by validating all memory in
the pei stage, so there is nothing to hand over to dxe and os. Only the
range where the compressed code gets uncompressed to must be passed from
sec to pei. And there is the memory range registered for pre-validation
by the vmm.

Intels (long-term?) plan seems to be to do lazily validate/accept
memory, triggered by memory allocations, to reduce boot time. Which
implies the dxe memory management core needs to be aware of page state
and invoke an vmm-specific protocol to handle validation/acceptance.
Concept posted to the list earlier this week. Slides only so far, no
patches yet.

take care,
Gerd


Re: [PATCH v6 06/29] OvmfPkg/ResetVector: pre-validate the data pages used in SEC phase

Gerd Hoffmann
 

Hi,

During the guest creation time, the VMM encrypts the OVMF_CODE.fd using
the SEV-SNP firmware provided LAUNCH_UPDATE_DATA command. In addition to
encrypting the content, the command also validates the memory region.
This allows us to execute the code without going through the validation
sequence.
Hmm, tdx must handle this too.

+ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSnpHypervisorPreValidatedStart|0x0|UINT32|0x56
+ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSnpHypervisorPreValidatedEnd|0x0|UINT32|0x57
So maybe we should drop the "Snp" from the name here ...

; GUID (SEV-SNP boot block): bd39c0c2-2f8e-4243-83e8-1b74cebcb7d9
;
sevSnpBootBlockStart:
+ DD SNP_HV_VALIDATED_START
+ DD SNP_HV_VALIDATED_END
... and store the range which needs validation in another, not snp-specific block?

Jiewen? Min?

take care,
Gerd


Re: [PATCH v6 02/29] OvmfPkg: reserve CPUID page for SEV-SNP

Gerd Hoffmann
 

On Wed, Sep 01, 2021 at 11:16:19AM -0500, Brijesh Singh wrote:
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275

Platform features and capabilities are traditionally discovered via the
CPUID instruction. Hypervisors typically trap and emulate the CPUID
instruction for a variety of reasons. There are some cases where incorrect
CPUID information can potentially lead to a security issue. The SEV-SNP
firmware provides a feature to filter the CPUID results through the PSP.
The filtered CPUID values are saved on a special page for the guest to
consume. Reserve a page in MEMFD that will contain the results of
filtered CPUID values.
Is the format of the page documented somewhere?
Is this snp-specific? Or could this also be used without snp?

thanks,
Gerd


Re: [PATCH V5 2/2] OvmfPkg/ResetVector: Enable Intel TDX in ResetVector of Ovmf

Min Xu
 

On September 2, 2021 3:18 PM, Gerd Hoffmann wrote:
Hi,

Sure. And I think we should add proper 5-level paging support to
the current ovmf implementation instead of adding hacks to the tdx code.
My understanding is that we should first add 5-level paging support in
OVMF, right?

Well, the page table setup should be in common code not tdx code as 5-level
paging isn't something tdx-specific.
Agree.

I'd suggest to add this to OvmfPkg/ResetVector/Ia32/PageTables64.asm.
Reserve one more page, setup the tables for 5-level paging by inserting a
level 5 page directory.
In the current patch a page (defined by PcdOvmfSecGhcbPageTableBase) reserved in MEMFD
is used as the 5-level page directory.
Now One new page will be reserved in MEMFD to hold the level 5 page directory. Like below:
0x00C000|0x001000
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbBackupBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbBackupSize

+0x00D000|0x001000
+gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPml5Base|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPml5Size

When using 5-level paging let cr3 point to the first page (level 5 pagedir),
when using 4-level paging let cr3 point to the second page (level 4 pagedir).
Yes. CPUID.(EAX=07H, ECX=0):ECX[bit 16] will be used to check if 5-level paging
is supported.

Can be part of this patch series, just make it a separate patch for easier
review.
Sure.

Whenever we should enable 5-level paging even in non-tdx mode or use 5-
level paging only with tdx is a separate question. We can continue to use 4-
level paging in non-tdx mode for now and discuss that later.
Agree.

I'm not sure which implications this would have for booting older kernels,
when handing over control to a OS kernel without 5-level paging support but
5-level paging enabled (non-issue for tdx as this requires a new tdx-aware
guest kernel anyway ...).
Thanks!
Min


Re: [PATCH V5 2/2] OvmfPkg/ResetVector: Enable Intel TDX in ResetVector of Ovmf

Gerd Hoffmann
 

Hi,

Sure. And I think we should add proper 5-level paging support to the current
ovmf implementation instead of adding hacks to the tdx code.
My understanding is that we should first add 5-level paging support in OVMF, right?
Well, the page table setup should be in common code not tdx code as
5-level paging isn't something tdx-specific.

I'd suggest to add this to OvmfPkg/ResetVector/Ia32/PageTables64.asm.
Reserve one more page, setup the tables for 5-level paging by inserting
a level 5 page directory.

When using 5-level paging let cr3 point to the first page (level 5
pagedir), when using 4-level paging let cr3 point to the second page
(level 4 pagedir).

Can be part of this patch series, just make it a separate patch for
easier review.

Whenever we should enable 5-level paging even in non-tdx mode or use
5-level paging only with tdx is a separate question. We can continue to
use 4-level paging in non-tdx mode for now and discuss that later.

I'm not sure which implications this would have for booting older
kernels, when handing over control to a OS kernel without 5-level paging
support but 5-level paging enabled (non-issue for tdx as this requires a
new tdx-aware guest kernel anyway ...).

take care,
Gerd


Re: [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg in gate-build-job.yml and CISetting.py

duntan
 

Thanks a lot!

Thanks,
Dun

-----Original Message-----
From: gaoliming <gaoliming@...>
Sent: Thursday, September 2, 2021 10:10 AM
To: devel@edk2.groups.io; Tan, Dun <dun.tan@...>
Cc: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew' <Bret.Barkelew@...>; Kinney, Michael D <michael.d.kinney@...>
Subject: 回复: [edk2-devel] [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg in gate-build-job.yml and CISetting.py

I upload it again. Now, it has been merged.

Thanks
Liming
-----邮件原件-----
发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 duntan
发送时间: 2021年9月2日 9:24
收件人: gaoliming <gaoliming@...>; devel@edk2.groups.io
抄送: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew'
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>
主题: Re: [edk2-devel] [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg
in gate-build-job.yml and CISetting.py

Hi Liming,

I have seen the link to push my commits to master of edk2. The result
shows that the Ci test failed in ArmPlatformPkg. But I think my
commits will not affect the ArmPlatformPkg. Here is the link.
https://github.com/tianocore/edk2/pull/1940the
So is there anything I need to do?

Thanks,
Dun
-----Original Message-----
From: Tan, Dun
Sent: Wednesday, September 1, 2021 11:32 AM
To: gaoliming <gaoliming@...>; devel@edk2.groups.io
Cc: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew'
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>
Subject: RE: [edk2-devel] [PATCH 2/2] .azurepipelines: Add
UefiPayloadPkg in gate-build-job.yml and CISetting.py

Hi Liming,

The patch to fix the build issue has been merged this morning.
Would you please help to merge the two patches to enable core CI for
UefiPayloadPkg?

Thanks,
Dun
-----Original Message-----
From: gaoliming <gaoliming@...>
Sent: Tuesday, August 31, 2021 9:05 AM
To: Tan, Dun <dun.tan@...>; devel@edk2.groups.io
Cc: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew'
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>
Subject: 回复: [edk2-devel] [PATCH 2/2] .azurepipelines: Add
UefiPayloadPkg in gate-build-job.yml and CISetting.py

Dun:
This PR also includes one additional commit to fix the build issue.
Have you send the patch for it?

For this patch set, Reviewed-by: Liming Gao <gaoliming@...>.
It will be merged after the build issue has been fixed.

Thanks
Liming
-----邮件原件-----
发件人: Tan, Dun <dun.tan@...>
发送时间: 2021年8月30日 16:31
收件人: gaoliming <gaoliming@...>; devel@edk2.groups.io
抄送: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew'
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>
主题: RE: [edk2-devel] [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg
in gate-build-job.yml and CISetting.py

Hi Liming,

Here is the link of the PR to verify the change in Tiano EDKII. It
passed the CI by GCC and VS both.
https://github.com/tianocore/edk2/pull/1931

Thanks,
Dun
-----Original Message-----
From: gaoliming <gaoliming@...>
Sent: Monday, August 30, 2021 11:26 AM
To: devel@edk2.groups.io; Tan, Dun <dun.tan@...>
Cc: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew'
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>
Subject: 回复: [edk2-devel] [PATCH 2/2] .azurepipelines: Add
UefiPayloadPkg in gate-build-job.yml and CISetting.py

Dun:
I don't see the issues to enable UefiPayloadPkg in CI. Have you
created the private PR to verify this change?

Thanks
Liming
-----邮件原件-----
发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 duntan
发送时间: 2021年8月24日 17:24
收件人: devel@edk2.groups.io
抄送: Sean Brogan <sean.brogan@...>; Bret Barkelew
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>; Liming Gao
<gaoliming@...>
主题: Re: [edk2-devel] [PATCH 2/2] .azurepipelines: Add
UefiPayloadPkg in gate-build-job.yml and CISetting.py

Hi all,
Since the CI for UefiPayloadPkg is important to our develop
progress, would you please speed up the review process? Thanks a lot!

Thanks,
Dun Tan
-----Original Message-----
From: Tan, Dun <dun.tan@...>
Sent: Friday, August 20, 2021 2:44 PM
To: devel@edk2.groups.io
Cc: Sean Brogan <sean.brogan@...>; Bret Barkelew
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>; Liming Gao
<gaoliming@...>; Tan, Dun <dun.tan@...>
Subject: [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg in
gate-build-job.yml and CISetting.py

Add UefiPayloadPkg in gate-build-job.yml to enable Core ci for
UefiPayloadPkg.
Add UefiPayloadPkg to supported Packages in CISettings.

Cc: Sean Brogan <sean.brogan@...>
Cc: Bret Barkelew <Bret.Barkelew@...>
Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>
Signed-off-by: DunTan <dun.tan@...>
---
.azurepipelines/templates/pr-gate-build-job.yml | 3 +++
.pytool/CISettings.py | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.azurepipelines/templates/pr-gate-build-job.yml
b/.azurepipelines/templates/pr-gate-build-job.yml
index 207acc7631..d5b16c127f 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -48,6 +48,9 @@ jobs:
TARGET_SECURITY:
Build.Pkgs: 'SecurityPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET'
+ TARGET_UEFIPAYLOAD:
+ Build.Pkgs: 'UefiPayloadPkg'
+ Build.Targets: 'DEBUG,RELEASE,NO-TARGET'
TARGET_PLATFORMS:
# For Platforms only check code. Leave it to Platform CI
# to build them.
diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py index
96e6baa519..ce330e2c73 100644
--- a/.pytool/CISettings.py
+++ b/.pytool/CISettings.py
@@ -67,7 +67,8 @@ class Settings(CiBuildSettingsManager,
UpdateSettingsManager, SetupSettingsManag
"CryptoPkg",
"UnitTestFrameworkPkg",
"OvmfPkg",
- "RedfishPkg"
+ "RedfishPkg",
+ "UefiPayloadPkg"
)

def GetArchitecturesSupported(self):
--
2.31.1.windows.1










回复: [edk2-devel] [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg in gate-build-job.yml and CISetting.py

gaoliming
 

I upload it again. Now, it has been merged.

Thanks
Liming

-----邮件原件-----
发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 duntan
发送时间: 2021年9月2日 9:24
收件人: gaoliming <gaoliming@...>; devel@edk2.groups.io
抄送: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew'
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>
主题: Re: [edk2-devel] [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg in
gate-build-job.yml and CISetting.py

Hi Liming,

I have seen the link to push my commits to master of edk2. The result shows
that the Ci test failed in ArmPlatformPkg. But I think my commits will not
affect the ArmPlatformPkg. Here is the link.
https://github.com/tianocore/edk2/pull/1940the
So is there anything I need to do?

Thanks,
Dun
-----Original Message-----
From: Tan, Dun
Sent: Wednesday, September 1, 2021 11:32 AM
To: gaoliming <gaoliming@...>; devel@edk2.groups.io
Cc: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew'
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>
Subject: RE: [edk2-devel] [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg in
gate-build-job.yml and CISetting.py

Hi Liming,

The patch to fix the build issue has been merged this morning.
Would you please help to merge the two patches to enable core CI for
UefiPayloadPkg?

Thanks,
Dun
-----Original Message-----
From: gaoliming <gaoliming@...>
Sent: Tuesday, August 31, 2021 9:05 AM
To: Tan, Dun <dun.tan@...>; devel@edk2.groups.io
Cc: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew'
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>
Subject: 回复: [edk2-devel] [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg
in gate-build-job.yml and CISetting.py

Dun:
This PR also includes one additional commit to fix the build issue. Have you
send the patch for it?

For this patch set, Reviewed-by: Liming Gao <gaoliming@...>.
It will be merged after the build issue has been fixed.

Thanks
Liming
-----邮件原件-----
发件人: Tan, Dun <dun.tan@...>
发送时间: 2021年8月30日 16:31
收件人: gaoliming <gaoliming@...>; devel@edk2.groups.io
抄送: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew'
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>
主题: RE: [edk2-devel] [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg
in gate-build-job.yml and CISetting.py

Hi Liming,

Here is the link of the PR to verify the change in Tiano EDKII. It
passed the CI by GCC and VS both.
https://github.com/tianocore/edk2/pull/1931

Thanks,
Dun
-----Original Message-----
From: gaoliming <gaoliming@...>
Sent: Monday, August 30, 2021 11:26 AM
To: devel@edk2.groups.io; Tan, Dun <dun.tan@...>
Cc: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew'
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>
Subject: 回复: [edk2-devel] [PATCH 2/2] .azurepipelines: Add
UefiPayloadPkg in gate-build-job.yml and CISetting.py

Dun:
I don't see the issues to enable UefiPayloadPkg in CI. Have you
created the private PR to verify this change?

Thanks
Liming
-----邮件原件-----
发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 duntan
发送时间: 2021年8月24日 17:24
收件人: devel@edk2.groups.io
抄送: Sean Brogan <sean.brogan@...>; Bret Barkelew
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>; Liming Gao <gaoliming@...>
主题: Re: [edk2-devel] [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg
in gate-build-job.yml and CISetting.py

Hi all,
Since the CI for UefiPayloadPkg is important to our develop
progress, would you please speed up the review process? Thanks a lot!

Thanks,
Dun Tan
-----Original Message-----
From: Tan, Dun <dun.tan@...>
Sent: Friday, August 20, 2021 2:44 PM
To: devel@edk2.groups.io
Cc: Sean Brogan <sean.brogan@...>; Bret Barkelew
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>; Liming Gao <gaoliming@...>;
Tan, Dun <dun.tan@...>
Subject: [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg in
gate-build-job.yml and CISetting.py

Add UefiPayloadPkg in gate-build-job.yml to enable Core ci for
UefiPayloadPkg.
Add UefiPayloadPkg to supported Packages in CISettings.

Cc: Sean Brogan <sean.brogan@...>
Cc: Bret Barkelew <Bret.Barkelew@...>
Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>
Signed-off-by: DunTan <dun.tan@...>
---
.azurepipelines/templates/pr-gate-build-job.yml | 3 +++
.pytool/CISettings.py | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.azurepipelines/templates/pr-gate-build-job.yml
b/.azurepipelines/templates/pr-gate-build-job.yml
index 207acc7631..d5b16c127f 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -48,6 +48,9 @@ jobs:
TARGET_SECURITY:
Build.Pkgs: 'SecurityPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET'
+ TARGET_UEFIPAYLOAD:
+ Build.Pkgs: 'UefiPayloadPkg'
+ Build.Targets: 'DEBUG,RELEASE,NO-TARGET'
TARGET_PLATFORMS:
# For Platforms only check code. Leave it to Platform CI
# to build them.
diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py index
96e6baa519..ce330e2c73 100644
--- a/.pytool/CISettings.py
+++ b/.pytool/CISettings.py
@@ -67,7 +67,8 @@ class Settings(CiBuildSettingsManager,
UpdateSettingsManager, SetupSettingsManag
"CryptoPkg",
"UnitTestFrameworkPkg",
"OvmfPkg",
- "RedfishPkg"
+ "RedfishPkg",
+ "UefiPayloadPkg"
)

def GetArchitecturesSupported(self):
--
2.31.1.windows.1










Re: [PATCH v5 0/8] Ovmf: Disable the TPM2 platform hierarchy

Stefan Berger
 

I apologize that you see this 3 times now. I thought something went wrong with the smtp delivery since the messages didn't appear as fast as expected, but obviously that wasn't the case and now it really went wrong.

  Stefan


Re: [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg in gate-build-job.yml and CISetting.py

duntan
 

Hi Liming,

I have seen the link to push my commits to master of edk2. The result shows that the Ci test failed in ArmPlatformPkg. But I think my commits will not affect the ArmPlatformPkg. Here is the link.
https://github.com/tianocore/edk2/pull/1940the
So is there anything I need to do?

Thanks,
Dun

-----Original Message-----
From: Tan, Dun
Sent: Wednesday, September 1, 2021 11:32 AM
To: gaoliming <gaoliming@...>; devel@edk2.groups.io
Cc: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew' <Bret.Barkelew@...>; Kinney, Michael D <michael.d.kinney@...>
Subject: RE: [edk2-devel] [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg in gate-build-job.yml and CISetting.py

Hi Liming,

The patch to fix the build issue has been merged this morning.
Would you please help to merge the two patches to enable core CI for UefiPayloadPkg?

Thanks,
Dun
-----Original Message-----
From: gaoliming <gaoliming@...>
Sent: Tuesday, August 31, 2021 9:05 AM
To: Tan, Dun <dun.tan@...>; devel@edk2.groups.io
Cc: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew' <Bret.Barkelew@...>; Kinney, Michael D <michael.d.kinney@...>
Subject: 回复: [edk2-devel] [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg in gate-build-job.yml and CISetting.py

Dun:
This PR also includes one additional commit to fix the build issue. Have you send the patch for it?

For this patch set, Reviewed-by: Liming Gao <gaoliming@...>. It will be merged after the build issue has been fixed.

Thanks
Liming
-----邮件原件-----
发件人: Tan, Dun <dun.tan@...>
发送时间: 2021年8月30日 16:31
收件人: gaoliming <gaoliming@...>; devel@edk2.groups.io
抄送: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew'
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>
主题: RE: [edk2-devel] [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg
in gate-build-job.yml and CISetting.py

Hi Liming,

Here is the link of the PR to verify the change in Tiano EDKII. It
passed the CI by GCC and VS both.
https://github.com/tianocore/edk2/pull/1931

Thanks,
Dun
-----Original Message-----
From: gaoliming <gaoliming@...>
Sent: Monday, August 30, 2021 11:26 AM
To: devel@edk2.groups.io; Tan, Dun <dun.tan@...>
Cc: 'Sean Brogan' <sean.brogan@...>; 'Bret Barkelew'
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>
Subject: 回复: [edk2-devel] [PATCH 2/2] .azurepipelines: Add
UefiPayloadPkg in gate-build-job.yml and CISetting.py

Dun:
I don't see the issues to enable UefiPayloadPkg in CI. Have you
created the private PR to verify this change?

Thanks
Liming
-----邮件原件-----
发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 duntan
发送时间: 2021年8月24日 17:24
收件人: devel@edk2.groups.io
抄送: Sean Brogan <sean.brogan@...>; Bret Barkelew
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>; Liming Gao <gaoliming@...>
主题: Re: [edk2-devel] [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg
in gate-build-job.yml and CISetting.py

Hi all,
Since the CI for UefiPayloadPkg is important to our develop
progress, would you please speed up the review process? Thanks a lot!

Thanks,
Dun Tan
-----Original Message-----
From: Tan, Dun <dun.tan@...>
Sent: Friday, August 20, 2021 2:44 PM
To: devel@edk2.groups.io
Cc: Sean Brogan <sean.brogan@...>; Bret Barkelew
<Bret.Barkelew@...>; Kinney, Michael D
<michael.d.kinney@...>; Liming Gao <gaoliming@...>;
Tan, Dun <dun.tan@...>
Subject: [PATCH 2/2] .azurepipelines: Add UefiPayloadPkg in
gate-build-job.yml and CISetting.py

Add UefiPayloadPkg in gate-build-job.yml to enable Core ci for
UefiPayloadPkg.
Add UefiPayloadPkg to supported Packages in CISettings.

Cc: Sean Brogan <sean.brogan@...>
Cc: Bret Barkelew <Bret.Barkelew@...>
Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>
Signed-off-by: DunTan <dun.tan@...>
---
.azurepipelines/templates/pr-gate-build-job.yml | 3 +++
.pytool/CISettings.py | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.azurepipelines/templates/pr-gate-build-job.yml
b/.azurepipelines/templates/pr-gate-build-job.yml
index 207acc7631..d5b16c127f 100644
--- a/.azurepipelines/templates/pr-gate-build-job.yml
+++ b/.azurepipelines/templates/pr-gate-build-job.yml
@@ -48,6 +48,9 @@ jobs:
TARGET_SECURITY:
Build.Pkgs: 'SecurityPkg'
Build.Targets: 'DEBUG,RELEASE,NO-TARGET'
+ TARGET_UEFIPAYLOAD:
+ Build.Pkgs: 'UefiPayloadPkg'
+ Build.Targets: 'DEBUG,RELEASE,NO-TARGET'
TARGET_PLATFORMS:
# For Platforms only check code. Leave it to Platform CI
# to build them.
diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py index
96e6baa519..ce330e2c73 100644
--- a/.pytool/CISettings.py
+++ b/.pytool/CISettings.py
@@ -67,7 +67,8 @@ class Settings(CiBuildSettingsManager,
UpdateSettingsManager, SetupSettingsManag
"CryptoPkg",
"UnitTestFrameworkPkg",
"OvmfPkg",
- "RedfishPkg"
+ "RedfishPkg",
+ "UefiPayloadPkg"
)

def GetArchitecturesSupported(self):
--
2.31.1.windows.1





Re: [PATCH V5 2/2] OvmfPkg/ResetVector: Enable Intel TDX in ResetVector of Ovmf

Min Xu
 

On August 31, 2021 1:35 PM, Gerd Hoffmann wrote:
On Tue, Aug 31, 2021 at 03:09:08AM +0000, Xu, Min M wrote:
On Monday, August 30, 2021 3:41 PM, Gerd Hoffmann wrote:
Hi,

_TdxPageTable:
If 5-level page table is supported (GPAW is 52), a top level page
directory pointers (1 * 256TB entry) is generated in this page.
_OvmfPageTable:
Initial page table for standard Ovmf.
Hmm, isn't 5-level paging independent from TDX? Why mix the two?

I think a top level page directory should be added to the standard
ovmf initial page tables instead, and setting up 5-level paging
should not happen in tdx- specific code.
In current Ovmf implementation
(OvmfPkg/ResetVector/Ia32/PageTables64.asm)
there are 6 pages reserved for initial page tables. It doesn't support 5-level
paging.

Sure. And I think we should add proper 5-level paging support to the current
ovmf implementation instead of adding hacks to the tdx code.
My understanding is that we should first add 5-level paging support in OVMF, right?
I am planning to add 5-level paging in OvmfPkgX64.dsc. Any comments?

take care,
Gerd





[PATCH v5 8/8] ArmVirtPkg: Disable the TPM2 platform hierarchy

Stefan Berger <stefanb@...>
 

Use the newly added function to disable the TPM2 platform hierarchy.

Signed-off-by: Stefan Berger <stefanb@...>
---
ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c | 6 ++++++
.../PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 +
2 files changed, 7 insertions(+)

diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVi=
rtPkg/Library/PlatformBootManagerLib/PlatformBm.c
index 69448ff65b..456f9fb4cb 100644
--- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
+++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
@@ -16,6 +16,7 @@
#include <Library/PcdLib.h>=0D
#include <Library/PlatformBmPrintScLib.h>=0D
#include <Library/QemuBootOrderLib.h>=0D
+#include <Library/TpmPlatformHierarchyLib.h>=0D
#include <Library/UefiBootManagerLib.h>=0D
#include <Protocol/DevicePath.h>=0D
#include <Protocol/FirmwareVolume2.h>=0D
@@ -832,6 +833,11 @@ PlatformBootManagerAfterConsole (
EfiBootManagerConnectAll ();=0D
}=0D
=0D
+ //=0D
+ // Disable the TPM 2 platform hierarchy=0D
+ //=0D
+ ConfigureTpmPlatformHierarchy ();=0D
+=0D
//=0D
// Enumerate all possible boot options, then filter and reorder them bas=
ed on=0D
// the QEMU configuration.=0D
diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerL=
ib.inf b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.i=
nf
index 9f54224d3e..997eb1a442 100644
--- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -48,6 +48,7 @@
QemuBootOrderLib=0D
QemuLoadImageLib=0D
ReportStatusCodeLib=0D
+ TpmPlatformHierarchyLib=0D
UefiBootManagerLib=0D
UefiBootServicesTableLib=0D
UefiLib=0D
--=20
2.31.1


[PATCH v5 3/8] SecurityPkg/TPM: Add a NULL implementation of TpmPlatformHierarchyLib

Stefan Berger <stefanb@...>
 

Add a NULL implementation of the library class TpmPlatformHierarchyLib

Signed-off-by: Stefan Berger <stefanb@...>
---
.../PeiDxeTpmPlatformHierarchyLib.c | 19 ++++++++++++
.../PeiDxeTpmPlatformHierarchyLib.inf | 31 +++++++++++++++++++
2 files changed, 50 insertions(+)
create mode 100644 SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/P=
eiDxeTpmPlatformHierarchyLib.c
create mode 100644 SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/P=
eiDxeTpmPlatformHierarchyLib.inf

diff --git a/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTp=
mPlatformHierarchyLib.c b/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib=
Null/PeiDxeTpmPlatformHierarchyLib.c
new file mode 100644
index 0000000000..b63729594f
--- /dev/null
+++ b/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatfo=
rmHierarchyLib.c
@@ -0,0 +1,19 @@
+/** @file=0D
+ Null TPM Platform Hierarchy configuration library.=0D
+=0D
+ This library provides stub functions for customizing the TPM's Platfor=
m Hierarchy.=0D
+=0D
+ Copyright (c) 2021, IBM Corporation.=0D
+ SPDX-License-Identifier: BSD-2-Clause-Patent=0D
+=0D
+**/=0D
+=0D
+#include <Uefi.h>=0D
+=0D
+VOID=0D
+EFIAPI=0D
+ConfigureTpmPlatformHierarchy (=0D
+ )=0D
+{=0D
+ /* no nothing */=0D
+}=0D
diff --git a/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTp=
mPlatformHierarchyLib.inf b/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyL=
ibNull/PeiDxeTpmPlatformHierarchyLib.inf
new file mode 100644
index 0000000000..2a3597004e
--- /dev/null
+++ b/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatfo=
rmHierarchyLib.inf
@@ -0,0 +1,31 @@
+### @file=0D
+#=0D
+# TPM Platform Hierarchy configuration library.=0D
+#=0D
+# This library provides functions for customizing the TPM's Platform Hie=
rarchy=0D
+# Authorization Value (platformAuth) and Platform Hierarchy Authorizatio=
n=0D
+# Policy (platformPolicy) can be defined through this function.=0D
+#=0D
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>=0D
+# Copyright (c) Microsoft Corporation.<BR>=0D
+#=0D
+# SPDX-License-Identifier: BSD-2-Clause-Patent=0D
+#=0D
+###=0D
+=0D
+[Defines]=0D
+ INF_VERSION =3D 0x00010005=0D
+ BASE_NAME =3D PeiDxeTpmPlatformHierarchyLibNull=0D
+ FILE_GUID =3D 7794F92C-4E8E-4E57-9E4A-49A0764C7D73=
=0D
+ MODULE_TYPE =3D PEIM=0D
+ VERSION_STRING =3D 1.0=0D
+ LIBRARY_CLASS =3D TpmPlatformHierarchyLib|PEIM DXE_DRIV=
ER=0D
+=0D
+[LibraryClasses]=0D
+ BaseLib=0D
+=0D
+[Packages]=0D
+ MdePkg/MdePkg.dec=0D
+=0D
+[Sources]=0D
+ PeiDxeTpmPlatformHierarchyLib.c=0D
--=20
2.31.1


[PATCH v5 5/8] OvmfPkg: Reference new TPM classes in the build system for compilation

Stefan Berger <stefanb@...>
 

Compile the added TPM related code now.

Signed-off-by: Stefan Berger <stefanb@...>
---
OvmfPkg/AmdSev/AmdSevX64.dsc | 3 +++
OvmfPkg/Bhyve/BhyveX64.dsc | 1 +
.../Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 +
OvmfPkg/OvmfPkgIa32.dsc | 3 +++
OvmfPkg/OvmfPkgIa32X64.dsc | 3 +++
OvmfPkg/OvmfPkgX64.dsc | 3 +++
OvmfPkg/OvmfXen.dsc | 1 +
7 files changed, 15 insertions(+)

diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc
index e6cd10b759..6b582626ff 100644
--- a/OvmfPkg/AmdSev/AmdSevX64.dsc
+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc
@@ -209,9 +209,11 @@
Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeT=
cg2PhysicalPresenceLib.inf=0D
Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibN=
ull.inf=0D
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure=
mentLib.inf=0D
+ TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLi=
b/PeiDxeTpmPlatformHierarchyLib.inf=0D
!else=0D
Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeT=
cg2PhysicalPresenceLib.inf=0D
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem=
entLibNull.inf=0D
+ TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLi=
bNull/PeiDxeTpmPlatformHierarchyLib.inf=0D
!endif=0D
=0D
[LibraryClasses.common]=0D
@@ -836,6 +838,7 @@
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf {=0D
<LibraryClasses>=0D
Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibR=
outerDxe.inf=0D
+ TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarc=
hyLib/PeiDxeTpmPlatformHierarchyLib.inf=0D
NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf=0D
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCrypt=
oRouterDxe.inf=0D
NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf=
=0D
diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc
index d8fe607d1c..1b8ec23847 100644
--- a/OvmfPkg/Bhyve/BhyveX64.dsc
+++ b/OvmfPkg/Bhyve/BhyveX64.dsc
@@ -224,6 +224,7 @@
=0D
Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeT=
cg2PhysicalPresenceLib.inf=0D
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem=
entLibNull.inf=0D
+ TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLi=
bNull/PeiDxeTpmPlatformHierarchyLib.inf=0D
=0D
[LibraryClasses.common]=0D
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf=0D
diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.=
inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
index c249a3cf1e..f2de7f5250 100644
--- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -55,6 +55,7 @@
UefiLib=0D
PlatformBmPrintScLib=0D
Tcg2PhysicalPresenceLib=0D
+ TpmPlatformHierarchyLib=0D
XenPlatformLib=0D
=0D
[Pcd]=0D
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index d1d92c97ba..374a1ea652 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -235,9 +235,11 @@
Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeT=
cg2PhysicalPresenceLib.inf=0D
Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibN=
ull.inf=0D
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure=
mentLib.inf=0D
+ TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLi=
b/PeiDxeTpmPlatformHierarchyLib.inf=0D
!else=0D
Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeT=
cg2PhysicalPresenceLib.inf=0D
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem=
entLibNull.inf=0D
+ TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLi=
bNull/PeiDxeTpmPlatformHierarchyLib.inf=0D
!endif=0D
=0D
[LibraryClasses.common]=0D
@@ -711,6 +713,7 @@
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf {=0D
<LibraryClasses>=0D
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCrypt=
oRouterPei.inf=0D
+ TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarc=
hyLib/PeiDxeTpmPlatformHierarchyLib.inf=0D
NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf=
=0D
NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256=
.inf=0D
NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384=
.inf=0D
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index a467ab7090..7b7dffcd94 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -239,9 +239,11 @@
Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeT=
cg2PhysicalPresenceLib.inf=0D
Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibN=
ull.inf=0D
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure=
mentLib.inf=0D
+ TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLi=
b/PeiDxeTpmPlatformHierarchyLib.inf=0D
!else=0D
Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeT=
cg2PhysicalPresenceLib.inf=0D
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem=
entLibNull.inf=0D
+ TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLi=
bNull/PeiDxeTpmPlatformHierarchyLib.inf=0D
!endif=0D
=0D
[LibraryClasses.common]=0D
@@ -1034,6 +1036,7 @@
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf {=0D
<LibraryClasses>=0D
Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibR=
outerDxe.inf=0D
+ TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarc=
hyLib/PeiDxeTpmPlatformHierarchyLib.inf=0D
NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf=0D
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCrypt=
oRouterDxe.inf=0D
NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf=
=0D
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index e56b83d95e..34c6e833e4 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -239,9 +239,11 @@
Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeT=
cg2PhysicalPresenceLib.inf=0D
Tcg2PpVendorLib|SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibN=
ull.inf=0D
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure=
mentLib.inf=0D
+ TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLi=
b/PeiDxeTpmPlatformHierarchyLib.inf=0D
!else=0D
Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeT=
cg2PhysicalPresenceLib.inf=0D
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem=
entLibNull.inf=0D
+ TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLi=
bNull/PeiDxeTpmPlatformHierarchyLib.inf=0D
!endif=0D
=0D
[LibraryClasses.common]=0D
@@ -723,6 +725,7 @@
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf {=0D
<LibraryClasses>=0D
HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCrypt=
oRouterPei.inf=0D
+ TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarc=
hyLib/PeiDxeTpmPlatformHierarchyLib.inf=0D
NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf=
=0D
NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256=
.inf=0D
NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384=
.inf=0D
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
index 1a9c06c164..4541d1aaf8 100644
--- a/OvmfPkg/OvmfXen.dsc
+++ b/OvmfPkg/OvmfXen.dsc
@@ -216,6 +216,7 @@
=0D
Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeT=
cg2PhysicalPresenceLib.inf=0D
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem=
entLibNull.inf=0D
+ TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLi=
bNull/PeiDxeTpmPlatformHierarchyLib.inf=0D
RealTimeClockLib|OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib=
.inf=0D
TimeBaseLib|EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf=0D
!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE)=0D
--=20
2.31.1

10841 - 10860 of 90922