Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Make sure to call pflusha before (not after) enabli...
details: https://anonhg.NetBSD.org/src/rev/b6e16ddf47fe
branches: trunk
changeset: 771616:b6e16ddf47fe
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sat Nov 26 14:05:52 2011 +0000
description:
Make sure to call pflusha before (not after) enabling MMU on
68030/68851 initialization paths.
Pointed out by isaki@ per observation of ATC status on XM6i emulator.
Tested on TT030, HP362, NWS-1750, and X68030 by me.
XXX: probably we can remove existing pflusha or TBIA calls after MMU turned
XXX: on (and before enabling cache) but I leave them as is for now to avoid
XXX: unexcpected side effects.
diffstat:
sys/arch/amiga/amiga/locore.s | 3 ++-
sys/arch/atari/atari/atari_init.c | 5 +++--
sys/arch/cesfic/cesfic/locore.s | 3 ++-
sys/arch/hp300/hp300/locore.s | 3 ++-
sys/arch/luna68k/luna68k/locore.s | 3 ++-
sys/arch/mac68k/mac68k/locore.s | 3 ++-
sys/arch/mvme68k/mvme68k/locore.s | 3 ++-
sys/arch/news68k/news68k/locore.s | 3 ++-
sys/arch/next68k/next68k/locore.s | 3 ++-
sys/arch/x68k/x68k/locore.s | 3 ++-
10 files changed, 21 insertions(+), 11 deletions(-)
diffs (179 lines):
diff -r aa2bdfa7cd13 -r b6e16ddf47fe sys/arch/amiga/amiga/locore.s
--- a/sys/arch/amiga/amiga/locore.s Sat Nov 26 14:04:20 2011 +0000
+++ b/sys/arch/amiga/amiga/locore.s Sat Nov 26 14:05:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.153 2011/11/15 10:57:00 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.154 2011/11/26 14:05:52 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -969,6 +969,7 @@
jmp LMMUenable_end:l
#endif /* M68040 || M68060 */
Lenable030:
+ pflusha
lea Ltc,%a0
pmove %a0@,%tc
jmp LMMUenable_end:l
diff -r aa2bdfa7cd13 -r b6e16ddf47fe sys/arch/atari/atari/atari_init.c
--- a/sys/arch/atari/atari/atari_init.c Sat Nov 26 14:04:20 2011 +0000
+++ b/sys/arch/atari/atari/atari_init.c Sat Nov 26 14:05:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atari_init.c,v 1.95 2011/01/02 18:48:05 tsutsui Exp $ */
+/* $NetBSD: atari_init.c,v 1.96 2011/11/26 14:05:52 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.95 2011/01/02 18:48:05 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.96 2011/11/26 14:05:52 tsutsui Exp $");
#include "opt_ddb.h"
#include "opt_mbtype.h"
@@ -559,6 +559,7 @@
* A = 8 bits, B = 11 bits
*/
tc = 0x82d08b00;
+ __asm volatile ("pflusha" : : );
__asm volatile ("pmove %0@,%%tc" : : "a" (&tc));
}
diff -r aa2bdfa7cd13 -r b6e16ddf47fe sys/arch/cesfic/cesfic/locore.s
--- a/sys/arch/cesfic/cesfic/locore.s Sat Nov 26 14:04:20 2011 +0000
+++ b/sys/arch/cesfic/cesfic/locore.s Sat Nov 26 14:05:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.26 2011/11/15 10:57:02 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.27 2011/11/26 14:05:52 tsutsui Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@@ -307,6 +307,7 @@
jmp Lenab1:l | avoid pc-relative
Lmotommu2:
/* XXX do TT here */
+ pflusha
RELOC(prototc, %a2)
movl #0x82c0aa00,%a2@ | value to load TC with
pmove %a2@,%tc | load it
diff -r aa2bdfa7cd13 -r b6e16ddf47fe sys/arch/hp300/hp300/locore.s
--- a/sys/arch/hp300/hp300/locore.s Sat Nov 26 14:04:20 2011 +0000
+++ b/sys/arch/hp300/hp300/locore.s Sat Nov 26 14:05:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.163 2011/11/15 10:57:02 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.164 2011/11/26 14:05:52 tsutsui Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@@ -544,6 +544,7 @@
Lmotommu2:
movl #MMU_IEN+MMU_FPE,INTIOBASE+MMUBASE+MMUCMD
| enable 68881 and i-cache
+ pflusha
RELOC(prototc, %a2)
#if PGSHIFT == 13
movl #0x82d08b00,%a2@ | value to load TC with
diff -r aa2bdfa7cd13 -r b6e16ddf47fe sys/arch/luna68k/luna68k/locore.s
--- a/sys/arch/luna68k/luna68k/locore.s Sat Nov 26 14:04:20 2011 +0000
+++ b/sys/arch/luna68k/luna68k/locore.s Sat Nov 26 14:05:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.45 2011/11/15 13:25:44 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.46 2011/11/26 14:05:52 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -266,6 +266,7 @@
.long 0xf0100800 | pmove %a0@,mmutt0
RELOC(protott1,%a0) | tt1 range 8000.0000-ffff.ffff
.long 0xf0100c00 | pmove %a0@,mmutt1
+ pflusha
RELOC(prototc,%a0) | %tc: SRP,CRP,4KB page,A=10bit,B=10bit
pmove %a0@,%tc
/*
diff -r aa2bdfa7cd13 -r b6e16ddf47fe sys/arch/mac68k/mac68k/locore.s
--- a/sys/arch/mac68k/mac68k/locore.s Sat Nov 26 14:04:20 2011 +0000
+++ b/sys/arch/mac68k/mac68k/locore.s Sat Nov 26 14:05:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.164 2011/11/15 10:57:03 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.165 2011/11/26 14:05:53 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -298,6 +298,7 @@
movl %a1,%a0@(4) | + segtable address
pmove %a0@,%srp | load the supervisor root pointer
movl #0x80000002,%a0@ | reinit upper half for CRP loads
+ pflusha
lea _ASM_LABEL(longscratch),%a2
#if PGSHIFT == 13
movl #0x82d08b00,%a2@ | value to load %TC with
diff -r aa2bdfa7cd13 -r b6e16ddf47fe sys/arch/mvme68k/mvme68k/locore.s
--- a/sys/arch/mvme68k/mvme68k/locore.s Sat Nov 26 14:04:20 2011 +0000
+++ b/sys/arch/mvme68k/mvme68k/locore.s Sat Nov 26 14:05:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.108 2011/11/15 10:57:03 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.109 2011/11/26 14:05:53 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -614,6 +614,7 @@
movc %d0,%cacr | turn on both caches
jmp Lenab1
Lmotommu2:
+ pflusha
movl #0x82c0aa00,%sp@- | value to load TC with
pmove %sp@,%tc | load it
diff -r aa2bdfa7cd13 -r b6e16ddf47fe sys/arch/news68k/news68k/locore.s
--- a/sys/arch/news68k/news68k/locore.s Sat Nov 26 14:04:20 2011 +0000
+++ b/sys/arch/news68k/news68k/locore.s Sat Nov 26 14:05:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.60 2011/11/20 15:38:00 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.61 2011/11/26 14:05:53 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -405,6 +405,7 @@
movl #0xc01f8143,%a0@ | use %tt1 (0xc0000000-0xdfffffff)
.long 0xf0100c00 | pmove %a0@,%tt1
+ pflusha
RELOC(prototc, %a2)
#if PGSHIFT == 13
movl #0x82d08b00,%a2@ | value to load TC with
diff -r aa2bdfa7cd13 -r b6e16ddf47fe sys/arch/next68k/next68k/locore.s
--- a/sys/arch/next68k/next68k/locore.s Sat Nov 26 14:04:20 2011 +0000
+++ b/sys/arch/next68k/next68k/locore.s Sat Nov 26 14:05:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.59 2011/11/15 10:57:03 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.60 2011/11/26 14:05:53 tsutsui Exp $ */
/*
* Copyright (c) 1998 Darrin B. Jewell
@@ -430,6 +430,7 @@
movl #MMU_IEN+MMU_FPE,INTIOBASE+MMUBASE+MMUCMD
| enable 68881 and i-cache
#endif
+ pflusha
RELOC(prototc, %a2)
movl #0x82c0aa00,%a2@ | value to load TC with
pmove %a2@,%tc | load it
diff -r aa2bdfa7cd13 -r b6e16ddf47fe sys/arch/x68k/x68k/locore.s
--- a/sys/arch/x68k/x68k/locore.s Sat Nov 26 14:04:20 2011 +0000
+++ b/sys/arch/x68k/x68k/locore.s Sat Nov 26 14:05:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.106 2011/11/15 10:57:04 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.107 2011/11/26 14:05:53 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -891,6 +891,7 @@
movc %d0,%cacr | turn on both caches
jmp Lenab1
Lmotommu2:
+ pflusha
#if PGSHIFT == 13
movl #0x82d08b00,%sp@- | value to load TC with
#else
Home |
Main Index |
Thread Index |
Old Index