[edk2-devel] [PATCH V2 04/10] OvmfPkg/IntelTdx: Implement other helper functions in SecTdxHelperLib
Yao, Jiewen
jiewen.yao at intel.com
Fri Jan 20 08:10:45 UTC 2023
> Can we define FV_HANDOFF_TABLE_POINTERS2 and FV_HANDOFF_TABLE_POINTERS2 in MdePkg/Include/IndustryStandard/UefiTcgPlatform.h?
[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.
Thank you
Yao, Jiewen
> -----Original Message-----
> From: Xu, Min M <min.m.xu at intel.com>
> Sent: Friday, January 20, 2023 3:40 PM
> To: Gerd Hoffmann <kraxel at redhat.com>; Yao, Jiewen
> <jiewen.yao at intel.com>
> Cc: devel at edk2.groups.io; Aktas, Erdem <erdemaktas at google.com>; James
> Bottomley <jejb at linux.ibm.com>; Tom Lendacky
> <thomas.lendacky at amd.com>; Michael Roth <michael.roth at amd.com>
> Subject: RE: [PATCH V2 04/10] OvmfPkg/IntelTdx: Implement other helper
> functions in SecTdxHelperLib
>
> On January 19, 2023 5:54 PM, Gerd Hoffmann wrote:
> >
> > > +#pragma pack(1)
> > > +
> > > +#define HANDOFF_TABLE_DESC "TdxTable"
> > > +typedef struct {
> > > + UINT8 TableDescriptionSize;
> > > + UINT8 TableDescription[sizeof (HANDOFF_TABLE_DESC)];
> > > + UINT64 NumberOfTables;
> > > + 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()
> >
> > Why do you need this? For standard event types we should have those
> > structs already defined somewhere in edk2 I think ...
> >
> FV_HANDOFF_TABLE_POINTERS2 is related to standard event type
> (EV_EFI_PLATFORM_FIRMWARE_BLOB2).
> According to comment
> (https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Industry
> Standard/UefiTcgPlatform.h#L145-L156) we can see this event type uses the
> structure of UEFI_PLATFORM_FIRMWARE_BLOB2. It is not a data struct with
> fixed size. Instead its size depends on BlobDescriptionSize.
> Tcg2Pei measures the FV image with the event type
> (EV_EFI_PLATFORM_FIRMWARE_BLOB2) and data struct
> (FV_HANDOFF_TABLE_POINTERS2).
> Tdx measurement does the same measurement to the Configuration FV
> image.
> @Yao, Jiewen Can we define FV_HANDOFF_TABLE_POINTERS2 and
> FV_HANDOFF_TABLE_POINTERS2 in
> MdePkg/Include/IndustryStandard/UefiTcgPlatform.h?
>
> Thanks
> Min
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#98910): https://edk2.groups.io/g/devel/message/98910
Mute This Topic: https://groups.io/mt/96370898/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list