SD controller now initialized; still need to read SD ID and perform data block transfer. Some questions on TFS and booting an application image

Gedare Bloom gedare at gwu.edu
Fri Jul 24 13:07:42 UTC 2015


On Fri, Jul 24, 2015 at 8:08 AM, Ed Sutter <ed.sutter at alcatel-lucent.com> wrote:
[...]
> There are several configurations to consider here...
>
> 1. Don't use any FFS in uMon at all:
>    uMon boots up, establishes connectivity with MMC and Ethernet and based
> on
>    the content of some area of raw MMC, it can either boot some
> already-installed
>    RTEMS application or it can look to the network for a network boot.  Once
> RTEMS
>    is running, it will have access to the MMC in whatever format it wants.
>
This option #1 is appealing from a simplicity point-of-view.

> 2. Incorporate whatever FFS RTEMS will use into uMon:
>    Since RTEMS already has some FFS-ish capabilities, just hook that same
> code
>    (or fragments of it) into uMon so that both the bootloader and app can
> access
>    all files easily.
>
What kind of files would be shared through this feature? I don't
entirely buy the premise that sharing a FS between a bootloader and an
application is a good idea. Is there a document I can read describing
the philosophy? Are there some reasons like for debug or modifying the
boot scripts (from within the application itself) that makes it
sensible to do this kind of sharing? It seems more likely that a
remote debug or upload engine would be used that can access the MMC
directly.

> 3. Incorporate TFS in uMon by allocating some block of MMC to it:
>    At startup, uMon initializes all periphery, and then has a section of MMC
> that
>    it sucks into RAM and then TFS is overlayed on that block of RAM.
>    Then uMon can have its typical script driven bootup, and RTEMS can
> optionally
>    have access to that, while still using some other FFS for the MMC.
>
I understand the utility of the FS to enable uMon to use scripts,
etc., but I don't buy that it is good to expose applications or even
RTEMS to those internal details, or to expose the FFS to possible bugs
in the application or RTEMS. Also, on reset the RAM FS has to be
re-built, so if the FS is not shared there is no point in reserving
that part of memory to preclude use by RTEMS/app, i.e. RTEMS should be
able to "wipe" the RAM overlay that is built by uMon.

But if good reasons for the sharing are proposed, I wouldn't be
opposed to seeing the TFS implementation ported to RTEMS (with proper
licensing). As it stands, however, I find it simpler to just ignore
that region of the flash device (MMC) from within RTEMS.

> IMHO, mode #3 is ideal because that philosophy can be applied to any system
> regardless of the memory configuration; however, I'd prefer that we get
> feedback
It's a fine option, but I don't see how the memory configuration has
anything to do with making this option better than the other two.

> from some other RTEMS core developers to get thoughts on that.
> Ed
>
>> Hi Ed and all:
>>
>> Initializing the SD controller on the AM335x took a bit longer than I
>> expected which was mostly a result of encountering some issues with
>> the SD controller initialization, specifically the clocks that are
>> involved.
>>
>> Now that I was able to resolve the issues I was facing, I was able to
>> initiate CMD0 (GO_IDLE_STATE), CMD8 (SEND_IF_COND), and CMD55
>> (APP_CMD) and was able to receive appropriate responses from any
>> arbitrary SD card that is connected.
>>
>> Right now I have the interface setup using 4-bit SD mode with the SD
>> clock frequency set to 6MHz and currently operating on 3.0 V.
>>
>> Currently, I am looking into reading the ID register and to write and
>> read to/from the SD card.  I suspect that this would be much easier
>> now since the SD controller is set up properly already.
>>
>> As I am approaching in getting ready to integrate the SD code, i.e.
>> establishing the necessary code to get the "sd" command working, I am
>> also simultaneously looking into TFS.
>>
>> It looks like a RAM-based TFS would have to be set up as both the
>> MMC/SD can not be accessed linearly.
>>
>> Once TFS is set up, I would say that the next step would be to have
>> the ability to transfer an application image from the SD card into TFS
>> for uMon to boot from or, if it's possible, to transfer a raw
>> application image from SD into DDR3 and then pass control to the entry
>> point of the application image.
>>
>> Am I approaching the idea of TFS and booting an application image
>> correctly.
>>
>> Thanks.
>> _______________________________________________
>> umon-devel mailing list
>> umon-devel at rtems.org
>> http://lists.rtems.org/mailman/listinfo/umon-devel
>
>
> _______________________________________________
> umon-devel mailing list
> umon-devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/umon-devel



More information about the umon-devel mailing list