2010-04-27 08:56:47 +02:00
|
|
|
static void hlt(void)
|
2003-05-09 04:39:00 +02:00
|
|
|
{
|
|
|
|
__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);
|
|
|
|
}
|