File: error.h

package info (click to toggle)
memtest86%2B 8.00-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,768 kB
  • sloc: ansic: 23,121; asm: 2,488; makefile: 625; sh: 408
file content (61 lines) | stat: -rw-r--r-- 1,187 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// SPDX-License-Identifier: GPL-2.0
#ifndef ERROR_H
#define ERROR_H
/**
 * \file
 *
 * Provides functions that can be called by the memory tests to report errors.
 *
 *//*
 * Copyright (C) 2020-2022 Martin Whitaker.
 */

#include <stdbool.h>
#include <stdint.h>

#include "test.h"

/**
 * The number of errors recorded during the current run.
 */
extern uint64_t error_count;

/**
 * The number of correctable ECC errors recorded during the current run.
 */
extern uint64_t error_count_cecc;

/**
 * Initialises the error records.
 */
void error_init(void);

/**
 * Adds an address error to the error reports.
 */
void addr_error(testword_t *addr1, testword_t *addr2, testword_t good, testword_t bad);

/**
 * Adds a data error to the error reports.
 */
void data_error(testword_t *addr, testword_t good, testword_t bad, bool use_for_badram);

/**
 * Adds an ECC error to the error reports.
 * ECC Error details are stored in ecc_status
 */
void ecc_error();

#if REPORT_PARITY_ERRORS
/**
 * Adds a parity error to the error reports.
 */
void parity_error(void);
#endif

/**
 * Refreshes the error display after the error mode is changed.
 */
void error_update(void);

#endif // ERROR_H