Changeset 3310


Ignore:
Timestamp:
Sep 17, 2012, 1:21:05 AM (3 years ago)
Author:
wmb
Message:

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.

Location:
cpu
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/linux.fth

    r3213 r3310  
    115115   use-fdt?  if
    116116      make-usable-property
    117       ramdisk-adr ?dup 0=  if  load-base  then  /fdt-max -  to linux-params
     117      ramdisk-adr ?dup 0=  if  load-base  then
     118      /fdt-max - 4 round-down  to linux-params
    118119      linux-params /fdt-max flatten-device-tree
    119120   else
     
    131132defer place-ramdisk
    132133: linux-place-ramdisk  ( adr len -- )
    133    to /ramdisk                                    ( adr )
    134 
    135    load-base  /ramdisk -                          ( adr new-ramdisk-adr )
     134   aligned  to /ramdisk                           ( adr )
     135
     136   load-base  /ramdisk - 4 round-down             ( adr new-ramdisk-adr )
    136137   tuck /ramdisk move                             ( new-ramdisk-adr )
    137138\  dup to linux-memtop
  • cpu/x86/pc/linux.fth

    r2865 r3310  
    208208      ?dup  if  1+  else  h# 8000.0000  then      ( adr ramdisk-limit )
    209209
    210       memory-limit  umin  /ramdisk -             ( adr new-ramdisk-adr )
     210      memory-limit  umin  /ramdisk - 4 round-down ( adr new-ramdisk-adr )
    211211      tuck /ramdisk move                          ( new-ramdisk-adr )
    212212      dup
Note: See TracChangeset for help on using the changeset viewer.