Page 3 of 3
Re: STI doesn't work
Posted: Sat Oct 04, 2008 8:11 am
by rdos
I can't see that you reprogram the IRQ bases in the PIC/APIC anywhere. Normally, IR0-7 is at ISR 8-0F while IRQ8-15 is at ISR 78-7F (if I remember it correctly). You seem to assume that IRQs start a 0x20.
Re: STI doesn't work
Posted: Sat Oct 04, 2008 9:41 am
by System123
Thats the code from brans kernel dev tutorial. I found the cause of the execution never continuing, it is a Stack Fault that keeps occuring and this causes and infinite loop of errors.
rdos wrote:I can't see that you reprogram the IRQ bases in the PIC/APIC anywhere. Normally, IR0-7 is at ISR 8-0F while IRQ8-15 is at ISR 78-7F (if I remember it correctly). You seem to assume that IRQs start a 0x20.
What would the code be to that then? This is my first kernel and all the tutorials I have read just do it that way
Re: STI doesn't work
Posted: Sat Oct 04, 2008 10:02 am
by inflater
it is a Stack Fault that keeps occuring and this causes and infinite loop of errors.
Change your kernel source code that RIGHT on your kernel boot up, set a fixed 16kB stack on a high address and then, don't mess with it anymore. I'm sure that all will work then.
BTW if you managed to catch IRQ's from a floppy, keyboard or anything else - your IDT/ISRs and PIC reprogram routines are working correctly.
Regards
inflater
Re: STI doesn't work
Posted: Sat Oct 04, 2008 3:08 pm
by System123
Yeah i manage to capture keyboard and timer irqs not sure about floppy because my driver has never run due to this stack fault.. When u say a high address u mean put the stack above the end of my kernel?
Re: STI doesn't work
Posted: Sun Oct 05, 2008 7:46 am
by System123
Ok I fixed the stack fault but the kernel still does not load past sti instruction. I can not use bochs debug any more to find the problem as the kernel is running properly in bochs with no unhandled interrupts or faults. Please can someone try run the kernel on their pc and let me know if it working? The bin's and source file link is on page one.
Brans example kernel works perfectly however mine does not. I have used his tutorial to code a Pascal kernel so maybe I made a stupid error somewhere. you wil know the kernel works if it ends on a clear screen with "Gizmic OS" printed at the top.
Re: STI doesn't work [SOLVED]
Posted: Wed Oct 08, 2008 6:58 am
by System123
The problem was a page fault that occurred but due to a small ISR error it never cause the kernel to panic.