Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update entry.S #201

Open
wants to merge 1 commit into
base: riscv
Choose a base branch
from
Open

Conversation

Abhinavpatel00
Copy link

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant