CVSROOT: /cvs Module name: src Changes by: m...@cvs.openbsd.org 2010/12/23 13:05:08
Modified files: sys/arch/aviion/aviion: locore.S sys/arch/aviion/include: prom.h sys/arch/luna88k/luna88k: locore.S sys/arch/m88k/include: cpu.h sys/arch/m88k/m88k: eh_common.S m88k_machdep.c subr.S vectors_88100.S vectors_88110.S sys/arch/mvme88k/dev: bugio.c mainbus.c sys/arch/mvme88k/include: prom.h sys/arch/mvme88k/mvme88k: autoconf.c locore.S machdep.c Log message: 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.