[coreboot] coreboot's memtest86+ is buggy compared to memtest86+ floppy

Mike Banon mikebdp2 at gmail.com
Mon Nov 5 15:03:54 CET 2018


coreboot's memtest86+ payload is buggy compared to memtest86+ floppy
(which could be downloaded from memtest.org and added to CBFS to be
accessible as SeaBIOS menu entry). at AMD Lenovo G505S and maybe some
other coreboot laptops, the USB devices like keyboard are not working
at coreboot's memtest86+ while working fine at all the other payloads
using "libpayload" (i.e. coreinfo or tint) - so it's not a libpayload
problem - and also the same USB keyboards are working at memtest86+
floppy. So it is obvious something is broken at 86+ payload source
code.

Also, with LZMA compression 86+ floppy occupies much less space than
86+ payload. So, aside from academic/research purposes, I do not see
any advantages of 86+ payload compared to 86+ floppy - only
disadvantages: larger size and troubled USB. I've seriously considered
submitting a patch which replaces coreboot's memtest86+ payload with a
floppy (download, compare its' checksum and then insert to CBFS), but
then I thought that maybe someone could need 86+ payload as a coding
example.

If you would like to try out a floppy (e.g. because something else -
like 2GB support - could be also broken at 86+ payload, while working
fine at 86+ floppy booted through SeaBIOS) , here are the
instructions:

1) Download the latest 5.01 version of memtest86+ from memtest86.org :

wget https://www.memtest.org/download/5.01/memtest86+-5.01.floppy.zip

2) Calculate its' sha256 :

sha256sum ./memtest86+-5.01.floppy.zip

should be

2a2d4c1234c9130e1da5fea941ccfbaa343739d5b3302b5f3f9b24077868f8ee
./memtest86+-5.01.floppy.zip

3) If sha256 is correct, unzip ./memtest86+-5.01.floppy.zip . You'll
get a "floppy" directory with these files: ls ./floppy/
dd.exe  install64.bat  install.bat  memtestp.bin  rawrite.exe  README.txt
You only need memtestp.bin , sha256 of which is "
ddd4a2ba44c312aa4f2c7506a388cc2ca7f1caec60c3c6d80ed8a9f0b43d529c "

4) Size of memtestp.bin file is 150024 bytes. To be understood by
SeaBIOS, it needs to be expanded to 1474560 bytes (by zeroes), which
could be done with this command:

dd if=/dev/zero of=./memtestp.bin bs=1 count=1 seek=1474559 conv=notrunc

sha256 of expanded memtestp.bin file will be "
364535abd0d105da9396df6015e480c4d4c52b07dcc4e1d4756bde8ef87a30f1 "

5) Now it could be added to the compiled coreboot.rom with this command:

./build/cbfstool ./build/coreboot.rom add -f ./floppy/memtestp.bin -n
floppyimg/memtestp.lzma -t raw -c lzma

If done everything correctly, it will be available at SeaBIOS boot
menu as Ramdisk [memtestp]

Best regards,
Mike Banon

On Mon, Nov 5, 2018 at 3:51 PM Krystian Hebel <krystian.hebel at 3mdeb.com> wrote:
>
>
>
> On 11/05/18 13:32, Paul Menzel wrote:
>
> > Thank you for the patch. If it’s the common problem, then it was > fixed in “coreboot’s” MemTest86+ [1]. Can you reproduce the problem > with that version?
> Yes, it is the version on which I tested. It worked OK before [1], because when no
> coreboot tables were found MemTest86+ resorted to e820.
>
> It was reproduced on PC Engines apu3 (2 GB version) and apu1, the latter requires SPD fix [2].
> 4 GB versions of apu doesn't seem to be affected.
>
> [1]: https://review.coreboot.org/cgit/memtest86plus.git/commit/?id=0704ab381a7ebd3c0100d2d7be9359076f713c43
>
> [2]: https://review.coreboot.org/c/memtest86plus/+/29372
>
> Regards,
>
> Krystian
>
>
> _______________________________________________
> SeaBIOS mailing list
> SeaBIOS at seabios.org
> https://mail.coreboot.org/mailman/listinfo/seabios



More information about the coreboot mailing list