mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user