mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2025-02-25 18:55:23 -06:00
Don't attempt to start the APs when restarting after a config change.
Leave the APs running whilst the BSP repeats the dummy runs. This means we need to bypass the barriers during a dummy run. The APs will wait at the first barrier until the BSP starts the first real run.
This commit is contained in:
parent
c23b129e55
commit
efc9a9c16a
28
app/main.c
28
app/main.c
@ -120,10 +120,12 @@ volatile uintptr_t test_addr[MAX_CPUS];
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
#define BARRIER \
|
#define BARRIER \
|
||||||
if (TRACE_BARRIERS) { \
|
if (!dummy_run) { \
|
||||||
trace(my_cpu, "Start barrier wait at %s line %i", __FILE__, __LINE__); \
|
if (TRACE_BARRIERS) { \
|
||||||
} \
|
trace(my_cpu, "Start barrier wait at %s line %i", __FILE__, __LINE__); \
|
||||||
barrier_wait(start_barrier);
|
} \
|
||||||
|
barrier_wait(start_barrier); \
|
||||||
|
}
|
||||||
|
|
||||||
static void run_at(uintptr_t addr, int my_cpu)
|
static void run_at(uintptr_t addr, int my_cpu)
|
||||||
{
|
{
|
||||||
@ -580,15 +582,17 @@ void main(void)
|
|||||||
if (dummy_run && pass_num == NUM_PASS_TYPES) {
|
if (dummy_run && pass_num == NUM_PASS_TYPES) {
|
||||||
start_run = true;
|
start_run = true;
|
||||||
dummy_run = false;
|
dummy_run = false;
|
||||||
barrier_init(start_barrier, num_enabled_cpus);
|
if (init_state < 2) {
|
||||||
int failed = smp_start(cpu_state);
|
barrier_init(start_barrier, num_enabled_cpus);
|
||||||
if (failed) {
|
int failed = smp_start(cpu_state);
|
||||||
const char *message = "Failed to start CPU core %i. Press any key to reboot...";
|
if (failed) {
|
||||||
display_notice_with_args(strlen(message), message, failed);
|
const char *message = "Failed to start CPU core %i. Press any key to reboot...";
|
||||||
while (get_key() == 0) { }
|
display_notice_with_args(strlen(message), message, failed);
|
||||||
reboot();
|
while (get_key() == 0) { }
|
||||||
|
reboot();
|
||||||
|
}
|
||||||
|
init_state = 2;
|
||||||
}
|
}
|
||||||
init_state = 2;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user