Tool/software: Linux
Trying to extend some of the secure boot features utilizing a TPM and would love to take a hash of the SPL when it's loaded in internal memory. Primary problem now is, I don't know the size of the image after it's loaded as the header information is stripped.
I know it's located at 0x402F0400 with the Image max size being CONFIG_SPL_MAX_SIZE = (SRAM_SCRATCH_SPACE_ADDR - CONFIG_SPL_TEXT_BASE)
However, when the image size is smaller than this, something utilizes the memory after the image and a SHA-1 Hash of this location changes every-time on boot.
Is there another reference point that marks the end of SPL image in memory or something that denotes the location of whatever is utilizing the memory after the SPL image?
Code would be executing from SPL - it will hash itself.