Author: wmb Date: Mon Sep 17 01:21:05 2012 New Revision: 3310 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3310
Log: Linux support - align the ramdisk and flattened device tree addresses. OLPC Trac #12107. The problem happened when secure-booting an initrd whose size was not a multiple of 4.
Modified: cpu/arm/linux.fth cpu/x86/pc/linux.fth
Modified: cpu/arm/linux.fth ============================================================================== --- cpu/arm/linux.fth Sat Sep 15 10:32:54 2012 (r3309) +++ cpu/arm/linux.fth Mon Sep 17 01:21:05 2012 (r3310) @@ -114,7 +114,8 @@ [ifdef] flatten-device-tree use-fdt? if make-usable-property - ramdisk-adr ?dup 0= if load-base then /fdt-max - to linux-params + ramdisk-adr ?dup 0= if load-base then + /fdt-max - 4 round-down to linux-params linux-params /fdt-max flatten-device-tree else args-buf cscount linux-params set-parameters @@ -130,9 +131,9 @@ defer load-ramdisk defer place-ramdisk : linux-place-ramdisk ( adr len -- ) - to /ramdisk ( adr ) + aligned to /ramdisk ( adr )
- load-base /ramdisk - ( adr new-ramdisk-adr ) + load-base /ramdisk - 4 round-down ( adr new-ramdisk-adr ) tuck /ramdisk move ( new-ramdisk-adr ) \ dup to linux-memtop to ramdisk-adr
Modified: cpu/x86/pc/linux.fth ============================================================================== --- cpu/x86/pc/linux.fth Sat Sep 15 10:32:54 2012 (r3309) +++ cpu/x86/pc/linux.fth Mon Sep 17 01:21:05 2012 (r3310) @@ -207,7 +207,7 @@ h# 22c +lp l@ ( adr ramdisk-limit ) ?dup if 1+ else h# 8000.0000 then ( adr ramdisk-limit )
- memory-limit umin /ramdisk - ( adr new-ramdisk-adr ) + memory-limit umin /ramdisk - 4 round-down ( adr new-ramdisk-adr ) tuck /ramdisk move ( new-ramdisk-adr ) dup then ( ramdisk-adr memtop )
openfirmware@openfirmware.info