2020-05-24 15:30:55 -05:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#ifndef TESTS_H
|
|
|
|
#define TESTS_H
|
2022-02-19 10:17:40 -06:00
|
|
|
/**
|
|
|
|
* \file
|
|
|
|
*
|
2020-05-24 15:30:55 -05:00
|
|
|
* Provides support for identifying and running the memory tests.
|
|
|
|
*
|
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 "config.h"
|
|
|
|
|
|
|
|
#define NUM_TEST_PATTERNS 11
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
bool enabled;
|
2023-11-29 05:45:17 -06:00
|
|
|
uint8_t cpu_mode;
|
2020-05-24 15:30:55 -05:00
|
|
|
int stages;
|
|
|
|
int iterations;
|
|
|
|
int errors;
|
2023-11-29 05:45:17 -06:00
|
|
|
char description[40];
|
2020-05-24 15:30:55 -05:00
|
|
|
} test_pattern_t;
|
|
|
|
|
|
|
|
extern test_pattern_t test_list[NUM_TEST_PATTERNS];
|
|
|
|
|
|
|
|
typedef enum { FAST_PASS, FULL_PASS, NUM_PASS_TYPES } pass_type_t;
|
|
|
|
|
|
|
|
extern int ticks_per_pass[NUM_PASS_TYPES];
|
|
|
|
extern int ticks_per_test[NUM_PASS_TYPES][NUM_TEST_PATTERNS];
|
|
|
|
|
2022-01-31 16:59:14 -06:00
|
|
|
int run_test(int my_cpu, int test, int stage, int iterations);
|
2020-05-24 15:30:55 -05:00
|
|
|
|
|
|
|
#endif // TESTS_H
|