Author: wmb Date: Thu Aug 23 22:12:25 2012 New Revision: 3213 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3213
Log: ARM - Added linux,usable-memory property to /memory to work around the fact that Linux does not honor the "available" property.
Modified: cpu/arm/linux.fth
Modified: cpu/arm/linux.fth ============================================================================== --- cpu/arm/linux.fth Wed Aug 22 09:15:00 2012 (r3212) +++ cpu/arm/linux.fth Thu Aug 23 22:12:25 2012 (r3213) @@ -94,6 +94,12 @@ true value use-fdt? : use-fdt ( -- ) true to use-fdt? ;
+: make-usable-property ( -- ) + " /memory" find-device + 0 encode-int linux-memtop encode-int encode+ " linux,usable-memory" property + device-end +; + h# 10000 constant /fdt-max : linux-fixup ( -- ) [ifdef] linux-logo linux-logo [then] @@ -107,6 +113,7 @@ arm-linux-machine-type to r1 [ifdef] flatten-device-tree use-fdt? if + make-usable-property ramdisk-adr ?dup 0= if load-base then /fdt-max - to linux-params linux-params /fdt-max flatten-device-tree else