This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62: How to perform RAM test using mtest in u-boot

Part Number: SK-AM62

I want to perform RAM test in u-boot using mtest. I have already tried the Linux memtester in the kernel, so I want to explore another way to test the memory.

I don't have the mtest command in my u-boot. Can anyone guide me on how to do this? Thanks.

  • Hello,
    Since u-boot is running from DDR itself. It is a bit hard to test full range of DDR using <mtest> cmd @u-boot.
    A good reference on pros-cons on running memory test @u-boot is noted in <u-boot/doc/README.memory-test>.
    Best,
    -Hong

  • => bdinfo
    boot_params = 0x0000000000000000
    DRAM bank   = 0x0000000000000000
    -> start    = 0x0000000080000000
    -> size     = 0x0000000080000000
    flashstart  = 0x0000000000000000
    flashsize   = 0x0000000000000000
    flashoffset = 0x0000000000000000
    baudrate    = 115200 bps
    relocaddr   = 0x00000000fff1c000
    reloc off   = 0x000000007f71c000
    Build       = 64-bit
    current eth = ethernet@8000000port@1
    ethaddr     = f4:84:4c:fc:0f:cc
    IP addr     = <NULL>
    fdt_blob    = 0x00000000f7ef1d60
    new_fdt     = 0x00000000f7ef1d60
    fdt_size    = 0x000000000000a080
    multi_dtb_fit= 0x0000000000000000
    lmb_dump_all:
        memory.cnt             = 0x1
        memory.size            = 0x0
        memory.reg[0x0].base   = 0x80000000
                       .size   = 0x80000000
    
        reserved.cnt           = 0x3
        reserved.size          = 0x0
        reserved.reg[0x0].base = 0x9db00000
                         .size = 0xc00000
        reserved.reg[0x1].base = 0x9e780000
                         .size = 0x1880000
        reserved.reg[0x2].base = 0xf7ef0960
                         .size = 0x810f6a0
    arch_number = 0x0000000000000000
    TLB addr    = 0x00000000ffff0000
    irq_sp      = 0x00000000f7ef1d50
    sp start    = 0x00000000f7ef1d50
    Early malloc usage: 2e70 / 8000

    This is the bdinfo of my board. The ram address starts at 0x8000000 and ends at 0x100000000 (0x80000000+2*1024*1024*1024).

    Two of the address ranges that can be tested without u-boot crashing are (0x80000000 to 0xf7ef1a59) and (0xf7ef1a60 to 0xf7ef1a77). If I test 0xf7ef1a59 to 0xf7ef1a60, the u-boot console will hang and not respond.

    Is there any information from the bdinfo I can use? What are the meaning of the parameters in the bdinfo? How can I know what address range I can safely test without finding the range by trial and error?

  • Hello,
    - there's u-boot relocation after initial u-boot run.
    These're u-boot relocation related addresses from "bdinfo": <relocaddr> <reloc off>
    I have a small note on JTAG debug on u-boot, where you'll find when/where u-boot relocaiton happens.
    - please note the caveat/restriction highlighted in <u-boot/doc/README.memory-test>
    Best,
    -Hong

    6064.u-boot_boot_flow.pdf