Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Fixing the Memtest EXE loader (Developers)

posted by RayeR(R) Homepage, CZ, 12.03.2015, 17:56

> I tried to do same thing, it starts but once it detected RAM modal names
> and tries to start testing, it reboots.

LOL, seems that I did the same yesterday as you with the same result. I could save my time insted... Memtest 5.01 original crashes when test should begin (desktop and ntb). Memtest 5.01 rowhammer starts running but reports errors on all address. My patch:

mt86+_loader.asm:
15,17c15,16
< %define fullsize ( 182704 + buffer - exeh )
<    ; the fullsize of memtest.bin is adjusted by makedos.sh
<    ; don't remove space after brace (needed for awk/sed processing)
---
> %define fullsize (182704 + buffer - exeh)
> ; 182704 is the size of memtest86+ V5.01, adjust as needed!
139c138
<    mov ax,[buffer+25Eh]    ; should be jmp far dword (ofs, seg)
---
> mov ax,[buffer+251h]      ; should be jmp far dword (ofs, seg)
152c151
<    mov [buffer+260h],eax   ; patch the protected mode entry jump
---
> mov [buffer+253h],eax     ; patch the protected mode entry jump
156c155
<    mov eax,[cs:buffer+219h]        ; should be lgdt offset
---
> mov eax,[cs:buffer+20ch]  ; should be lgdt offset
161c160
<    mov ax,[cs:buffer+21ch]         ; GDTR contents pointer
---
> mov ax,[cs:buffer+20fh]           ; GDTR contents pointer
216,217c215,216
< nopatch    db "jmp far dword not found at setup.S offset 5Eh,",13,10
<    db "(file offset 25Eh is not 66h, 0eah)",13,10
---
> nopatch   db "jmp far dword not found at setup.S offset 37h,",13,10
> db "(file offset 237h is not 66h, 0eah)",13,10
220,221c219,220
< nogdt      db "lgdt [...] not found at setup.S offset 19h,",13,10
<    db "(file offset 219h is not 0fh, 01h, 16h)",13,10
---
> nogdt     db "lgdt [...] not found at setup.S offset 0ch,",13,10
> db "(file offset 20ch is not 0fh, 01h, 16h)",13,10


makedos.sh:
#!/bin/bash

if [ -f memtest.bin ]
then
CSIZE="$(awk 'NR==15' mt86+_loader.asm | awk '{print $4}')";
NSIZE="$(ls -l memtest.bin | awk '{print $5}')";
sed "s/$CSIZE/$NSIZE/" mt86+_loader.asm > mt86+_loader.asm.new;
mv mt86+_loader.asm.new mt86+_loader.asm;
nasm mt86+_loader.asm;
fi

---
DOS gives me freedom to unlimited HW access.

 

Complete thread:

Back to the forum
Board view  Mix view
15108 Postings in 1358 Threads, 245 registered users, 13 users online (0 registered, 13 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum