User mode and Interrupts

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
chorakm
Posts: 14
Joined: Fri Dec 08, 2006 12:07 am

User mode and Interrupts

Post by chorakm »

So I'm going to switch to CPL to (try to) protect the kernel from applications. The INT operating concerns me, however. How do I prevent users from firing, say INT 32 which happens to be my timer interrupt and throwing off the system time? I tried to find a source on this but I'm pretty puzzled!
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

In the IDT, you can provide the privilege level required to call the interrupt as a software interrupt. Look at the IDT descriptor information in the Intel Manuals which should tell you where that information is stored.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
chorakm
Posts: 14
Joined: Fri Dec 08, 2006 12:07 am

Post by chorakm »

LOL! Ahhh so that's what that was for. I feel, well....dumb. Thank you for the clarification. :)
Post Reply