On 04/07/21 02:21, Xu, Min M wrote: > Intel TDX also has metadata which is consumed by QEMU. We put the metadata > in a single file (TdxMetadata.asm) and put it at the end of ResetVectorVtf0. > Then a pointer is placed in a known location in ResetVector.nasm. In this way > QEMU can easily read the Metadata by the pointer. > ------------------------------------------------------------------ > ALIGN 8 > ; > ; TDX Virtual Firmware injects metadata in VTF0. > ; The address of the metadata is injected in this location (0xffffffe8) > ; > DD (OVMF_IMAGE_SIZE_IN_KB * 1024 - (fourGigabytes - TdxMetadataGuid > - 16)) > ; > ; The VTF signature > ; > ; VTF-0 means that the VTF (Volume Top File) code does not require > ; any fixups. > ; > vtfSignature: > DB 'V', 'T', 'F', 0 > ------------------------------------------------------------------ > > The space in ResetVector is very precious and we all want a known location so > that QEMU > can find the metadata easily. Putting the metadata in a single file give the > developers > more flexible (They can put anything they want). So I think a pointer (point > to a metadata > file) in a known location maybe a better solution.
Assuming a QEMU version has been released that looks for the chain of GUID-ed structs already, then I think such a change would break compatibility with that QEMU version. If we definitely need a separate spot to include more information in the flash, for QEMU's parsing, then please introduce a new GUIDed structure, which contains nothing but a pointer to that spot. Thanks Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#73780): https://edk2.groups.io/g/devel/message/73780 Mute This Topic: https://groups.io/mt/81584577/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-