3
\ -------------------------------------------------------------------------
4
\ UPA encode/decode unit
5
\ -------------------------------------------------------------------------
7
: decode-unit-upa ( str len -- id lun )
9
( addr-R len-R addr-L len-L )
15
: encode-unit-upa ( id lun -- str len)
18
" ," pocket tmpstrcat >r
19
rot pocket tohexstr r> tmpstrcat drop
23
2 encode-int " #address-cells" property
24
2 encode-int " #size-cells" property
25
" sun4u" encode-string " compatible" property
27
: encode-unit encode-unit-upa ;
28
: decode-unit decode-unit-upa ;
36
\ see arch/sparc64/lib.c for methods
40
" virtual-memory" device-name
42
\ see arch/sparc64/lib.c for methods
45
" /options" find-device
46
" disk" encode-string " boot-from" property
48
" /openprom" find-device
49
" OBP 3.10.24 1999/01/01 01:01" encode-string " version" property