]>
Commit | Line | Data |
---|---|---|
1815bff5 A |
1 | ## |
2 | # Copyright (c) 1999 Apple Computer, Inc. All rights reserved. | |
3 | # | |
4 | # @APPLE_LICENSE_HEADER_START@ | |
5 | # | |
6 | # "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights | |
7 | # Reserved. This file contains Original Code and/or Modifications of | |
8 | # Original Code as defined in and that are subject to the Apple Public | |
9 | # Source License Version 1.0 (the 'License'). You may not use this file | |
10 | # except in compliance with the License. Please obtain a copy of the | |
11 | # License at http://www.apple.com/publicsource and read it before using | |
12 | # this file. | |
13 | # | |
14 | # The Original Code and all software distributed under the License are | |
15 | # distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
16 | # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
17 | # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
18 | # FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the | |
19 | # License for the specific language governing rights and limitations | |
20 | # under the License." | |
21 | # | |
22 | # @APPLE_LICENSE_HEADER_END@ | |
23 | ## | |
24 | # Version: 1.2.1 Date: 1-30-2001 | |
25 | use-nvramrc? true | |
26 | load-base 600000 | |
27 | diag-device | |
28 | nvramrc hex\ | |
29 | : $D find-device ;\ | |
30 | : $E device-end ;\ | |
31 | : $L BLpatch ; : $R BRpatch ;\ | |
32 | : $X execute ;\ | |
33 | : $P 0 to my-self property ;\ | |
34 | : &a " /chosen" $D $P $E ;\ | |
35 | : &c " ata-enable" $call-parent ;\ | |
36 | : helpb " backlight-on" _pmu-ihandle $call-method\ | |
37 | 0 0 " "(70)" 40 " pmu-op" _pmu-ihandle $call-method drop ;\ | |
38 | 10 buffer: km\ | |
39 | devalias ide0 /pci/@10/ata0\ | |
40 | devalias ide1 /pci/@10/@34/ata1\ | |
41 | devalias ide4 /pci/@d/@34/ata4\ | |
42 | dev /aliases\ | |
43 | : $M delete-property ;\ | |
44 | " ata-int" $M\ | |
45 | " ata0" $M\ | |
46 | " ata1" $M\ | |
47 | " ata4" $M\ | |
48 | dev kbd\ | |
49 | get-key-map km swap move\ | |
50 | $E\ | |
51 | : ck 0 do swap dup 3 >> km + c@ 1 rot 7 and << and or loop ;\ | |
52 | : bootr 0d word count encode-string " machargs" &a\ | |
53 | 0 0 1 ck if 0 and else dup 1 = if 3d 0 1 else f 3d 0 2 then ck if 40 or then then\ | |
54 | 40 and if bye else helpb 1e 0 do ['] boot catch drop 1f4 ms loop then bye ;\ | |
55 | : myboot boot-command eval ;\ | |
56 | dev enet\ | |
57 | 62 ' READ 7 - c!\ | |
58 | : READ { _p _n ; _a } begin _p _n bead -> _a _a 2+\ | |
59 | if _p c@ 80 and 0= else 1 then until _a ;\ | |
60 | $E\ | |
61 | dev /packages/obp-tftp\ | |
62 | : $M over + ['] noop $L ;\ | |
63 | : $O ['] open + ;\ | |
64 | : $M1 dup 24 - -1720 $O $X 6 move 14 + ;\ | |
65 | -5BC $O ' $M1 $L\ | |
66 | 0 $O E8 $M EC $M F0 $M F4 $M F8 + ' true $L\ | |
67 | $E\ | |
68 | dev /packages/mac-parts\ | |
69 | : $M -7E86F0 $X 8000 alloc-mem 7F00 + 4 -7E86F0 $X ;\ | |
70 | ' load 268 - ' $M $L\ | |
71 | ' load 160 + ' 0 $L\ | |
72 | dev ide0\ | |
73 | : open use-ata-interface 0 &c -1 ;\ | |
74 | : set-device-ID set-drive-select ;\ | |
75 | $E\ | |
76 | dev mac-io/@34\ | |
77 | 1 value &f\ | |
78 | : ata-enable &f if 1000 ms &c 1000 ms 0 to &f else drop then ;\ | |
79 | $E\ | |
80 | dev ide1\ | |
81 | : open use-ata-interface 1 &c -1 ;\ | |
82 | : set-device-ID set-drive-select ;\ | |
83 | : reset-atapi-bus reset-ata-bus ;\ | |
84 | $E\ | |
85 | dev pci1/@d/@34\ | |
86 | : ata-enable &c ;\ | |
87 | $E\ | |
88 | dev ide4\ | |
89 | : open use-ata-interface 1 &c -1 ;\ | |
90 | : set-device-ID set-drive-select ;\ | |
91 | : reset-atapi-bus reset-ata-bus ;\ | |
92 | $E\ | |
93 | dev scsi\ | |
94 | : $M ['] do-cmd + ;\ | |
95 | : $M2 5 us -5f0 $M $X ;\ | |
96 | : $M3 -710 $M f over $X $X ;\ | |
97 | : $M4 1 ms ;\ | |
98 | -1AC $M ' $M2 $L\ | |
99 | 100 $M ' $M3 $L\ | |
100 | 120 $M ' $M4 $L\ | |
101 | 124 $M ' 1 $L\ | |
102 | $E\ | |
103 | unselect-dev |