Implemented CR4 register for Winchip. Currently only Time Stamp Disable (TSD) has an effect.
Fixed stupid bug in WRMSR - MSRs can now be written with values other than zero.
This commit is contained in:
parent
63adb3a9ae
commit
262b188790
6 changed files with 49 additions and 2 deletions
|
|
@ -6,6 +6,11 @@ static int opRDTSC(uint32_t fetchdat)
|
|||
x86illegal();
|
||||
return 0;
|
||||
}
|
||||
if ((cr4 & CR4_TSD) && CPL)
|
||||
{
|
||||
x86gpf("RDTSC when TSD set and CPL != 0", 0);
|
||||
return 0;
|
||||
}
|
||||
EAX = tsc & 0xffffffff;
|
||||
EDX = tsc >> 32;
|
||||
cycles--;
|
||||
|
|
|
|||
Loading…
Reference in a new issue