UPSTREAM: arch/riscv: Unconditionally start payloads in machine mode

Ron Minnich writes: "we'll change cbfstool to put a header on the
payload to jump to supervisor if that is desired. The principal here is
that payloads are always started in machine mode, but we want to set the
page tables up for them."

BUG=None
BRANCH=None
TEST=None

Change-Id: I5cbfc90afd3febab33835935f08005136a3f47e9
Original-Signed-off-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Original-Reviewed-on: https://review.coreboot.org/15510
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360813
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
This commit is contained in:
Jonathan Neuschäfer 2016-07-07 20:53:29 +02:00 committed by chrome-bot
commit 68f3d95785

View file

@ -24,11 +24,9 @@ void arch_prog_run(struct prog *prog)
if (ENV_RAMSTAGE && prog_type(prog) == PROG_PAYLOAD) {
initVirtualMemory();
write_csr(mepc, doit);
asm volatile("eret");
} else {
doit(prog_entry_arg(prog));
}
doit(prog_entry_arg(prog));
}
int arch_supports_bounce_buffer(void)