Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / obp / obp / arch / sun4v / niagara2 / loadprom.fth
CommitLineData
920dae64
AT
1\ ========== Copyright Header Begin ==========================================
2\
3\ Hypervisor Software File: loadprom.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 ============================================
42id: @(#)loadprom.fth 1.1 07/04/30
43purpose:
44copyright: Copyright 2007 Sun Microsystems, Inc. All rights reserved.
45copyright: Use is subject to license terms.
46
47decimal
48warning off
49caps on
50
51\ Niagara2 Load File
52transient
53
54\ Variables controlling inclusion of optional packages.
55
56[define] assembler?
57
58fload debug.fth
59
60resident
61
62fload ${BP}/os/unix/simforth/findnext.fth
63
64fload ${BP}/fm/lib/loadcomm.fth \ Generic CPU-independent Forth tools
65fload ${BP}/os/sun/sparc/loadmach.fth \ CPU and OS-specific extensions
66fload ${BP}/os/sun/sparc/loadfw.fth \ Platform-independent Open Firmware
67
68fload ${BP}/arch/sun4v/hfcodes.fth
69fload ${BP}/arch/sun4v/mdlib.fth
70fload ${BP}/pkg/fcode/vfcodes/sun4v.fth
71
72\ ===========================================================================
73\ Up to this point, we haven't loaded any machine-dependent code
74
75fload ${BP}/arch/sun4v/niagara/sysinfo.fth
76
77d# 256 1meg * constant 256meg
78d# 128 1meg * constant 128meg
79d# 64 1meg * constant 64meg
80d# 16 1meg * constant 16meg
81d# 8 1meg * constant 8meg
82d# 4 1meg * constant 4meg
83d# 2 1meg * constant 2meg
84
85h# 8.0000 constant ROMsize
86
87alias obmem 0
88alias obio 0
89
90fload ${BP}/cpu/sparc/ultra4v/loadultra.fth
91
92fload ${BP}/arch/sun4v/hyperconsole.fth
93
94fload ${BP}/arch/sun4v/niagara/virtaddrs.fth
95fload ${BP}/os/bootprom/loadlist.fth \ S Virtual, physical memory allocators
96fload ${BP}/os/bootprom/availmem.fth
97fload ${BP}/arch/sun4v/ramforth.fth \ S Ramforth
98fload ${BP}/os/bootprom/allocmor.fth
99fload ${BP}/os/bootprom/msgbuf.fth
100
101fload ${BP}/arch/sun4v/api-group-id.fth
102
103\ This file is shared by hardware and simulation environments, which have
104\ different HV API needs. We load hv-apis.fth from the appropriate directory
105\ based on the build location.
106fload ../hv-apis.fth
107fload ${BP}/arch/sun4v/api-version.fth
108
109fload ${BP}/arch/sun4v/mdload.fth
110fload ${BP}/arch/sun4v/devalias.fth \ S MD devalias import
111
112fload ${BP}/arch/sun4s/reentry-table.fth
113fload ${BP}/arch/sun4v/fastfill.fth
114fload ${BP}/arch/sun4v/cpustruct.fth \ S Allocate cpu structs
115fload ${BP}/arch/sun4v/sun4v-svcreport.fth
116fload ${BP}/cpu/sparc/ultra4v/savecpu.fth
117
118fload ${BP}/arch/sun4u/asmmacros.fth
119fload ${BP}/arch/sun4v/catchexc.fth \ S pssave and rssave
120fload ${BP}/arch/sun4v/mmumiss.fth
121
122fload ${BP}/arch/sun4v/mapdi.fth \ Mapping for drop-in drivers
123fload ${BP}/os/bootprom/dropin.fth \ Drop-in driver support
124fload ${BP}/pkg/decompressor/dropin.fth
125
126fload ${BP}/arch/sun4u/trans.fth
127fload ${BP}/arch/sun4u/traptable.fth
128fload ${BP}/arch/sun4u/fieldberr.fth \ Bus error handler for probing
129
130fload ${BP}/os/bootprom/pdump.fth \ physical dump
131
132fload ${BP}/os/stand/sysuart.fth
133
134fload ${BP}/cpu/sparc/ultra4v/tlbasm.fth
135fload ${BP}/arch/sun4v/niagara/tlbsetup.fth
136
137fload ${BP}/arch/sun4u/arcbpsup.fth \ S Arch-dependent breakpoint support
138fload ${BP}/arch/sun4u/reenter.fth \ S Getting back to Forth from Unix
139
140fload ${BP}/arch/sun/model.fth \ /openprom model and version props.
141
142fload ${BP}/arch/sun4s/msloop.fth \ Delays of n milliseconds
143fload ${BP}/arch/sun4v/machine-init.fth
144fload ${BP}/arch/sun4v/forthint.fth \ S alarm trap handler
145
146fload ${BP}/arch/sun4v/slavecpu.fth
147
148fload ${BP}/arch/sun4v/hslave.fth
149
150fload ${BP}/arch/sun4v/niagara/boot.fth \ SI startup code
151
152fload ${BP}/arch/sun4v/xcall.fth
153
154fload ${BP}/arch/sun4u/startcpu.fth
155fload ${BP}/arch/sun4v/switchcpu.fth
156
157fload ${BP}/arch/sun4u/quark/le-access.fth \ little endian access code.
158fload ${BP}/dev/builtin.fth
159
160fload ${BP}/arch/sun4v/mondo.fth
161
162stand-init: Loading Support Packages
163 diagnostic-mode? if
164 ." Loading Support Packages: "
165 then
166 " support-pkg" do-drop-in
167 diagnostic-mode? if cr then
168;
169
170stand-init: Loading Builtin Devices
171 " onboard-devices" ['] builtin-drivers-package find-method if
172 execute
173 then
174;
175
176fload ${BP}/arch/sun4v/niagara/loadconfig.fth
177' diag-switch? is diagnostic-mode?
178
179vocabulary ldc
180also ldc definitions
181fload ${BP}/dev/sun4v-devices/ldc/methods.fth
182previous definitions
183
184fload ${BP}/arch/sun4v/domain-services.fth \ domain service backend
185fload ${BP}/arch/sun4v/ldom-variables.fth \ ldom variables domain service
186
187stand-init: Track firmware verbosity
188 " verbosity" ['] options search-wordlist if
189 get to fw-verbosity
190 then
191;
192
193fload ${BP}/arch/sun4v/memprobe.fth \ S memory sizer
194
195fload ${BP}/os/bootprom/scrubmem.fth
196
197fload ${BP}/arch/sun/idprom.fth \ IDPROM layout
198fload ${BP}/arch/sun/keystore.fth \ Security keystore
199fload ${BP}/arch/sun4v/keystore.fth \ keystore domain service
200
201headers
202
203: bzero-region ( va len -- ) 2drop ;
204: btouch-region ( va len -- ) 2drop ;
205
206fload ${BP}/pkg/keyboard/usb/support.fth
207
208\ Force a map of the drop-in ROM
209stand-init: direct-open-drop-in
210 direct-open-drop-in drop
211;
212
213stand-init: cpu-devices-
214 " cpu-devices-" do-drop-in
215;
216
217fload ${BP}/pkg/fcode/obsfcode.fth
218
219fload ${BP}/arch/sun4v/retained.fth \ retained memory is non-functional
220
221fload ${BP}/arch/sun4v/rootnexus.fth
222
223fload ${BP}/dev/pci/knownprops.fth
224
225stand-init: cpu-devices+
226 " cpu-devices+" do-drop-in
227;
228
2290 value xir-reset? \ XXXX
230
231fload ${BP}/cpu/sparc/init-c9.fth \ S Init. C Stack Pointer
232
233fload ${BP}/arch/sun4u/starthacks.fth \ XXXX
234
235fload ${BP}/arch/sun4u/unixmap.fth \ MMU initialization
236
237fload ${BP}/arch/sun4u/reboot.fth \ S Reboot Info
238fload ${BP}/arch/sun4u/consredir.fth
239
240\ Packages
241fload ${BP}/pkg/loadpkg.fth
242fload ${BP}/pkg/dropins/loadpkg.fth
243
244fload ${BP}/arch/sun4v/multipath-boot.fth
245fload ${BP}/arch/sun4v/reboot-info.fth
246
247fload ${BP}/pkg/asr-ds/asr.fth \ asr domain service
248
249fload ${BP}/pkg/selftest/selftest.fth
250
251\ modify banner to display available rather than installed memory
252: .memory-available ( -- ) ." memory available" ;
253' .memory-available is .memory-install-msg
254
255fload ${BP}/arch/sun4v/niagara/probeall.fth
256
257fload ${BP}/dev/scsi/probescsi.fth \ probe-scsi
258fload ${BP}/pkg/inet/watchnet.fth \ watch-net
259fload ${BP}/dev/ide/probe.fth \ probe-ide
260
261fload builtin.fth
262
263true value system-test-ok?
264alias post-ok? true
265alias system-tests noop
266
267fload ${BP}/arch/sun4u/startup.fth \ S misc. startup stuff
268fload ${BP}/arch/sun4v/auto-boot-on-error.fth
269fload ${BP}/arch/sun4v/niagara/bootscript.fth
270
271headers
272
273fload ${BP}/arch/sun4v/console-tty.fth
274fload ${BP}/arch/sun4v/md-iodevice-props.fth
275
276fload ${BP}/arch/sun4v/guest-state.fth
277
278headerless
279fload ${BP}/arch/sun4v/niagara/cleanup.fth