Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit 6958c3b

Browse files
grg-haasdayeol
authored andcommitted
Parse phdr and phnum and pass them in auxvec
1 parent f4b0c9e commit 6958c3b

File tree

5 files changed

+3287
-14
lines changed

5 files changed

+3287
-14
lines changed

boot.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ init_freemem()
8282

8383
/* initialize user stack */
8484
void
85-
init_user_stack_and_env()
85+
init_user_stack_and_env(ELF(Ehdr) *hdr)
8686
{
8787
void* user_sp = (void*) EYRIE_USER_STACK_START;
8888

@@ -101,7 +101,7 @@ init_user_stack_and_env()
101101
#endif // USE_FREEMEM
102102

103103
// setup user stack env/aux
104-
user_sp = setup_start(user_sp);
104+
user_sp = setup_start(user_sp, hdr);
105105

106106
// prepare user sp
107107
csr_write(sscratch, user_sp);
@@ -155,7 +155,7 @@ eyrie_boot(uintptr_t dummy, // $a0 contains the return value from the SBI
155155
#endif /* USE_FREEMEM */
156156

157157
/* initialize user stack */
158-
init_user_stack_and_env();
158+
init_user_stack_and_env((ELF(Ehdr) *) __va(user_paddr));
159159

160160
/* set trap vector */
161161
csr_write(stvec, &encl_trap_handler);

0 commit comments

Comments
 (0)