Double Fault if i run an infinite loop
Posted: Tue Apr 18, 2017 6:17 pm
im creating an os for fun and i allready jumped to the kernel and i am in protected mode.
I setup the GDT and IDT in the kernel and everything seems to work but if i try to run an infinite loop in C afterwards (anything eg. for(;;),while(1)...) it generates a double fault (i catched the double fault to display an error).
But if i remove the CPU_initGDT and CPU_initIDT (both set the IDT or GDT table to appropriate values and run lidt and lgdt) it works fine.
(im allready setting a default GDT in the second stage bootloader )
Did anyone had this problem and how did he/she fix it ?
thanks in advance
I setup the GDT and IDT in the kernel and everything seems to work but if i try to run an infinite loop in C afterwards (anything eg. for(;;),while(1)...) it generates a double fault (i catched the double fault to display an error).
But if i remove the CPU_initGDT and CPU_initIDT (both set the IDT or GDT table to appropriate values and run lidt and lgdt) it works fine.
(im allready setting a default GDT in the second stage bootloader )
Did anyone had this problem and how did he/she fix it ?
thanks in advance