We can select cpu using unit number instead of name,

for instance we can use "dev /cpus/@0" instead of "dev 
/cpus/PowerPC,750". This notation is used in Fedora bootscript
to know if the CPU is 64-bit or 32-bit: it looks at "64-bit" property
of first available CPUS ("@0").

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@559 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Laurent Vivier
2009-08-17 21:57:04 +00:00
parent aea3404ef2
commit 1be70e1bca

View File

@@ -19,6 +19,16 @@ new-device
" cpus" device-name
1 encode-int " #address-cells" property
0 encode-int " #size-cells" property
external
: encode-unit ( unit -- str len )
pocket tohexstr
;
: decode-unit ( str len -- unit )
parse-hex
;
finish-device
new-device