aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-08-12 21:01:53 +0200
committerLubomir Rintel <lkundrak@v3.sk>2019-08-12 21:02:00 +0200
commit68fd56cde7d01130f73132ed8aaeb0dc51832323 (patch)
tree26f4dfbe6bfade625c8b5fb8de816080dbd7036b
parent3642927b5812c54c7956344d119c7898e9bf8ed1 (diff)
downloadopenfirmware-68fd56cde7d01130f73132ed8aaeb0dc51832323.tar.gz
arm/linux: drop an extra copy of the loaded address
The commit 2d7dad95a1f4 ('arm/linux: ignore the size from the zImage header') duplicates the length of the loaded area before comparing it to 30, but fails to drop the extra copy on early return. Fix that.
-rw-r--r--cpu/arm/linux.fth2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu/arm/linux.fth b/cpu/arm/linux.fth
index 4ffc8401..b7f6e92c 100644
--- a/cpu/arm/linux.fth
+++ b/cpu/arm/linux.fth
@@ -166,7 +166,7 @@ defer place-ramdisk
: init-zimage? ( -- flag )
loaded ( adr len )
- dup h# 30 < if drop false exit then ( adr len )
+ dup h# 30 < if 2drop false exit then ( adr len )
over h# 24 + l@ h# 016f2818 <> if drop false exit then ( adr len )
swap >r ( len r: adr )
r@ h# 28 + l@ r@ + ( len start r: adr )