Поделиться через


NKrdmsr (Compact 2013)

10/16/2014

This function is a C wrapper function for the x86 RDMSR instruction. It puts the CPU into ring 0 if it is not already there.

This function is specific to x86 only.

Syntax

BOOL NKrdmsr(
  DWORD dwAddr,
  DWORD* lpdwValHigh,
  DWORD* lpdwValLow
);

Parameters

  • dwAddr
    [in] Address of the model-specific register (MSR) being read.
  • lpdwValHigh
    [in] Receives the upper 32 bits of the value being read. Can be NULL.
  • lpdwValLow
    [in] Receives the lower 32 bits of the value being read. Can be NULL.

Return Value

TRUE indicates success. FALSE indicates failure.

Remarks

The pfnX86rdmsr member of NKGLOBAL points to this function.

All MSR-related information is specific to x86 only. MSRs are not supported on all x86 CPUs.

Note

This function does not determine whether the CPU supports MSRs, nor does it determine whether the CPU supports the particular MSR address being read. The caller is responsible for determining whether MSRs are supported using the x86 CPUID instruction to query CPU features. For information about MSR addresses, see the documentation for your particular CPU.

Requirements

Header

msr.h

Library

coredll.lib

See Also

Reference

Kernel Functions Available to the OAL
NKwrmsr