Guard against an AP starting more than once.

This commit is contained in:
Martin Whitaker 2022-02-03 19:48:27 +00:00
parent e37fbbd429
commit 13efd906f1

View File

@ -424,7 +424,14 @@ void main(void)
my_cpu = smp_my_cpu_num();
}
if (init_state < 2 && my_cpu > 0) {
if (cpu_state[my_cpu] == CPU_STATE_RUNNING) {
enable_trace = true;
trace(my_cpu, "started more than once");
}
cpu_state[my_cpu] = CPU_STATE_RUNNING;
while (init_state < 2) {
usleep(10);
}
}
BARRIER;