General Protection Fault when trying to `sti`
问题 Trying to implement hardware interrupts on a test bootloader. Exceptions are working(thus found it is GPF). When trying to sti , a GPF is occured. Here is my main code: cli lgdt [gdt_desc] lidt [idt_desc] mov eax, cr0 or eax, 1 mov cr0, eax jmp 0x8:bit_32 bit_32: [bits 32] mov ax, 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax mov eax, 0x8000 mov esp, eax mov ebp, esp sti ; exception raised This is how my GDT looks like: start_gdt: null: dd 0x0 dd 0x0 code: dw 0xffff dw 0x0 db