From nobody Mon Feb 9 03:13:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+97428+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+97428+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1671093921; cv=none; d=zohomail.com; s=zohoarc; b=lg2li2McMeWfJTooOFL4tYiGXi42nnw46CzjEQKpthhXLxsrTwV8GPucNYnk9UFxD7AIzL7OaHOrznJLUm+/b0nRUQqggwFrH26ObVOkNL5Dc+aaxS0xm51Vs+rHczqd7+grI/EDm3Xa16Www9Pm1C+wDpsOZQWjPk+OmLcZelQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1671093921; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=CT/5fqSegCqmJt7v21TZ5V5MbNdlIrlNf1Tsvm16xec=; b=eh5H1OWCqIF/GCabM9F8xV+g1MRjlFTodgJhDUrnrmHEOhuloE443SGbZbEeB5QJnKajGhW/ZEPiRYScSaYYXW9RVzpmeFXOEfpNnsOB8ture+KYLU+rO+sNhhosEwTOnbfojrIuRDgoDAxEOd212v3mfFBw6lB1rI6M5CBWtYQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+97428+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1671093921099573.8205423255661; Thu, 15 Dec 2022 00:45:21 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 6tJzYY1788612xwTi1tqYW29; Thu, 15 Dec 2022 00:45:20 -0800 X-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 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" X-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" X-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: [edk2-devel] [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> In-Reply-To: <20221215084440.481-1-min.m.xu@intel.com> References: <20221215084440.481-1-min.m.xu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,min.m.xu@intel.com X-Gm-Message-State: O8985dQ62zF5hbwvow3RmQfvx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1671093920; bh=ozVgXTTIpJX+KLplJw1UnrvnXT9F3aizThafE8Z8XGI=; h=Cc:Date:From:Reply-To:Subject:To; b=aqbwg00BpUeWGkf1eDHHqSBJvHdqguH6iKP4z41sI3hY/qxoIYrRQww4LwmESIYFANE 404BX1E8tNqtRhlAk6PSWFLoBJk7aT0tR8L/r1149OT0bO83cpUUDgTBWBILlVkD2ukO7 FYi2CVl7aR25+c3Cg8Ye3ziKpaBgRVC6OHs= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1671093923553100001 Content-Type: text/plain; charset="utf-8" From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4172 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/Libr= ary/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 =3D TdxMailboxLib =20 # -# VALID_ARCHITECTURES =3D X64 IA32 +# VALID_ARCHITECTURES =3D X64 # =20 -[Sources.IA32] - TdxMailboxNull.c - [Sources.X64] TdxMailbox.c =20 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 =3D 0x00010005 + BASE_NAME =3D TdxMailboxLibNull + FILE_GUID =3D 002a1265-a1a0-47cd-bc69-4342b147f57d + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D TdxMailboxLib + +# +# VALID_ARCHITECTURES =3D IA32 X64 +# + +[Sources] + TdxMailboxNull.c + +[Packages] + MdePkg/MdePkg.dec + OvmfPkg/OvmfPkg.dec + +[LibraryClasses] + BaseLib + DebugLib --=20 2.29.2.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#97428): https://edk2.groups.io/g/devel/message/97428 Mute This Topic: https://groups.io/mt/95684993/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-