[PATCH 6/9] RISC-V: virt: riscvemu: clear frame buffer before jumping to reset vector

Ahmad Fatoum a.fatoum at pengutronix.de
Sat Jan 8 09:15:21 PST 2022

Our poor man's reset just resumes execution at the reset vector, so the
framebuffer will maintain its contents over reset, leading to artifacts.
Clear screen before reset to avoid this.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
 arch/riscv/boards/riscvemu/board.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/riscv/boards/riscvemu/board.c b/arch/riscv/boards/riscvemu/board.c
index 60c93716a2bc..31d0c70be643 100644
--- a/arch/riscv/boards/riscvemu/board.c
+++ b/arch/riscv/boards/riscvemu/board.c
@@ -21,6 +21,9 @@ static void __noreturn riscvemu_restart(struct restart_handler *rst)
 	struct riscvemu_priv *priv = container_of(rst, struct riscvemu_priv, rst);
+	/* clear screen on graphic console */
+	puts("\e[J");
 	 * barebox PBL relocates itself to end of RAM early on, so unless
 	 * something explicitly scrubbed the initial PBL, we can jump back to

More information about the barebox mailing list