memtest86plus/app/config.h
Martin Whitaker 4078b7760e Faster barrier implementation.
The old barrier implementation was very slow when running on a multi-socket
machine (pcmemtest issue 16).

The new implementation provides two options:

  - when blocked, spin on a thread-local flag
  - when blocked, execute a HLT instruction and wait for a NMI

The first option might be faster, but we need to measure it to find out. A
new boot command line option is provided to select between the two, with a
third setting that uses a mixture of the two.
2022-02-28 22:05:21 +00:00

62 lines
1000 B
C

// SPDX-License-Identifier: GPL-2.0
#ifndef CONFIG_H
#define CONFIG_H
/**
* \file
*
* Provides the configuration settings and pop-up menu.
*
*//*
* Copyright (C) 2020-2022 Martin Whitaker.
*/
#include <stdbool.h>
#include <stdint.h>
#include "smp.h"
typedef enum {
PAR,
SEQ,
ONE
} cpu_mode_t;
typedef enum {
ERROR_MODE_NONE,
ERROR_MODE_SUMMARY,
ERROR_MODE_ADDRESS,
ERROR_MODE_BADRAM
} error_mode_t;
typedef enum {
POWER_SAVE_OFF,
POWER_SAVE_LOW,
POWER_SAVE_HIGH
} power_save_t;
extern uintptr_t pm_limit_lower;
extern uintptr_t pm_limit_upper;
extern uintptr_t num_pages_to_test;
extern cpu_mode_t cpu_mode;
extern error_mode_t error_mode;
extern cpu_state_t cpu_state[MAX_CPUS];
extern bool enable_temperature;
extern bool enable_trace;
extern bool pause_at_start;
extern power_save_t power_save;
void config_init(void);
void config_menu(bool initial);
void initial_config(void);
#endif // CONFIG_H