Forum Jump

Select Group :
Select Forum :
Sorted By :
Sort Order :
From The :
 
Thread Tools  Search this thread 
tsunghsunwu@fpc.com.tw
May 7, 2007 7:11 AM PDT
How to get/set unique MSR registers for each core

I knew that MSR registers (for example, IA32_CLOCK_MODULATION and IA32_THERM_STATUS) can be set and get through RDMSR and WRMSR instruction. However, I would like to know how to set and get for 'each core' of dual core processor. Can anyone kindly tell me?

Besides, how to enter privilege level 0 by some instruction?

P.S.I am using QNX operating system, only assembly instruction can be used.

 

Igor Levicki
Total Points:
10,865
Status Points:
10,865
Black Belt
May 10, 2007 6:09 PM PDT
Rate
 
#1
You cannot enter ring 0 with any particular instruction under any modern operating system because that is considered security risk and the kernel does not allow your process to execute such instructions. However, you can write a device driver or use already existing driver from within your application to perform privileged operations such as access to MSR registers. In order to access unique MSR registers your application needs to change its process/thread affinity for each CPU whose MSR you want to read/write. Under Windows that is accomplished by calling SetThreadAffinityMask() API but for QNX you will have to consult proper OS API documentation or ask someone else.
--------
If you find my post helpfull, please rate it and/or select it as a best answer where applies. Thank you.


zhangyihere
Total Points:
100
Status Points:
50
Green Belt
November 4, 2009 5:01 AM PST
Rate
 
#2 Reply to #1
Hi, now I also would like to control the unique MSRs for each core. According to this post, if one application which is running on "core 0" sets the unique MSR registers, then it is the unique MSRs of "core 0" be set. In other words, one application running on one core can't set the unique MSRs on the other core? Is my understanding right?  




Intel Software Network Forums Statistics

8488 users have contributed to 31626 threads and 100733 posts to date.
In the past 24 hours, we have 35 new thread(s) 132 new posts(s), and 199 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member chat1983