summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2016-08-23 12:54:10 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2016-08-23 12:54:10 +0000
commit2786f1e6f132f04ed3bb6643bd16c03b40bf3a51 (patch)
tree7ef23d8764ca21010a30d796d10658e983e0ddbe /sys
parent2f877af7c3c0809fb4e340fe4c524cfe439c81cd (diff)
The TLB refill and XTLB refill exceptions use distinct exception vectors
on Loongson 3A. Consequently, the kernel has to set up both vectors to prevent panics with virtual address references. On Loongson 2F, it is enough to set up the TLB refill vector because the XTLB refill exception uses the same vector address. ok miod@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/loongson/loongson/machdep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c
index c65ebcd5295..695c5359813 100644
--- a/sys/arch/loongson/loongson/machdep.c
+++ b/sys/arch/loongson/loongson/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.64 2016/03/06 19:42:27 mpi Exp $ */
+/* $OpenBSD: machdep.c,v 1.65 2016/08/23 12:54:09 visa Exp $ */
/*
* Copyright (c) 2009, 2010, 2014 Miodrag Vallat.
@@ -703,10 +703,14 @@ mips_init(uint64_t argc, uint64_t argv, uint64_t envp, uint64_t cv,
/*
* Build proper TLB refill handler trampolines.
+ *
+ * On Loongson 2F, the XTLB refill exception actually uses
+ * the TLB refill vector.
*/
xtlb_handler = (vaddr_t)&xtlb_miss;
build_trampoline(TLB_MISS_EXC_VEC, xtlb_handler);
+ build_trampoline(XTLB_MISS_EXC_VEC, xtlb_handler);
/*
* Turn off bootstrap exception vectors.