I am working through Bran's kernel tutorial and have it up and running under Bochs for debugging.
I set a breakpoint at 0x100000, as that is the address that kernel.bin is set to load. This breakpoint gets triggered as it is supposed to, and I can confirm that I am indeed at the entry of kernel.bin.
I used objdump to get the address of the common_isr_stub, which is the common part of all isr's that is run after the handler.
I thought that putting a breakpoint at this point would be a nice way to check any interrups that is occuring.
However, Bochs doesn't seem to trigger at this breakpoint, which seems a bit strange as for instance the timer int should be triggered quite a lot.
Instead, the kernel proceeds and shows the 'one second passed' message about once every second (actually its slower due to Bochs...). When I give a CtlC to stop the Bochs debugger by hand, it shows me that it is running the endless loop in the main() of the kernel:
Code: Select all
void main()
{
int i;
gdt_install();
idt_install();
isrs_install();
irq_install();
init_video();
timer_install();
keyboard_install();
__asm__ __volatile__ ("sti");
puts("Hello World!\n");
// i = 10 / 0;
// putch(i);
for (;;); //BOCHS STOPS HERE WHEN I HIT CTL-C
}
I probably am missing something (are interrupts running in another code segment?).
Any help is appreciated.