Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / obp / obp / fm / kernel / sparc / loadkern.fth
CommitLineData
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!
50ascii . ascii , npatch numdelim?
51
52warning off \ Turn OFF the warning messages
53
5464\ 8 constant /n
55\needs lconstant alias lconstant constant
56
57[ifnexist] [message]
58fload ${BP}/fm/lib/message.fth
59[then]
60
61fload ${BP}/fm/meta/meta1.fth
62alias xref-on meta-xref-on
63alias xref-off meta-xref-off
64fload ${BP}/fm/lib/xref.fth
65
66only forth also meta also definitions
67fload ${BP}/cpu/sparc/assem.fth
68
69only forth also meta assembler also meta definitions
70: assembler ( -- ) srassembler ;
71
72only forth also meta also assembler definitions
73
74fload ${BP}/fm/lib/loclabel.fth
75
76fload ${BP}/fm/meta/nswapmap.fth
77fload ${BP}/fm/meta/sparc/target.fth
78fload ${BP}/fm/meta/forward.fth
79fload ${BP}/fm/meta/sparc/fixvoc.fth
80fload ${BP}/fm/meta/compilin.fth
81
82only forth also definitions
83
84[ifdef] XREF
85xref-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
92fload ${BP}/fm/kernel/sparc/metainit.fth
93
94\ always-headers \ Keep all the headers
95\ sometimes-headers \ Keep some instead
96
97sometimes-headers
98
99\ Comment out the following line(s) when debugging
100-1 threshold ! \ Turn OFF ALL debugging messages
101warning-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 !
105warning-t on
106
107fload ${BP}/fm/kernel/sparc/kerncode.fth
10832\ fload ${BP}/fm/kernel/sparc/divrem.fth
10964\ fload ${BP}/fm/kernel/sparc/divrem9.fth
110
111fload ${BP}/fm/kernel/uservars.fth \ I init task link.
11232\ fload ${BP}/fm/kernel/sparc/multiply.fth
11364\ 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
119headers
120defer xref-on ' noop is xref-on
121defer xref-off ' noop is xref-off
122defer xref-header-hook ' noop is xref-header-hook
123defer xref-find-hook ' noop is xref-find-hook
124defer xref-hide-hook ' noop is xref-hide-hook
125defer xref-reveal-hook ' noop is xref-reveal-hook
126defer xref-string-hook ' noop is xref-string-hook
127[then]
128
129fload ${BP}/fm/lib/xref.fth
130fload ${BP}/fm/kernel/sparc/extra.fth
131
132fload ${BP}/fm/kernel/sparc/double.fth
133fload ${BP}/fm/kernel/double.fth
134
135fload ${BP}/fm/kernel/dmuldiv.fth
13664\ fload ${BP}/fm/kernel/dmul.fth
137defer title ' noop is title \ Set later in loadutil.fth
138
139fload ${BP}/fm/kernel/io.fth \ I init #-buf
140
141fload ${BP}/fm/kernel/stresc.fth \ I init stringbuf
142fload ${BP}/fm/kernel/comment.fth
143fload ${BP}/fm/kernel/kernel2.fth
144fload ${BP}/fm/kernel/compiler.fth \ I init 'compile-buffer
145fload ${BP}/fm/kernel/interp.fth
146fload ${BP}/fm/kernel/kernport.fth
147
148fload ${BP}/fm/kernel/definers.fth \ I clear buffers
149fload ${BP}/fm/kernel/tagvoc.fth
150fload ${BP}/fm/kernel/voccom.fth \ I init canonical-words and
151 \ prev-canonical-word
152
153fload ${BP}/fm/kernel/order.fth \ I init search order
154fload ${BP}/fm/kernel/is.fth
155fload ${BP}/fm/kernel/sparc/field.fth
156
157fload ${BP}/fm/kernel/cold.fth
158
159fload ${BP}/fm/kernel/sparc/checkpt.fth
160
161fload ${BP}/fm/kernel/guarded.fth
162
163fload ${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?
169fload ${BP}/fm/kernel/sparc/filecode.fth
170fload ${BP}/fm/kernel/filecomm.fth \ I init 'word and fds
171fload ${BP}/fm/kernel/disk.fth
172fload ${BP}/fm/kernel/readline.fth
173fload ${BP}/fm/cwrapper/sysdisk.fth
174[then]
175
176fload ${BP}/fm/cwrapper/syskey.fth
177fload ${BP}/os/unix/sparc/sys.fth
178
179fload ${BP}/fm/lib/alias.fth
180
181fload ${BP}/fm/kernel/cmdline.fth
182
183fload ${BP}/fm/kernel/nswapmap.fth
184
185fload ${BP}/fm/kernel/ansio.fth \ I init error-file
186fload ${BP}/fm/kernel/sparc/parseline.fth
187
188[ifndef] miniforth?
189fload ${BP}/fm/kernel/fileio.fth
190[then]
191
192\ fload ${BP}/fm/lib/transien.fth
193\ fload ${BP}/fm/lib/headless.fth
194
195fload ${BP}/fm/cwrapper/sparc/boot.fth
196fload ${BP}/fm/kernel/init.fth
197fload ${BP}/fm/kernel/sparc/finish.fth
198
199fload ${BP}/fm/meta/sparc/savemeta.fth
200
201warning on \ Turn ON the warning messages
202
203hex
204
205metaoff
206
207[ifndef] dic-file-name
208true 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