Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aarch64: make the microkit loader relocatable #220

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alwin-joshy
Copy link

@alwin-joshy alwin-joshy commented Sep 20, 2024

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

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

Signed-off-by: Alwin Joshy <joshyalwin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant