Closed JoelHutton closed 5 years ago
Just to note, the TF-A defines a default CoT Trust here. The platforms are allowed to override the default CoT and implement their own variant. This would break for platforms which have their own CoT and they would need to migrate to the new structure. This should be fairly easy to do and would have significant memory savings.
The patch-set is currently undergoing review. Please let us know if there are any comments for this change.
Edited the description to point to trustedfirmware.org gerrit links.
The chain-of-trust description was using a lot of memory, as it was a sparse struct array. The image descriptors contained in this array also contained arrays, which were not always used.
The first patch in the series replaces the chain of trust descriptor array with a struct pointer array, https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/657/1
The second patch changes the struct declaration (and adds casts in the assignment) to replace the arrays with pointers, allowing the uninitialised arrays to default to NULL. https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/658/1
Altogether, these patches save the following memory from bl1 and bl2 respectively, a more detailed breakdown can be seen in the commit message. bl1:-7427B, bl2:-2660B