diff --git a/cpu/i386/idt.c b/cpu/i386/idt.c index fc1551e..11fb823 100644 --- a/cpu/i386/idt.c +++ b/cpu/i386/idt.c @@ -8,7 +8,7 @@ void set_idt_gate(int n,uint32_t handler) { idt[n].low_offset=low_16(handler); idt[n].sel=KERNEL_CS; idt[n].always0=0; - idt[n].flags=0x8E; + idt[n].flags=0xEE; idt[n].high_offset=high_16(handler); } diff --git a/kernel/kernel.c b/kernel/kernel.c index 07fb1e1..0da7263 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -27,26 +27,26 @@ void kmain(multiboot_info_t* header) { } vga_init(info); vga_write_string("Hello\n"); - // asm volatile(" \ - // cli; \ - // mov $0x23, %ax; \ - // mov %ax, %ds; \ - // mov %ax, %es; \ - // mov %ax, %fs; \ - // mov %ax, %gs; \ - // \ - // mov %esp, %eax; \ - // pushl $0x23; \ - // pushl %eax; \ - // pushf; \ - // pop %eax; \ - // or $0x200,%eax; \ - // push %eax; \ - // pushl $0x1B; \ - // push $1f; \ - // iret; \ - // 1: \ - // "); + asm volatile(" \ + cli; \ + mov $0x23, %ax; \ + mov %ax, %ds; \ + mov %ax, %es; \ + mov %ax, %fs; \ + mov %ax, %gs; \ + \ + mov %esp, %eax; \ + pushl $0x23; \ + pushl %eax; \ + pushf; \ + pop %eax; \ + or $0x200,%eax; \ + push %eax; \ + pushl $0x1B; \ + push $1f; \ + iret; \ + 1: \ + "); vga_write_string("UMODE!\n"); port_byte_out(0xe9,'U'); port_byte_out(0xe9,'M');