Memtest86+ 的官方仓库
Memtest86+ is a free, open-source, stand-alone memory tester for x86, x86-64, ARM AArch64 and LoongArch64 architecture computers. It provides a much more thorough memory check than that provided by BIOS memory tests.
It is also able to access almost all the computer's memory, not being restricted by the memory used by the operating system and not depending on any underlying software like UEFI libraries.
Memtest86+ can be loaded and run either directly by a PC BIOS (legacy or UEFI) or via an intermediate bootloader that supports the Linux 16-bit, 32-bit, 64-bit, or EFI handover boot protocol. It should work on most x86, x86-64 CPU (Pentium class or later 32-bit or 64-bit), most ARMv8-A AArch64 CPU (UEFI boot only) and most LoongArch64 CPU (Loongson 3 and Loongson 2 family).
Binary releases (both stable and nightly dev builds) are available on memtest.org.
Memtest86+ v6.00 was based on PCMemTest, which was a fork and rewrite of the earlier Memtest86+ v5, which in turn was a fork of MemTest-86. The purpose of the PCMemTest rewrite was to:
In the process of creating PCMemTest, a number of features of Memtest86+ v5 that were not strictly required for testing the system memory were dropped. In particular, no attempt was made to measure the cache and main memory speed, or to identify and report the DRAM type. These features were added back and expanded in Memtest86+ v6.0 to create a unified, fully-featured release.
Memtest86+ is released under the terms of the GNU General Public License version 2 (GPLv2). Other than the provisions of the GPL there are no restrictions for use, private or commercial. See the LICENSE file for details.
Build is only tested on a Linux system, but should be possible on any system using the GNU toolchain and the ELF file format. The tools required are:
Change directory into the build/i586 directory and type make. The result
is a mt86plus binary image file which can be booted directly by a 32-bit
UEFI BIOS (if named mt86plus.efi), by a legacy BIOS (in floppy mode) or by
an intermediate bootloader using the Linux 16-bit boot protocol. The image
can be also booted by an intermediate bootloader using the Linux 32-bit or
32-bit EFI handover boot protocols.
Change directory into the build/x86_64 directory and type make. The result
is a mt86plus binary image file which can be booted directly by a 64-bit
UEFI BIOS (if named mt86plus.efi), by a legacy BIOS (in floppy mode) or by
an intermediate bootloader using the Linux 16-bit boot protocol. The image
can be also booted by an intermediate bootloader using the Linux 32-bit,
64-bit, or 64-bit EFI handover boot protocols.
Change directory into the build/aarch64 directory and type make. When not
building on an AArch64 host, the Makefile defaults to the aarch64-linux-gnu-
cross toolchain; pass CC=, LD= and OBJCOPY= overrides if yours is named
differently. The result is a mt86plus binary image file which can be booted
directly by a 64-bit UEFI firmware (if named mt86plus.efi, or as
EFI/BOOT/BOOTAA64.EFI on removable media). UEFI is the only supported boot
method on this architecture.
sudo mkdir /opt/LoongArch_Toolchains -p; cd /opt/LoongArch_Toolchainswget to download the latest version or other versions cross-compiler.sudo tar -xvf x86_64-cross-tools-xxxxxx.tar.gz
export PATH=/opt/LoongArch_Toolchains/cross-tools/bin/:$PATHmemtest86plus directorybuild/loongarch64 directory and make.cd build/loongarch64
make CC=loongarch64-unknown-linux-gnu-gcc LD=loongarch64-unknown-linux-gnu-ld OBJCOPY=loongarch64-unknown-linux-gnu-objcopyChange directory into the build/loongarch64 directory type make.
The result is a mt86plus binary image file which can be booted directly
by a 64-bit UEFI BIOS (if named mt86plus.efi), and the image can also booted
by an intermediate bootloader using the 64-bit EFI handover boot protocols.
In either case, to build an ISO image that can be used to create a bootable
CD, DVD, or USB Flash drive, type make iso, The result is a memtest.iso
ISO image file. This can then be written directly to a blank CD or DVD, or
to a USB Flash drive, which can then be booted directly by a legacy or UEFI
PC BIOS.
Note that when writing to a USB Flash drive, the ISO image must be written
directly ('dumped') to the raw device, either by using the dd command or
by using a utility that provides the same functionality.
When using an intermediate bootloader, mt86plus file should be stored
in a disk partition the bootloader can access, and the bootloader
configuration should be updated to boot from that file as if it were a Linux
kernel with no initial RAM disk. Several boot command line options are
recognised, as described below. If using the 16-bit boot protocol, Memtest86+
will use the display in text mode (640x400). If using the 32-bit or 64-bit
boot protocols, Memtest86+ will use the display in either text mode or
graphics mode, as specified in the boot_params struct passed to it by
the bootloader. If in graphics mode, the supplied framebuffer must be
at least 640x400 pixels; if larger, the display will be centred. If
the system was booted in UEFI mode, graphics mode must be used.
For test purposes, there is also an option to build an ISO image that uses
GRUB as an intermediate bootloader. See the individual Makefile under the
build directory for details. The ISO image is both legacy and UEFI bootable,
so you need GRUB modules for both legacy and EFI boot installed on your
build system (e.g. on Debian, the required GRUB modules are located in
packages grub-pc-bin, grub-efi-ia32-bin, grub-efi-amd64-bin,
grub-efi-arm64-bin and grub-efi-loong64-bin). You may need to adjust
some path and file names in the Makefile to match the naming on your
system.
P.S. LoongArch64 GRUB ISO can only be created on LoongArch64 Linux
environment.
The GRUB configuration files contained in the grub directory are there for
use on the test ISO, but also serve as an example of how to boot Memtest86+
from GRUB.
An intermediate bootloader may pass a boot command line to Memtest86+. The
command line may contain one or more options, separated by spaces. Each
option consists of an option name, optionally followed by an = sign and
one or more parameters, separated by commas. The following options are
recognised:
0x prefix (eg: 0xFEDC9000)console=MTLOG ts=<seconds> ev=<event> key=value ... line per event
(start banner, system info, pass/test lifecycle, timed progress, errors)console=; if both are given, log winsev=done line, then rebootlog mode; 0 = unlimited (default)testlist=0,1 would only run tests 0 and 1.Memtest86+ supports both the legacy keyboard interface (using I/O or MMIO ports 0x60 and 0x64) and USB keyboards (using its own USB device drivers). One or the other or both can be selected via the boot command line. If not specified on the command line, the default is to use both if the system was booted in UEFI mode, otherwise to only use the legacy interface.
Older x86 or x86-64 BIOSs usually support USB legacy keyboard emulation, which makes USB keyboards act like legacy keyboards connected to ports 0x60 and 0x64. This can often be enabled or disabled in the BIOS setup menus. If Memtest86+'s USB device drivers are enabled, they will override this and access any USB keyboards directly. The downside of that is that the USB controllers and device drivers require some memory to be reserved for their private use, which means that memory can't then be covered by the memory tests. So to maximise test coverage, if it is supported, enable USB legacy keyboard emulation and, i
暂无开放 Issues,或尚未同步最近议题。