From bf4140d1f805c94e9ffd79c5a53342a1a057d0da Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Thu, 16 Nov 2023 15:08:13 -0600 Subject: demo: handle reset gracefully --- demo/main.c | 5 ++++- demo/start.S | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/demo/main.c b/demo/main.c index d8f38d4..858b50e 100644 --- a/demo/main.c +++ b/demo/main.c @@ -146,7 +146,10 @@ static void bsp_main(void) kick_cpus(); while (!boot_done); - print("booted %u cpus", NUM_CPUS); + + extern volatile unsigned _boot_num; + print("booted %u cpus", _boot_num); + _boot_num = 0; while (1) { char input[64]; diff --git a/demo/start.S b/demo/start.S index fd33231..74b5a65 100644 --- a/demo/start.S +++ b/demo/start.S @@ -44,6 +44,7 @@ _start: bl reset b . +.global _boot_num _boot_num: .word 0 -- cgit v1.2.3