BBB: DDR3 is now initialized, next step is initializing MMC interface.

Jarielle Catbagan jcatbagan93 at gmail.com
Tue Jul 14 06:38:12 UTC 2015


Hello all,

I finally manage to get the DDR3 memory initialized on the BBB! I was
able to access and manipulate values within the DDR3 memory space.

According to the AM335x TRM, Section 2.1 "ARM Cortex-A8 Memory Map",
Table 2-1 "L3 Memory Map", DDR memories can span the range 0x80000000
- 0xBFFFFFFF.

Prior to getting the DDR3 initialized, accessing an address within the
DDR memory space resulted in a data abort exception.  Now that I got
the DDR3 initialized I was able to manipulate values within the DDR3
memory space.

I have attached 2 screenshots showcasing my attempt to access the
beginning of the DDR3 memory space (0x80000000) both when the DDR3 is
uninitialized and initialized within uMon.

Shortly after getting the initialization working, I updated the
BOOTRAMBASE in the Makefile to map uMon's RAM in the DDR3.  After
doing this, uMon has appeared to enter a deadloop.  After some
investigation I have found that uMon's BSS section is being
initialized before the DDR3 is even initialized in start.c.

It appears that the current mechanisms of initializing the BSS prevent
uMon on the BBB to map the BSS in the DDR3.  I am thinking that
probably a workaround to this is to have uMon test and initialize the
RAM before using it, where this approach would be applied in general
among different platforms to cover all scenarios especially with
special cases like the AM335x.

Nonetheless with the current uMon, (DDR init included), the size of
the image is roughly 35 KB.  Given that the internal SRAM is roughly
109 KB, I would say that uMon is still happy and so mapping uMon's RAM
in the internal SRAM is still OK.

My github branch "dev-ddr-init" contains everything I have so far with
setting up the DDR3.  Specifically, everything I have done so far is
in cpuio.c, which can be found here:
https://github.com/jrcatbagan/umon/blob/dev-ddr-init/ports/beagleboneblack/cpuio.c
. Note that this branch is a moving target and is quite messy as of
right now.  I will now take this time to clean up the DDR3
initialization before submitting patches that will integrate this
feature with the master uMon sources.

With DDR3 initialization done, my next step aside from cleaning up the
DDR init is to get the MMC interface working.  This will ultimately
lead to booting up RTEMS applications not just from a uSD card but
ultimately from the onboard eMMC memory.  Once I get the MMC interface
working, I feel that booting up an RTEMS application is possible.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: umon-ddr3-initialized.png
Type: image/png
Size: 13207 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/umon-devel/attachments/20150713/30b60f82/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: umon-ddr3-uninitialized.png
Type: image/png
Size: 5561 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/umon-devel/attachments/20150713/30b60f82/attachment-0003.png>


More information about the umon-devel mailing list