~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/openbios/arch/sparc64/tree.fs

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
include config.fs
 
2
 
 
3
\ -------------------------------------------------------------------------
 
4
\ UPA encode/decode unit
 
5
\ -------------------------------------------------------------------------
 
6
 
 
7
: decode-unit-upa ( str len -- id lun )
 
8
  ascii , left-split
 
9
  ( addr-R len-R addr-L len-L )
 
10
  parse-hex
 
11
  -rot parse-hex
 
12
  swap
 
13
;
 
14
 
 
15
: encode-unit-upa ( id lun -- str len)
 
16
  swap
 
17
  pocket tohexstr
 
18
  " ," pocket tmpstrcat >r
 
19
  rot pocket tohexstr r> tmpstrcat drop
 
20
;
 
21
 
 
22
" /" find-device
 
23
  2 encode-int " #address-cells" property
 
24
  2 encode-int " #size-cells" property
 
25
  " sun4u" encode-string " compatible" property
 
26
 
 
27
  : encode-unit encode-unit-upa ;
 
28
  : decode-unit decode-unit-upa ;
 
29
 
 
30
new-device
 
31
  " memory" device-name
 
32
  " memory" device-type
 
33
  external
 
34
  : open true ;
 
35
  : close ;
 
36
  \ see arch/sparc64/lib.c for methods
 
37
finish-device
 
38
 
 
39
new-device
 
40
  " virtual-memory" device-name
 
41
  external
 
42
  \ see arch/sparc64/lib.c for methods
 
43
finish-device
 
44
 
 
45
" /options" find-device
 
46
  " disk" encode-string " boot-from" property
 
47
 
 
48
" /openprom" find-device
 
49
  " OBP 3.10.24 1999/01/01 01:01" encode-string " version" property