interrupt in pmode
interrupt in pmode
Hello Mr. Guru,
Can you please explain clearly the ff questions.
1)What happens to interrupt vector when we switch to protected mode?
2)Why I can not use them when I am in protected mode?
3)Why do I need to reprogram the PIC?
4)When should I reprogram the PIC, before switching to protected mode or after?
5)How to create ISR in pmode and where to put them?
Thank you very much in advance
Re:interrupt in pmode
Are you trying to pull someones leg?
First, all those questions are covered in the QuickLinkz section. Stroll along and do some reading there - or short and juicy: RTFM!
second:
ad 1. It remains at the place where the bios has put it into memory. If you overwrite the memory in question, the interrupt vector table is gone.
ad 2. The Interrupt descriptor table required in protected mod has another layout than the IVT in real mode.
ad 3. To redirect the hardware irq lines to places in the Interrupt descriptor table which do not interfere with the first 32 entries. the first 32 entries of the interrupt descriptor table are dedicated to Exceptions generated by the cpu.
ad 4. I do it after the switch to protected mode and *after* I have sucessfully installed a General Descriptor Table and a Interrupt Descriptor Table. Do it without those prerequisites and look what happens if you trigger an interrupt. You can do it after installing GDT and IDT as long as the IRQ lines remain masked and you don't generate exceptions.
ad 5. Oh, come on, do a bit of searching: an example you may find on www.distantvoices.org/html/multitasking.html
stay safe
First, all those questions are covered in the QuickLinkz section. Stroll along and do some reading there - or short and juicy: RTFM!
second:
ad 1. It remains at the place where the bios has put it into memory. If you overwrite the memory in question, the interrupt vector table is gone.
ad 2. The Interrupt descriptor table required in protected mod has another layout than the IVT in real mode.
ad 3. To redirect the hardware irq lines to places in the Interrupt descriptor table which do not interfere with the first 32 entries. the first 32 entries of the interrupt descriptor table are dedicated to Exceptions generated by the cpu.
ad 4. I do it after the switch to protected mode and *after* I have sucessfully installed a General Descriptor Table and a Interrupt Descriptor Table. Do it without those prerequisites and look what happens if you trigger an interrupt. You can do it after installing GDT and IDT as long as the IRQ lines remain masked and you don't generate exceptions.
ad 5. Oh, come on, do a bit of searching: an example you may find on www.distantvoices.org/html/multitasking.html
stay safe
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:interrupt in pmode
http://www.mega-tokyo.com/os/os-faq-pic ... _exception
http://osdev.neopages.net/tutorials.php?cat=5&sort=1
<strip>
<sequence id="1" comment="Calvin talkin' to Calvin's dad who look at him furiously">
<calvin>see ? what great resource we have in .:QuickLinkz:. ! I just had to browse this ! see ? it all makes sense ...</calvin>
</sequence>
<sequence id="2" comment="Calvin's locked in his room, talkin' to Hobbes">
<calvin>they never see ...</calvin>
</sequence>
</strip>
http://osdev.neopages.net/tutorials.php?cat=5&sort=1
<strip>
<sequence id="1" comment="Calvin talkin' to Calvin's dad who look at him furiously">
<calvin>see ? what great resource we have in .:QuickLinkz:. ! I just had to browse this ! see ? it all makes sense ...</calvin>
</sequence>
<sequence id="2" comment="Calvin's locked in his room, talkin' to Hobbes">
<calvin>they never see ...</calvin>
</sequence>
</strip>
Re:interrupt in pmode
;D
To By Lazy,
Thank you so much. I don't think ur lazy, ur genious!!
To By Lazy,
Thank you so much. I don't think ur lazy, ur genious!!