xv6-riscv
xv6-riscv copied to clipboard
Update entry.S
corrected the typo here
# Read the hardware thread ID ('mhartid') into register 'a1'. csrr a1, mhartid # Increment the hardware thread ID by 1 to avoid a stack overlap issue. addi a1, a1, 1 # Calculate the new stack pointer value: # sp = stack0 + ((hartid + 1) * 4096) mul a0, a0, a1 add sp, sp, a0