From 2dcb2ac20963b57fb8fa7bf0c2ac7d1d4abd167b Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 23 Aug 2024 16:45:03 +0200 Subject: [PATCH] Save return address before calling putchar --- bootrom/rbootrom.S | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/bootrom/rbootrom.S b/bootrom/rbootrom.S index c2c0d00..45c08fd 100644 --- a/bootrom/rbootrom.S +++ b/bootrom/rbootrom.S @@ -73,8 +73,8 @@ print_hello: beq t0, zero, 1f // Print message on HART 0 only ret 1: - // Identify bootroom - PUTC '\n' + mv s0, ra // Save return address + PUTC '\n' // Identify bootroom PUTC '\r' PUTC 'R' PUTC 'B' @@ -89,6 +89,41 @@ print_hello: PUTC '1' PUTC '.' PUTC '0' + PUTC ' ' + PUTC ':' + PUTC '^' + PUTC ')' PUTC '\n' PUTC '\r' + + // Print jumping address + PUTC 'J' + PUTC 'u' + PUTC 'm' + PUTC 'p' + PUTC 'i' + PUTC 'n' + PUTC 'g' + PUTC ' ' + PUTC 't' + PUTC 'o' + PUTC ' ' + PUTC '0' // TODO: Compute from DRAM_BASE + PUTC 'x' + PUTC '8' + PUTC '0' + PUTC '0' + PUTC '0' + PUTC '_' + PUTC '0' + PUTC '0' + PUTC '0' + PUTC '0' + PUTC '.' + PUTC '.' + PUTC '.' + PUTC '\n' + PUTC '\r' + + mv ra, s0 // Restore return address ret