Changeset View
Changeset View
Standalone View
Standalone View
sys/riscv/riscv/locore.S
Show First 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | .option norelax | ||||
la gp, __global_pointer$ | la gp, __global_pointer$ | ||||
.option pop | .option pop | ||||
/* Initialize stack pointer */ | /* Initialize stack pointer */ | ||||
la s3, initstack_end | la s3, initstack_end | ||||
mv sp, s3 | mv sp, s3 | ||||
/* Allocate space for thread0 PCB and riscv_bootparams */ | /* Allocate space for thread0 PCB and riscv_bootparams */ | ||||
addi sp, sp, -(PCB_SIZE + 40) & ~STACKALIGNBYTES | addi sp, sp, -(PCB_SIZE + RISCV_BOOTPARAMS_SIZE) & ~STACKALIGNBYTES | ||||
/* Clear BSS */ | /* Clear BSS */ | ||||
la s0, _C_LABEL(__bss_start) | la s0, _C_LABEL(__bss_start) | ||||
la s1, _C_LABEL(_end) | la s1, _C_LABEL(_end) | ||||
1: | 1: | ||||
sd zero, 0(s0) | sd zero, 0(s0) | ||||
addi s0, s0, 8 | addi s0, s0, 8 | ||||
bltu s0, s1, 1b | bltu s0, s1, 1b | ||||
▲ Show 20 Lines • Show All 142 Lines • Show Last 20 Lines |