Page 1 of 1
IRQs/PIC/IDT interrupts/Exceptions
Posted: Sat Jun 26, 2004 8:26 am
by Beginner
Just finished my first bootloader and yesterday I started writing a kernel. Anyone who knows where I can find everything I need about the PIC/IRQs/IDT and all that stuff.. tried to read the FAQ but didnt get much out of it. I barely know anythings about this subjects, so a basic tutorial or something would be the best
Re:IRQs/PIC/IDT interrupts/Exceptions
Posted: Sat Jun 26, 2004 12:20 pm
by Beginner
I might add, I dont need code or anything, just wanna know how it works and all that
Re:IRQs/PIC/IDT interrupts/Exceptions
Posted: Sun Jun 27, 2004 8:34 am
by Pype.Clicker
Re:IRQs/PIC/IDT interrupts/Exceptions
Posted: Sun Jun 27, 2004 9:26 am
by Beginner
Alright... but what?s software interrupts for? I mean if I wanna check if a key?s been hit I use hardware interrupts..but what can I use software interrupts for in PM? Cause in Real Mode I use BIOS-interrupts (INT instruction) e.g. to wait for the user to press a key, but to do this in PM I read it was better to use a hardware interrupt for such things..
Re:IRQs/PIC/IDT interrupts/Exceptions
Posted: Sun Jun 27, 2004 9:28 am
by Beginner
I mean, in PM, is there already pre-defined software interrupts that I can "launch" with the INT instruction, or do I have to write an ISR for these aswell? Cause if I do I dont see the point with using them since I only could replace the INT-instrction with a function call to the ISR?
Re:IRQs/PIC/IDT interrupts/Exceptions
Posted: Sun Jun 27, 2004 12:48 pm
by DennisCGc
Beginner wrote:
I mean, in PM, is there already pre-defined software interrupts that I can "launch" with the INT instruction, or do I have to write an ISR for these aswell?
Yes, you have to write it yourself as well....
Re:IRQs/PIC/IDT interrupts/Exceptions
Posted: Sun Jun 27, 2004 3:59 pm
by Beginner
But hey I dont really get it... you write an ISR for a software interrupt..and then you call it using INT... but Why? why use interrupts that?ll just call a method? why do it via interrupts?
Re:IRQs/PIC/IDT interrupts/Exceptions
Posted: Sun Jun 27, 2004 4:04 pm
by Pype.Clicker
in pmode, interrupts will mainly be useful when user-level software needs to trap to the kernel. A simple function call cannot do this.
The IBM approach of having the different hardware components and software services using different well-known interrupt numbers are replaced by OS-specific abstractions ...
Re:IRQs/PIC/IDT interrupts/Exceptions
Posted: Sun Jun 27, 2004 4:11 pm
by Beginner
So there?s no really reason for me to use software interrupts if I only wanna write a small kernel (and not develop programs?).. so if a programmer wanna make a program for my OS, then I wanna let Him use my software interrupts?
Re:IRQs/PIC/IDT interrupts/Exceptions
Posted: Sun Jun 27, 2004 10:39 pm
by Curufir
If you're just writing a kernel then no, you don't need software interrupts. Since everything is running in ring 0 you can just use pointers instead.
Re:IRQs/PIC/IDT interrupts/Exceptions
Posted: Mon Jun 28, 2004 7:47 am
by Beginner
Thanks a lot