[OpenBIOS] r500 - cpu/x86/pc/olpc ofw/core
svn at openbios.org
svn at openbios.org
Thu Jul 26 18:39:29 CEST 2007
Author: wmb
Date: 2007-07-26 18:39:29 +0200 (Thu, 26 Jul 2007)
New Revision: 500
Modified:
cpu/x86/pc/olpc/linux.fth
ofw/core/bootparm.fth
Log:
Made a new /chosen property "ramdisk" so loading the Linux ramdisk
doesn't overwrite the "bootpath" property.
Modified: cpu/x86/pc/olpc/linux.fth
===================================================================
--- cpu/x86/pc/olpc/linux.fth 2007-07-26 16:00:48 UTC (rev 499)
+++ cpu/x86/pc/olpc/linux.fth 2007-07-26 16:39:29 UTC (rev 500)
@@ -178,13 +178,22 @@
linux-params to %esi
;
+d# 256 buffer: ramdisk-buf
+' ramdisk-buf " ramdisk" chosen-string
+
: load-ramdisk ( -- )
- " ramdisk" eval dup 0= if 2drop exit then
- 0 to /ramdisk
- ." Loading ramdisk image from " 2dup type ." ..."
- boot-read
+ " ramdisk" eval dup 0= if 2drop exit then ( name$ )
+ 0 to /ramdisk ( name$ )
+
+ ['] load-path behavior >r ( name$ r: xt )
+ ['] ramdisk-buf to load-path ( name$ r: xt )
+
+ ." Loading ramdisk image from " 2dup type ." ..." ( name$ r: xt )
+ ['] boot-read catch ( throw-code r: xt )
+ cr ( throw-code r: xt )
+ r> to load-path ( throw-code )
+ throw
loaded to /ramdisk to ramdisk-adr
- cr
;
: claim-params ( -- )
Modified: ofw/core/bootparm.fth
===================================================================
--- ofw/core/bootparm.fth 2007-07-26 16:00:48 UTC (rev 499)
+++ ofw/core/bootparm.fth 2007-07-26 16:39:29 UTC (rev 500)
@@ -78,6 +78,9 @@
defer load-started ' noop to load-started
defer load-done ' noop to load-done
+defer load-path
+' path-buf is load-path
+
headerless
: (boot-read) ( adr len -- )
opened-ih if ( adr len )
@@ -89,7 +92,7 @@
( print-probe-list )
true abort" "r"nCan't open boot device"r"n"
then ( fileid )
- dup ihandle>devname path-buf place-cstr drop ( fileid )
+ dup ihandle>devname load-path place-cstr drop ( fileid )
>r ( )
load-started
0 !load-size load-base ( load-adr )
More information about the OpenBIOS
mailing list