summaryrefslogtreecommitdiff
path: root/sys/arch/m88k/include
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-12-23 20:05:09 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-12-23 20:05:09 +0000
commit44c9dc1c4eda10bcc733fcce04e5249926c6698e (patch)
tree38af7c2701de3ecf390f86cbbf6cc98cd63c9a19 /sys/arch/m88k/include
parentdc9e6cb7b12837ee36fba9caa2c5682760e4a98c (diff)
The exception vector page on m88k systems has always been the same page as
the one used by the firmware, which (at least on mvme88k) is at address zero. This is unfortunate, since this means that NULL pointer dereferences in the kernel are not caught, and writes cause havoc. This behaviour was necessary to be able to use the PROM system call interface during early bootstrap, without having to disassemble the VBR page and update branches - which use pc-relative displacement - if we were to use a different VBR address. On mvme88k, change this and actually set up two VBR pages: one, over the PROM page (except for the system call vectors), and another one in the kernel image (which will be mapped read-only). We'll run with the PROM page until the end of autoconf, and then switch to the kernel one, and unmap all the PROM below it. As a bonus, the final kernel page can use optimized data access fault handlers, which do not have to check for faults caused by badaddr(), since badaddr() is only used during device probe on buses which do not support hotplug. There are a few infrastructure collateral damage on aviion and luna88k, but these ports do not change their behaviour yet.
Diffstat (limited to 'sys/arch/m88k/include')
-rw-r--r--sys/arch/m88k/include/cpu.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/m88k/include/cpu.h b/sys/arch/m88k/include/cpu.h
index a953169f5ff..aecac92f45b 100644
--- a/sys/arch/m88k/include/cpu.h
+++ b/sys/arch/m88k/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.50 2010/09/28 20:27:55 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.51 2010/12/23 20:05:08 miod Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
* Copyright (c) 1992, 1993
@@ -276,6 +276,8 @@ void signotify(struct proc *);
void softipi(void);
int badaddr(vaddr_t addr, int size);
+void set_vbr(register_t);
+extern register_t kernel_vbr;
#endif /* _KERNEL */
#endif /* __M88K_CPU_H__ */