public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Min Xu" <min.m.xu@intel.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Yao, Jiewen" <jiewen.yao@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Aktas, Erdem" <erdemaktas@google.com>,
	"James Bottomley" <jejb@linux.ibm.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Michael Roth <michael.roth@amd.com>
Subject: Re: [PATCH V2 04/10] OvmfPkg/IntelTdx: Implement other helper functions in SecTdxHelperLib
Date: Sat, 21 Jan 2023 00:02:05 +0000	[thread overview]
Message-ID: <PH0PR11MB50646AD665D19371845CEDCDC5CA9@PH0PR11MB5064.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230120135059.opht56zl4jbybg23@sirius.home.kraxel.org>

On January 20, 2023 9:51 PM, Gerd Hoffmann wrote:
> 
> > > > [Jiewen] No. We cannot move to MdePkg.
> > > > TCG defines the field to be variable length. Something like below:
> > > >
> > > > typedef struct {
> > > >   UINT8                      TableDescriptionSize;
> > > >   UINT8                      TableDescription[TableDescriptionSize];
> > > >   UINT64                     NumberOfTables;
> > > >   EFI_CONFIGURATION_TABLE    TableEntry[NumberOfTables];
> > > > } HANDOFF_TABLE_POINTERS2;
> > > >
> > > > typedef struct {
> > > >   UINT8                   BlobDescriptionSize;
> > > >   UINT8                   BlobDescription[BlobDescriptionSize];
> > > >   EFI_PHYSICAL_ADDRESS    BlobBase;
> > > >   UINT64                  BlobLength;
> > > > } HANDOFF_TABLE_POINTERS2;
> > > >
> > > > The implementation can choose its own length as they wish.
> > >
> > > Why doesn't follow TDX standard TCG practices here?
> > >
> > As Jiewen mentioned TCG defines the field to be variable length. The
> implementation can choose its own length. Below are some examples.
> > Tcg2Pei defines its FV_HANDOFF_TABLE_POINTERS2.
> > (https://github.com/tianocore/edk2/blob/master/SecurityPkg/Tcg/Tcg2Pei
> > /Tcg2Pei.c#L126-L136) SmbiosMeasurementDxe defines its
> > SMBIOS_HANDOFF_TABLE_POINTERS2
> >
> (https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/
> > SmbiosMeasurementDxe/SmbiosMeasurementDxe.c#L113-L123)
> > TcgEventLogRecordLib defines the PLATFORM_FIRMWARE_BLOB2_STRUCT
> and
> > HANDOFF_TABLE_POINTERS2_STRUCT.
> > https://github.com/tianocore/edk2/blob/master/SecurityPkg/Include/Libr
> > ary/TcgEventLogRecordLib.h#L14-L32
> 
> > I think TDX follow the same practice above to define its own
> > TDX_HANDOFF_TABLE_POINTERS2 and FV_HANDOFF_TABLE_POINTERS2.
> > (FV_HANDOFF_TABLE_POINTERS2 happens to be same as the one in
> Tcg2Pei.)
> 
> Ok, that makes sense.  The TdHob is tdx-specific, measuring a firmware
> volume is not.  I'm still wondering why the structs for standard events (like
> the firmware volume) are not in some shared header file ...
> 
Hi, Gerd
Actually I tried to find some common header file to define the events (the firmware volume). But it seems there is no such header file. Let me check the code again and see if there is such header file.

Thanks
Min

  reply	other threads:[~2023-01-21  0:02 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19  3:28 [PATCH V2 00/10] Enable Tdx measurement in OvmfPkgX64 Min Xu
2023-01-19  3:28 ` [PATCH V2 01/10] OvmfPkg: Add Tdx measurement data structure in WorkArea Min Xu
2023-01-19  9:33   ` Gerd Hoffmann
2023-01-19  3:28 ` [PATCH V2 02/10] OvmfPkg/IntelTdx: Add TdxHelperLibNull Min Xu
2023-01-19  9:33   ` Gerd Hoffmann
2023-01-19  3:28 ` [PATCH V2 03/10] OvmfPkg/IntelTdx: Add SecTdxHelperLib Min Xu
2023-01-19  9:33   ` Gerd Hoffmann
2023-01-19  3:28 ` [PATCH V2 04/10] OvmfPkg/IntelTdx: Implement other helper functions in SecTdxHelperLib Min Xu
2023-01-19  9:54   ` Gerd Hoffmann
2023-01-19 23:44     ` Min Xu
2023-01-20  7:40     ` Min Xu
2023-01-20  8:10       ` Yao, Jiewen
2023-01-20 10:18         ` Gerd Hoffmann
2023-01-20 11:42           ` Min Xu
2023-01-20 13:50             ` Gerd Hoffmann
2023-01-21  0:02               ` Min Xu [this message]
2023-01-19  3:28 ` [PATCH V2 05/10] OvmfPkg/IntelTdx: Add PeiTdxHelperLib Min Xu
2023-01-19  9:54   ` Gerd Hoffmann
2023-01-19  3:28 ` [PATCH V2 06/10] OvmfPkg/PeilessStartupLib: Build GuidHob for Tdx measurements Min Xu
2023-01-19  9:57   ` Gerd Hoffmann
2023-01-19  3:28 ` [PATCH V2 07/10] OvmfPkg/IntelTdx: Update tdx measurement in SEC phase Min Xu
2023-01-19  9:57   ` Gerd Hoffmann
2023-01-19  3:28 ` [PATCH V2 08/10] OvmfPkg: Enable Tdx measurement in OvmfPkgX64 Min Xu
2023-01-19  3:28 ` [PATCH V2 09/10] OvmfPkg/PlatformPei: Build GuidHob for Tdx measurement Min Xu
2023-01-19  9:58   ` Gerd Hoffmann
2023-01-19  3:28 ` [PATCH V2 10/10] OvmfPkg/PlatformInitLib: Delete the ProcessTdxHobList() Min Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR11MB50646AD665D19371845CEDCDC5CA9@PH0PR11MB5064.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox