iPXE
Functions
msr.h File Reference

Model-specific registers. More...

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static __attribute__ ((always_inline)) uint64_t rdmsr(unsigned int msr)
 Read model-specific register.

Detailed Description

Model-specific registers.

Definition in file msr.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
static __attribute__ ( (always_inline)  ) [inline, static]

Read model-specific register.

Write model-specific register.

Parameters:
msrModel-specific register
Return values:
valueValue
Parameters:
msrModel-specific register
valueValue

Definition at line 18 of file msr.h.

References __asm__(), and value.

                           {
        uint64_t value;

        __asm__ __volatile__ ( "rdmsr" : "=A" ( value ) : "c" ( msr ) );
        return value;
}