2020-05-24 15:30:55 -05:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#ifndef CONFIG_H
|
|
|
|
#define CONFIG_H
|
2022-02-19 10:17:40 -06:00
|
|
|
/**
|
|
|
|
* \file
|
|
|
|
*
|
2020-05-24 15:30:55 -05:00
|
|
|
* Provides the configuration settings and pop-up menu.
|
|
|
|
*
|
2022-02-19 13:56:55 -06:00
|
|
|
*//*
|
2022-01-31 16:59:14 -06:00
|
|
|
* Copyright (C) 2020-2022 Martin Whitaker.
|
2020-05-24 15:30:55 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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;
|
|
|
|
|
2022-02-28 14:21:50 -06:00
|
|
|
typedef enum {
|
|
|
|
POWER_SAVE_OFF,
|
|
|
|
POWER_SAVE_LOW,
|
|
|
|
POWER_SAVE_HIGH
|
|
|
|
} power_save_t;
|
|
|
|
|
2020-05-24 15:30:55 -05:00
|
|
|
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;
|
|
|
|
|
2022-01-31 16:59:14 -06:00
|
|
|
extern cpu_state_t cpu_state[MAX_CPUS];
|
2020-05-24 15:30:55 -05:00
|
|
|
|
2022-04-11 12:37:52 -05:00
|
|
|
extern bool smp_enabled;
|
|
|
|
|
2020-05-24 15:30:55 -05:00
|
|
|
extern bool enable_temperature;
|
|
|
|
extern bool enable_trace;
|
|
|
|
|
2022-03-13 23:35:36 -05:00
|
|
|
extern bool enable_sm;
|
2022-04-04 11:31:54 -05:00
|
|
|
extern bool enable_tty;
|
2022-04-01 13:34:52 -05:00
|
|
|
extern bool enable_bench;
|
2022-03-13 23:35:36 -05:00
|
|
|
|
2021-12-23 08:08:02 -06:00
|
|
|
extern bool pause_at_start;
|
|
|
|
|
2022-02-28 14:21:50 -06:00
|
|
|
extern power_save_t power_save;
|
|
|
|
|
2022-04-04 11:31:54 -05:00
|
|
|
extern int tty_params_port;
|
|
|
|
extern int tty_params_baud;
|
|
|
|
extern int tty_update_period;
|
|
|
|
|
2020-05-24 15:30:55 -05:00
|
|
|
void config_init(void);
|
|
|
|
|
|
|
|
void config_menu(bool initial);
|
|
|
|
|
|
|
|
void initial_config(void);
|
|
|
|
|
|
|
|
#endif // CONFIG_H
|