mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 05:35:20 +00:00
4f3f36fe5f
The preferred way of retrieving the offset where to find the TDVF descriptor structure is by going through a table of GUIDs that can be found at a specific offset in the firmware file. If the expected GUIDs can't be found, we can fallback onto the former way, which is to read directly the value at a specific offset in the file. This patch implements the new mechanism without breaking compatibility for older firmwares as it keeps supporting the previous mechanism. As a reference, here is the documentation from the EDK2 code, and particularly from the OvmfPkg/ResetVector/Ia16/ResetVectorVtf0.asm file: ``` GUIDed structure. To traverse this you should first verify the presence of the table footer guid (96b582de-1fb2-45f7-baea-a366c55a082d) at 0xffffffd0. If that is found, the two bytes at 0xffffffce are the entire table length. The table is composed of structures with the form: Data (arbitrary bytes identified by guid) length from start of data to end of guid (2 bytes) guid (16 bytes) so work back from the footer using the length to traverse until you either find the guid you're looking for or run off the beginning of the table. ``` Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |