diff options
author | jhb <jhb@FreeBSD.org> | 2014-12-22 19:53:55 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2014-12-22 19:53:55 +0000 |
commit | 71f9e38fa2d4dc13b36ced356445eea08f620127 (patch) | |
tree | f5ea67c6a3628107d872a3d3fd63e6e23fd40a44 /sys/x86 | |
parent | 77f68eb34a5227ee871dceac46abbd1db966388b (diff) | |
download | FreeBSD-src-71f9e38fa2d4dc13b36ced356445eea08f620127.zip FreeBSD-src-71f9e38fa2d4dc13b36ced356445eea08f620127.tar.gz |
MFC 271405,271408,271409,272658:
MFamd64: Use initializecpu() to set various model-specific registers on
AP startup and AP resume (it was already used for BSP startup and BSP
resume).
Diffstat (limited to 'sys/x86')
-rw-r--r-- | sys/x86/x86/identcpu.c | 19 | ||||
-rw-r--r-- | sys/x86/x86/local_apic.c | 11 |
2 files changed, 1 insertions, 29 deletions
diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index e33ab8a..da24761 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -405,30 +405,11 @@ printcpuinfo(void) break; case 0x5a0: strcat(cpu_model, "Geode LX"); - /* - * Make sure the TSC runs through suspension, - * otherwise we can't use it as timecounter - */ - wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL); break; default: strcat(cpu_model, "Unknown"); break; } -#if defined(I586_CPU) && defined(CPU_WT_ALLOC) - if ((cpu_id & 0xf00) == 0x500) { - if (((cpu_id & 0x0f0) > 0) - && ((cpu_id & 0x0f0) < 0x60) - && ((cpu_id & 0x00f) > 3)) - enable_K5_wt_alloc(); - else if (((cpu_id & 0x0f0) > 0x80) - || (((cpu_id & 0x0f0) == 0x80) - && (cpu_id & 0x00f) > 0x07)) - enable_K6_2_wt_alloc(); - else if ((cpu_id & 0x0f0) > 0x50) - enable_K6_wt_alloc(); - } -#endif #else if ((cpu_id & 0xf00) == 0xf00) strcat(cpu_model, "AMD64 Processor"); diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index 9c33ee4..25cdec6 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include <vm/pmap.h> #include <x86/apicreg.h> -#include <machine/cpu.h> #include <machine/cputypes.h> #include <machine/frame.h> #include <machine/intr_machdep.h> @@ -1264,9 +1263,6 @@ static void apic_init(void *dummy __unused) { struct apic_enumerator *enumerator; -#ifndef __amd64__ - uint64_t apic_base; -#endif int retval, best; /* We only support built in local APICs. */ @@ -1308,12 +1304,7 @@ apic_init(void *dummy __unused) * CPUs during early startup. We need to turn the local APIC back * on on such CPUs now. */ - if (cpu == CPU_686 && cpu_vendor_id == CPU_VENDOR_INTEL && - (cpu_id & 0xff0) == 0x610) { - apic_base = rdmsr(MSR_APICBASE); - apic_base |= APICBASE_ENABLED; - wrmsr(MSR_APICBASE, apic_base); - } + ppro_reenable_apic(); #endif /* Probe the CPU's in the system. */ |