From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.128323.1671093920118855250 for ; Thu, 15 Dec 2022 00:45:20 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=dsgRxObh; spf=pass (domain: intel.com, ip: 192.55.52.151, 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=1671093920; x=1702629920; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iKp4+kct/Kk3Fgf7CJUi777BKQcyCrmZdbA3VZvbmiI=; b=dsgRxObhQqYahFU1i7wVg9nnxIlCA5BtpklWbPviHMaql+pPN6t0ooDv 8tBAx7DhDlfyKvTLmhmbTCiNHoelYQxRm6wbtEwcePF2YBRBwjZYiU7r3 dSj+8tpSOH3IS4imWTpUtRqWuCL+/fG5xtPVTE9m9eNcZJlafOkNhvb/u z21hKwWqxQKVNflYp+ejn7v5tfj4ifCz8T1iCXW2ZMduieGPcEZbGNPDP t7l1tnPigI0osY5msmRkJOZFfDyXkfdAIRyownYgMxUg2AUJ8roEQnHiQ xyar4Pr4OBBjgZUIvOQZa2nQZSMnGkt9YnEDaZuGZUsGG6FeDw20GkMa5 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10561"; a="298967896" X-IronPort-AV: E=Sophos;i="5.96,246,1665471600"; d="scan'208";a="298967896" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2022 00:45:14 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10561"; a="651464822" X-IronPort-AV: E=Sophos;i="5.96,246,1665471600"; d="scan'208";a="651464822" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.249.170.19]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2022 00:44:56 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Erdem Aktas , Gerd Hoffmann , James Bottomley , Jiewen Yao , Tom Lendacky Subject: [PATCH V1 2/6] OvmfPkg/TdxMailboxLib: Add NULL instance of TdxMailboxLib Date: Thu, 15 Dec 2022 16:44:36 +0800 Message-Id: <20221215084440.481-3-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: <20221215084440.481-1-min.m.xu@intel.com> References: <20221215084440.481-1-min.m.xu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4172 TdxMailboxLib is designed only for TDX guest which arch is X64. This patch set the VALID_ARCHITECTURES of TdxMailboxLib as X64. Because in the following patches TdxMailboxLib will be included in PlatformInitLib. While PlatformInitLib is imported by some X64 platforms (for example AmdSevX64.dsc). So we need a NULL instance of TdxMailboxLib which VALID_ARCHITECTURES is X64 as well. Based on this consideration we design TdxMailboxLibNull. Cc: Erdem Aktas Cc: Gerd Hoffmann Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Signed-off-by: Min Xu --- .../Library/TdxMailboxLib/TdxMailboxLib.inf | 7 ++-- .../TdxMailboxLib/TdxMailboxLibNull.inf | 34 +++++++++++++++++++ 2 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 OvmfPkg/Library/TdxMailboxLib/TdxMailboxLibNull.inf diff --git a/OvmfPkg/Library/TdxMailboxLib/TdxMailboxLib.inf b/OvmfPkg/Library/TdxMailboxLib/TdxMailboxLib.inf index 3cf3690a16c7..e504bda0dd90 100644 --- a/OvmfPkg/Library/TdxMailboxLib/TdxMailboxLib.inf +++ b/OvmfPkg/Library/TdxMailboxLib/TdxMailboxLib.inf @@ -1,6 +1,6 @@ #/** @file # -# TBD +# TdxMailbox Library # # Copyright (c) 2018, Intel Corporation. All rights reserved.
# Copyright (c) 2008, Apple Inc. All rights reserved.
@@ -19,12 +19,9 @@ LIBRARY_CLASS = TdxMailboxLib # -# VALID_ARCHITECTURES = X64 IA32 +# VALID_ARCHITECTURES = X64 # -[Sources.IA32] - TdxMailboxNull.c - [Sources.X64] TdxMailbox.c diff --git a/OvmfPkg/Library/TdxMailboxLib/TdxMailboxLibNull.inf b/OvmfPkg/Library/TdxMailboxLib/TdxMailboxLibNull.inf new file mode 100644 index 000000000000..8380d9f4f6d8 --- /dev/null +++ b/OvmfPkg/Library/TdxMailboxLib/TdxMailboxLibNull.inf @@ -0,0 +1,34 @@ +#/** @file +# +# Null instance of TdxMailboxLib +# +# Copyright (c) 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2008, Apple Inc. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# +#**/ + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = TdxMailboxLibNull + FILE_GUID = 002a1265-a1a0-47cd-bc69-4342b147f57d + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = TdxMailboxLib + +# +# VALID_ARCHITECTURES = IA32 X64 +# + +[Sources] + TdxMailboxNull.c + +[Packages] + MdePkg/MdePkg.dec + OvmfPkg/OvmfPkg.dec + +[LibraryClasses] + BaseLib + DebugLib -- 2.29.2.windows.2