srt0.S revision 1.15 1 1.15 tsutsui /* $NetBSD: srt0.S,v 1.15 2006/07/20 13:21:38 tsutsui Exp $ */
2 1.1 thorpej
3 1.1 thorpej /*
4 1.1 thorpej * Copyright (c) 1982, 1990, 1993
5 1.1 thorpej * The Regents of the University of California. All rights reserved.
6 1.12 agc *
7 1.12 agc * This code is derived from software contributed to Berkeley by
8 1.12 agc * the Systems Programming Group of the University of Utah Computer
9 1.12 agc * Science Department.
10 1.12 agc *
11 1.12 agc * Redistribution and use in source and binary forms, with or without
12 1.12 agc * modification, are permitted provided that the following conditions
13 1.12 agc * are met:
14 1.12 agc * 1. Redistributions of source code must retain the above copyright
15 1.12 agc * notice, this list of conditions and the following disclaimer.
16 1.12 agc * 2. Redistributions in binary form must reproduce the above copyright
17 1.12 agc * notice, this list of conditions and the following disclaimer in the
18 1.12 agc * documentation and/or other materials provided with the distribution.
19 1.12 agc * 3. Neither the name of the University nor the names of its contributors
20 1.12 agc * may be used to endorse or promote products derived from this software
21 1.12 agc * without specific prior written permission.
22 1.12 agc *
23 1.12 agc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 1.12 agc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 1.12 agc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 1.12 agc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 1.12 agc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 1.12 agc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 1.12 agc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 1.12 agc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 1.12 agc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 1.12 agc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 1.12 agc * SUCH DAMAGE.
34 1.12 agc *
35 1.12 agc * from: Utah $Hdr: srt0.c 1.18 92/12/21$
36 1.12 agc *
37 1.12 agc * @(#)srt0.c 8.1 (Berkeley) 6/10/93
38 1.12 agc */
39 1.12 agc /*
40 1.12 agc * Copyright (c) 1988 University of Utah.
41 1.1 thorpej *
42 1.1 thorpej * This code is derived from software contributed to Berkeley by
43 1.1 thorpej * the Systems Programming Group of the University of Utah Computer
44 1.1 thorpej * Science Department.
45 1.1 thorpej *
46 1.1 thorpej * Redistribution and use in source and binary forms, with or without
47 1.1 thorpej * modification, are permitted provided that the following conditions
48 1.1 thorpej * are met:
49 1.1 thorpej * 1. Redistributions of source code must retain the above copyright
50 1.1 thorpej * notice, this list of conditions and the following disclaimer.
51 1.1 thorpej * 2. Redistributions in binary form must reproduce the above copyright
52 1.1 thorpej * notice, this list of conditions and the following disclaimer in the
53 1.1 thorpej * documentation and/or other materials provided with the distribution.
54 1.1 thorpej * 3. All advertising materials mentioning features or use of this software
55 1.1 thorpej * must display the following acknowledgement:
56 1.1 thorpej * This product includes software developed by the University of
57 1.1 thorpej * California, Berkeley and its contributors.
58 1.1 thorpej * 4. Neither the name of the University nor the names of its contributors
59 1.1 thorpej * may be used to endorse or promote products derived from this software
60 1.1 thorpej * without specific prior written permission.
61 1.1 thorpej *
62 1.1 thorpej * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
63 1.1 thorpej * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
64 1.1 thorpej * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
65 1.1 thorpej * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
66 1.1 thorpej * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
67 1.1 thorpej * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
68 1.1 thorpej * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
69 1.1 thorpej * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
70 1.1 thorpej * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
71 1.1 thorpej * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
72 1.1 thorpej * SUCH DAMAGE.
73 1.1 thorpej *
74 1.1 thorpej * from: Utah $Hdr: srt0.c 1.18 92/12/21$
75 1.1 thorpej *
76 1.1 thorpej * @(#)srt0.c 8.1 (Berkeley) 6/10/93
77 1.1 thorpej */
78 1.1 thorpej
79 1.1 thorpej /*
80 1.1 thorpej * Startup code for standalone system
81 1.1 thorpej */
82 1.1 thorpej
83 1.3 thorpej /* For machineid and mmuid constants */
84 1.3 thorpej #include <machine/hp300spu.h>
85 1.1 thorpej
86 1.3 thorpej /* For _C_LABEL() and friends. */
87 1.3 thorpej #include <machine/asm.h>
88 1.3 thorpej
89 1.9 thorpej STACK = 0xfffff000 /* below the ROM page */
90 1.1 thorpej BOOTTYPE = 0xfffffdc0
91 1.1 thorpej LOWRAM = 0xfffffdce
92 1.9 thorpej SYSFLAG = 0xfffffed2 /* system flags */
93 1.9 thorpej MSUS = 0xfffffedc /* MSUS (?) structure */
94 1.9 thorpej VECTORS = 0xfffffee0 /* beginning of jump vectors */
95 1.9 thorpej NMIRESET = 0xffffff9c /* reset vector */
96 1.1 thorpej BUSERR = 0xfffffffc
97 1.1 thorpej MAXADDR = 0xfffff000
98 1.1 thorpej NBPG = 4096
99 1.9 thorpej MMUCMD = 0x005f400c /* MMU command/status register */
100 1.1 thorpej
101 1.1 thorpej .data
102 1.3 thorpej GLOBAL(bootdev)
103 1.1 thorpej .long 0
104 1.3 thorpej
105 1.3 thorpej GLOBAL(howto)
106 1.1 thorpej .long 0
107 1.3 thorpej
108 1.3 thorpej GLOBAL(lowram)
109 1.1 thorpej .long 0
110 1.3 thorpej
111 1.3 thorpej GLOBAL(machineid)
112 1.1 thorpej .long 0
113 1.1 thorpej
114 1.7 thorpej GLOBAL(mmuid)
115 1.7 thorpej .long 0
116 1.7 thorpej
117 1.1 thorpej .text
118 1.3 thorpej ASENTRY_NOPROFILE(begin)
119 1.10 thorpej movl #STACK,%sp
120 1.10 thorpej moveq #47,%d0 /* # of vectors - 1 */
121 1.10 thorpej movl #VECTORS+2,%a0 /* addr part of first vector */
122 1.3 thorpej 1:
123 1.10 thorpej movl #_ASM_LABEL(__trap),%a0@ /* make it direct to __trap */
124 1.10 thorpej addql #6,%a0 /* move to next vector addr */
125 1.10 thorpej dbf %d0,1b /* go til done */
126 1.8 thorpej #ifdef ITECONSOLE
127 1.10 thorpej movl #NMIRESET,%a0 /* NMI keyboard reset addr */
128 1.10 thorpej movl #nmi,%a0@ /* catch in reset routine */
129 1.8 thorpej #else
130 1.8 thorpej /*
131 1.8 thorpej * Built without ITE console support; leave the ROM's NMI
132 1.8 thorpej * vector in place, so the system will still reset if a
133 1.8 thorpej * keyboard NMI is issued.
134 1.8 thorpej */
135 1.8 thorpej #endif
136 1.3 thorpej
137 1.1 thorpej /*
138 1.3 thorpej * Determine our SPU type and look for internal HP-IB
139 1.1 thorpej */
140 1.10 thorpej lea _C_LABEL(machineid),%a0
141 1.10 thorpej movl #0x808,%d0
142 1.10 thorpej movc %d0,%cacr /* clear and disable on-chip cache(s) */
143 1.10 thorpej movl #0x200,%d0 /* data freeze bit */
144 1.10 thorpej movc %d0,%cacr /* only exists on 68030 */
145 1.10 thorpej movc %cacr,%d0 /* read it back */
146 1.10 thorpej tstl %d0 /* zero? */
147 1.9 thorpej jeq not68030 /* yes, we have 68020/68040 */
148 1.3 thorpej
149 1.3 thorpej /*
150 1.3 thorpej * 68030 models
151 1.3 thorpej */
152 1.1 thorpej
153 1.14 tsutsui movl #0x808,%d0
154 1.14 tsutsui movc %d0,%cacr /* clear data freeze bit again */
155 1.14 tsutsui
156 1.9 thorpej movl #0x80,MMUCMD /* set magic cookie */
157 1.10 thorpej movl MMUCMD,%d0 /* read it back */
158 1.10 thorpej btst #7,%d0 /* cookie still on? */
159 1.15 tsutsui jeq not370 /* no, 360, 362 or 375 */
160 1.10 thorpej movl #HP_370,%a0@ /* consider a 370 for now */
161 1.9 thorpej movl #0,MMUCMD /* clear magic cookie */
162 1.10 thorpej movl MMUCMD,%d0 /* read it back */
163 1.10 thorpej btst #7,%d0 /* still on? */
164 1.9 thorpej jeq ihpibcheck /* no, a 370 */
165 1.10 thorpej movl #HP_340,%a0@ /* yes, must be a 340 */
166 1.1 thorpej jra ihpibcheck
167 1.3 thorpej
168 1.1 thorpej not370:
169 1.10 thorpej movl #HP_360,%a0@ /* type is at least a 360 */
170 1.9 thorpej movl #0,MMUCMD /* clear magic cookie2 */
171 1.10 thorpej movl MMUCMD,%d0 /* read it back */
172 1.10 thorpej btst #16,%d0 /* still on? */
173 1.15 tsutsui jeq isa36x /* no, a 360 or a 362 */
174 1.10 thorpej lea _C_LABEL(mmuid),%a0
175 1.10 thorpej lsrl #MMUID_SHIFT,%d0 /* save MMU ID */
176 1.10 thorpej andl #MMUID_MASK,%d0
177 1.10 thorpej movl %d0,%a0@
178 1.10 thorpej lea _C_LABEL(machineid),%a0
179 1.10 thorpej cmpb #MMUID_345,%d0 /* are we a 345? */
180 1.3 thorpej jeq isa345
181 1.10 thorpej cmpb #MMUID_375,%d0 /* how about a 375? */
182 1.3 thorpej jeq isa375
183 1.10 thorpej movl #HP_400,%a0@ /* must be a 400 */
184 1.3 thorpej jra ihpibcheck
185 1.15 tsutsui isa36x:
186 1.15 tsutsui movl #0x41c000,%sp@- /* check (INTIOBASE + FRODO_BASE) */
187 1.15 tsutsui jbsr _C_LABEL(badaddr)
188 1.15 tsutsui addql #4,%sp
189 1.15 tsutsui tstl %d0
190 1.15 tsutsui jne ihpibcheck
191 1.15 tsutsui lea _C_LABEL(machineid),%a0
192 1.15 tsutsui movl #HP_362,%a0@
193 1.15 tsutsui jra ihpibcheck
194 1.3 thorpej isa345:
195 1.10 thorpej movl #HP_345,%a0@
196 1.1 thorpej jra ihpibcheck
197 1.3 thorpej isa375:
198 1.10 thorpej movl #HP_375,%a0@
199 1.3 thorpej jra ihpibcheck
200 1.3 thorpej
201 1.3 thorpej /*
202 1.3 thorpej * End of 68030 section
203 1.3 thorpej */
204 1.3 thorpej
205 1.1 thorpej not68030:
206 1.10 thorpej bset #31,%d0 /* data cache enable bit */
207 1.10 thorpej movc %d0,%cacr /* only exists on 68040 */
208 1.10 thorpej movc %cacr,%d0 /* read it back */
209 1.10 thorpej tstl %d0 /* zero? */
210 1.9 thorpej beq is68020 /* yes, we have 68020 */
211 1.14 tsutsui
212 1.14 tsutsui /*
213 1.14 tsutsui * 68040 models
214 1.14 tsutsui */
215 1.14 tsutsui
216 1.10 thorpej moveq #0,%d0 /* now turn it back off */
217 1.10 thorpej movec %d0,%cacr /* before we access any data */
218 1.9 thorpej
219 1.10 thorpej .long 0x4e7b0004 /* movc %d0,%itt0 */
220 1.10 thorpej .long 0x4e7b0005 /* movc %d0,%itt1 */
221 1.10 thorpej .long 0x4e7b0006 /* movc %d0,%dtt0 */
222 1.10 thorpej .long 0x4e7b0007 /* movc %d0,%dtt1 */
223 1.9 thorpej .word 0xf4d8 /* cinva bc */
224 1.3 thorpej
225 1.10 thorpej lea _C_LABEL(mmuid),%a0
226 1.10 thorpej movl MMUCMD,%d0 /* get MMU ID */
227 1.10 thorpej lsrl #MMUID_SHIFT,%d0
228 1.10 thorpej andl #MMUID_MASK,%d0
229 1.10 thorpej movl %d0,%a0@ /* save it */
230 1.10 thorpej lea _C_LABEL(machineid),%a0
231 1.10 thorpej cmpb #MMUID_425_T,%d0 /* are we a 425t? */
232 1.3 thorpej jeq isa425
233 1.10 thorpej cmpb #MMUID_425_S,%d0 /* how about 425s? */
234 1.3 thorpej jeq isa425
235 1.10 thorpej cmpb #MMUID_425_E,%d0 /* or maybe a 425e? */
236 1.6 thorpej jeq isa425
237 1.10 thorpej cmpb #MMUID_433_T,%d0 /* or a 433t? */
238 1.3 thorpej jeq isa433
239 1.10 thorpej cmpb #MMUID_433_S,%d0 /* or a 433s? */
240 1.3 thorpej jeq isa433
241 1.10 thorpej cmpb #MMUID_385,%d0 /* or a 385? */
242 1.6 thorpej jeq isa385
243 1.15 tsutsui cmpb #MMUID_382,%d0 /* or a 382? */
244 1.15 tsutsui jeq isa382
245 1.10 thorpej movl #HP_380,%a0@ /* guess we are a 380 */
246 1.1 thorpej jra ihpibcheck
247 1.3 thorpej isa425:
248 1.10 thorpej movl #HP_425,%a0@
249 1.1 thorpej jra ihpibcheck
250 1.3 thorpej isa433:
251 1.10 thorpej movl #HP_433,%a0@
252 1.6 thorpej jra ihpibcheck
253 1.6 thorpej isa385:
254 1.10 thorpej movl #HP_385,%a0@
255 1.3 thorpej jra ihpibcheck
256 1.15 tsutsui isa382:
257 1.15 tsutsui movl #HP_382,%a0@
258 1.15 tsutsui jra ihpibcheck
259 1.3 thorpej
260 1.3 thorpej /*
261 1.3 thorpej * End 68040 section
262 1.3 thorpej */
263 1.3 thorpej
264 1.3 thorpej /*
265 1.3 thorpej * 68020 models
266 1.3 thorpej */
267 1.3 thorpej
268 1.1 thorpej is68020:
269 1.10 thorpej movl #HP_330,%a0@ /* consider a 330 for now */
270 1.9 thorpej movl #1,MMUCMD /* a 68020, write HP MMU location */
271 1.10 thorpej movl MMUCMD,%d0 /* read it back */
272 1.10 thorpej btst #0,%d0 /* zero? */
273 1.9 thorpej jeq ihpibcheck /* yes, a 330 */
274 1.10 thorpej movl #HP_320,%a0@ /* no, consider a 320 for now */
275 1.9 thorpej movl #0x80,MMUCMD /* set magic cookie */
276 1.10 thorpej movl MMUCMD,%d0 /* read it back */
277 1.10 thorpej btst #7,%d0 /* cookie still on? */
278 1.9 thorpej jeq ihpibcheck /* no, just a 320 */
279 1.10 thorpej movl #HP_350,%a0@ /* yes, a 350 */
280 1.3 thorpej
281 1.3 thorpej /*
282 1.3 thorpej * End 68020 section
283 1.3 thorpej */
284 1.3 thorpej
285 1.1 thorpej ihpibcheck:
286 1.9 thorpej movl #0,MMUCMD /* make sure MMU is off */
287 1.9 thorpej btst #5,SYSFLAG /* do we have an internal HP-IB? */
288 1.9 thorpej jeq boottype /* yes, continue */
289 1.9 thorpej clrl _C_LABEL(internalhpib) /* no, clear the internal address */
290 1.1 thorpej /*
291 1.1 thorpej * If this is a reboot, extract howto/bootdev stored by kernel
292 1.1 thorpej */
293 1.1 thorpej boottype:
294 1.9 thorpej cmpw #12,BOOTTYPE /* is this a reboot (REQ_REBOOT)? */
295 1.9 thorpej jne notreboot /* no, skip */
296 1.10 thorpej lea MAXADDR,%a0 /* find last page */
297 1.10 thorpej movl %a0@+,%d7 /* and extract howto, bootdev */
298 1.10 thorpej movl %a0@+,%d6 /* from where doboot() left them */
299 1.1 thorpej jra boot1
300 1.1 thorpej /*
301 1.1 thorpej * At this point we do not know which logical device the MSUS select
302 1.1 thorpej * code refers to so we cannot construct bootdev. So we just punt
303 1.1 thorpej * and let configure() construct it.
304 1.1 thorpej */
305 1.1 thorpej notreboot:
306 1.10 thorpej moveq #0,%d6 /* make sure bootdev is invalid */
307 1.9 thorpej cmpw #18,BOOTTYPE /* does the user want to interact? */
308 1.9 thorpej jeq askme /* yes, go to it */
309 1.10 thorpej moveq #0,%d7 /* default to RB_AUTOBOOT */
310 1.1 thorpej jra boot1
311 1.1 thorpej askme:
312 1.10 thorpej moveq #3,%d7 /* default to RB_SINGLE|RB_ASKNAME */
313 1.1 thorpej boot1:
314 1.10 thorpej movl %d6,_C_LABEL(bootdev) /* save bootdev and howto */
315 1.10 thorpej movl %d7,_C_LABEL(howto) /* globally so all can access */
316 1.10 thorpej movl LOWRAM,%d0 /* read lowram value from bootrom */
317 1.2 thorpej /*
318 1.2 thorpej * Must preserve the scratch area for the BOOT ROM.
319 1.2 thorpej * Round up to the next 8k boundary.
320 1.2 thorpej */
321 1.10 thorpej addl #((2*NBPG)-1),%d0
322 1.10 thorpej andl #-(2*NBPG),%d0
323 1.10 thorpej movl %d0,_C_LABEL(lowram) /* stash that value */
324 1.1 thorpej start:
325 1.10 thorpej movl #_C_LABEL(edata),%a2 /* start of BSS */
326 1.10 thorpej movl #_C_LABEL(end),%a3 /* end */
327 1.3 thorpej 1:
328 1.10 thorpej clrb %a2@+ /* clear BSS */
329 1.10 thorpej cmpl %a2,%a3 /* done? */
330 1.9 thorpej bne 1b /* no, keep going */
331 1.9 thorpej jsr _C_LABEL(configure) /* configure critical devices */
332 1.9 thorpej jsr _C_LABEL(main) /* lets go */
333 1.3 thorpej GLOBAL(_rtt)
334 1.9 thorpej movl #3,_C_LABEL(howto) /* restarts get RB_SINGLE|RB_ASKNAME */
335 1.1 thorpej jmp start
336 1.1 thorpej
337 1.1 thorpej /*
338 1.1 thorpej * probe a location and see if it causes a bus error
339 1.1 thorpej */
340 1.3 thorpej ENTRY_NOPROFILE(badaddr)
341 1.9 thorpej movl BUSERR,_C_LABEL(_bsave) /* save ROM bus error handler address */
342 1.10 thorpej movl %sp,_C_LABEL(_ssave) /* and current stack pointer */
343 1.9 thorpej movl #catchbad,BUSERR /* plug in our handler */
344 1.10 thorpej movl %sp@(4),%a0 /* address to probe */
345 1.10 thorpej movw %a0@,%d1 /* do it */
346 1.9 thorpej movl _C_LABEL(_bsave),BUSERR /* if we got here, it did not fault */
347 1.10 thorpej clrl %d0 /* return that this was not a bad */
348 1.9 thorpej /* addr */
349 1.1 thorpej rts
350 1.1 thorpej
351 1.1 thorpej catchbad:
352 1.9 thorpej movl _C_LABEL(_bsave),BUSERR /* got a bus error, so restore */
353 1.9 thorpej /* old handler */
354 1.10 thorpej movl _C_LABEL(_ssave),%sp /* manually restore stack */
355 1.10 thorpej moveq #1,%d0 /* indicate that we got a fault */
356 1.9 thorpej rts /* return to caller of badaddr() */
357 1.1 thorpej
358 1.3 thorpej .data
359 1.3 thorpej GLOBAL(_bsave)
360 1.1 thorpej .long 0
361 1.3 thorpej
362 1.3 thorpej GLOBAL(_ssave)
363 1.1 thorpej .long 0
364 1.1 thorpej
365 1.3 thorpej ASENTRY_NOPROFILE(__trap)
366 1.10 thorpej moveml #0xFFFF,%sp@- /* save registers */
367 1.10 thorpej movl %sp,%sp@- /* push pointer to frame */
368 1.9 thorpej jsr _C_LABEL(trap) /* call C routine to deal with it */
369 1.10 thorpej tstl %d0
370 1.1 thorpej jeq Lstop
371 1.10 thorpej addql #4,%sp
372 1.10 thorpej moveml %sp@+,#0x7FFF
373 1.10 thorpej addql #8,%sp
374 1.1 thorpej rte
375 1.1 thorpej Lstop:
376 1.9 thorpej stop #0x2700 /* stop cold */
377 1.1 thorpej
378 1.8 thorpej #ifdef ITECONSOLE
379 1.3 thorpej ASENTRY_NOPROFILE(nmi)
380 1.9 thorpej movw #18,BOOTTYPE /* mark as system switch */
381 1.9 thorpej jsr _C_LABEL(kbdnmi) /* clear the interrupt, and */
382 1.9 thorpej /* reset the system */
383 1.9 thorpej stop #0 /* SCREEEECH! */
384 1.8 thorpej #endif
385 1.3 thorpej
386 1.3 thorpej ENTRY_NOPROFILE(call_req_reboot)
387 1.9 thorpej jmp 0x1A4 /* call ROM reboot function */
388 1.9 thorpej rts /* XXX: just in case? */
389 1.1 thorpej
390 1.3 thorpej ENTRY_NOPROFILE(romout)
391 1.10 thorpej movl %sp@(4),%d0 /* line number */
392 1.10 thorpej movl %sp@(8),%a0 /* string */
393 1.9 thorpej jsr 0x150 /* do it */
394 1.1 thorpej rts
395 1.11 thorpej
396 1.11 thorpej /*
397 1.11 thorpej * _transfer(entry, howto, opendev, conscode, lowram, esym)
398 1.11 thorpej *
399 1.11 thorpej * Transfer control to the kernel. We also set up registers
400 1.11 thorpej * as older kernels expect.
401 1.11 thorpej */
402 1.11 thorpej ENTRY_NOPROFILE(_transfer)
403 1.11 thorpej movl %sp@(8),%d7 /* howto */
404 1.11 thorpej movl %sp@(12),%d6 /* opendev (compat) */
405 1.11 thorpej movl %sp@(16),%d5 /* conscode (compat) */
406 1.11 thorpej movl %sp@(20),%a5 /* lowram */
407 1.11 thorpej movl %sp@(24),%a4 /* esym (compat) */
408 1.11 thorpej
409 1.11 thorpej movl %sp@(4),%a0 /* load entry point */
410 1.11 thorpej jbsr %a0@ /* GO! */
411