microkit
microkit copied to clipboard
aarch64: make the microkit loader relocatable
This allows a microkit image to be loaded anywhere in memory at which point it will relocate itself to the LOADER_LINK_ADDRESS. These changes are based on the elfloader from seL4/seL4_tools.
Changes include:
- crt0.s was changed to crt0.S and compiled with gcc to pass in LINK_ADDRESS
- memmove and memcpy implementations were added
- loader_data was changed to include a size field. This is the size of loader_data, the list of regions, and the regions themselves. These also need to be relocated to ensure that everything works correctly
Tested on: imx8mm with LOADER_LINK_ADDRESS = 0x41000000 and uboot load address parameter set to 0x42000000