diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-02-01 10:23:17 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-02-01 10:23:17 +0100 |
commit | 28ad4e661610353efec655fdf147a46e156bf46e (patch) | |
tree | e830a6f8cfa91507114c1bc52f3c45356d235b15 /sys/src/9/pc/devarch.c | |
parent | 06bc19c28f3bd1528f669626eb9826226decabd9 (diff) |
pc kernel: split mpstartap() and squidboy into separate file... stuff for amd64
Diffstat (limited to 'sys/src/9/pc/devarch.c')
-rw-r--r-- | sys/src/9/pc/devarch.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/src/9/pc/devarch.c b/sys/src/9/pc/devarch.c index be29eab3c..71824f631 100644 --- a/sys/src/9/pc/devarch.c +++ b/sys/src/9/pc/devarch.c @@ -759,7 +759,7 @@ cpuidentify(void) char *p; int family, model, nomce; X86type *t, *tab; - ulong cr4; + uintptr cr4; ulong regs[4]; vlong mca, mct; @@ -804,6 +804,7 @@ cpuidentify(void) wrmsr(0x10, 0); } + /* * use i8253 to guess our cpu speed */ @@ -815,7 +816,7 @@ cpuidentify(void) * If machine check was enabled clear out any lingering status. */ if(m->cpuiddx & (Pge|Mce|Pse)){ - cr4 = 0; + cr4 = getcr4(); if(m->cpuiddx & Pse) cr4 |= 0x10; /* page size extensions */ if(p = getconf("*nomce")) @@ -851,6 +852,7 @@ cpuidentify(void) } putcr4(cr4); + if(m->cpuiddx & Mce) rdmsr(0x01, &mct); } |