pc64: preserve reserved bits in CR0/CR4 for amd64 in mtrr setstate()
On AMD64, CR0/CR4 are 64-bit registers, with the upper half reserved. So use uintptr type to store the register values to get 32 bit on 386 and 64 bit on AMD64.
This commit is contained in:
parent
4db8a82f5a
commit
263dc8093d
1 changed files with 1 additions and 1 deletions
|
@ -354,7 +354,7 @@ enum {
|
|||
static void
|
||||
putstate(State *s)
|
||||
{
|
||||
ulong cr0, cr4;
|
||||
uintptr cr0, cr4;
|
||||
int i, x;
|
||||
|
||||
x = splhi();
|
||||
|
|
Loading…
Reference in a new issue