How to verify eMMC and DDR?

79 views
Skip to first unread message

Venugopal S Nair

unread,
Jan 5, 2021, 4:27:45 AM1/5/21
to BeagleBoard
Hello,


I would like to write some random data to some locations in eMMC and DDR, then read back and check whether they are same.

- From where do I get the information regarding the start and end addresses of eMMC and DDR?

- Does the mw and md commands in u-boot help for this activity?

Thank You

Dennis Lee Bieber

unread,
Jan 5, 2021, 10:45:05 AM1/5/21
to Beagleboard
On Tue, 5 Jan 2021 01:27:45 -0800 (PST), in
gmane.comp.hardware.beagleboard.user Venugopal S Nair
<venugopal.nss12-Re5...@public.gmane.org> wrote:


>I would like to write some random data to some locations in eMMC and DDR,
>then read back and check whether they are same.

Presuming the eMMC behaves similar to things like SD cards -- writing
to /any/ location may qualify as random. Most flash memory, at this level,
incorporates wear-leveling algorithms. When you write new data, the
chip/card allocates an empty/erased "allocation unit", copies data from the
previous allocation unit up to the point where the new data will be
written, then writes the new data, and holds the allocation unit "open"
should additional data be written. When the output file is closed, the
chip/card copies the rest of the original data to the fresh unit, closes
the unit, ERASES the old allocation unit and marks it free, and maps the
fresh unit into the address space.

>
>- From where do I get the information regarding the start and end addresses
>of eMMC and DDR?

So far as I know, the eMMC is not mapped into the processor address
space -- it is a serial I/O block device, just like an SD card or attached
hard-drive.

I'd need to study more, but the TRM for the SoC should show the RAM
addresses. SPRUH73P, page 172, has the L3 Memory Map. It has:

-=-=-
Block Name Start_address (hex) End_address (hex) Size Description

GPMC (External Memory) 0x0000_0000(1) 0x1FFF_FFFF 512MB 8-/16-bit External
Memory (Ex/R/W)(2)

Boot ROM 0x4000_0000 0x4001_FFFF 128KB
0x4002_0000 0x4002_BFFF 48KB 32-bit Ex/R(2) – Public

SRAM internal 0x402F_0400 0x402F_FFFF 32-bit Ex/R/W(2)

L3 OCMC0 0x4030_0000 0x4030_FFFF 64KB 32-bit Ex/R/W(2) OCMC SRAM


EMIF0 SDRAM 0x8000_0000 0xBFFF_FFFF 1GB 8-/16-bit External Memory
(Ex/R/W)(3)
-=-=-

Some of that may be reflected within various device tree source
files... for example: am335x-bone-common.dtsi
-=-=-
memory@80000000 {
device_type = "memory";
reg = <0x80000000 0x10000000>; /* 256 MB */
};
-=-=-

No idea how to go from 256MB to the 512MB on the BBB.

debian@beaglebone:/opt/source/dtb-4.19-ti/src/arm$ grep -i "0x80000000" *

>
>- Does the mw and md commands in u-boot help for this activity?
>
>Thank You


--
Dennis L Bieber

Reply all
Reply to author
Forward
0 new messages