memtest86plus/app/badram.h
Martin Whitaker ccc03d4aeb badram: Add more modes for recording/displaying error maps.
The original code just supported recording and displaying patterns suitable
for use with the Linux BadRAM extension or GRUB badram command. With some
minor changes it can be made to record address ranges and display them
either in the format used by the Linux memmap boot command line option
or as a simple list of memory page numbers (which can be used with the
Windows bcdedit program).
2024-11-09 17:26:27 +00:00

50 lines
1.2 KiB
C

// SPDX-License-Identifier: GPL-2.0
#ifndef BADRAM_H
#define BADRAM_H
/**
* \file
*
* Provides functions for recording and displaying faulty address locations
* in a condensed form. The display format is determined by the current value
* of the error_mode config setting as follows:
*
* - ERROR_MODE_BADRAM
* records and displays patterns in the format used by the Linux BadRAM
* extension or GRUB badram command
*
* - ERROR_MODE_MEMMAP
* records and displays address ranges in the format used by the Linux
* memmap boot command line option
*
* - ERROR_MODE_PAGES
* records and displays memory page numbers
*
*//*
* Copyright (C) 2020-2024 Martin Whitaker.
*/
#include <stdbool.h>
#include <stdint.h>
#include "test.h"
/**
* Initialises the fault record. This must be called each time error_mode is
* changed.
*/
void badram_init(void);
/**
* Inserts a single faulty address into the fault record. Returns true iff
* the fault record was changed.
*/
bool badram_insert(testword_t page, testword_t offset);
/**
* Displays the fault record in the scrollable display region in the format
* determined by error_mode.
*/
void badram_display(void);
#endif // BADRAM_H