Commit 8ffdb91a by malcolm

Maybe fixes some stuff dark magic why:

parent 83b7c108
Showing with 4 additions and 3 deletions
#include "gdt.h"
#include "string.h"
#include "serial.h"
#include "term.h"
//#include "term.h"
uint16_t gdt_limit;
uint32_t gdt_base;
......@@ -18,7 +18,7 @@ void gdt_install(){
gdtr.base = gdt_base;
asm volatile ("lgdt (%0)": :"r"(&gdtr));
set_cs(8);
asm volatile("mov $0x10, %ax;\
asm volatile("mov $0x10, %ax; \
mov %ax, %ds; \
mov %ax, %es; \
mov %ax, %fs; \
......
......@@ -15,6 +15,8 @@ void idt_install() {
idtr.limit = idt_limit;
idtr.base = idt_base;
char f[20];
itoa(idtr.limit, f);
itoa(idtr.base, f);
asm volatile ("lidt (%0)": :"r"(&idtr));
}
......
......@@ -16,7 +16,6 @@ void kernel_main() {
/* Initialize terminal and serial interfaces */
terminal_initialize();
serial_init();
gdt_init();
idt_init(0x8);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment