From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web10.13668.1674914336767550554 for ; Sat, 28 Jan 2023 05:59:07 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=B6f15WLr; spf=pass (domain: intel.com, ip: 134.134.136.31, 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=1674914347; x=1706450347; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UkEDTLn5+f3gBXi5dLa+w8JGwFrGk22AJ4QLTY1a+Xw=; b=B6f15WLrplRzlKHAGix+m5jktjLO1y27sAMTeDzBegUExQSOpw6aw1AW 5rnWNZPRdyglSYTY7WbrSXf9k6LYf2P8zEe8W4W3z9fNXokzKkVENkMhW XeZY50eCxRViPQfExmkHXgFYQduD5sXMSJyd0efdzYzwHRnbqm+qs1MXQ QYJt3GifQYUwit265yrnMQh+Pov6q8rKPBaKRDXqzbg/3r+NkJws3/1VR rOGhDM29VmTvv4KCEGUGWRGXo1Pyiov+DwnhRwO1xZWiCWWKaGrBS1Uo2 Yz5xG92+Q9zyN+Z13Xu838fT/bs5LUK6Ww8faIfnCFQLZQdUbKLYzMbAF g==; X-IronPort-AV: E=McAfee;i="6500,9779,10604"; a="389670682" X-IronPort-AV: E=Sophos;i="5.97,254,1669104000"; d="scan'208";a="389670682" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2023 05:59:06 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10604"; a="787512537" X-IronPort-AV: E=Sophos;i="5.97,254,1669104000"; d="scan'208";a="787512537" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.255.31.196]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2023 05:59:04 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Erdem Aktas , James Bottomley , Jiewen Yao , Gerd Hoffmann , Tom Lendacky , Michael Roth Subject: [PATCH V5 04/13] OvmfPkg/PeilessStartupLib: Update the define of FV_HANDOFF_TABLE_POINTERS2 Date: Sat, 28 Jan 2023 21:58:33 +0800 Message-Id: <20230128135842.980-5-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: <20230128135842.980-1-min.m.xu@intel.com> References: <20230128135842.980-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=4243 FV_HANDOFF_TABLE_POINTERS2 once was defined in IntelTdx.c. Its structure is same as PLATFORM_FIRMWARE_BLOB2_STRUCT which is defined in Library/TcgEventLogRecordLib.h. So this patch reuse the define of PLATFORM_FIRMWARE_BLOB2_STRUCT as FV_HANDOFF_TABLE_POINTERS2. Furthermore FV_HANDOFF_TABLE_POINTERS2 is renamed as CFV_HANDOFF_TABLE_POINTERS2 so that the name is more meaningful. Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Tom Lendacky Cc: Michael Roth Signed-off-by: Min Xu --- OvmfPkg/Library/PeilessStartupLib/IntelTdx.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/OvmfPkg/Library/PeilessStartupLib/IntelTdx.c b/OvmfPkg/Library/PeilessStartupLib/IntelTdx.c index 216c413caad5..4e8dca3d7712 100644 --- a/OvmfPkg/Library/PeilessStartupLib/IntelTdx.c +++ b/OvmfPkg/Library/PeilessStartupLib/IntelTdx.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "PeilessStartupInternal.h" @@ -25,16 +26,11 @@ typedef struct { EFI_CONFIGURATION_TABLE TableEntry[1]; } TDX_HANDOFF_TABLE_POINTERS2; -#define FV_HANDOFF_TABLE_DESC "Fv(XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)" -typedef struct { - UINT8 BlobDescriptionSize; - UINT8 BlobDescription[sizeof (FV_HANDOFF_TABLE_DESC)]; - EFI_PHYSICAL_ADDRESS BlobBase; - UINT64 BlobLength; -} FV_HANDOFF_TABLE_POINTERS2; - #pragma pack() +#define FV_HANDOFF_TABLE_DESC "Fv(XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)" +typedef PLATFORM_FIRMWARE_BLOB2_STRUCT CFV_HANDOFF_TABLE_POINTERS2; + /** Measure the Hoblist passed from the VMM. @@ -161,9 +157,9 @@ MeasureFvImage ( IN UINT8 PcrIndex ) { - EFI_STATUS Status; - FV_HANDOFF_TABLE_POINTERS2 FvBlob2; - VOID *FvName; + EFI_STATUS Status; + CFV_HANDOFF_TABLE_POINTERS2 FvBlob2; + VOID *FvName; // // Init the log event for FV measurement -- 2.29.2.windows.2