18 lines
310 B
C
18 lines
310 B
C
|
#pragma once
|
||
|
#include <stdint.h>
|
||
|
|
||
|
#define IA32_EFER_MSR 0xC0000080
|
||
|
|
||
|
struct MSR
|
||
|
{
|
||
|
void write(uint64_t value);
|
||
|
uint64_t read();
|
||
|
|
||
|
MSR(uint32_t msr_num);
|
||
|
|
||
|
static void write_to(uint32_t msr_num, uint64_t value);
|
||
|
static uint64_t read_from(uint32_t msr_num);
|
||
|
|
||
|
private:
|
||
|
uint32_t m_msr_num;
|
||
|
};
|