From bd63b119ec373e66eadbae4024d170c3c1bbb933 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Wed, 19 Apr 2023 02:42:32 +0900 Subject: [PATCH] startup: Direct primary CPU RVBAR entry to m1n1 main This definitely isn't going to work yet, but it's better than ending up in the secondary loop if it ever works. Signed-off-by: Hector Martin --- src/startup.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/startup.c b/src/startup.c index 105270706..84f189454 100644 --- a/src/startup.c +++ b/src/startup.c @@ -117,5 +117,9 @@ void _cpu_reset_c(void *stack) printf(" CPU: %s\n", type); exception_initialize(); - smp_secondary_entry(); + + if (mrs(MPIDR_EL1) & 0xffffff) + smp_secondary_entry(); + else + m1n1_main(); }