commit | 6acda830bbfb3b45c8b741ef89492623443a5ecf | [log] [tgz] |
---|---|---|
author | Sam Leffler <sleffler@google.com> | Fri Mar 29 11:08:47 2024 -0700 |
committer | Sam Leffler <sleffler@google.com> | Fri Mar 29 11:08:47 2024 -0700 |
tree | 0811aaf969a6d6d7deba1e087ca7c89089005164 | |
parent | 12b830472b53221da5645ed69725de3caf841edb [diff] |
elfloader: major overhaul to support non-seL4 images Overhaul the ELF loader support to handle loading ELF images unlike seL4 (e.g. many ELF load segments, no capdl-loader) and cleanup some code. With these changes CHERIoT firmware images load. - add support for loading multiple ELF load segments - handle a missing capdl-loader; e.g. when starting the SMC do not post the boot message to the mailbox - improve loading unaligned ELF segments; still does not handle all cases but it's unclear if they matter (will panic) - handle running out of space for ELF phdrs more gracefully - change SEL4State to have only one instance of "offset" & "headers" to save memory, especially when we grow the "headers" array to handle more complex ELF images - combine the FindFile, LoadElfHeaders, and LoadElf tasks into a single LoadElf task; this better safeguards SEL4State that was shared between the tasks and clobbered if the old tasks were mis-ordered - reduce the task array size after combining FindFile & co - add a Noop task for initializing/padding the task array - cleanup SEL4State handling; e.g. move calculations derived from the ELF phdrs to immediately after the full set of headers are read; this safeguards against clobbering shared state between task phases - change ELF segment log msgs to include the segment # and to only log non-zero size segments (file-data, bss) - use the tar magic marker to identify EOF (when present) - remove a bunch of dead code - replace panic(<line-number>) by unreachable! calls since the line numbers were (wrong and) unmtaintable - increase the tock app memory layout for the changes (we were right on the edge) Fix: 331955054 Change-Id: Iecb00e5545c9cf5e603d49e3f2c7669ed36581e3
This project contains the support needed to build a TockOS artifact that can run on the Matcha security core, and integrated as part of the Shodan repository.
If you get this project from Project Shodan manifest, you are all set.
This project needs to be at <dir>/sw/matcha
.