microkit icon indicating copy to clipboard operation
microkit copied to clipboard

aarch64: make the microkit loader relocatable

Open alwin-joshy opened this issue 5 months ago • 0 comments

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

alwin-joshy avatar Sep 20 '24 06:09 alwin-joshy