Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/xen/pv.c
Show First 20 Lines • Show All 359 Lines • ▼ Show 20 Lines | start_xen_ap(int cpu) | ||||
const size_t stacksize = kstack_pages * PAGE_SIZE; | const size_t stacksize = kstack_pages * PAGE_SIZE; | ||||
/* allocate and set up an idle stack data page */ | /* allocate and set up an idle stack data page */ | ||||
bootstacks[cpu] = (void *)kmem_malloc(stacksize, M_WAITOK | M_ZERO); | bootstacks[cpu] = (void *)kmem_malloc(stacksize, M_WAITOK | M_ZERO); | ||||
doublefault_stack = (char *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO); | doublefault_stack = (char *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO); | ||||
mce_stack = (char *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO); | mce_stack = (char *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO); | ||||
nmi_stack = (char *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO); | nmi_stack = (char *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO); | ||||
dbg_stack = (void *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO); | dbg_stack = (void *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO); | ||||
dpcpu = (void *)kmem_malloc(DPCPU_SIZE, M_WAITOK | M_ZERO); | |||||
bootSTK = (char *)bootstacks[cpu] + kstack_pages * PAGE_SIZE - 8; | bootSTK = (char *)bootstacks[cpu] + kstack_pages * PAGE_SIZE - 8; | ||||
bootAP = cpu; | bootAP = cpu; | ||||
ctxt = malloc(sizeof(*ctxt), M_TEMP, M_WAITOK | M_ZERO); | ctxt = malloc(sizeof(*ctxt), M_TEMP, M_WAITOK | M_ZERO); | ||||
ctxt->flags = VGCF_IN_KERNEL; | ctxt->flags = VGCF_IN_KERNEL; | ||||
ctxt->user_regs.rip = (unsigned long) init_secondary; | ctxt->user_regs.rip = (unsigned long) init_secondary; | ||||
▲ Show 20 Lines • Show All 264 Lines • Show Last 20 Lines |