次の方法で共有


NKwrmsr (Compact 2013)

10/16/2014

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

This function is specific to x86 only.

Syntax

BOOL NKwrmsr(
  DWORD dwAddr,
  DWORD dwValHigh,
  DWORD dwValLow
);

Parameters

  • dwAddr
    [in] Address of the MSR being written.
  • dwValHigh
    [in] Upper 32 bits of value being written.
  • dwValLow
    [in] Lower 32 bits of value being written.

Return Value

TRUE indicates success. FALSE indicates failure.

Remarks

An MSR is a model-specific register.

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

Note

This function does not check if the CPU supports MSRs and it does not check if the CPU supports the particular MSR address being written. The caller is responsible for checking if MSRs are supported using the x86 CPUID instruction to query CPU features. For information about MSR addresses, see the documentation for your CPU.

Requirements

Header

msr.h

Library

coredll.lib

See Also

Reference

Kernel Functions Available to the OAL
NKrdmsr