forked from PoliEcho-holding-org/kern
Began using Limine as a bootloader instead of QEMUs mb1 bootloader.
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ SRCS_C = $(wildcard $(SRC)/*.c)
|
||||
SRCS_S = $(wildcard $(SRC)/*.s)
|
||||
OBJS_C = $(patsubst $(SRC)/%.c, $(BIN)/%.c.o, $(SRCS_C))
|
||||
OBJS_S = $(patsubst $(SRC)/%.s, $(BIN)/%.s.o, $(SRCS_S))
|
||||
OUT = ./kernel.elf
|
||||
OUT = $(SYSROOT)/boot/kernel.elf
|
||||
LINKER = ./linker.ld
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
@@ -61,6 +61,8 @@ int gdt_init(void) {
|
||||
gdt_reload();
|
||||
tss_reload();
|
||||
|
||||
debugf("[gdt] GDT loaded.\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,10 @@ int idt_init(void) {
|
||||
idtp.limit = sizeof(idt);
|
||||
idtp.base = (uint32_t)&idt;
|
||||
|
||||
// Load IDT instruction
|
||||
__asm__ volatile ("lidt %0" : : "m"(idtp));
|
||||
|
||||
debugf("[idt] IDT initalized.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,8 @@ int isr_init(void) {
|
||||
|
||||
// Let interrupts interrupt
|
||||
__asm__ volatile ("sti");
|
||||
|
||||
debugf("[isr] ISR initialized.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,8 @@ int pag_init(void) {
|
||||
memset(pagedirs, 0, PAGE_SIZE * PAGE_DIR_COUNT);
|
||||
memset(pagedirUsed, 0, PAGE_DIR_COUNT);
|
||||
|
||||
debugf("[pag] Paging initalized.\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user