I'm trying to write a simple OS for 80386. When I was writing interrupt handler, I encounter interrupt 13 over and over again. I mean the program enters interrupt handler with number 13 after finishing last interrupt handler.
I read about 80386 manual and know interrupt 13 is General Protection Exception. But I don't know what exactly causes this exception or how to response to this exception.
I have tried to do nothing in interrupt handler for interrupt 13, but the program throw this exception over and over again.
Status of registers:
edi: 0x1000 4096
esi: 0x0 0
ebp: 0x105ed8 1072856
oesp: 0x105ea0 1072800
ebx: 0x0 0
edx: 0x3f8 1016
ecx: 0x105f24 1072932
eax: 0x35 53
-------------------
gs: 0x10 16
fs: 0x10 16
es: 0x10 16
ds: 0x10 16
trapno: 0xd 13
-------------------
err: 0x210 528
eip: 0x1022db 1057499
cs: 0x8 8
eflags: 0x12 18 0b 1 0010
-------------------
esp: 0x8 8
ss: 0x212 530
----------------
Here is my code: https://github.com/stskyblade/StarOS/blob/7dcfabc74c208fffa1f8eda3da5aa68a1b7c1bca/src/interrupt.cpp#L78