diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-07-24 18:42:38 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-07-24 18:42:38 -0700 |
commit | 6aa84fd30d23e109f66f9c05e87eda9d4ce7290f (patch) | |
tree | f12298fc48d397ea4c1ee158a6e00350a17d8aec | |
parent | 39f189549b5703a94c1049bfce23f416eede3c07 (diff) | |
download | pk-6aa84fd30d23e109f66f9c05e87eda9d4ce7290f.zip pk-6aa84fd30d23e109f66f9c05e87eda9d4ce7290f.tar.gz pk-6aa84fd30d23e109f66f9c05e87eda9d4ce7290f.tar.bz2 |
Undo last commit
It breaks programs that rely on ELF program headers.
-rw-r--r-- | pk/init.c | 4 | ||||
-rw-r--r-- | pk/minit.c | 3 | ||||
-rw-r--r-- | pk/pk.h | 2 |
3 files changed, 5 insertions, 4 deletions
@@ -84,7 +84,7 @@ struct mainvars* parse_args(struct mainvars* args) return (struct mainvars*)&args->argv[a0-1]; } -void load_program(struct mainvars* args) +void boot_loader(struct mainvars* args) { // load program named by argv[0] long phdrs[128]; @@ -93,4 +93,6 @@ void load_program(struct mainvars* args) if (!args->argc) panic("tell me what ELF to load!"); load_elf((char*)(uintptr_t)args->argv[0], ¤t); + + run_loaded_program(args); } @@ -67,8 +67,7 @@ static void init_first_hart() memory_init(); vm_init(); - load_program(args); - run_loaded_program(args); + boot_loader(args); } static void init_other_hart() @@ -60,7 +60,7 @@ void handle_misaligned_load(trapframe_t*); void handle_misaligned_store(trapframe_t*); void handle_fault_load(trapframe_t*); void handle_fault_store(trapframe_t*); -void load_program(struct mainvars*); +void boot_loader(struct mainvars*); void run_loaded_program(struct mainvars*); void boot_other_hart(); |