Enable all serial debugging outputs in the interrupt handlers.
Serial should be working now, but i can never trust things to work first time.
This commit is contained in:
parent
4af4ad89a4
commit
d3c8dd45c7
|
@ -34,11 +34,13 @@
|
||||||
|
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
|
|
||||||
#ifdef __x86_64__
|
|
||||||
typedef unsigned long long int uword_t;
|
typedef unsigned long long int uword_t;
|
||||||
#else
|
|
||||||
typedef unsigned int uword_t;
|
|
||||||
#endif
|
static void* IRQ_Handlers[16] = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* All of the ISR routines call this function for now.
|
/* All of the ISR routines call this function for now.
|
||||||
|
@ -48,11 +50,10 @@ typedef unsigned int uword_t;
|
||||||
void ISR_Common(INTERRUPT_FRAME* Frame, size_t Exception) {
|
void ISR_Common(INTERRUPT_FRAME* Frame, size_t Exception) {
|
||||||
/* Only the first 32 ISR/IRQs are reserved for exceptions by the CPU. We can handle up to 512 interrupts total, though. */
|
/* Only the first 32 ISR/IRQs are reserved for exceptions by the CPU. We can handle up to 512 interrupts total, though. */
|
||||||
if(Exception < 32) {
|
if(Exception < 32) {
|
||||||
/* exception_messages is an array of c-strings defined in kernel.h */
|
/* ExceptionStrings is an array of c-strings defined in kernel.h */
|
||||||
// TODO: Serial!
|
|
||||||
|
|
||||||
//serial_print(0x3F8, exception_messages[Exception]);
|
serial_print(ExceptionStrings[Exception]);
|
||||||
//serial_print(0x3F8, " Exception.\r\n");
|
serial_print(" Exception.\r\n");
|
||||||
printf("%s exception!", ExceptionStrings[Exception]);
|
printf("%s exception!", ExceptionStrings[Exception]);
|
||||||
panic();
|
panic();
|
||||||
}
|
}
|
||||||
|
@ -62,8 +63,8 @@ void ISR_Common(INTERRUPT_FRAME* Frame, size_t Exception) {
|
||||||
into what went wrong. In pure Curle style, though, we just ignore the error code. */
|
into what went wrong. In pure Curle style, though, we just ignore the error code. */
|
||||||
void ISR_Error_Common(EXCEPTION_FRAME* Frame, size_t Exception) {
|
void ISR_Error_Common(EXCEPTION_FRAME* Frame, size_t Exception) {
|
||||||
if(Exception < 32) {
|
if(Exception < 32) {
|
||||||
//serial_print(0x3F8, ExceptionStrings[Exception]);
|
serial_print(ExceptionStrings[Exception]);
|
||||||
//serial_printf(0x3F8, " Exception. Context given: %d\r\n", Frame->ErrorCode);
|
serial_printf(" Exception. Context given: %d\r\n", Frame->ErrorCode);
|
||||||
printf("%s exception. Context: %x", ExceptionStrings[Exception], Frame->ErrorCode);
|
printf("%s exception. Context: %x", ExceptionStrings[Exception], Frame->ErrorCode);
|
||||||
panic();
|
panic();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user