Commit 83b7c108 by malcolm

Style fixes

parent fca15660
......@@ -17,19 +17,13 @@ void gdt_install(){
gdtr.limit = gdt_limit;
gdtr.base = gdt_base;
asm volatile ("lgdt (%0)": :"r"(&gdtr));
//serial_writestring("gdt installed, now setting cs\n");
set_cs(8);
//serial_writestring("cs set, setting ds\n");
//asm volatile ("ljmp $0x8,$1f;
// 1:
asm volatile(" mov $0x10, %ax;\
mov %ax, %ds;\
mov %ax, %es;\
mov %ax, %fs;\
mov %ax, %gs;\
asm volatile("mov $0x10, %ax;\
mov %ax, %ds; \
mov %ax, %es; \
mov %ax, %fs; \
mov %ax, %gs; \
mov %ax, %ss;");
//serial_writestring("ds set, we done here. moving on to idt\n");
//terminal_writestring("");
strlen("");
}
void gdt_set_desc(uint32_t i, uint64_t base, uint64_t limit, uint8_t access, uint8_t gran){
......
......@@ -12,25 +12,15 @@ void idt_install() {
uint16_t limit;
uint32_t base;
} __attribute__((packed)) idtr;
//char s[1];
//itoa(sizeof(idtr),s);
//serial_writestring(s);
idtr.limit = idt_limit;
idtr.base = idt_base;
char f[20];
itoa(idtr.limit,f);
//serial_writestring(f);
//serial_writestring("\n");
itoa(idtr.base,f);
//serial_writestring(f);
//serial_writestring("\n");
asm volatile ("lidt (%0)": :"r"(&idtr));
}
static void default_handler () {
//DEBUG OUTPUT MAYBE?
serial_writestring("int caught\n");
//for(;;);
return;
}
......
......@@ -17,10 +17,6 @@ void kernel_main() {
terminal_initialize();
serial_init();
char b[2];
int a = strlen("");
itoa(a,b);
terminal_writestring(b);
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