mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
30 lines
562 B
Forth
30 lines
562 B
Forth
|
|
|
||
|
|
" /" find-device
|
||
|
|
2 encode-int " #address-cells" property
|
||
|
|
1 encode-int " #size-cells" property
|
||
|
|
|
||
|
|
: encode-unit encode-unit-sbus ;
|
||
|
|
: decode-unit decode-unit-sbus ;
|
||
|
|
|
||
|
|
new-device
|
||
|
|
" memory" device-name
|
||
|
|
external
|
||
|
|
: open true ;
|
||
|
|
: close ;
|
||
|
|
\ claim ( phys size align -- base )
|
||
|
|
\ release ( phys size -- )
|
||
|
|
finish-device
|
||
|
|
|
||
|
|
new-device
|
||
|
|
" virtual-memory" device-name
|
||
|
|
external
|
||
|
|
: open true ;
|
||
|
|
: close ;
|
||
|
|
\ claim ( phys size align -- base )
|
||
|
|
\ release ( phys size -- )
|
||
|
|
finish-device
|
||
|
|
|
||
|
|
" /options" find-device
|
||
|
|
" disk" encode-string " boot-from" property
|
||
|
|
|