From 92db5d2c4ee4522ffaf3832e6ad365e9541b788b Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Sat, 24 Jun 2017 14:20:12 +0200 Subject: [PATCH] sel4: limit max relocation memory to 256M relocation is required, to avoid overlapping phdr in the elf binaries, but sel4 will fail to boot if bender relocates the images at the end of physical memory. Limit the physical relocation address to a fixed 256M value, so that sel4 will work. Issue #2451 --- tool/boot/README | 3 +-- tool/boot/bender | Bin 16292 -> 16292 bytes tool/run/boot_dir/sel4 | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tool/boot/README b/tool/boot/README index 65e5d9d6b2..fc26340a95 100644 --- a/tool/boot/README +++ b/tool/boot/README @@ -7,8 +7,7 @@ code respectively the download source of binaries are described below. The 'bender' tool is part of the 'morbo' toolchain available under GPL. The toolchain was obtained from https://github.com/TUD-OS/morbo. For Genode the bender was modified so that binaries are only relocated up - to 2G physical. Relocation can be disabled by the commandline option - "norelocate". + to 2G physical. Additional, relocation can be limited to 256M for sel4. The changes are available on the genode_bender branch of https://github.com/alex-ab/morbo.git. diff --git a/tool/boot/bender b/tool/boot/bender index d110b87711b82308437922b8a647a837793ad5b9..7b4588b780d06671e37f131af152fb79b512e04f 100755 GIT binary patch delta 576 zcmZ2dzodQx52KR6an>Fq2?h|@C9WyK(0Sv9Utp_>Ef`@^j+x5(G*DD~O13lI0df~M`$RUqG=1Bsj zfr1USM;J;ZGtL8*WPlCJ)CL+>K3Rmjk@4&1Y1}uM7^OGo^9g~R*Tlb;F=VoVK%#u9 zF3?jlUZrfu8P;+$Fuc(D{r~^#)2-i1g+S)FPu?J~fpOO4M8P7)uZyn;GBNI&d{wxa z`yEhM#(xmOJvmwA5M#z>HPMBPjC(ep5VK@tJUf|5LXGj`W=#nPLEeIl%HsIk#0py@ zQ#0Sq#hQU^K@)rglp8=^vD1@a@DVU=0?En8k>^(rXvA}Z>li@Cy4G|aBmtd%t wY)}S?n*iDWfdIr-oh)jQHo4wFgv&@b-6+Y-Ff}oG^IU_|%s_`_npkrK0Dd~JeEFq2?h|@C88<8(0Sv-_Bs$-9;!=Y@=r!-PHmu2 zP*6a|gUPZ?2HYQjyw@DfZ+J2oCPy%3GxAS9!lcG%IQcbG0Atu@8|Ft$j5(X-*-RN3 zmrM?2-_5AAS&+knkB)VZk^)>hKs%Co85pAD{+FJ~(4V}WGm6n=vJjUM z_Y*Ck+Y*8D8Ivaab4dU-WN>9UtpPd8f`@^j+x5(G*DD~O13lI0df~M`$RQ6v=1Bsj zfr1USM;J;ZGtL8*WPlAz(*_z=GFgPXk@3^!Y1}uM7$r96^9g~R*Tlb;F>tbhK%#t+ zF3?jlUZrfu8P;+$Fuc(D{r~^#)2-i1g+S)FOx_@{fpPleM8P7)Pm8YzGBIwSd{wxa z`!!Hk#vc&DF*#Y}5M#<_HPMBPj5{`;5VK@tJUN+3LXGk5W=#nPL9V>~qST!HA;^?hQ diff --git a/tool/run/boot_dir/sel4 b/tool/run/boot_dir/sel4 index b6b4337125..5efb321810 100644 --- a/tool/run/boot_dir/sel4 +++ b/tool/run/boot_dir/sel4 @@ -52,7 +52,7 @@ proc run_boot_dir {binaries} { puts $fh "timeout 0" puts $fh "default 0" puts $fh "\ntitle Genode on seL4" - puts $fh " kernel /boot/bender norelocate" + puts $fh " kernel /boot/bender phys_max=256M" puts $fh " module /sel4 disable_iommu" puts $fh " module /image.elf" @@ -71,7 +71,7 @@ proc run_boot_dir {binaries} { # Generate pulsar config file # set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"] - puts $fh " exec /boot/bender norelocate" + puts $fh " exec /boot/bender phys_max=256M" puts $fh " load /sel4 disable_iommu" puts $fh " load /image.elf" close $fh