summaryrefslogtreecommitdiffstats
path: root/memtestEDK/Memtest/Test1/memoryMap.h
blob: 23ff7e768326c6ec4da3eecb1ac99626f9c711a1 (plain) (blame)
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
typedef unsigned long ulong;

#define MAX_MEM_SEGMENTS 127

struct mmap {
    ulong pbase_addr;
    ulong *start;  // VA of segment start
    ulong *end;    // VA of the last dword within the segment.
};

/* Define common variables across relocations of memtest86 */
struct vars {
    int pass;
    int msg_line;
    int ecount;
    int ecc_ecount;
    int msegs;  // number of entries in pmap[]
    int testsel;
    int scroll_start;
    int pass_ticks;
    int total_ticks;
    int pptr;
    int tptr;
    // struct err_info erri;
    // PA ranges from e820 table:
    //struct pmap pmap[MAX_MEM_SEGMENTS];
    // VA mappings:
    volatile struct mmap map[MAX_MEM_SEGMENTS];
    ulong plim_lower;  // phys page number
    ulong plim_upper;  // phys page number
    ulong clks_msec;
    ulong starth;
    ulong startl;
    ulong snaph;
    ulong snapl;
    int printmode;
    int numpatn;
    // struct pair patn [BADRAM_MAXPATNS];
    ulong test_pages;
    ulong selected_pages;
    ulong reserved_pages;
    int check_temp;
    int fail_safe;
    int each_sec;
    int beepmode;
    int debugging;  // Set in selftest only
};

struct 		vars variables = {};
struct 		vars * const vv = &variables;