public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Min Xu" <min.m.xu@intel.com>
To: devel@edk2.groups.io
Cc: Min Xu <min.m.xu@intel.com>, Eric Dong <eric.dong@intel.com>,
	Ray Ni <ray.ni@intel.com>, Brijesh Singh <brijesh.singh@amd.com>,
	Erdem Aktas <erdemaktas@google.com>,
	James Bottomley <jejb@linux.ibm.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: [PATCH V2 3/6] OvmfPkg: Add MpInitLibDepLib
Date: Sat,  7 May 2022 09:36:20 +0800	[thread overview]
Message-ID: <fe5f72025550335727573926b0808ef14ddd18ca.1651885849.git.min.m.xu@intel.com> (raw)
In-Reply-To: <cover.1651885849.git.min.m.xu@intel.com>

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

There are 4 MpInitLibDepLib:
 - PeiMpInitLibMpDepLib:
   MpInitLib multi-processor dependency
 - PeiMpInitLibUpDepLib:
   MpInitLib unique-processor dependency
 - DxeMpInitLibMpDepLib:
   MpInitLib multi-processor dependency
 - DxeMpInitLibUpDepLib
   MpInitLib unique-processor dependency

The Pei libs depend on the corresponding PPI. The Dxe libs depend on the
corresponding Protocol.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
---
 .../MpInitLibDepLib/DxeMpInitLibMpDepLib.inf  | 27 +++++++++++++++++++
 .../MpInitLibDepLib/DxeMpInitLibUpDepLib.inf  | 27 +++++++++++++++++++
 .../Library/MpInitLibDepLib/MpInitLibDepLib.c | 23 ++++++++++++++++
 .../MpInitLibDepLib/PeiMpInitLibMpDepLib.inf  | 27 +++++++++++++++++++
 .../MpInitLibDepLib/PeiMpInitLibUpDepLib.inf  | 27 +++++++++++++++++++
 5 files changed, 131 insertions(+)
 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

diff --git a/OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibMpDepLib.inf b/OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibMpDepLib.inf
new file mode 100644
index 000000000000..97a8a52d4c29
--- /dev/null
+++ b/OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibMpDepLib.inf
@@ -0,0 +1,27 @@
+## @file
+#
+#  Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  INF_VERSION                    = 0x00010005
+  BASE_NAME                      = DxeMpInitLibMpDepLib
+  FILE_GUID                      = 57461928-290D-4FEC-A439-377420A829BE
+  MODULE_TYPE                    = BASE
+  VERSION_STRING                 = 1.0
+  LIBRARY_CLASS                  = NULL
+
+[LibraryClasses]
+  BaseLib
+
+[Packages]
+  MdePkg/MdePkg.dec
+  OvmfPkg/OvmfPkg.dec
+
+[Sources]
+  MpInitLibDepLib.c
+
+[Depex]
+  gEfiMpInitLibMpDepProtocolGuid
\ No newline at end of file
diff --git a/OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibUpDepLib.inf b/OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibUpDepLib.inf
new file mode 100644
index 000000000000..1241fa5de2fa
--- /dev/null
+++ b/OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibUpDepLib.inf
@@ -0,0 +1,27 @@
+## @file
+#
+#  Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  INF_VERSION                    = 0x00010005
+  BASE_NAME                      = DxeMpInitLibUpDepLib
+  FILE_GUID                      = 95FA4B7B-930E-4755-A9B7-10F0716DA374
+  MODULE_TYPE                    = BASE
+  VERSION_STRING                 = 1.0
+  LIBRARY_CLASS                  = NULL
+
+[LibraryClasses]
+  BaseLib
+
+[Packages]
+  MdePkg/MdePkg.dec
+  OvmfPkg/OvmfPkg.dec
+
+[Sources]
+  MpInitLibDepLib.c
+
+[Depex]
+  gEfiMpInitLibUpDepProtocolGuid
\ No newline at end of file
diff --git a/OvmfPkg/Library/MpInitLibDepLib/MpInitLibDepLib.c b/OvmfPkg/Library/MpInitLibDepLib/MpInitLibDepLib.c
new file mode 100644
index 000000000000..a7501bd9d960
--- /dev/null
+++ b/OvmfPkg/Library/MpInitLibDepLib/MpInitLibDepLib.c
@@ -0,0 +1,23 @@
+/** @file
+
+  Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#include <Uefi.h>
+
+/**
+This is null constructor which always return EFI_SUCCESS.
+@param  ImageHandle   The firmware allocated handle for the EFI image.
+@param  SystemTable   A pointer to the EFI System Table.
+@retval EFI_SUCCESS   Always return EFI_SUCCESS
+**/
+EFI_STATUS
+EFIAPI
+MpInitLibDepContructor (
+  IN EFI_HANDLE        ImageHandle,
+  IN EFI_SYSTEM_TABLE  *SystemTable
+  )
+{
+  return EFI_SUCCESS;
+}
diff --git a/OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibMpDepLib.inf b/OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibMpDepLib.inf
new file mode 100644
index 000000000000..3a3c24ecd142
--- /dev/null
+++ b/OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibMpDepLib.inf
@@ -0,0 +1,27 @@
+## @file
+#
+#  Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  INF_VERSION                    = 0x00010005
+  BASE_NAME                      = PeiMpInitLibMpDepLib
+  FILE_GUID                      = D14271DE-FBEA-4AAC-9633-7143DCD7C1C8
+  MODULE_TYPE                    = BASE
+  VERSION_STRING                 = 1.0
+  LIBRARY_CLASS                  = NULL
+
+[LibraryClasses]
+  BaseLib
+
+[Packages]
+  MdePkg/MdePkg.dec
+  OvmfPkg/OvmfPkg.dec
+
+[Sources]
+  MpInitLibDepLib.c
+
+[Depex]
+  gEfiPeiMpInitLibMpDepPpiGuid
\ No newline at end of file
diff --git a/OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibUpDepLib.inf b/OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibUpDepLib.inf
new file mode 100644
index 000000000000..4a55a242a6f1
--- /dev/null
+++ b/OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibUpDepLib.inf
@@ -0,0 +1,27 @@
+## @file
+#
+#  Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  INF_VERSION                    = 0x00010005
+  BASE_NAME                      = MpInitLibUpDepLib
+  FILE_GUID                      = C64B5035-FA3D-4215-ADBF-9C9F3F458E30
+  MODULE_TYPE                    = BASE
+  VERSION_STRING                 = 1.0
+  LIBRARY_CLASS                  = NULL
+
+[LibraryClasses]
+  BaseLib
+
+[Packages]
+  MdePkg/MdePkg.dec
+  OvmfPkg/OvmfPkg.dec
+
+[Sources]
+  MpInitLibDepLib.c
+
+[Depex]
+  gEfiPeiMpInitLibUpDepPpiGuid
\ No newline at end of file
-- 
2.29.2.windows.2


  parent reply	other threads:[~2022-05-07  1:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-07  1:36 [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image Min Xu
2022-05-07  1:36 ` [PATCH V2 1/6] UefiCpuPkg: Revert "UefiCpuPkg: Enable Tdx support in MpInitLib" Min Xu
2022-05-07  5:30   ` Ni, Ray
2022-05-07  1:36 ` [PATCH V2 2/6] OvmfPkg: Add MpInitLibDepLib related PPI/Protocol definitions Min Xu
2022-05-07  1:36 ` Min Xu [this message]
2022-05-07  1:36 ` [PATCH V2 4/6] OvmfPkg/Sec: Install MpInitLibDepLib PPIs in SecMain.c Min Xu
2022-05-07  1:36 ` [PATCH V2 5/6] OvmfPkg/TdxDxe: Install MpInitLibDepLib protocols Min Xu
2022-05-07  1:36 ` [PATCH V2 6/6] OvmfPkg: Enable 2 different CpuMpPei and CpuDxe drivers Min Xu
2022-05-07  5:30 ` [PATCH V2 0/6] Support 2 CpuMpPei/CpuDxe in One image Ni, Ray
2022-05-09 12:44 ` Min Xu
2022-05-09 17:29   ` Lendacky, Thomas
2022-05-09 23:37     ` Min Xu
2022-05-10 13:22       ` Lendacky, Thomas
2022-05-10 15:16       ` Lendacky, Thomas
2022-05-10  9:26   ` Gerd Hoffmann
2022-05-11  0:13     ` Min Xu
2022-05-11  8:47   ` Yao, Jiewen
2022-05-11  8:47   ` Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe5f72025550335727573926b0808ef14ddd18ca.1651885849.git.min.m.xu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox