Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

Running kernel space instructions

I have an assignment to write a code that monitors the processor temperature of a Phar Lap real-time target. I read the intel documentation and there is an MSR that contains the temperature of the CPU core. I have successfully extracted the MSR value under Windows 10 with the WinRing0.sys driver, but unfortunately I can not use that method on Phar Lap.

How can I run kernel-space (ring0) instructions (like rdmsr) on Phar Lap?
Are there other methods of getting the temperature on Phar Lap?
Is there a documentation on doing this?
I assume that I would have to write a kernel driver, but I couldn't find much resource on that.


I am using LabWindows/CVI 2012 with the RT module.

0 Kudos
Message 1 of 3
(2,558 Views)

Kernel driver development for Pharlap ETS is a past station. You need for that the according Pharlap SDK, but Interval Zero discontinued that product at around 2013 and wants everyone to move to their RTX64 RTOS platform.

Only customers who had at that point a valid software contract for Pharlap ETS with IntervalZero could still access the SDK but the SDK was not sold to new customers anymore.

 

However I do believe that the Pharlap ETS system is not like Windows, where you have a privileged kernel running in Ring 0 and a user space limited to run in Ring 3.

But there is no information anymore to be found on the net about how Pharlap ETS is structured in a kernel space and user space if at all!

 

So it "might" be possible to execute the according CPUID or RDMSR assembly instructions directly in your shared library. Dangerous? You bet! Tricky? Of course!

So tread carefully when doing such exercises.

 

And no LabWindows/CVI does not support inline assembly. You have to use an external assembler to create the according object module.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 3
(2,218 Views)

There is the NI System Control API that has functions to control and retrieve all kind of things from a controller but last time I checked, some of the temperature properties that it supposedly has returned an unsupported error on my target, which was however a Linux RT controller, so your mileage may vary. Not sure if LabWindows./CVI 2012 had already NI System Control API support, but that API is DLL based so you always could resolve into using the standard C compiler support for that API and linking to the MS VC import library, if you don't require function panel support for invoking and adding library functions.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 3
(2,211 Views)