#
7176dd57 |
| 09-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Reworked the exception handling code. The former one ran into the void after turning off BAT for the segment containing itself. The monster macro for the exception vector code was not really elegant
Reworked the exception handling code. The former one ran into the void after turning off BAT for the segment containing itself. The monster macro for the exception vector code was not really elegant besides being too long for the 32 byte performance monitor exception slot. Furthermore wasting three of the SPRG* registers as cheap scratch memory wasn't that nice either.
We now have a three-step approach: The exception vectors themselves contain only five instructions which branch to common code at the beginning of the same physical page. That one sets up BAT for itself, turns address translation back on and jumps into the kernel. There we turn off BAT again, dump an iframe, and enter the actual exception handler (/dispatcher). Upon return the registers are restored from the iframe and we get back to the place where the exception occurred.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15881 a95241bf-73f2-0310-859d-f6bbb57e9c96
show more ...
|
#
b20667b3 |
| 27-Apr-2005 |
Axel Dörfler <axeld@pinc-software.de> |
{install|remove}_io_interrupt_handler() now correctly handle the B_NO_ENABLE_COUNTER flag. Lots of cleanup: - moved B_NO_ENABLE_COUNTER flag definition out of int.h to KernelExport.h, as it's descr
{install|remove}_io_interrupt_handler() now correctly handle the B_NO_ENABLE_COUNTER flag. Lots of cleanup: - moved B_NO_ENABLE_COUNTER flag definition out of int.h to KernelExport.h, as it's described in the BeBook (although it's probably not really used that often :)) - int.c no longer has any platform dependent code (+ 0x20 on interrupt numbers is gone); it's now entirely handled in the arch/x86/ section. - the io_vectors[] is now statically initialized, instead of allocated from the heap - removed {install|remove}_interrupt_handler(); they weren't that useful, arch_smp_init() is now calling install_io_interrupt_handler() correctly instead - introduced a new arch_int.h header file that currently contains NUM_IO_VECTORS only (though on x86, it also has ARCH_INTERRUPT_BASE == 0x20). - changed the return type from {install|remove}_io_interrupt_handler() from "long" to "status_t" - rearranged and cleaned the PIC initialization code, made the PIC code more prominent - changed comments that talk about a non existing 8239 (the PIC chip is actually 8259) - moved arch/x86/interrupts.h to the source directory, as it's not used outside - added BeOS compatible interrupts_enabled() function, that should replace our equivalent (and private) are_interrupts_enabled()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12477 a95241bf-73f2-0310-859d-f6bbb57e9c96
show more ...
|