summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRegia König2021-06-23 17:08:51 +0200
committerRegia König2021-06-23 17:08:51 +0200
commit1a243e596484af31d70abc57b1fc6ba5411ea338 (patch)
tree598db66f54ce3428307186d45477403ccccfb07b
parentDo not allocate pages (diff)
downloadmemtest86-1a243e596484af31d70abc57b1fc6ba5411ea338.tar.gz
memtest86-1a243e596484af31d70abc57b1fc6ba5411ea338.tar.xz
memtest86-1a243e596484af31d70abc57b1fc6ba5411ea338.zip
Last state
-rw-r--r--efi_memtest/OUTPUT/MemtestEfi.libbin2570386 -> 2568674 bytes
-rw-r--r--efi_memtest/memtest86+/efi/test.c48
-rw-r--r--efi_memtest/memtest86+/error.c4
3 files changed, 50 insertions, 2 deletions
diff --git a/efi_memtest/OUTPUT/MemtestEfi.lib b/efi_memtest/OUTPUT/MemtestEfi.lib
index 20223f6..1b115fe 100644
--- a/efi_memtest/OUTPUT/MemtestEfi.lib
+++ b/efi_memtest/OUTPUT/MemtestEfi.lib
Binary files differ
diff --git a/efi_memtest/memtest86+/efi/test.c b/efi_memtest/memtest86+/efi/test.c
index 0c5ce5b..8f63714 100644
--- a/efi_memtest/memtest86+/efi/test.c
+++ b/efi_memtest/memtest86+/efi/test.c
@@ -100,13 +100,19 @@ void foreach_segment
(ulong* start, ulong* end,
int me, const void* ctx, segment_fn func) {
+ //if(1) print_log(" 01 ", 4);
+
ASSERT(start < end);
+ //if(1) print_log(" 02 ", 4);
+
// Confirm 'start' points to an even dword, and 'end'
// should point to an odd dword
ASSERT(0 == (((ulong)start) & 0x7));
ASSERT(0x4 == (((ulong)end) & 0x7));
+ //if(1) print_log(" 03 ", 4);
+
// 'end' may be exactly 0xfffffffc, right at the 4GB boundary.
//
// To avoid overflow in our loop tests and length calculations,
@@ -114,13 +120,19 @@ void foreach_segment
ulong start_dw = ((ulong)start) >> 2;
ulong end_dw = ((ulong) end) >> 2;
+ //if(1) print_log(" 04 ", 4);
+
// end is always xxxxxffc, but increment end_dw to an
// address beyond the segment for easier boundary calculations.
++end_dw;
+ //if(1) print_log(" 05 ", 4);
+
ulong seg_dw = start_dw;
ulong seg_end_dw = start_dw;
+ //if(1) print_log(" 06 ", 4);
+
int done = 0;
do {
@@ -128,9 +140,13 @@ void foreach_segment
print_log("foreach_segment(): do_tick", 26);
}*/
+ //if(1) print_log(" 07 ", 4);
+
do_tick(me);
{ BAILR }
+ //if(1) print_log(" 08 ", 4);
+
// ensure no overflow
ASSERT((seg_end_dw + SPINSZ_DWORDS) > seg_end_dw);
seg_end_dw += SPINSZ_DWORDS;
@@ -143,6 +159,8 @@ void foreach_segment
break;
}
+ //if(1) print_log(" 09 ", 4);
+
ASSERT(((ulong)seg_end_dw) <= 0x40000000);
ASSERT(seg_end_dw > seg_dw);
ulong seg_len_dw = seg_end_dw - seg_dw;
@@ -154,6 +172,9 @@ void foreach_segment
func((ulong*)(seg_dw << 2), seg_len_dw, ctx);
seg_dw = seg_end_dw;
+
+ //if(1) print_log(" 10 ", 4);
+
} while (!done);
/*if (logflag && log_fine) {
print_log("foreach_segment(): done", 23);
@@ -188,6 +209,16 @@ STATIC void unsliced_foreach_segment
int_to_charr((ulong)vv->map[j].end, log, &length);
print_log(log, length);
}*/
+/* if (1) {
+ char log[48] = "unsliced_foreach_segment(): segment = ";
+ int length = 38;
+ int_to_charr(j, log, &length);
+ print_log(log, length);
+ }*/
+
+ //if(1) print_log("HAHAHA", 6);
+ if(1) cprint(1, 1, "#################");
+
foreach_segment(vv->map[j].start,
vv->map[j].end,
me, ctx, func);
@@ -339,7 +370,7 @@ STATIC void addr_tst2_init_segment(ulong* p,
print_log(log, length);*/
}
- if (addr_written && (*(ulong *) bad_addr != bad_addr)) {
+/* if (addr_written && (*(ulong *) bad_addr != bad_addr)) {
ulong *px = (ulong *)bad_addr;
char log[35] = "content of p = ";
int length = 15;
@@ -360,7 +391,7 @@ STATIC void addr_tst2_init_segment(ulong* p,
extern void reboot(); // TODO remove
reboot(); // TODO remove
- }
+ }*/
round++;
}
@@ -435,6 +466,19 @@ STATIC void addr_tst2_check_segment(ulong* p,
if((bad = *p) != (ulong)p) {
+ {
+ char log[51] = "addr_tst2_check_segment(): p = ";
+ int length = 31;
+ int_to_charr((ulong)p, log, &length);
+ print_log(log, length);
+ }
+
+ {
+ char log[52] = "addr_tst2_check_segment(): *p = ";
+ int length = 32;
+ int_to_charr(bad, log, &length);
+ print_log(log, length);
+ }
ad_err2((ulong *)p, bad);
}
}
diff --git a/efi_memtest/memtest86+/error.c b/efi_memtest/memtest86+/error.c
index 221a7c5..37ce341 100644
--- a/efi_memtest/memtest86+/error.c
+++ b/efi_memtest/memtest86+/error.c
@@ -111,6 +111,7 @@ void ad_err1(ulong *adr1, ulong *mask, ulong bad, ulong good)
void ad_err2(ulong *adr, ulong bad)
{
+
if (logflag) {
print_log("ad_err2(): FOUND ERROR IN MEMORY TEST # 2", 41);
}
@@ -127,6 +128,9 @@ void ad_err2(ulong *adr, ulong bad)
print_log(log, length);
}
+
+ extern void reboot(); // TODO remove
+ reboot(); // TODO remove
//while(1);
//query_memory_table(); // TODO remove