summaryrefslogtreecommitdiff
path: root/sys/arch/mvme68k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-12-30 21:28:49 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-12-30 21:28:49 +0000
commit6eb290c167c4a5f9543379bf27e0960d0a22f85f (patch)
tree9ae99b5e30cb372066da37930d84fb6740e3119a /sys/arch/mvme68k
parentf6f3723d10fe56463c5f4fd89abd59cfc174a1fb (diff)
If we are running on a 68040 or a 68060 processor, overwrite the copypage()
code with the faster copypage040() before the kernel text is mapped read-only.
Diffstat (limited to 'sys/arch/mvme68k')
-rw-r--r--sys/arch/mvme68k/mvme68k/locore.s19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/arch/mvme68k/mvme68k/locore.s b/sys/arch/mvme68k/mvme68k/locore.s
index 09b3f9168df..6e41e389a2e 100644
--- a/sys/arch/mvme68k/mvme68k/locore.s
+++ b/sys/arch/mvme68k/mvme68k/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.46 2004/12/24 22:50:30 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.47 2004/12/30 21:28:48 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -449,6 +449,23 @@ Lstart2:
addql #8,sp
/*
+ * While still running physical, override copypage() with the 68040
+ * optimized version, copypage040(), if possible.
+ * This relies upon the fact that copypage() immediately follows
+ * copypage040() in memory.
+ */
+ RELOC(mmutype, a0)
+ cmpl #MMU_68040,a0@
+ jgt Lmmu_enable
+ RELOC(copypage040, a0)
+ RELOC(copypage, a1)
+ movl a1, a2
+1:
+ movw a0@+, a2@+
+ cmpl a0, a1
+ jgt 1b
+
+/*
* Enable the MMU.
* Since the kernel is mapped logical == physical, we just turn it on.
*/