feat: setup structure for block devices
added ide block device added mbr block device driver started fat block device driver reordered boot start timer before pci/ide/etc. enable interrupts earlier fixed exception from ide controller cleanup code more printfs
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
//
|
||||
|
||||
#include "isr.h"
|
||||
#include <kprint.h>
|
||||
|
||||
#include <cpu/idt.h>
|
||||
#include <libc/libc.h>
|
||||
#include <drivers/ports.h>
|
||||
#include <libc/kprintf.h>
|
||||
|
||||
#define PIC_END_OF_INTERRUPT 0x20
|
||||
|
||||
@@ -119,13 +119,7 @@ char *exception_messages[] = {
|
||||
};
|
||||
|
||||
void isr_handler(registers_t r) {
|
||||
kprint("received interrupt: ");
|
||||
char s[3];
|
||||
itoa(r.int_no, s, 10);
|
||||
kprint(s);
|
||||
kprint("\n");
|
||||
kprint(exception_messages[r.int_no]);
|
||||
kprint("\n");
|
||||
printf("Received interrupt: %d - %s\n", r.int_no, exception_messages[r.int_no]);
|
||||
}
|
||||
|
||||
void register_interrupt_handler(u8 n, isr_t handler) {
|
||||
|
||||
@@ -40,7 +40,7 @@ static void timer_callback(registers_t regs) {
|
||||
|
||||
void sleep(u32 milliseconds) {
|
||||
u32 done = tick + milliseconds;
|
||||
while (done != milliseconds) {
|
||||
while (tick != done) {
|
||||
k_wait_for_interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user