Quick CPU ring mode protection question

Posted by b-gen-jack-o-neill on Stack Overflow See other posts from Stack Overflow or by b-gen-jack-o-neill
Published on 2010-05-19T20:45:44Z Indexed on 2010/05/19 23:30 UTC
Read the original article Hit count: 213

Filed under:
|
|
|

Hi, me again :)

I am very curious in messing up with HW. But my top level "messing" so far was linked or inline assembler in C program. If my understanding of CPU and ring mode is right, I cannot directly from user mode app access some low level CPU features, like disabling interrupts, or changing protected mode segments, so I must use system calls to do everything I want.

But, if I am right, drivers can run in ring mode 0. I actually don´t know much about drivers, but this is what I ask for. I just want to know, is learning how to write your own drivers and than call them the way I should go, to do what I wrote?

I know I could write whole new OS (at least to some point), but what I exactly want to do is acessing some low level features of HW from standart windows application. So, is driver the way to go?

© Stack Overflow or respective owner

Related posts about driver

Related posts about cpu