[edk2-devel] [PATCH 0/6] Support 2 CpuMpPei/CpuDxe in One image

Min Xu min.m.xu at intel.com
Thu May 5 14:43:13 UTC 2022


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

Above BZ reports an issue that commit 88da06ca triggers ASSERT in some
scenario. This patch-set is to fix this issue.

As commit 88da06ca describes TDVF BSP and APs are simplied and it can
simply use MpInitLibUp instead of MpInitLib. To achieve this goal, we
include 2 CpuMpPei/CpuDxe drivers in OvmfPkgX64 and IntelTdxX64. This
is done by setting different FILE_GUID to these drivers (of the same
name). In the other hand, we import a set of MpInitLibDepLib. These
libs simply depend on the PPI/Protocols. While these PPI/Protocols are
installed according to the guest type.

This patch-set is a replacement of
https://edk2.groups.io/g/devel/message/89381. Please see the dicussion in
 - https://edk2.groups.io/g/devel/message/89382
 - https://edk2.groups.io/g/devel/message/89455
 - https://edk2.groups.io/g/devel/message/89522
 - https://edk2.groups.io/g/devel/message/89535

The code is at: https://github.com/mxu9/edk2/tree/Rework-MpInitLib

Cc: Eric Dong <eric.dong at intel.com>
Cc: Ray Ni <ray.ni at intel.com>
Cc: Brijesh Singh <brijesh.singh at amd.com>
Cc: Erdem Aktas <erdemaktas at google.com>
Cc: James Bottomley <jejb at linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao at intel.com>
Cc: Tom Lendacky <thomas.lendacky at amd.com>
Cc: Gerd Hoffmann <kraxel at redhat.com>
Signed-off-by: Min Xu <min.m.xu at intel.com>

*** BLURB HERE ***

Min M Xu (4):
  UefiCpuPkg: Revert "UefiCpuPkg: Enable Tdx support in MpInitLib"
  OvmfPkg/Sec: Install MpInitLibDepLib PPIs in SecMain.c
  OvmfPkg/TdxDxe: Install MpInitLibDepLib protocols
  OvmfPkg: Enable 2 different CpuMpPei and CpuDxe drivers

Min Xu (2):
  OvmfPkg: Add MpInitLibDepLib related PPI/Protocol definitions
  OvmfPkg: Add MpInitLibDepLib

 OvmfPkg/Include/Ppi/MpInitLibDep.h            |  28 +++++
 .../Include/Protocol/MpInitLibDepProtocols.h  |  28 +++++
 OvmfPkg/IntelTdx/IntelTdxX64.dsc              |  23 +++-
 OvmfPkg/IntelTdx/IntelTdxX64.fdf              |   5 +-
 .../MpInitLibDepLib/DxeMpInitLibMpDepLib.inf  |  27 +++++
 .../MpInitLibDepLib/DxeMpInitLibUpDepLib.inf  |  27 +++++
 .../Library/MpInitLibDepLib/MpInitLibDepLib.c |  23 ++++
 .../MpInitLibDepLib/PeiMpInitLibMpDepLib.inf  |  27 +++++
 .../MpInitLibDepLib/PeiMpInitLibUpDepLib.inf  |  27 +++++
 OvmfPkg/OvmfPkg.dec                           |   5 +
 OvmfPkg/OvmfPkgX64.dsc                        |  45 +++++++-
 OvmfPkg/OvmfPkgX64.fdf                        |   8 +-
 OvmfPkg/Sec/SecMain.c                         |  30 ++++-
 OvmfPkg/Sec/SecMain.inf                       |   2 +
 OvmfPkg/TdxDxe/TdxDxe.c                       |  22 +++-
 OvmfPkg/TdxDxe/TdxDxe.inf                     |   2 +
 UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   3 -
 UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h     |  69 ------------
 UefiCpuPkg/Library/MpInitLib/MpLib.c          |  63 +----------
 UefiCpuPkg/Library/MpInitLib/MpLibTdx.c       | 106 ------------------
 UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c   |  69 ------------
 UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf |   3 -
 22 files changed, 325 insertions(+), 317 deletions(-)
 create mode 100644 OvmfPkg/Include/Ppi/MpInitLibDep.h
 create mode 100644 OvmfPkg/Include/Protocol/MpInitLibDepProtocols.h
 create mode 100644 OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibMpDepLib.inf
 create mode 100644 OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibUpDepLib.inf
 create mode 100644 OvmfPkg/Library/MpInitLibDepLib/MpInitLibDepLib.c
 create mode 100644 OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibMpDepLib.inf
 create mode 100644 OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibUpDepLib.inf
 delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpIntelTdx.h
 delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdx.c
 delete mode 100644 UefiCpuPkg/Library/MpInitLib/MpLibTdxNull.c

-- 
2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89536): https://edk2.groups.io/g/devel/message/89536
Mute This Topic: https://groups.io/mt/90912387/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list