diff options
author | Maximilian Brune <maximilian.brune@9elements.com> | 2024-01-14 09:24:43 +0600 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2024-02-10 17:28:47 +0000 |
commit | 2d26e9bdce01a23eabf843c3d0d029fcab686e7f (patch) | |
tree | 2b7101948888da190c38dd0207833f8b998fce9c /src | |
parent | 0452d0939e7d7ddbf24d78ad5e69408b5ad52f47 (diff) |
arch/riscv/boot.c: Comment OpenSBI Supervisor mode switch
It simply adds a comment to indicate to the reader that the
RISCV_PAYLOAD_MODE_S parameter causes OpenSBI to switch to Supervisor
mode. Otherwise it could be interpreted that coreboot switches to
Supervisor mode before starting OpenSBI (which is not the case)
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Ib62be0c2ff59361200df4c65f9aca5f7456a0ada
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79949
Reviewed-by: ron minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Hug <philipp@hug.cx>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/riscv/boot.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/arch/riscv/boot.c b/src/arch/riscv/boot.c index a59f9d15ec..6f744d3211 100644 --- a/src/arch/riscv/boot.c +++ b/src/arch/riscv/boot.c @@ -31,10 +31,12 @@ static void do_arch_prog_run(struct arch_prog_run_args *args) fdt = prog_entry_arg(prog); if (ENV_RAMSTAGE && prog_type(prog) == PROG_PAYLOAD) { - if (CONFIG(RISCV_OPENSBI)) + if (CONFIG(RISCV_OPENSBI)) { + // tell OpenSBI to switch to Supervisor mode before jumping to payload run_payload_opensbi(prog, fdt, args->opensbi, RISCV_PAYLOAD_MODE_S); - else + } else { run_payload(prog, fdt, RISCV_PAYLOAD_MODE_S); + } } else { void (*doit)(int hart_id, void *fdt, void *arg) = prog_entry(prog); doit(hart_id, fdt, prog_entry_arg(prog)); |