Changeset View
Changeset View
Standalone View
Standalone View
sys/riscv/riscv/locore.S
Show First 20 Lines • Show All 200 Lines • ▼ Show 20 Lines | |||||
#ifdef SMP | #ifdef SMP | ||||
/* Store boot hart id. */ | /* Store boot hart id. */ | ||||
la t0, boot_hart | la t0, boot_hart | ||||
sw a0, 0(t0) | sw a0, 0(t0) | ||||
#endif | #endif | ||||
/* Fill riscv_bootparams */ | /* Fill riscv_bootparams */ | ||||
la t0, pagetable_l1 | la t0, pagetable_l1 | ||||
sd t0, 0(sp) /* kern_l1pt */ | sd t0, RISCV_BOOTPARAMS_KERN_L1PT(sp) | ||||
sd s9, 8(sp) /* kern_phys */ | sd s9, RISCV_BOOTPARAMS_KERN_PHYS(sp) | ||||
la t0, initstack | la t0, initstack | ||||
sd t0, 16(sp) /* kern_stack */ | sd t0, RISCV_BOOTPARAMS_KERN_STACK(sp) | ||||
li t0, (VM_MAX_KERNEL_ADDRESS - 2 * L2_SIZE) | li t0, (VM_MAX_KERNEL_ADDRESS - 2 * L2_SIZE) | ||||
sd t0, 24(sp) /* dtbp_virt */ | sd t0, RISCV_BOOTPARAMS_DTBP_VIRT(sp) | ||||
sd a1, 32(sp) /* dtbp_phys */ | sd a1, RISCV_BOOTPARAMS_DTBP_PHYS(sp) | ||||
mv a0, sp | mv a0, sp | ||||
call _C_LABEL(initriscv) /* Off we go */ | call _C_LABEL(initriscv) /* Off we go */ | ||||
call _C_LABEL(mi_startup) | call _C_LABEL(mi_startup) | ||||
.align 4 | .align 4 | ||||
initstack: | initstack: | ||||
.space (PAGE_SIZE * KSTACK_PAGES) | .space (PAGE_SIZE * KSTACK_PAGES) | ||||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |