[edk2-devel] [PATCH V2 02/10] UefiCpuPkg: Add PcdTdxWorkAreaBase

Min Xu min.m.xu at intel.com
Fri Jan 28 08:02:23 UTC 2022


On January 27, 2022 9:24 PM, Gerd Hoffmann wrote:
> On Tue, Jan 25, 2022 at 02:33:10PM +0800, Min Xu wrote:
> > RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429
> >
> > Add PcdTdxWorkAreaBase to indicate the area of memory where the TDX
> > work area block lives.
> 
> Why have both PcdSevEsWorkAreaBase and PcdTdxWorkAreaBase when we
> have a shared work area?
PcdTdxWorkAreaBase mimics PcdSevEsWorkAreaBase. Yes, TdxWorkAreaBase is same as SevEsWorkAreaBase. But the name of TdxWorkAreaBase is more meaningful in the Tdx related code.
For example:
  TDX_WORK_AREA  *TdxWorkArea;
  TdxWorkArea = (TDX_WORK_AREA *)(UINTN)FixedPcdGet32 (PcdTdxWorkAreaBase);
  ASSERT (TdxWorkArea != NULL);
  ASSERT (TdxWorkArea->SecTdxWorkArea.HobList != 0);
  return (VOID *)(UINTN)TdxWorkArea->SecTdxWorkArea.HobList;

Thanks
Min


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86140): https://edk2.groups.io/g/devel/message/86140
Mute This Topic: https://groups.io/mt/88666800/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