Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / obp / obp / arch / sun4v / niagara / 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.19 07/06/22
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\ Niagara 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
102fload ${BP}/arch/sun4v/niagara/hv-apis.fth
103fload ${BP}/arch/sun4v/api-version.fth
104fload ${BP}/arch/sun4v/niagara/hv-api-init.fth
105
106fload ${BP}/arch/sun4v/mdload.fth
107fload ${BP}/arch/sun4v/devalias.fth \ S MD devalias import
108
109fload ${BP}/arch/sun4s/reentry-table.fth
110fload ${BP}/arch/sun4v/fastfill.fth
111fload ${BP}/arch/sun4v/cpustruct.fth \ S Allocate cpu structs
112fload ${BP}/arch/sun4v/sun4v-svcreport.fth
113fload ${BP}/cpu/sparc/ultra4v/savecpu.fth
114
115fload ${BP}/arch/sun4u/asmmacros.fth
116fload ${BP}/arch/sun4v/catchexc.fth \ S pssave and rssave
117fload ${BP}/arch/sun4v/mmumiss.fth
118
119fload ${BP}/arch/sun4v/mapdi.fth \ Mapping for drop-in drivers
120fload ${BP}/os/bootprom/dropin.fth \ Drop-in driver support
121fload ${BP}/pkg/decompressor/dropin.fth
122
123fload ${BP}/arch/sun4u/trans.fth
124fload ${BP}/arch/sun4u/traptable.fth
125fload ${BP}/arch/sun4u/fieldberr.fth \ Bus error handler for probing
126
127fload ${BP}/os/bootprom/pdump.fth \ physical dump
128
129fload ${BP}/os/stand/sysuart.fth
130
131fload ${BP}/cpu/sparc/ultra4v/tlbasm.fth
132fload ${BP}/arch/sun4v/niagara/tlbsetup.fth
133
134fload ${BP}/arch/sun4u/arcbpsup.fth \ S Arch-dependent breakpoint support
135fload ${BP}/arch/sun4u/reenter.fth \ S Getting back to Forth from Unix
136
137fload ${BP}/arch/sun/model.fth \ /openprom model and version props.
138
139fload ${BP}/arch/sun4s/msloop.fth \ Delays of n milliseconds
140fload ${BP}/arch/sun4v/machine-init.fth
141fload ${BP}/arch/sun4v/forthint.fth \ S alarm trap handler
142
143fload ${BP}/arch/sun4v/slavecpu.fth
144
145fload ${BP}/arch/sun4v/hslave.fth
146
147fload ${BP}/arch/sun4v/niagara/boot.fth \ SI startup code
148
149fload ${BP}/arch/sun4v/xcall.fth
150
151fload ${BP}/arch/sun4u/startcpu.fth
152fload ${BP}/arch/sun4v/switchcpu.fth
153
154fload ${BP}/arch/sun4u/quark/le-access.fth \ little endian access code.
155fload ${BP}/dev/builtin.fth
156
157fload ${BP}/arch/sun4v/mondo.fth
158
159stand-init: Loading Support Packages
160 diagnostic-mode? if
161 ." Loading Support Packages: "
162 then
163 " support-pkg" do-drop-in
164 diagnostic-mode? if cr then
165;
166
167stand-init: Loading Builtin Devices
168 " onboard-devices" ['] builtin-drivers-package find-method if
169 execute
170 then
171;
172
173fload ${BP}/arch/sun4v/niagara/loadconfig.fth
174' diag-switch? is diagnostic-mode?
175
176vocabulary ldc
177also ldc definitions
178fload ${BP}/dev/sun4v-devices/ldc/methods.fth
179previous definitions
180
181fload ${BP}/arch/sun4v/domain-services.fth \ domain service backend
182fload ${BP}/arch/sun4v/ldom-variables.fth \ ldom variables domain service
183
184stand-init: Track firmware verbosity
185 " verbosity" ['] options search-wordlist if
186 get to fw-verbosity
187 then
188;
189
190fload ${BP}/arch/sun4v/memprobe.fth \ S memory sizer
191
192fload ${BP}/os/bootprom/scrubmem.fth
193
194fload ${BP}/arch/sun/idprom.fth \ IDPROM layout
195fload ${BP}/arch/sun/keystore.fth \ Security keystore
196fload ${BP}/arch/sun4v/keystore.fth \ keystore domain service
197
198headers
199
200: bzero-region ( va len -- ) 2drop ;
201: btouch-region ( va len -- ) 2drop ;
202
203fload ${BP}/pkg/keyboard/usb/support.fth
204
205\ Force a map of the drop-in ROM
206stand-init: direct-open-drop-in
207 direct-open-drop-in drop
208;
209
210stand-init: cpu-devices-
211 " cpu-devices-" do-drop-in
212;
213
214fload ${BP}/pkg/fcode/obsfcode.fth
215
216fload ${BP}/arch/sun4v/retained.fth \ retained memory is non-functional
217
218fload ${BP}/arch/sun4v/rootnexus.fth
219
220fload ${BP}/dev/pci/knownprops.fth
221
222stand-init: cpu-devices+
223 " cpu-devices+" do-drop-in
224;
225
2260 value xir-reset? \ XXXX
227
228fload ${BP}/cpu/sparc/init-c9.fth \ S Init. C Stack Pointer
229
230fload ${BP}/arch/sun4u/starthacks.fth \ XXXX
231
232fload ${BP}/arch/sun4u/unixmap.fth \ MMU initialization
233
234fload ${BP}/arch/sun4u/reboot.fth \ S Reboot Info
235fload ${BP}/arch/sun4u/consredir.fth
236
237\ Packages
238fload ${BP}/pkg/loadpkg.fth
239fload ${BP}/pkg/dropins/loadpkg.fth
240
241fload ${BP}/arch/sun4v/multipath-boot.fth
242fload ${BP}/arch/sun4v/reboot-info.fth
243
244fload ${BP}/pkg/asr-ds/asr.fth \ asr domain service
245
246fload ${BP}/pkg/selftest/selftest.fth
247
248\ modify banner to display available rather than installed memory
249: .memory-available ( -- ) ." memory available" ;
250' .memory-available is .memory-install-msg
251
252fload ${BP}/arch/sun4v/niagara/probeall.fth
253
254fload ${BP}/dev/scsi/probescsi.fth \ probe-scsi
255fload ${BP}/pkg/inet/watchnet.fth \ watch-net
256fload ${BP}/dev/ide/probe.fth \ probe-ide
257
258fload builtin.fth
259
260true value system-test-ok?
261alias post-ok? true
262alias system-tests noop
263
264fload ${BP}/arch/sun4u/startup.fth \ S misc. startup stuff
265
266fload ${BP}/arch/sun4v/auto-boot-on-error.fth
267fload ${BP}/arch/sun4v/niagara/bootscript.fth
268
269headers
270
271fload ${BP}/arch/sun4v/console-tty.fth
272fload ${BP}/arch/sun4v/md-iodevice-props.fth
273
274headerless
275fload ${BP}/arch/sun4v/niagara/cleanup.fth