os-workshop

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 43b54ea4b100605eba2a1e3842bd263ee7dd253e
parent 08ac4203fbde7508c7080b47a4302f31c29a72cf
Author: Brian Swetland <swetland@frotz.net>
Date:   Sat, 23 Apr 2022 20:06:34 -0700

start: active hartid is passed to bootcode via a0

- so don't clobber it

Diffstat:
Mhw/src/start.S | 1-
Mmisc/info.c | 3+--
2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/hw/src/start.S b/hw/src/start.S @@ -4,7 +4,6 @@ .globl _start _start: li sp, 0x81000000 - mv a0, sp jal start .globl exit diff --git a/misc/info.c b/misc/info.c @@ -4,8 +4,7 @@ #include <hw/debug.h> #include <hw/riscv.h> -void start(uint32_t sp, uint32_t dtb) { - xprintf("Hello?\n"); +void start(uint32_t hartid, uint32_t dtb) { xprintf("MSTATUS %08x\n", csr_read(CSR_MSTATUS)); xprintf("MISA %08x\n", csr_read(CSR_MISA)); xprintf("MCYCLE %08x\n", csr_read(CSR_MCYCLE));