Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Miod Vallat (miodcvs.openbsd.org)
Date: Thu Dec 23 2010 - 14:05:08 CST
Module name: src
Changes by: miodcvs.openbsd.org 2010/12/23 13:05:08
sys/arch/m88k/m88k: eh_common.S m88k_machdep.c subr.S
sys/arch/mvme88k/dev: bugio.c mainbus.c
sys/arch/mvme88k/mvme88k: autoconf.c locore.S machdep.c
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
There are a few infrastructure collateral damage on aviion and luna88k, but
these ports do not change their behaviour yet.