diff options
-rw-r--r-- | src/kernel/boot.asm | 4 | ||||
-rw-r--r-- | src/kernel/fs/ata_pio.c | 3 | ||||
-rw-r--r-- | src/kernel/interrupts/interrupts.h | 10 | ||||
-rw-r--r-- | src/kernel/interrupts/isr.c | 15 | ||||
-rw-r--r-- | src/kernel/linker.ld | 6 |
5 files changed, 8 insertions, 30 deletions
diff --git a/src/kernel/boot.asm b/src/kernel/boot.asm index 9b4ddc7..28e3c38 100644 --- a/src/kernel/boot.asm +++ b/src/kernel/boot.asm @@ -1,4 +1,4 @@ -section .start_location +section .start_section dd _start ; Initialize stack @@ -54,7 +54,7 @@ section .text push test_user iret -section .sizedetect +section .end_section global ASM_KERNEL_END ASM_KERNEL_END: ; Kernel size detection diff --git a/src/kernel/fs/ata_pio.c b/src/kernel/fs/ata_pio.c index 78cf7ac..f7b78cc 100644 --- a/src/kernel/fs/ata_pio.c +++ b/src/kernel/fs/ata_pio.c @@ -18,9 +18,6 @@ struct ata_interface *new_ata(uint8_t master, uint16_t port_base) ret->command_port = port_base + 0x7; ret->control_port = port_base + 0x206; - // isr_ignore(0x2E); - // isr_ignore(0x2F); - return ret; } diff --git a/src/kernel/interrupts/interrupts.h b/src/kernel/interrupts/interrupts.h index cd96b7c..cb30492 100644 --- a/src/kernel/interrupts/interrupts.h +++ b/src/kernel/interrupts/interrupts.h @@ -23,16 +23,6 @@ void idt_set_gate(unsigned char num, unsigned long base, unsigned short sel, uns void isrs_install(); /** - * Ignore interrupt - */ -void isr_ignore(uint8_t int_no); - -/** - * Un-ignore interrupt - */ -void isr_remember(uint8_t int_no); - -/** * Registers that get passed into an IRQ handler */ struct regs { diff --git a/src/kernel/interrupts/isr.c b/src/kernel/interrupts/isr.c index d511dda..8b42a24 100644 --- a/src/kernel/interrupts/isr.c +++ b/src/kernel/interrupts/isr.c @@ -156,7 +156,7 @@ const char *exception_messages[] = { // Master exception/interrupt/fault handler - halt via panic void fault_handler(struct regs *r) { - if (r->int_no < 32 && !(ignored_isr[r->int_no / 32] & (1 << (r->int_no % 32)))) { + if (r->int_no < 32) { uint32_t faulting_address; asm ("mov %%cr2, %0" : "=r" (faulting_address)); @@ -178,20 +178,11 @@ void fault_handler(struct regs *r) serial_write_hex(r->err_code); serial_write("\nInterrupt code: "); serial_write_hex(r->int_no); + serial_write("\nInterrupt message: "); + serial_write(exception_messages[r->int_no]); halt_loop(); // Idk loop? char *message = (char *) exception_messages[r->int_no]; strcat(message, " Exception"); panic(message); } } - - -void isr_ignore(uint8_t int_no) -{ - ignored_isr[int_no / 32] |= 1 << (int_no % 32); -} - -void isr_remember(uint8_t int_no) -{ - ignored_isr[int_no / 32] &= ~(1 << (int_no % 32)); -} diff --git a/src/kernel/linker.ld b/src/kernel/linker.ld index b338ba6..192c86e 100644 --- a/src/kernel/linker.ld +++ b/src/kernel/linker.ld @@ -4,7 +4,7 @@ SECTIONS { . = 1M; .text BLOCK(4K) : ALIGN(4K) { - *(.start_location) + *(.start_section) *(.text) } @@ -21,7 +21,7 @@ SECTIONS { *(.bss) } - .sizedetect BLOCK(4K) : ALIGN(4K) { - *(.sizedetect) + .end_section BLOCK(4K) : ALIGN(4K) { + *(.end_section) } } |