Cleanup _doboot, fixing the 040 reboot bug.
This commit is contained in:
parent
16afbbecd6
commit
334656f748
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: locore.s,v 1.31 1998/08/05 16:08:38 minoura Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.32 1998/09/07 14:14:34 minoura Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -1905,9 +1905,14 @@ Lm68060fprdone:
|
|||
*/
|
||||
.globl _doboot
|
||||
_doboot:
|
||||
movw #PSL_HIGHIPL,sr | cut off any interrupts
|
||||
subal a1,a1 | a1 = 0
|
||||
moveq #0,d1 | d1 = 0
|
||||
movl _mmutype,d2 | d2 = 0
|
||||
|
||||
movl #CACHE_OFF,d0
|
||||
#if defined(M68040) || defined(M68060)
|
||||
cmpl #MMU_68040,_mmutype | 68040?
|
||||
cmpl #MMU_68040,d2 | 68040?
|
||||
jne Ldoboot0 | no, skip
|
||||
.word 0xf4f8 | cpusha bc - push and invalidate caches
|
||||
nop
|
||||
|
@ -1916,24 +1921,19 @@ Ldoboot0:
|
|||
#endif
|
||||
movc d0,cacr | disable on-chip cache(s)
|
||||
|
||||
movw #0x2700,sr | cut off any interrupts
|
||||
|
||||
| ok, turn off MMU..
|
||||
Ldoreboot:
|
||||
#if defined(M68040) || defined(M68060)
|
||||
cmpl #MMU_68040,_mmutype | 68040?
|
||||
cmpl #MMU_68040,d2 | 68040?
|
||||
jne LmotommuF | no, skip
|
||||
moveq #0,d0
|
||||
movc d0,cacr | caches off
|
||||
.long 0x4e7b0003 | movc d0,tc
|
||||
moval 0x00ff0004:l,a0
|
||||
jmp a0@ | reboot X680x0
|
||||
movc d1,cacr | caches off
|
||||
.long 0x4e7b1003 | movc d1(=0),tc ; disable MMU
|
||||
jra Ldoreboot1
|
||||
LmotommuF:
|
||||
#endif
|
||||
clrl sp@ | value for pmove to TC (turn off MMU)
|
||||
movl d1,sp@
|
||||
pmove sp@,tc | disable MMU
|
||||
|
||||
subal a1,a1
|
||||
Ldoreboot1:
|
||||
moveml 0x00ff0000,#0x0101 | get RESET vectors in ROM
|
||||
| (d0: ssp, a0: pc)
|
||||
moveml #0x0101,a1@ | put them at 0x0000 (for Xellent30)
|
||||
|
|
Loading…
Reference in New Issue