Prev: Custom GINA logon failing for Remote Desktop sessions
Next: Help - inline assembly in driver code
From: BonBon on 15 Dec 2006 07:19 Hello~ I used MFC to get some MSR of CPU, I included "intrin.h" and used "__readmsr()", but it had error messages that "Privileged instrction". I think OS maybe has protected it. So, how to do that I can access MSR of CPU? or where has some relative information of this? such as DDK, WDK or others. Please someone can kindly tell me! Thank you! Best regards.
From: Pavel A. on 15 Dec 2006 10:59 Correct. You can't do privileged instructions from user mode (even with MFC :) --PA "BonBon" <BonBon(a)discussions.microsoft.com> wrote in message news:C88EB1E2-A79A-47C1-80EA-024C61052C50(a)microsoft.com... > Hello~ > > I used MFC to get some MSR of CPU, I included "intrin.h" and used > "__readmsr()", > > but it had error messages that "Privileged instrction". > > I think OS maybe has protected it. > > So, how to do that I can access MSR of CPU? > > or where has some relative information of this? such as DDK, WDK or others. > > Please someone can kindly tell me! > > Thank you! > > Best regards. >
From: Ben Voigt on 22 Dec 2006 11:54 "Pavel A." <pavel_a(a)NOwritemeNO.com> wrote in message news:%23YR06KGIHHA.924(a)TK2MSFTNGP02.phx.gbl... > Correct. You can't do privileged instructions from user mode (even with > MFC :) > > --PA The usual solution is to find a driver that already exposes what you're looking for. A common driver providing user-mode access to protected I/O resources is giveio, there is probably something similar for MSRs. But isn't all that information exposed via API calls already? > > "BonBon" <BonBon(a)discussions.microsoft.com> wrote in message > news:C88EB1E2-A79A-47C1-80EA-024C61052C50(a)microsoft.com... >> Hello~ >> >> I used MFC to get some MSR of CPU, I included "intrin.h" and used >> "__readmsr()", >> >> but it had error messages that "Privileged instrction". >> >> I think OS maybe has protected it. >> >> So, how to do that I can access MSR of CPU? >> >> or where has some relative information of this? such as DDK, WDK or >> others. >> >> Please someone can kindly tell me! >> >> Thank you! >> >> Best regards. >> > >
|
Pages: 1 Prev: Custom GINA logon failing for Remote Desktop sessions Next: Help - inline assembly in driver code |