[coreboot-gerrit] New patch to review for coreboot: [WIP] arch/riscv: Make SBI support optional

Jonathan Neuschäfer (j.neuschaefer@gmx.net) gerrit at coreboot.org
Thu Jun 30 05:00:49 CEST 2016


Jonathan Neuschäfer (j.neuschaefer at gmx.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15510

-gerrit

commit 757eb21bfb5850a536f3dce201fe5917cd622c7e
Author: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
Date:   Thu Jun 30 04:05:08 2016 +0200

    [WIP] arch/riscv: Make SBI support optional
    
    I'm posting this patch early so I can link to it from the wiki.
    
    Change-Id: I5cbfc90afd3febab33835935f08005136a3f47e9
    Signed-off-by: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
---
 src/arch/riscv/boot.c           | 4 ++++
 src/arch/riscv/virtual_memory.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/src/arch/riscv/boot.c b/src/arch/riscv/boot.c
index 96526bf..e2d7d14 100644
--- a/src/arch/riscv/boot.c
+++ b/src/arch/riscv/boot.c
@@ -22,6 +22,7 @@ void arch_prog_run(struct prog *prog)
 {
 	void (*doit)(void *) = prog_entry(prog);
 
+#if IS_ENABLED(CONFIG_RISCV_SBI)
 	if (ENV_RAMSTAGE && prog_type(prog) == PROG_PAYLOAD) {
 		initVirtualMemory();
 		write_csr(mepc, doit);
@@ -29,6 +30,9 @@ void arch_prog_run(struct prog *prog)
 	} else {
 		doit(prog_entry_arg(prog));
 	}
+#else
+	doit(prog_entry_arg(prog));
+#endif
 }
 
 int arch_supports_bounce_buffer(void)
diff --git a/src/arch/riscv/virtual_memory.c b/src/arch/riscv/virtual_memory.c
index 64ea2b1..dce0887 100644
--- a/src/arch/riscv/virtual_memory.c
+++ b/src/arch/riscv/virtual_memory.c
@@ -101,6 +101,7 @@ void init_vm(uintptr_t virtMemStart, uintptr_t physMemStart, uintptr_t pageTable
 
 void initVirtualMemory(void) {
 	printk(BIOS_DEBUG, "Initializing virtual memory...\n");
+	return;
 	uintptr_t physicalStart = 0x1000000; // TODO: Figure out how to grab this from cbfs
 	uintptr_t virtualStart = 0xffffffff81000000;
 	uintptr_t pageTableStart = 0x1400000;



More information about the coreboot-gerrit mailing list