|
|
@ -154,7 +154,7 @@ static void rest_of_boot_loader(uintptr_t kstack_top) |
|
|
run_loaded_program(argc, args.argv, kstack_top); |
|
|
run_loaded_program(argc, args.argv, kstack_top); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void boot_loader() |
|
|
void boot_loader(uintptr_t dtb) |
|
|
{ |
|
|
{ |
|
|
extern char trap_entry; |
|
|
extern char trap_entry; |
|
|
write_csr(stvec, &trap_entry); |
|
|
write_csr(stvec, &trap_entry); |
|
|
@ -163,10 +163,10 @@ void boot_loader() |
|
|
set_csr(sstatus, SSTATUS_SUM); |
|
|
set_csr(sstatus, SSTATUS_SUM); |
|
|
|
|
|
|
|
|
file_init(); |
|
|
file_init(); |
|
|
enter_supervisor_mode(rest_of_boot_loader, pk_vm_init(), 0); |
|
|
enter_supervisor_mode(rest_of_boot_loader, pk_vm_init(), dtb); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void boot_other_hart() |
|
|
void boot_other_hart(uintptr_t dtb) |
|
|
{ |
|
|
{ |
|
|
// stall all harts besides hart 0
|
|
|
// stall all harts besides hart 0
|
|
|
while (1) |
|
|
while (1) |
|
|
|