idt.inc is being included under a bits 16 directive so everything in idt.inc will be encoded as 16-bit instructions (your idt.inc doesn't specify any bits directives so it takes on whatever bits directives were specified before it while being included in boot2.asm). That won't work when running in 32-bit protected mode. As an experiment what happens if you do:

Oh, what a silly error I made!Now works, but, seems that something is messing with my VRAM (the green dot):That green dot is not only green, it changes to all the 16 colors constantly (the entire ASCII charset that you see on the screen is not related, is intentionally produced by me)Serial communication does not work, and ISR does not work, I tried to divide by zero, the ISR should trigger, which should make the screen appear "Division by zero", but that doesn't happen!

Your version is truncating the pointers to the interrupt handlers and sending the CPU off into neverland when interrupts occur. You may also wish to review the function irq_install. I don't believe the majority of the calls to idt_set_gate are using the correct first parameter.I also have a recommendation. A serious one. You should stop including non static functions as code from in header files. Non static functions should be placed in separate .c files and you compile them just like you did with kmain.c and then you add the extra objects to your linker line.

Still working, but when I press a key, system crashes with General protection fault. I think that is some problem with the IDT again...But for my surprise, my entire OS has no code of any keyboard communication! or drivers...

Notice how the first parameter is all 32 except for the last one. IMHO They should be numbered 32 through 47. You've effectively overwritten entry 32 many times leaving most interrupts with no valid interrupt handler. Effectively iRQ1 through IRQ14 will fault when they occur. IRQ1 is the keyboard handler. IRQ0 and IRQ15 won't fault because they were actually initialised.

Who is online

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum