Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | \ ========== Copyright Header Begin ========================================== |
2 | \ | |
3 | \ Hypervisor Software File: loadkern.fth | |
4 | \ | |
5 | \ Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. | |
6 | \ | |
7 | \ - Do no alter or remove copyright notices | |
8 | \ | |
9 | \ - Redistribution and use of this software in source and binary forms, with | |
10 | \ or without modification, are permitted provided that the following | |
11 | \ conditions are met: | |
12 | \ | |
13 | \ - Redistribution of source code must retain the above copyright notice, | |
14 | \ this list of conditions and the following disclaimer. | |
15 | \ | |
16 | \ - Redistribution in binary form must reproduce the above copyright notice, | |
17 | \ this list of conditions and the following disclaimer in the | |
18 | \ documentation and/or other materials provided with the distribution. | |
19 | \ | |
20 | \ Neither the name of Sun Microsystems, Inc. or the names of contributors | |
21 | \ may be used to endorse or promote products derived from this software | |
22 | \ without specific prior written permission. | |
23 | \ | |
24 | \ This software is provided "AS IS," without a warranty of any kind. | |
25 | \ ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, | |
26 | \ INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A | |
27 | \ PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN | |
28 | \ MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR | |
29 | \ ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR | |
30 | \ DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN | |
31 | \ OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR | |
32 | \ FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE | |
33 | \ DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, | |
34 | \ ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF | |
35 | \ SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | |
36 | \ | |
37 | \ You acknowledge that this software is not designed, licensed or | |
38 | \ intended for use in the design, construction, operation or maintenance of | |
39 | \ any nuclear facility. | |
40 | \ | |
41 | \ ========== Copyright Header End ============================================ | |
42 | \ id: @(#)loadkern.fth 2.34 07/06/05 10:54:48 | |
43 | \ purpose: | |
44 | \ copyright: Copyright 2007 Sun Microsystems, Inc. All Rights Reserved | |
45 | \ copyright: Use is subject to license terms. | |
46 | \ Copyright 1985-1994 Bradley Forthware | |
47 | ||
48 | \ Don't accept ',' as numeric punctuation because doing so makes | |
49 | \ the forward referencing mechanism think that "c," is a number! | |
50 | ascii . ascii , npatch numdelim? | |
51 | ||
52 | warning off \ Turn OFF the warning messages | |
53 | ||
54 | 64\ 8 constant /n | |
55 | \needs lconstant alias lconstant constant | |
56 | ||
57 | [ifnexist] [message] | |
58 | fload ${BP}/fm/lib/message.fth | |
59 | [then] | |
60 | ||
61 | fload ${BP}/fm/meta/meta1.fth | |
62 | alias xref-on meta-xref-on | |
63 | alias xref-off meta-xref-off | |
64 | fload ${BP}/fm/lib/xref.fth | |
65 | ||
66 | only forth also meta also definitions | |
67 | fload ${BP}/cpu/sparc/assem.fth | |
68 | ||
69 | only forth also meta assembler also meta definitions | |
70 | : assembler ( -- ) srassembler ; | |
71 | ||
72 | only forth also meta also assembler definitions | |
73 | ||
74 | fload ${BP}/fm/lib/loclabel.fth | |
75 | ||
76 | fload ${BP}/fm/meta/nswapmap.fth | |
77 | fload ${BP}/fm/meta/sparc/target.fth | |
78 | fload ${BP}/fm/meta/forward.fth | |
79 | fload ${BP}/fm/meta/sparc/fixvoc.fth | |
80 | fload ${BP}/fm/meta/compilin.fth | |
81 | ||
82 | only forth also definitions | |
83 | ||
84 | [ifdef] XREF | |
85 | xref-init | |
86 | \ Init the first reference file | |
87 | " ${BP}/fm/kernel/sparc/loadkern.fth" xref-push-file 2drop | |
88 | \ The include-exit hook in metainit will pop this file | |
89 | " ${BP}/fm/kernel/sparc/metainit.fth" xref-push-file 2drop | |
90 | [then] | |
91 | ||
92 | fload ${BP}/fm/kernel/sparc/metainit.fth | |
93 | ||
94 | \ always-headers \ Keep all the headers | |
95 | \ sometimes-headers \ Keep some instead | |
96 | ||
97 | sometimes-headers | |
98 | ||
99 | \ Comment out the following line(s) when debugging | |
100 | -1 threshold ! \ Turn OFF ALL debugging messages | |
101 | warning-t off \ Turn OFF target warning messages | |
102 | ||
103 | \ Uncomment the following line(s) for more debug output | |
104 | \ show? on 1 granularity ! 1 threshold ! | |
105 | warning-t on | |
106 | ||
107 | fload ${BP}/fm/kernel/sparc/kerncode.fth | |
108 | 32\ fload ${BP}/fm/kernel/sparc/divrem.fth | |
109 | 64\ fload ${BP}/fm/kernel/sparc/divrem9.fth | |
110 | ||
111 | fload ${BP}/fm/kernel/uservars.fth \ I init task link. | |
112 | 32\ fload ${BP}/fm/kernel/sparc/multiply.fth | |
113 | 64\ fload ${BP}/fm/kernel/sparc/mulv9.fth | |
114 | ||
115 | \t32-t fload ${BP}/fm/kernel/sparc/move.fth | |
116 | \t16-t fload ${BP}/fm/kernel/sparc/moveslow.fth \ Longword optimized | |
117 | \ but not doubleword optimized | |
118 | [ifdef] XREF | |
119 | headers | |
120 | defer xref-on ' noop is xref-on | |
121 | defer xref-off ' noop is xref-off | |
122 | defer xref-header-hook ' noop is xref-header-hook | |
123 | defer xref-find-hook ' noop is xref-find-hook | |
124 | defer xref-hide-hook ' noop is xref-hide-hook | |
125 | defer xref-reveal-hook ' noop is xref-reveal-hook | |
126 | defer xref-string-hook ' noop is xref-string-hook | |
127 | [then] | |
128 | ||
129 | fload ${BP}/fm/lib/xref.fth | |
130 | fload ${BP}/fm/kernel/sparc/extra.fth | |
131 | ||
132 | fload ${BP}/fm/kernel/sparc/double.fth | |
133 | fload ${BP}/fm/kernel/double.fth | |
134 | ||
135 | fload ${BP}/fm/kernel/dmuldiv.fth | |
136 | 64\ fload ${BP}/fm/kernel/dmul.fth | |
137 | defer title ' noop is title \ Set later in loadutil.fth | |
138 | ||
139 | fload ${BP}/fm/kernel/io.fth \ I init #-buf | |
140 | ||
141 | fload ${BP}/fm/kernel/stresc.fth \ I init stringbuf | |
142 | fload ${BP}/fm/kernel/comment.fth | |
143 | fload ${BP}/fm/kernel/kernel2.fth | |
144 | fload ${BP}/fm/kernel/compiler.fth \ I init 'compile-buffer | |
145 | fload ${BP}/fm/kernel/interp.fth | |
146 | fload ${BP}/fm/kernel/kernport.fth | |
147 | ||
148 | fload ${BP}/fm/kernel/definers.fth \ I clear buffers | |
149 | fload ${BP}/fm/kernel/tagvoc.fth | |
150 | fload ${BP}/fm/kernel/voccom.fth \ I init canonical-words and | |
151 | \ prev-canonical-word | |
152 | ||
153 | fload ${BP}/fm/kernel/order.fth \ I init search order | |
154 | fload ${BP}/fm/kernel/is.fth | |
155 | fload ${BP}/fm/kernel/sparc/field.fth | |
156 | ||
157 | fload ${BP}/fm/kernel/cold.fth | |
158 | ||
159 | fload ${BP}/fm/kernel/sparc/checkpt.fth | |
160 | ||
161 | fload ${BP}/fm/kernel/guarded.fth | |
162 | ||
163 | fload ${BP}/fm/lib/cstrings.fth \ I init cstrbuf | |
164 | ||
165 | \ Bootstrapping onto a minikernel does not work yet so we need these. | |
166 | [undef] miniforth? | |
167 | ||
168 | [ifndef] miniforth? | |
169 | fload ${BP}/fm/kernel/sparc/filecode.fth | |
170 | fload ${BP}/fm/kernel/filecomm.fth \ I init 'word and fds | |
171 | fload ${BP}/fm/kernel/disk.fth | |
172 | fload ${BP}/fm/kernel/readline.fth | |
173 | fload ${BP}/fm/cwrapper/sysdisk.fth | |
174 | [then] | |
175 | ||
176 | fload ${BP}/fm/cwrapper/syskey.fth | |
177 | fload ${BP}/os/unix/sparc/sys.fth | |
178 | ||
179 | fload ${BP}/fm/lib/alias.fth | |
180 | ||
181 | fload ${BP}/fm/kernel/cmdline.fth | |
182 | ||
183 | fload ${BP}/fm/kernel/nswapmap.fth | |
184 | ||
185 | fload ${BP}/fm/kernel/ansio.fth \ I init error-file | |
186 | fload ${BP}/fm/kernel/sparc/parseline.fth | |
187 | ||
188 | [ifndef] miniforth? | |
189 | fload ${BP}/fm/kernel/fileio.fth | |
190 | [then] | |
191 | ||
192 | \ fload ${BP}/fm/lib/transien.fth | |
193 | \ fload ${BP}/fm/lib/headless.fth | |
194 | ||
195 | fload ${BP}/fm/cwrapper/sparc/boot.fth | |
196 | fload ${BP}/fm/kernel/init.fth | |
197 | fload ${BP}/fm/kernel/sparc/finish.fth | |
198 | ||
199 | fload ${BP}/fm/meta/sparc/savemeta.fth | |
200 | ||
201 | warning on \ Turn ON the warning messages | |
202 | ||
203 | hex | |
204 | ||
205 | metaoff | |
206 | ||
207 | [ifndef] dic-file-name | |
208 | true abort" ERROR: dic-file-name undefined, can't save image" | |
209 | [then] | |
210 | [defined] dic-file-name dup 1+ alloc-mem pack save-meta | |
211 | ||
212 | \ In order to get the headers/headerless info save the dictionary | |
213 | [ifdef] nheads-dic-name | |
214 | [defined] nheads-dic-name "temp pack | |
215 | [else] | |
216 | "" nheads.dic | |
217 | [then] save-forth |