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:
cinap_lenrek 2020-12-08 16:00:57 +01:00
parent 4db8a82f5a
commit 263dc8093d

View file

@ -354,7 +354,7 @@ enum {
static void
putstate(State *s)
{
ulong cr0, cr4;
uintptr cr0, cr4;
int i, x;
x = splhi();