arch/riscv: Implement the SBI again
Not all SBI calls are implemented, but it's enough to see a couple dozen lines of Linux boot output. It should also be noted that the SBI is still in flux: https://groups.google.com/a/groups.riscv.org/forum/#!topic/sw-dev/6oNhlW0OFKM Change-Id: I80e4fe508336d6428ca7136bc388fbc3cda4f1e4 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/16119 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
committed by
Ronald G. Minnich
parent
3965a522c2
commit
857e33e27f
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <arch/barrier.h>
|
||||
#include <arch/encoding.h>
|
||||
#include <arch/sbi.h>
|
||||
#include <atomic.h>
|
||||
#include <console/console.h>
|
||||
#include <stdint.h>
|
||||
@@ -151,7 +152,7 @@ void init_vm(uintptr_t virtMemStart, uintptr_t physMemStart, uintptr_t pageTable
|
||||
|
||||
// map SBI at top of vaddr space
|
||||
uintptr_t num_sbi_pages = 1; // only need to map a single page for sbi interface
|
||||
uintptr_t sbiStartAddress = 0x2000; // the start of the sbi mapping
|
||||
uintptr_t sbiStartAddress = (uintptr_t) &sbi_page;
|
||||
uintptr_t sbiAddr = sbiStartAddress;
|
||||
for (uintptr_t i = 0; i < num_sbi_pages; i++) {
|
||||
uintptr_t idx = (1 << RISCV_PGLEVEL_BITS) - num_sbi_pages + i;
|
||||
|
Reference in New Issue
Block a user