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

Pass a1 as received from OpenSBI to main's second argument #103

Merged
merged 1 commit into from
Sep 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion elfloader-tool/src/arch-riscv/crt0.S
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ _start:
addi gp, gp, %pcrel_lo(1b)
.option pop

/* a0 should have hart id, store it in s0 so as not to clobber from HSM calls */
/* a0 should have hart id, store it in s0 so as not to clobber from HSM calls
a1 should have the dtb, store it in s2 so as not to clobber it as well */
mv s0, a0
mv s2, a1
lsf37 marked this conversation as resolved.
Show resolved Hide resolved

#ifdef CONFIG_IMAGE_BINARY
/* Clear the BSS before we get to do anything more specific */
Expand Down Expand Up @@ -83,6 +85,7 @@ _start1:

la sp, (elfloader_stack_alloc + BIT(12))

mv a1, s2 // restore dtb to main's second argument
la s0, main
jr s0

Expand Down