Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/machdep.c
Show First 20 Lines • Show All 1,556 Lines • ▼ Show 20 Lines | amd64_bsp_pcpu_init1(struct pcpu *pc) | ||||
PCPU_SET(prvspace, pc); | PCPU_SET(prvspace, pc); | ||||
gdt = *PCPU_PTR(gdt); | gdt = *PCPU_PTR(gdt); | ||||
PCPU_SET(curthread, &thread0); | PCPU_SET(curthread, &thread0); | ||||
PCPU_SET(tssp, PCPU_PTR(common_tss)); | PCPU_SET(tssp, PCPU_PTR(common_tss)); | ||||
PCPU_SET(tss, (struct system_segment_descriptor *)&gdt[GPROC0_SEL]); | PCPU_SET(tss, (struct system_segment_descriptor *)&gdt[GPROC0_SEL]); | ||||
PCPU_SET(ldt, (struct system_segment_descriptor *)&gdt[GUSERLDT_SEL]); | PCPU_SET(ldt, (struct system_segment_descriptor *)&gdt[GUSERLDT_SEL]); | ||||
PCPU_SET(fs32p, &gdt[GUFS32_SEL]); | PCPU_SET(fs32p, &gdt[GUFS32_SEL]); | ||||
PCPU_SET(gs32p, &gdt[GUGS32_SEL]); | PCPU_SET(gs32p, &gdt[GUGS32_SEL]); | ||||
PCPU_SET(smp_tlb_gen, 1); | |||||
} | } | ||||
void | void | ||||
amd64_bsp_pcpu_init2(uint64_t rsp0) | amd64_bsp_pcpu_init2(uint64_t rsp0) | ||||
{ | { | ||||
PCPU_SET(rsp0, rsp0); | PCPU_SET(rsp0, rsp0); | ||||
PCPU_SET(pti_rsp0, ((vm_offset_t)PCPU_PTR(pti_stack) + | PCPU_SET(pti_rsp0, ((vm_offset_t)PCPU_PTR(pti_stack) + | ||||
▲ Show 20 Lines • Show All 1,242 Lines • Show Last 20 Lines |