From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web11.11878.1651761831263961075 for ; Thu, 05 May 2022 07:43:52 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=cgxZxmHX; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651761831; x=1683297831; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0Nk0PSpyONZFptWnRIm81LIffu2Iil6reksiVpFubCU=; b=cgxZxmHXIinyfOk28lfDEiReMMK7OLbr9jNSJkmd3F5X4hl0s/z6FiqL oem9YP4i1UDs8dO6uebfS5OQrFeSg3AjnbcNvoucOVCZrI5nB8/BUWUZx G3N377FM/j9fnLCDL75XLwWV7JjCa9ULKKf9xwFy8j1d3rpAzglaXGC4I sNqngGrvL4HVVNJcwHewb/VdmyA44umdUDCvST+P8eh5h8uY7SRhybqff LNjAfwg8uCqR8kcV/VbETqHf2iN7RnB4MWh4BGAMhU9TAjD5J6pPVBFIX tHRWByjM5VyZ6WjrHbRHskvK2Lo0U6V1hgNZS5tvqt4ajfU5f/ScBBj6k w==; X-IronPort-AV: E=McAfee;i="6400,9594,10338"; a="255604386" X-IronPort-AV: E=Sophos;i="5.91,201,1647327600"; d="scan'208";a="255604386" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 07:43:44 -0700 X-IronPort-AV: E=Sophos;i="5.91,201,1647327600"; d="scan'208";a="563268855" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.249.175.139]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 07:43:41 -0700 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Eric Dong , Ray Ni , Brijesh Singh , Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky , Gerd Hoffmann Subject: [PATCH 3/6] OvmfPkg: Add MpInitLibDepLib Date: Thu, 5 May 2022 22:43:16 +0800 Message-Id: <8e1d357d2a4b60ea080ad18a07edccb1fa62c88a.1651760174.git.min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Ray Ni Cc: Brijesh Singh Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Cc: Gerd Hoffmann Signed-off-by: Min Xu --- .../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.
+# 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.
+# 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.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include + +/** +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.
+# 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.
+# 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