summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2023-11-16 15:08:13 -0600
committerAlejandro Soto <alejandro@34project.org>2023-11-16 16:43:59 -0600
commitbf4140d1f805c94e9ffd79c5a53342a1a057d0da (patch)
tree1634a2a2938150d48f114aac89c63f40f74f8f3a /demo
parent87a42e555bf952047e287f4c7810cd538595d5af (diff)
demo: handle reset gracefully
Diffstat (limited to 'demo')
-rw-r--r--demo/main.c5
-rw-r--r--demo/start.S1
2 files changed, 5 insertions, 1 deletions
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