1999-12-14 23:57:44 +03:00
|
|
|
/* $NetBSD: srt0.S,v 1.11 1999/12/14 20:57:44 thorpej Exp $ */
|
1994-10-26 10:22:45 +03:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 1988 University of Utah.
|
|
|
|
* Copyright (c) 1982, 1990, 1993
|
|
|
|
* The Regents of the University of California. All rights reserved.
|
|
|
|
*
|
|
|
|
* This code is derived from software contributed to Berkeley by
|
|
|
|
* the Systems Programming Group of the University of Utah Computer
|
|
|
|
* Science Department.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
|
|
|
* This product includes software developed by the University of
|
|
|
|
* California, Berkeley and its contributors.
|
|
|
|
* 4. Neither the name of the University nor the names of its contributors
|
|
|
|
* may be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
* from: Utah $Hdr: srt0.c 1.18 92/12/21$
|
|
|
|
*
|
1994-10-26 10:22:45 +03:00
|
|
|
* @(#)srt0.c 8.1 (Berkeley) 6/10/93
|
1994-01-26 05:38:16 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Startup code for standalone system
|
|
|
|
*/
|
|
|
|
|
1997-04-28 01:10:06 +04:00
|
|
|
/* For machineid and mmuid constants */
|
|
|
|
#include <machine/hp300spu.h>
|
1994-01-26 05:38:16 +03:00
|
|
|
|
1997-04-28 01:10:06 +04:00
|
|
|
/* For _C_LABEL() and friends. */
|
|
|
|
#include <machine/asm.h>
|
|
|
|
|
1999-08-12 14:46:33 +04:00
|
|
|
STACK = 0xfffff000 /* below the ROM page */
|
1994-01-26 05:38:16 +03:00
|
|
|
BOOTTYPE = 0xfffffdc0
|
|
|
|
LOWRAM = 0xfffffdce
|
1999-08-12 14:46:33 +04:00
|
|
|
SYSFLAG = 0xfffffed2 /* system flags */
|
|
|
|
MSUS = 0xfffffedc /* MSUS (?) structure */
|
|
|
|
VECTORS = 0xfffffee0 /* beginning of jump vectors */
|
|
|
|
NMIRESET = 0xffffff9c /* reset vector */
|
1994-01-26 05:38:16 +03:00
|
|
|
BUSERR = 0xfffffffc
|
|
|
|
MAXADDR = 0xfffff000
|
|
|
|
NBPG = 4096
|
1999-08-12 14:46:33 +04:00
|
|
|
MMUCMD = 0x005f400c /* MMU command/status register */
|
1994-01-26 05:38:16 +03:00
|
|
|
|
|
|
|
.data
|
1997-04-28 01:10:06 +04:00
|
|
|
GLOBAL(bootdev)
|
1994-01-26 05:38:16 +03:00
|
|
|
.long 0
|
1997-04-28 01:10:06 +04:00
|
|
|
|
|
|
|
GLOBAL(howto)
|
1994-01-26 05:38:16 +03:00
|
|
|
.long 0
|
1997-04-28 01:10:06 +04:00
|
|
|
|
|
|
|
GLOBAL(lowram)
|
1994-01-26 05:38:16 +03:00
|
|
|
.long 0
|
1997-04-28 01:10:06 +04:00
|
|
|
|
|
|
|
GLOBAL(machineid)
|
1994-01-26 05:38:16 +03:00
|
|
|
.long 0
|
|
|
|
|
1999-07-31 21:20:22 +04:00
|
|
|
GLOBAL(mmuid)
|
|
|
|
.long 0
|
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
.text
|
1997-04-28 01:10:06 +04:00
|
|
|
ASENTRY_NOPROFILE(begin)
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #STACK,%sp
|
|
|
|
moveq #47,%d0 /* # of vectors - 1 */
|
|
|
|
movl #VECTORS+2,%a0 /* addr part of first vector */
|
1997-04-28 01:10:06 +04:00
|
|
|
1:
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #_ASM_LABEL(__trap),%a0@ /* make it direct to __trap */
|
|
|
|
addql #6,%a0 /* move to next vector addr */
|
|
|
|
dbf %d0,1b /* go til done */
|
1999-08-01 01:49:03 +04:00
|
|
|
#ifdef ITECONSOLE
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #NMIRESET,%a0 /* NMI keyboard reset addr */
|
|
|
|
movl #nmi,%a0@ /* catch in reset routine */
|
1999-08-01 01:49:03 +04:00
|
|
|
#else
|
|
|
|
/*
|
|
|
|
* Built without ITE console support; leave the ROM's NMI
|
|
|
|
* vector in place, so the system will still reset if a
|
|
|
|
* keyboard NMI is issued.
|
|
|
|
*/
|
|
|
|
#endif
|
1997-04-28 01:10:06 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
/*
|
1997-04-28 01:10:06 +04:00
|
|
|
* Determine our SPU type and look for internal HP-IB
|
1994-01-26 05:38:16 +03:00
|
|
|
*/
|
1999-11-11 20:08:37 +03:00
|
|
|
lea _C_LABEL(machineid),%a0
|
|
|
|
movl #0x808,%d0
|
|
|
|
movc %d0,%cacr /* clear and disable on-chip cache(s) */
|
|
|
|
movl #0x200,%d0 /* data freeze bit */
|
|
|
|
movc %d0,%cacr /* only exists on 68030 */
|
|
|
|
movc %cacr,%d0 /* read it back */
|
|
|
|
tstl %d0 /* zero? */
|
1999-08-12 14:46:33 +04:00
|
|
|
jeq not68030 /* yes, we have 68020/68040 */
|
1997-04-28 01:10:06 +04:00
|
|
|
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #0x808,%d0
|
|
|
|
movc %d0,%cacr /* clear data freeze bit again */
|
1997-04-28 01:10:06 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 68030 models
|
|
|
|
*/
|
|
|
|
|
1999-08-12 14:46:33 +04:00
|
|
|
movl #0x80,MMUCMD /* set magic cookie */
|
1999-11-11 20:08:37 +03:00
|
|
|
movl MMUCMD,%d0 /* read it back */
|
|
|
|
btst #7,%d0 /* cookie still on? */
|
1999-08-12 14:46:33 +04:00
|
|
|
jeq not370 /* no, 360 or 375 */
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #HP_370,%a0@ /* consider a 370 for now */
|
1999-08-12 14:46:33 +04:00
|
|
|
movl #0,MMUCMD /* clear magic cookie */
|
1999-11-11 20:08:37 +03:00
|
|
|
movl MMUCMD,%d0 /* read it back */
|
|
|
|
btst #7,%d0 /* still on? */
|
1999-08-12 14:46:33 +04:00
|
|
|
jeq ihpibcheck /* no, a 370 */
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #HP_340,%a0@ /* yes, must be a 340 */
|
1994-01-26 05:38:16 +03:00
|
|
|
jra ihpibcheck
|
1997-04-28 01:10:06 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
not370:
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #HP_360,%a0@ /* type is at least a 360 */
|
1999-08-12 14:46:33 +04:00
|
|
|
movl #0,MMUCMD /* clear magic cookie2 */
|
1999-11-11 20:08:37 +03:00
|
|
|
movl MMUCMD,%d0 /* read it back */
|
|
|
|
btst #16,%d0 /* still on? */
|
1999-08-12 14:46:33 +04:00
|
|
|
jeq ihpibcheck /* no, a 360 */
|
1999-11-11 20:08:37 +03:00
|
|
|
lea _C_LABEL(mmuid),%a0
|
|
|
|
lsrl #MMUID_SHIFT,%d0 /* save MMU ID */
|
|
|
|
andl #MMUID_MASK,%d0
|
|
|
|
movl %d0,%a0@
|
|
|
|
lea _C_LABEL(machineid),%a0
|
|
|
|
cmpb #MMUID_345,%d0 /* are we a 345? */
|
1997-04-28 01:10:06 +04:00
|
|
|
jeq isa345
|
1999-11-11 20:08:37 +03:00
|
|
|
cmpb #MMUID_375,%d0 /* how about a 375? */
|
1997-04-28 01:10:06 +04:00
|
|
|
jeq isa375
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #HP_400,%a0@ /* must be a 400 */
|
1997-04-28 01:10:06 +04:00
|
|
|
jra ihpibcheck
|
|
|
|
isa345:
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #HP_345,%a0@
|
1994-01-26 05:38:16 +03:00
|
|
|
jra ihpibcheck
|
1997-04-28 01:10:06 +04:00
|
|
|
isa375:
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #HP_375,%a0@
|
1997-04-28 01:10:06 +04:00
|
|
|
jra ihpibcheck
|
|
|
|
|
|
|
|
/*
|
|
|
|
* End of 68030 section
|
|
|
|
*/
|
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
not68030:
|
1999-11-11 20:08:37 +03:00
|
|
|
bset #31,%d0 /* data cache enable bit */
|
|
|
|
movc %d0,%cacr /* only exists on 68040 */
|
|
|
|
movc %cacr,%d0 /* read it back */
|
|
|
|
tstl %d0 /* zero? */
|
1999-08-12 14:46:33 +04:00
|
|
|
beq is68020 /* yes, we have 68020 */
|
1999-11-11 20:08:37 +03:00
|
|
|
moveq #0,%d0 /* now turn it back off */
|
|
|
|
movec %d0,%cacr /* before we access any data */
|
1999-08-12 14:46:33 +04:00
|
|
|
|
1999-11-11 20:08:37 +03:00
|
|
|
.long 0x4e7b0004 /* movc %d0,%itt0 */
|
|
|
|
.long 0x4e7b0005 /* movc %d0,%itt1 */
|
|
|
|
.long 0x4e7b0006 /* movc %d0,%dtt0 */
|
|
|
|
.long 0x4e7b0007 /* movc %d0,%dtt1 */
|
1999-08-12 14:46:33 +04:00
|
|
|
.word 0xf4d8 /* cinva bc */
|
1997-04-28 01:10:06 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 68040 models
|
|
|
|
*/
|
|
|
|
|
1999-11-11 20:08:37 +03:00
|
|
|
lea _C_LABEL(mmuid),%a0
|
|
|
|
movl MMUCMD,%d0 /* get MMU ID */
|
|
|
|
lsrl #MMUID_SHIFT,%d0
|
|
|
|
andl #MMUID_MASK,%d0
|
|
|
|
movl %d0,%a0@ /* save it */
|
|
|
|
lea _C_LABEL(machineid),%a0
|
|
|
|
cmpb #MMUID_425_T,%d0 /* are we a 425t? */
|
1997-04-28 01:10:06 +04:00
|
|
|
jeq isa425
|
1999-11-11 20:08:37 +03:00
|
|
|
cmpb #MMUID_425_S,%d0 /* how about 425s? */
|
1997-04-28 01:10:06 +04:00
|
|
|
jeq isa425
|
1999-11-11 20:08:37 +03:00
|
|
|
cmpb #MMUID_425_E,%d0 /* or maybe a 425e? */
|
1999-07-31 04:45:28 +04:00
|
|
|
jeq isa425
|
1999-11-11 20:08:37 +03:00
|
|
|
cmpb #MMUID_433_T,%d0 /* or a 433t? */
|
1997-04-28 01:10:06 +04:00
|
|
|
jeq isa433
|
1999-11-11 20:08:37 +03:00
|
|
|
cmpb #MMUID_433_S,%d0 /* or a 433s? */
|
1997-04-28 01:10:06 +04:00
|
|
|
jeq isa433
|
1999-11-11 20:08:37 +03:00
|
|
|
cmpb #MMUID_385,%d0 /* or a 385? */
|
1999-07-31 04:45:28 +04:00
|
|
|
jeq isa385
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #HP_380,%a0@ /* guess we are a 380 */
|
1997-04-28 01:10:06 +04:00
|
|
|
jra ihpibcheck
|
|
|
|
isa425:
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #HP_425,%a0@
|
1994-01-26 05:38:16 +03:00
|
|
|
jra ihpibcheck
|
1997-04-28 01:10:06 +04:00
|
|
|
isa433:
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #HP_433,%a0@
|
1994-01-26 05:38:16 +03:00
|
|
|
jra ihpibcheck
|
1999-07-31 04:45:28 +04:00
|
|
|
isa385:
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #HP_385,%a0@
|
1999-07-31 04:45:28 +04:00
|
|
|
jra ihpibcheck
|
1997-04-28 01:10:06 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* End 68040 section
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 68020 models
|
|
|
|
*/
|
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
is68020:
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #HP_330,%a0@ /* consider a 330 for now */
|
1999-08-12 14:46:33 +04:00
|
|
|
movl #1,MMUCMD /* a 68020, write HP MMU location */
|
1999-11-11 20:08:37 +03:00
|
|
|
movl MMUCMD,%d0 /* read it back */
|
|
|
|
btst #0,%d0 /* zero? */
|
1999-08-12 14:46:33 +04:00
|
|
|
jeq ihpibcheck /* yes, a 330 */
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #HP_320,%a0@ /* no, consider a 320 for now */
|
1999-08-12 14:46:33 +04:00
|
|
|
movl #0x80,MMUCMD /* set magic cookie */
|
1999-11-11 20:08:37 +03:00
|
|
|
movl MMUCMD,%d0 /* read it back */
|
|
|
|
btst #7,%d0 /* cookie still on? */
|
1999-08-12 14:46:33 +04:00
|
|
|
jeq ihpibcheck /* no, just a 320 */
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #HP_350,%a0@ /* yes, a 350 */
|
1997-04-28 01:10:06 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* End 68020 section
|
|
|
|
*/
|
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
ihpibcheck:
|
1999-08-12 14:46:33 +04:00
|
|
|
movl #0,MMUCMD /* make sure MMU is off */
|
|
|
|
btst #5,SYSFLAG /* do we have an internal HP-IB? */
|
|
|
|
jeq boottype /* yes, continue */
|
|
|
|
clrl _C_LABEL(internalhpib) /* no, clear the internal address */
|
1994-01-26 05:38:16 +03:00
|
|
|
/*
|
|
|
|
* If this is a reboot, extract howto/bootdev stored by kernel
|
|
|
|
*/
|
|
|
|
boottype:
|
1999-08-12 14:46:33 +04:00
|
|
|
cmpw #12,BOOTTYPE /* is this a reboot (REQ_REBOOT)? */
|
|
|
|
jne notreboot /* no, skip */
|
1999-11-11 20:08:37 +03:00
|
|
|
lea MAXADDR,%a0 /* find last page */
|
|
|
|
movl %a0@+,%d7 /* and extract howto, bootdev */
|
|
|
|
movl %a0@+,%d6 /* from where doboot() left them */
|
1994-01-26 05:38:16 +03:00
|
|
|
jra boot1
|
|
|
|
/*
|
|
|
|
* At this point we do not know which logical device the MSUS select
|
|
|
|
* code refers to so we cannot construct bootdev. So we just punt
|
|
|
|
* and let configure() construct it.
|
|
|
|
*/
|
|
|
|
notreboot:
|
1999-11-11 20:08:37 +03:00
|
|
|
moveq #0,%d6 /* make sure bootdev is invalid */
|
1999-08-12 14:46:33 +04:00
|
|
|
cmpw #18,BOOTTYPE /* does the user want to interact? */
|
|
|
|
jeq askme /* yes, go to it */
|
1999-11-11 20:08:37 +03:00
|
|
|
moveq #0,%d7 /* default to RB_AUTOBOOT */
|
1994-01-26 05:38:16 +03:00
|
|
|
jra boot1
|
|
|
|
askme:
|
1999-11-11 20:08:37 +03:00
|
|
|
moveq #3,%d7 /* default to RB_SINGLE|RB_ASKNAME */
|
1994-01-26 05:38:16 +03:00
|
|
|
boot1:
|
1999-11-11 20:08:37 +03:00
|
|
|
movl %d6,_C_LABEL(bootdev) /* save bootdev and howto */
|
|
|
|
movl %d7,_C_LABEL(howto) /* globally so all can access */
|
|
|
|
movl LOWRAM,%d0 /* read lowram value from bootrom */
|
1997-03-10 11:00:47 +03:00
|
|
|
/*
|
|
|
|
* Must preserve the scratch area for the BOOT ROM.
|
|
|
|
* Round up to the next 8k boundary.
|
|
|
|
*/
|
1999-11-11 20:08:37 +03:00
|
|
|
addl #((2*NBPG)-1),%d0
|
|
|
|
andl #-(2*NBPG),%d0
|
|
|
|
movl %d0,_C_LABEL(lowram) /* stash that value */
|
1994-01-26 05:38:16 +03:00
|
|
|
start:
|
1999-11-11 20:08:37 +03:00
|
|
|
movl #_C_LABEL(edata),%a2 /* start of BSS */
|
|
|
|
movl #_C_LABEL(end),%a3 /* end */
|
1997-04-28 01:10:06 +04:00
|
|
|
1:
|
1999-11-11 20:08:37 +03:00
|
|
|
clrb %a2@+ /* clear BSS */
|
|
|
|
cmpl %a2,%a3 /* done? */
|
1999-08-12 14:46:33 +04:00
|
|
|
bne 1b /* no, keep going */
|
|
|
|
jsr _C_LABEL(configure) /* configure critical devices */
|
|
|
|
jsr _C_LABEL(main) /* lets go */
|
1997-04-28 01:10:06 +04:00
|
|
|
GLOBAL(_rtt)
|
1999-08-12 14:46:33 +04:00
|
|
|
movl #3,_C_LABEL(howto) /* restarts get RB_SINGLE|RB_ASKNAME */
|
1994-01-26 05:38:16 +03:00
|
|
|
jmp start
|
|
|
|
|
|
|
|
/*
|
|
|
|
* probe a location and see if it causes a bus error
|
|
|
|
*/
|
1997-04-28 01:10:06 +04:00
|
|
|
ENTRY_NOPROFILE(badaddr)
|
1999-08-12 14:46:33 +04:00
|
|
|
movl BUSERR,_C_LABEL(_bsave) /* save ROM bus error handler address */
|
1999-11-11 20:08:37 +03:00
|
|
|
movl %sp,_C_LABEL(_ssave) /* and current stack pointer */
|
1999-08-12 14:46:33 +04:00
|
|
|
movl #catchbad,BUSERR /* plug in our handler */
|
1999-11-11 20:08:37 +03:00
|
|
|
movl %sp@(4),%a0 /* address to probe */
|
|
|
|
movw %a0@,%d1 /* do it */
|
1999-08-12 14:46:33 +04:00
|
|
|
movl _C_LABEL(_bsave),BUSERR /* if we got here, it did not fault */
|
1999-11-11 20:08:37 +03:00
|
|
|
clrl %d0 /* return that this was not a bad */
|
1999-08-12 14:46:33 +04:00
|
|
|
/* addr */
|
1994-01-26 05:38:16 +03:00
|
|
|
rts
|
|
|
|
|
|
|
|
catchbad:
|
1999-08-12 14:46:33 +04:00
|
|
|
movl _C_LABEL(_bsave),BUSERR /* got a bus error, so restore */
|
|
|
|
/* old handler */
|
1999-11-11 20:08:37 +03:00
|
|
|
movl _C_LABEL(_ssave),%sp /* manually restore stack */
|
|
|
|
moveq #1,%d0 /* indicate that we got a fault */
|
1999-08-12 14:46:33 +04:00
|
|
|
rts /* return to caller of badaddr() */
|
1994-01-26 05:38:16 +03:00
|
|
|
|
1997-04-28 01:10:06 +04:00
|
|
|
.data
|
|
|
|
GLOBAL(_bsave)
|
1994-01-26 05:38:16 +03:00
|
|
|
.long 0
|
1997-04-28 01:10:06 +04:00
|
|
|
|
|
|
|
GLOBAL(_ssave)
|
1994-01-26 05:38:16 +03:00
|
|
|
.long 0
|
|
|
|
|
1997-04-28 01:10:06 +04:00
|
|
|
ASENTRY_NOPROFILE(__trap)
|
1999-11-11 20:08:37 +03:00
|
|
|
moveml #0xFFFF,%sp@- /* save registers */
|
|
|
|
movl %sp,%sp@- /* push pointer to frame */
|
1999-08-12 14:46:33 +04:00
|
|
|
jsr _C_LABEL(trap) /* call C routine to deal with it */
|
1999-11-11 20:08:37 +03:00
|
|
|
tstl %d0
|
1994-01-26 05:38:16 +03:00
|
|
|
jeq Lstop
|
1999-11-11 20:08:37 +03:00
|
|
|
addql #4,%sp
|
|
|
|
moveml %sp@+,#0x7FFF
|
|
|
|
addql #8,%sp
|
1994-01-26 05:38:16 +03:00
|
|
|
rte
|
|
|
|
Lstop:
|
1999-08-12 14:46:33 +04:00
|
|
|
stop #0x2700 /* stop cold */
|
1994-01-26 05:38:16 +03:00
|
|
|
|
1999-08-01 01:49:03 +04:00
|
|
|
#ifdef ITECONSOLE
|
1997-04-28 01:10:06 +04:00
|
|
|
ASENTRY_NOPROFILE(nmi)
|
1999-08-12 14:46:33 +04:00
|
|
|
movw #18,BOOTTYPE /* mark as system switch */
|
|
|
|
jsr _C_LABEL(kbdnmi) /* clear the interrupt, and */
|
|
|
|
/* reset the system */
|
|
|
|
stop #0 /* SCREEEECH! */
|
1999-08-01 01:49:03 +04:00
|
|
|
#endif
|
1994-01-26 05:38:16 +03:00
|
|
|
|
1997-04-28 01:10:06 +04:00
|
|
|
ENTRY_NOPROFILE(call_req_reboot)
|
1999-08-12 14:46:33 +04:00
|
|
|
jmp 0x1A4 /* call ROM reboot function */
|
|
|
|
rts /* XXX: just in case? */
|
1995-09-02 09:04:14 +04:00
|
|
|
|
1997-04-28 01:10:06 +04:00
|
|
|
ENTRY_NOPROFILE(romout)
|
1999-11-11 20:08:37 +03:00
|
|
|
movl %sp@(4),%d0 /* line number */
|
|
|
|
movl %sp@(8),%a0 /* string */
|
1999-08-12 14:46:33 +04:00
|
|
|
jsr 0x150 /* do it */
|
1994-01-26 05:38:16 +03:00
|
|
|
rts
|
1999-12-14 23:57:44 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* _transfer(entry, howto, opendev, conscode, lowram, esym)
|
|
|
|
*
|
|
|
|
* Transfer control to the kernel. We also set up registers
|
|
|
|
* as older kernels expect.
|
|
|
|
*/
|
|
|
|
ENTRY_NOPROFILE(_transfer)
|
|
|
|
movl %sp@(8),%d7 /* howto */
|
|
|
|
movl %sp@(12),%d6 /* opendev (compat) */
|
|
|
|
movl %sp@(16),%d5 /* conscode (compat) */
|
|
|
|
movl %sp@(20),%a5 /* lowram */
|
|
|
|
movl %sp@(24),%a4 /* esym (compat) */
|
|
|
|
|
|
|
|
movl %sp@(4),%a0 /* load entry point */
|
|
|
|
jbsr %a0@ /* GO! */
|