From 926b360655fd7a22413c7732faceeea21a224aa1 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 17 Feb 2017 01:54:41 -0800 Subject: WIP towards ECALL interface for SBI --- pk/pk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pk/pk.c') diff --git a/pk/pk.c b/pk/pk.c index 25cd5a5..8132f8d 100644 --- a/pk/pk.c +++ b/pk/pk.c @@ -162,7 +162,7 @@ void boot_loader() write_csr(sie, 0); file_init(); - enter_supervisor_mode(rest_of_boot_loader, pk_vm_init()); + enter_supervisor_mode(rest_of_boot_loader, pk_vm_init(), 0); } void boot_other_hart() -- cgit v1.1 From 7d60c5904f45d979643c1b9f6cdde42f62ef3c32 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 21 Mar 2017 16:56:52 -0700 Subject: Allow PK access to user memory --- pk/pk.c | 1 + 1 file changed, 1 insertion(+) (limited to 'pk/pk.c') diff --git a/pk/pk.c b/pk/pk.c index 8132f8d..c0b6407 100644 --- a/pk/pk.c +++ b/pk/pk.c @@ -160,6 +160,7 @@ void boot_loader() write_csr(stvec, &trap_entry); write_csr(sscratch, 0); write_csr(sie, 0); + set_csr(sstatus, SSTATUS_SUM); file_init(); enter_supervisor_mode(rest_of_boot_loader, pk_vm_init(), 0); -- cgit v1.1 From 23ab37ad78673166a8300584d177ace77fca5101 Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Wed, 22 Mar 2017 14:35:13 -0700 Subject: SBI: a0+a1 hold hartid+dtb pointer between boot loader stages --- pk/pk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pk/pk.c') diff --git a/pk/pk.c b/pk/pk.c index c0b6407..1a2e540 100644 --- a/pk/pk.c +++ b/pk/pk.c @@ -154,7 +154,7 @@ static void rest_of_boot_loader(uintptr_t kstack_top) run_loaded_program(argc, args.argv, kstack_top); } -void boot_loader() +void boot_loader(uintptr_t dtb) { extern char trap_entry; write_csr(stvec, &trap_entry); @@ -163,10 +163,10 @@ void boot_loader() set_csr(sstatus, SSTATUS_SUM); 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 while (1) -- cgit v1.1 From 96965a8cc670d10055dbf64d42fedcda5b35beff Mon Sep 17 00:00:00 2001 From: "Wesley W. Terpstra" Date: Thu, 23 Mar 2017 19:12:08 -0700 Subject: pk: does not use dtb --- pk/pk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pk/pk.c') diff --git a/pk/pk.c b/pk/pk.c index 1a2e540..11a2cdf 100644 --- a/pk/pk.c +++ b/pk/pk.c @@ -163,7 +163,7 @@ void boot_loader(uintptr_t dtb) set_csr(sstatus, SSTATUS_SUM); file_init(); - enter_supervisor_mode(rest_of_boot_loader, pk_vm_init(), dtb); + enter_supervisor_mode(rest_of_boot_loader, pk_vm_init(), 0); } void boot_other_hart(uintptr_t dtb) -- cgit v1.1 From 9204785053e9a488b8990f9f98ff8f05c71fd0d5 Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Thu, 2 Nov 2017 15:44:15 -0700 Subject: Detect harts that can't boot Linux instead of hard-coding them This checks to see if a hart can't boot Linux by looking for a compatible "mmu-type" field. If the hart can't boot Linux, then bbl masks it off. --- pk/pk.c | 1 + 1 file changed, 1 insertion(+) (limited to 'pk/pk.c') diff --git a/pk/pk.c b/pk/pk.c index 11a2cdf..e7cfc3a 100644 --- a/pk/pk.c +++ b/pk/pk.c @@ -7,6 +7,7 @@ #include elf_info current; +long disabled_hart_mask; static void handle_option(const char* s) { -- cgit v1.1