From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.46058.1671525777169185136 for ; Tue, 20 Dec 2022 00:43:01 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=g5Oq7qkg; spf=pass (domain: intel.com, ip: 134.134.136.100, 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=1671525781; x=1703061781; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iKp4+kct/Kk3Fgf7CJUi777BKQcyCrmZdbA3VZvbmiI=; b=g5Oq7qkgTrwxZ1im4B7e4EhACR7hW2XFOzX8GEwqq9ogu1PK01ntJ+/m 2e9LUoSiWpZAp4TdjezZC3hcmQymwZoSwERW0Tlc7dXrwdR0tjvTLrrsb pf96ptATWUOM0xBDGa2Vbk0FxGHNrOO3j9eEkkTcd+tU6gwOms9EtxMxD 0MgHRkApUnxRk1gRsmkP3Xvy0kJhUCLjpz6nCUwlSIlCddP8cERbX7OAr tyIccX6CW902h0Z2y5QIOhQ1R+IvBEjRpmMWhJRjDZZBPgHZSt9C2PYW4 73bE1rU4RGhU60VT4hd8LiR+2d8dfU2KgA5UZPTxheywEW/vg/Mh3fxD3 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10566"; a="383908249" X-IronPort-AV: E=Sophos;i="5.96,258,1665471600"; d="scan'208";a="383908249" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 00:43:00 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10566"; a="628644649" X-IronPort-AV: E=Sophos;i="5.96,259,1665471600"; d="scan'208";a="628644649" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.255.29.12]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 00:42:58 -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 V2 2/6] OvmfPkg/TdxMailboxLib: Add NULL instance of TdxMailboxLib Date: Tue, 20 Dec 2022 16:42:36 +0800 Message-Id: <20221220084240.1922-3-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: <20221220084240.1922-1-min.m.xu@intel.com> References: <20221220084240.1922-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