seL4_tools icon indicating copy to clipboard operation
seL4_tools copied to clipboard

Allow elfloader to put kernel images directly after firmware on RISCV

Open kent-mcleod opened this issue 3 years ago • 4 comments

opensbi puts the elfloader in a fixed location right after it in memory which is where we normally wish to place the kernel with the elfloader higher in memory. This allows the kernel to immediately reclaim the elfloader memory and slightly reduces memory fragmentation by allowing the kernel reserved memory to be located next to the opensbi reserved memory and all memory after free for application use.

Test with: https://github.com/seL4/seL4/pull/759

kent-mcleod avatar Feb 01 '22 11:02 kent-mcleod

I'm not deep enough in the RISCV details to review this one, but I am in favour of the general idea.

lsf37 avatar Feb 01 '22 21:02 lsf37

These changes also allow the issue underlying https://github.com/seL4/seL4_tools/issues/76 to be resolved.

kent-mcleod avatar Feb 04 '22 11:02 kent-mcleod

This relocation needs to consider the DTB passed through from opensbi when doing relocations otherwise it could get overwritten. This is an outstanding issue on Arm (https://sel4.atlassian.net/browse/SELFOUR-2138)

kent-mcleod avatar Feb 09 '22 08:02 kent-mcleod

This relocation needs to consider the DTB passed through from opensbi when doing relocations otherwise it could get overwritten. This is an outstanding issue on Arm (https://sel4.atlassian.net/browse/SELFOUR-2138)

This is now handled by the most recent commit.

kent-mcleod avatar Feb 22 '22 06:02 kent-mcleod