xv6-riscv icon indicating copy to clipboard operation
xv6-riscv copied to clipboard

Update entry.S

Open Abhinavpatel00 opened this issue 1 year ago • 0 comments

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

Abhinavpatel00 avatar Sep 20 '23 21:09 Abhinavpatel00