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