Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/i386/mp_machdep.c
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
#include <vm/vm.h> | #include <vm/vm.h> | ||||
#include <vm/vm_param.h> | #include <vm/vm_param.h> | ||||
#include <vm/pmap.h> | #include <vm/pmap.h> | ||||
#include <vm/vm_kern.h> | #include <vm/vm_kern.h> | ||||
#include <vm/vm_extern.h> | #include <vm/vm_extern.h> | ||||
#include <x86/apicreg.h> | #include <x86/apicreg.h> | ||||
#include <machine/clock.h> | #include <machine/clock.h> | ||||
#include <machine/cpu.h> | |||||
#include <machine/cputypes.h> | #include <machine/cputypes.h> | ||||
#include <x86/mca.h> | #include <x86/mca.h> | ||||
#include <machine/md_var.h> | #include <machine/md_var.h> | ||||
#include <machine/pcb.h> | #include <machine/pcb.h> | ||||
#include <machine/psl.h> | #include <machine/psl.h> | ||||
#include <machine/smp.h> | #include <machine/smp.h> | ||||
#include <machine/specialreg.h> | #include <machine/specialreg.h> | ||||
#include <machine/cpu.h> | #include <x86/ucode.h> | ||||
#define WARMBOOT_TARGET 0 | #define WARMBOOT_TARGET 0 | ||||
#define WARMBOOT_OFF (PMAP_MAP_LOW + 0x0467) | #define WARMBOOT_OFF (PMAP_MAP_LOW + 0x0467) | ||||
#define WARMBOOT_SEG (PMAP_MAP_LOW + 0x0469) | #define WARMBOOT_SEG (PMAP_MAP_LOW + 0x0469) | ||||
#define CMOS_REG (0x70) | #define CMOS_REG (0x70) | ||||
#define CMOS_DATA (0x71) | #define CMOS_DATA (0x71) | ||||
#define BIOS_RESET (0x0f) | #define BIOS_RESET (0x0f) | ||||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | init_secondary(void) | ||||
struct pcpu *pc; | struct pcpu *pc; | ||||
struct i386tss *common_tssp; | struct i386tss *common_tssp; | ||||
struct region_descriptor r_gdt, r_idt; | struct region_descriptor r_gdt, r_idt; | ||||
int gsel_tss, myid, x; | int gsel_tss, myid, x; | ||||
u_int cr0; | u_int cr0; | ||||
/* bootAP is set in start_ap() to our ID. */ | /* bootAP is set in start_ap() to our ID. */ | ||||
myid = bootAP; | myid = bootAP; | ||||
/* Update microcode before doing anything else. */ | |||||
ucode_load_ap(myid); | |||||
/* Get per-cpu data */ | /* Get per-cpu data */ | ||||
pc = &__pcpu[myid]; | pc = &__pcpu[myid]; | ||||
/* prime data page for it to use */ | /* prime data page for it to use */ | ||||
pcpu_init(pc, myid, sizeof(struct pcpu)); | pcpu_init(pc, myid, sizeof(struct pcpu)); | ||||
dpcpu_init(dpcpu, myid); | dpcpu_init(dpcpu, myid); | ||||
pc->pc_apic_id = cpu_apic_ids[myid]; | pc->pc_apic_id = cpu_apic_ids[myid]; | ||||
▲ Show 20 Lines • Show All 238 Lines • Show Last 20 Lines |