Based on the open source AMDFWTOOL available here:
https://github.com/coreboot/coreboot/tree/main/util/amdfwtool
TODO:
- Merge duplicated regions
There can be multiple L2 directory tables, for A/B recovery or
to support different SoC SKUs. They point to the same regions,
causing the same area to be shown multiple times in the parsed
image.
- Better quirks support
PSP hardcodes certain sizes and address types for some files.
The parser might thus fail, even though it works on real hardware.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
As the first step towards automated parsing, this change set replaces outdated BootGuard-related parsers with shiny new KaitaiStruct-based ones.
It also does the following:
- improves Intel FIT definitions by using the relevant specification
- adds sha1, sha384, sha512 and sm3 digest implementations
- updates LZMA SDK to v22.01
- moves GUIDs out of include files to prevent multiple instantiations
- enforces C++11
- adds Kaitai-based parsers for Intel FIT, BootGuard v1 and BootGuard v2 structures
- makes many small refactorings here, there and everywhere
This allows UEFIExtract to build on a greater variety of targets and more
importantly allows us to build with the system-defined hardening protections
present in enterprise distributions.