Changeset View
Changeset View
Standalone View
Standalone View
head/sys/i386/i386/initcpu.c
Show All 35 Lines | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <machine/cputypes.h> | #include <machine/cputypes.h> | ||||
#include <machine/md_var.h> | #include <machine/md_var.h> | ||||
#include <machine/psl.h> | |||||
#include <machine/specialreg.h> | #include <machine/specialreg.h> | ||||
#include <vm/vm.h> | #include <vm/vm.h> | ||||
#include <vm/pmap.h> | #include <vm/pmap.h> | ||||
#ifdef I486_CPU | #ifdef I486_CPU | ||||
static void init_5x86(void); | static void init_5x86(void); | ||||
static void init_bluelightning(void); | static void init_bluelightning(void); | ||||
▲ Show 20 Lines • Show All 571 Lines • ▼ Show 20 Lines | init_transmeta(void) | ||||
/* Expose all hidden features. */ | /* Expose all hidden features. */ | ||||
wrmsr(0x80860004, rdmsr(0x80860004) | ~0UL); | wrmsr(0x80860004, rdmsr(0x80860004) | ~0UL); | ||||
do_cpuid(1, regs); | do_cpuid(1, regs); | ||||
cpu_feature = regs[3]; | cpu_feature = regs[3]; | ||||
} | } | ||||
#endif | #endif | ||||
/* | /* | ||||
* The value for the TSC_AUX MSR and rdtscp/rdpid. | * The value for the TSC_AUX MSR and rdtscp/rdpid on the invoking CPU. | ||||
* | |||||
* Caller should prevent CPU migration. | |||||
*/ | */ | ||||
u_int | u_int | ||||
cpu_auxmsr(void) | cpu_auxmsr(void) | ||||
{ | { | ||||
KASSERT((read_eflags() & PSL_I) == 0, ("context switch possible")); | |||||
return (PCPU_GET(cpuid)); | return (PCPU_GET(cpuid)); | ||||
} | } | ||||
extern int elf32_nxstack; | extern int elf32_nxstack; | ||||
void | void | ||||
initializecpu(void) | initializecpu(void) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 349 Lines • Show Last 20 Lines |