[coreboot] Ramstage region overlap with QEMU armv7 and GRUB (was: What payloads are easily usable with ARM targets?)
Paul Menzel
paulepanter at users.sourceforge.net
Fri Feb 17 22:51:39 CET 2017
Dear coreboot folks,
Am Freitag, den 17.02.2017, 09:28 +0100 schrieb Paul Menzel:
> What payload can be easily build and used for ARM targets?
>
> If you have any scripts, could you please share those? Maybe they can
> be integrated into coreboot, so that there is also a default payload
> available for ARM targets.
>
> Building GRUB resulted in a payload that is too big. I’ll try building
> with a bigger ROM chip size for the target *QEMU armv7* later.
It looks like, there is actually enough room, but cbfstool claims there
is an overlap.
```
[…]
CBFS fallback/payload
INFO: Performing operation on 'COREBOOT' region...
ERROR: Ramstage region _postram_cbfs_cache overlapped by: fallback/payload
```
But there is enough room available. Any idea, what is going on? The
commands below work just fine.
```
$ git describe --tag
4.5-1004-g17335fab17
$ make V=1
[…]
printf " CBFS fallback/payload\n"
CBFS fallback/payload
build/util/cbfstool/cbfstool build/coreboot.pre.tmp add-payload -f payloads/external/GRUB2/grub2/build/default_payload.elf -n fallback/payload -t payload -c LZMA -r COREBOOT
true
mv build/coreboot.pre.tmp build/coreboot.pre
programs=$( build/util/cbfstool/cbfstool build/coreboot.pre print -v | sed -n '\%fallback/payload%,\%^[^ ]\{4\}%s% .*load: \(0x[0-9a-fA-F]*\),.*length: [0-9]*/\([0-9]*\).*%\1 \2%p' ; ) ; \
regions=$( echo ramstage ; arm-linux-gnueabi-objdump -t build/cbfs/fallback/ramstage.elf | sed -n '/ _ramstage$/s/^\([0-9a-fA-F]*\) .*/0x\1/p' ; arm-linux-gnueabi-objdump -t build/cbfs/fallback/ramstage.elf | sed -n '/ _eramstage$/s/^\([0-9a-fA-F]*\) .*/0x\1/p' ; echo postram_cbfs_cache ; arm-linux-gnueabi-objdump -t build/cbfs/fallback/ramstage.elf | sed -n '/ _postram_cbfs_cache$/s/^\([0-9a-fA-F]*\) .*/0x\1/p' ; arm-linux-gnueabi-objdump -t build/cbfs/fallback/ramstage.elf | sed -n '/ _epostram_cbfs_cache$/s/^\([0-9a-fA-F]*\) .*/0x\1/p' ; echo stack ; arm-linux-gnueabi-objdump -t build/cbfs/fallback/ramstage.elf | sed -n '/ _stack$/s/^\([0-9a-fA-F]*\) .*/0x\1/p' ; arm-linux-gnueabi-objdump -t build/cbfs/fallback/ramstage.elf | sed -n '/ _estack$/s/^\([0-9a-fA-F]*\) .*/0x\1/p' ; echo ttb ; arm-linux-gnueabi-objdump -t build/cbfs/fallback/ramstage.elf | sed -n '/ _ttb$/s/^\([0-9a-fA-F]*\) .*/0x\1/p' ; arm-linux-gnueabi-objdump -t build/cbfs/fallback/ramstage.elf | sed -n '/ _ettb$/s/^\([0-9a-fA-F]*\) .*/0x\1/p' ; ) ; \
pstart= ; pend= ; \
for x in $programs; do \
if [ -z $pstart ]; then pstart=$(($x)) ; continue ; fi ; \
pend=$(($pstart + $x)) ; \
rname= ; rstart= ; rend= ; \
for y in $regions ; do \
if [ -z $rname ]; then rname=$y ; continue ; fi ; \
if [ -z $rstart ]; then rstart=$(($y)) ; continue ; fi ; \
rend=$(($y)) ; \
if [ $pstart -lt $rend -a $rstart -lt $pend ]; then \
echo "ERROR: Ramstage region _$rname overlapped by:" \
fallback/payload ; \
exit 1 ; \
fi ; \
rname= ; rstart= ; rend= ; \
done ; \
pstart= ; pend= ; \
done
INFO: Performing operation on 'COREBOOT' region...
ERROR: Ramstage region _postram_cbfs_cache overlapped by: fallback/payload
```
Commit fffee873c86 (Makefile: Add build-time overlap check for programs
loaded after coreboot) [1] adds this check.
Thanks,
Paul
[1] https://review.coreboot.org/13949
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20170217/3c8981ed/attachment.asc>
More information about the coreboot
mailing list