I am trying to write a simple driver for a timer device. The board has an AMD GX500, which uses the AMD CS5536 Companion Device, and the timer that I want to use is on this companion device.
The problem I am running into is that to set up this timer properly, I need to access a couple of MSRs (Machine Specific Registers), through the use of RDMSR and WRMSR assembly instructions.
Even if I call ‘ThreadCtl(_NTO_TCTL_IO, 0)’ to get I/O priveledges for my code, I still generate a memory fault when I try to execute either of these instructions to access a MSR.
Documentation says that RDMSR and WRMSR can only run from Ring 0, yet the QNX Knowledge Base (QNX.000009784) article says that Ring 0 is only accessible from the kernel.
Does anyone have some suggestions as to how to read/write MSR’s from a QNX application?
EDIT : I should probably add, although its implied by stating that I’m running on an AMD GX500, that this question is very x86 specific.