Author: laurent Date: 2009-08-17 23:57:04 +0200 (Mon, 17 Aug 2009) New Revision: 559
Modified: trunk/openbios-devel/arch/ppc/qemu/tree.fs Log: 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
Modified: trunk/openbios-devel/arch/ppc/qemu/tree.fs =================================================================== --- trunk/openbios-devel/arch/ppc/qemu/tree.fs 2009-08-17 16:58:48 UTC (rev 558) +++ trunk/openbios-devel/arch/ppc/qemu/tree.fs 2009-08-17 21:57:04 UTC (rev 559) @@ -19,6 +19,16 @@ " 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