aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2021-03-26 15:19:10 -0700
committerAndrew Waterman <andrew@sifive.com>2021-03-26 15:19:10 -0700
commit168c5cac036cbc92c86f947372441d58ca0d10f2 (patch)
tree841c57214ad8b820b68912660c4bcaade14de6df
parent146391f7eb837e895a46c90ca52333d62448a07b (diff)
downloadpk-168c5cac036cbc92c86f947372441d58ca0d10f2.zip
pk-168c5cac036cbc92c86f947372441d58ca0d10f2.tar.gz
pk-168c5cac036cbc92c86f947372441d58ca0d10f2.tar.bz2
pk: don't init files until VM setup is complete
-rw-r--r--pk/pk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pk/pk.c b/pk/pk.c
index e83c29b..4f16abc 100644
--- a/pk/pk.c
+++ b/pk/pk.c
@@ -189,6 +189,8 @@ rest_of_boot_loader:\n\
void rest_of_boot_loader_2(uintptr_t kstack_top)
{
+ file_init();
+
static arg_buf args; // avoid large stack allocation
size_t argc = parse_args(&args);
if (!argc)
@@ -205,8 +207,6 @@ void rest_of_boot_loader_2(uintptr_t kstack_top)
void boot_loader(uintptr_t dtb)
{
- file_init();
-
uintptr_t kernel_stack_top = pk_vm_init();
extern char trap_entry;