Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products

Open Networking Hardware Diagnostic Guide October 2024

PDF

memtool

The memtool tests the physical memories in the system.

Tests

The memtool performs address bus and data tests that moves 1s or 0s through the bus lines to detect stuck, missing, bridged, or other issues found during board tests. The tool also places hamming values or addresses into memory to test and report failing bits. All tests are similar to the memtest86 application but are available through the CLI.

In addition, the memtool reads the types and locations of memory in the system. The memory may be physical RAMs connected to the CPU covered by caches, or memory attached or embedded in other devices or across buses. The tool must know the addressable location of the memory, the memory address, data bus sizes, and any addressing constraints; for example, byte or word addressable boundaries.

The memtool allocates a memory region to tests in, which is either malloc space or opens a memory map to the memory, and passes the pointer to access the memory.

  • Address Read—Causes read transactions on the memory bus. Address read can loop for several iterations, checking for any changes in the data between iterations. You can specify patterns on the address bus for the bits to allow the testing for stuck address bits.
  • Address Write—Creates write transactions on the memory bus. Address writes can loop for several iterations, and works similar to the Address Read test.
  • Address Walking 1—Walks a 1 though the provided address space in memory for the available address bits. Address Walking 1 writes the address of the cell in the location it is referencing. After it completes writing all the locations, it walks back through and verifies that the data is correct.
  • Address Walking 0—Walks a 0 address bit through the memory area available to it. Address walking 0 writes the additive inverse of the address to the location. After writing all addressed locations, it walks back through and verifies the locations data.
  • Data Read—Reads transactions similar to the Address Read test, but focuses on the data bits. Patterns are placed on the data bus to test for stuck data bits.
  • Data Write—Places data patterns on the bus for testing the bus and looks for stuck data bits.
  • Data Walking 1—Walks a 1 through the data bits within an address location and verifies that the values are valid before overwriting.
  • Data Walking 0—Walks a 0 through the data bits and verifies the value as it is testing.
  • Data Sliding 1—Slides a 1 through the data testing for stuck bits. By xor of each shift to the data, when complete, the cell holds all the 1s.
  • Data Sliding 0—Slides a 0 through the data bits set to 1. By xor of each shift of the data, when complete, the cell holds all the 1s.
  • Data Pattern—Writes four different patterns to memory locations within the specified region. The patterns are 0xFFFF, 0xFF00, 0xF0F0, 0xAAAA, 0xAA55 and 0x5555. The patterns are written as repeated portions of these patterns in the memory to fill the memory and as Hamming patterns (such as Hamming [8,4], Hamming[16,11], Hamming[32,26] or Hamming[64,57]) encoding with the additional most significant byte (MSB) parity bit to cover the parity bits in the Hamming code. This pattern allows for detecting multiple bit errors.
  • Data Cache—Performs a rotation of a 16MB array in four clockwise rotations for 16 iterations of the complete rotation. The 16MB size ensures that memory is not within the cache lines and causes cache ejections through each of the rotations.

CLI options

DellEmc Diag - Memory Tool
version 1.5, x.xx.x.x-x
build, 2022/05/20,

Syntax: memtool <option>
 Show the Help-text:=
      memtool --h                                                                      (or)
      memtool -h
 Display the configuration info of the device:=
      memtool --info                                                                   (or)
      memtool -i
 List all of the memory regions in the config file:=
      memtool --list                                                                   (or)
      memtool -l
 Test using the MEM test config file:=
      memtool --test --region=<region/'ALL'> [--testlist=<test0>,<test1>...]           (or)
      memtool -t -G <region/ALL> [-T <test0>,<test1>,...]
 Read the specified physical address:=
      memtool --read --addr=<address> --count=<bytes> [--width=<8/16/32>]              (or)
      memtool -r -a <address> -C <bytes> [-W <#8,16,32>]
 Write at the specified physical address:=
      memtool --write --addr=<address> --val=<data0>,<data1>, ... ,<dataN> [--width=<8/16/32>] (or)
      memtool -w -a <address> -V <data0>,<data1>...,<dataN> [-W <8/16/32>]
 Execute repeatedly command by count:=
      memtool --iteration=max/<count> [option1] [option2]...                           (or)
      memtool -I max/<count> [option1] [option2]...

Usage:=
  -h, --h            Show the help text
  -t, --test         Test using the pre-programmed configuration or use supplied config
  -i, --info         Configuration information
  -l, --list         List the understood TLV codes and names
  -G, --region       Region
  -T, --testlist     List of tests
  -I, --iteration=   Iteration command execution
  -C, --count=       Count
  -a, --addr=        Address
  -r, --read         Read operation
  -w, --write        Write operation
  -V, --val=         Value to be set
  -W, --width        Width {8,16}
Available Tests are:
    ALL_TESTS, ADDRESS_READ, ADDRESS_WRITE, ADDRESS_WALKING1, ADDRESS_WALKING0, DATA_READ,
    DATA_WRITE, DATA_WALKING1, DATA_WALKING0, DATA_SLIDING1, DATA_SLIDING0, DATA_PATTERN,
    DATA_CACHE
e.g. ADDRESS_WALKING1,DATA_WALKING1

The memtool uses long options for the parameters which requires two hyphens in front of the options. Options are required, optional, or none. If a parameter is required, it is specified as such and must include an equal sign; if an option is optional, it is enclosed with square brackets. However, do not type the brackets at the CLI. For example, the -region and -testlist options are optional and you must enter them as -region=0 and -testlist=0.

  • List—Lists the memory regions SDI knows. The tool queries SDI for the regions and prints a list of the regions with a region number that you can use for the subsequent options requiring a region number.
  • Info—Lists the SPD information for the specified regions. Specifying a region allows the tool to read SPD from different DIMM modules, each specified in its own region. The output lists the actual data read and completes some parsing of the parameters so you do not have to decode the values. Decoding is based on the SPD standard definition for DDR3 and DDR4 DIMM memory.
  • Test—Runs tests that include: Address Read/Write, Address Walking 1/0, Data Read/Write, Data Walking 1/0, Data Sliding 1/0, and Data Patterns (that writes Hamming patterns that you can use to detect multiple bit errors and identify single bit errors). These tests run during the normal memory tests. In extended memory tests, the data cache memory test runs. This test is lengthy and causes multiple ejections of data from the cache and tests the caches. In Verbosity 0, only the pass/fail message prints for all the tests. In Verbosity 1, each test prints its own pass/fail and other information; for example, what failed in the test. Higher verbosities show where each pass of the test performs and has verbose output. All output, regardless of verbosity, is in the log. You can see every level of detail by referring to the log.
  • Read—Reads physical memory locations. You can loop over address read cycles to look for data that is volatile or read physical devices on the memory bus (localbus for Power-PC processors). You can specify a region, address, and count of successive bytes to read.
  • Write—Writes to a physical memory address to test write cycles and memory. Similar to the Read command, this command takes a region, address in that region, and a comma-separated list of values to write.

Output

root@dell-diag-os:~# memtool --list
===================================
Region ID: 0
Region Name: DDR3-0
Address: dynamically allocated, Chunk: 0x2800 KB
Largest Cache Size: 0, Cache Line Size : 0
Access: d Increment: 8 Ecc: Y Iterations: 1
Configuration device: SPD (/dev/i2c-0) at 0x50, Regs 0 to 255
Tests:
Address Read Test
Address Write Test
Address Walking 1's Test
Address Walking 0's Test
Data Read Test
Data Write Test
Data Walking 1's Test
Data Walking 0's Test
Data Sliding 1's Test
Data Sliding 0's Test
Data Pattern Tests
Data Cache Test
root@dell-diag-os:~#

Info output

root@dell-diag-os:~# memtool --info
==== SPD Data ====
 Density 8192 MB,  Rows: 16, Cols: 10
 Bus Width: 64 bits, ECC: yes
 Manufacturer: Unknown
 Part Number : AW48M7228BNK0M
[00000000]: 0x92 0x13 0x0b 0x08 0x05 0x22 0x00 0x09 0x0b 0x11 0x01 0x08 0x0a 0x00 0xfe 0x00 
  || ....."..........
[00000010]: 0x69 0x78 0x69 0x3c 0x69 0x11 0x18 0x81 0xf0 0x0a 0x3c 0x3c 0x01 0x40 0x83 0x05
  || ixi<i.....<<.@..
[00000020]: 0x80 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x88 0x00 0x00 0x00 0x00 0x00 0x00 
 || ................
[00000030]: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0f 0x11 0x5f 0x00 
 || .............._.
[00000040]: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
 || ................
[00000050]: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
 || ................
[00000060]: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
 || ................
[00000070]: 0x00 0x00 0x00 0x00 0x00 0x86 0xe3 0x05 0x16 0x04 0xb3 0xd1 0x0d 0x05 0xec 0x10 
 || ................
[00000080]: 0x41 0x57 0x34 0x38 0x4d 0x37 0x32 0x32 0x38 0x42 0x4e 0x4b 0x30 0x4d 0x00 0x00 
 || AW48M7228BNK0M..
[00000090]: 0x00 0x00 0x00 0x00 0x00 0x00 0x41 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
 || ......A.........
[000000a0]: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
 || ................
[000000b0]: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  || ................
[000000c0]: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  || ................
[000000d0]: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  || ................
[000000e0]: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  || ................
[000000f0]: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
 || ...............
root@dell-diag-os:~#

Test output

root@dell-diag-os:~# memtool --test
Testing Memory Regions:
Testing Memory Region 0:
Address Read Test ......................................... Passed
Address Write Test ........................................ Passed
Address Walking 1's Test .................................. Passed
Address Walking 0's Test .................................. Passed
Data Read Test ............................................ Passed
Data Write Test ........................................... Passed
Data Walking 1's Test ..................................... Passed
Data Walking 0's Test ..................................... Passed
Data Sliding 1's Test ..................................... Passed
Data Sliding 0's Test ..................................... Passed
Data Pattern Test ......................................... Passed
Memory: Overall test results -------------------------- >>> Passed
root@dell-diag-os:~#

Read output

root@dell-diag-os:~# memtool --read --addr=200
[00000200]: 0x00  || .

Write output

root@dell-diag-os:~# memtool --write --addr=200 --val=0x50

Constraints

You cannot perform memory tests while other tests that allocate and use memory within the region are performing. However, you can perform the Read tests concurrently with other processes. You cannot run multiple memory tests at the same time as they may collide within the memory spaces.

Memory tests cannot test all the memory, and without cache flushes, memory tests may not get out of the caches. The SDI must ensure the memory accessed is accessing the physical memory. This check slows down the tests.

Data flow

The memtool is not part of the data path and does not participate in the data flow.


Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\