]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: Add MpInitLibDepLib
authorMin M Xu <min.m.xu@intel.com>
Sat, 7 May 2022 01:36:20 +0000 (09:36 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 11 May 2022 08:40:53 +0000 (08:40 +0000)
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>
Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibMpDepLib.inf [new file with mode: 0644]
OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibUpDepLib.inf [new file with mode: 0644]
OvmfPkg/Library/MpInitLibDepLib/MpInitLibDepLib.c [new file with mode: 0644]
OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibMpDepLib.inf [new file with mode: 0644]
OvmfPkg/Library/MpInitLibDepLib/PeiMpInitLibUpDepLib.inf [new file with mode: 0644]

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