blob: cb1f4940d7916a9b64062a3b6cfed09a23e06ed5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
static void hlt(void)
{
__builtin_hlt();
}
typedef __builtin_msr_t msr_t;
static msr_t rdmsr(unsigned long index)
{
return __builtin_rdmsr(index);
}
static void wrmsr(unsigned long index, msr_t msr)
{
__builtin_wrmsr(index, msr.lo, msr.hi);
}
static void main(void)
{
msr_t msr;
msr = rdmsr(0x1234);
msr.lo &= ~(1<<5);
wrmsr(0x1234, msr);
}
|