This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: More eb40a redboot questions
- From: Scott Dattalo <scott at dattalo dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Sun, 8 Dec 2002 20:33:47 -0800 (PST)
- Subject: Re: [ECOS] More eb40a redboot questions
On Sun, 8 Dec 2002, Tim Drury wrote:
> Shannon Holland wrote:
<snip>
> > 2. Is what I did to make the sram configuration correct? (I did actually add
> > an redboot_SRAM.ecm and mlt_arm_at91_eb40a_sram.h/ldi - I can provide more
> > info on what I did here.
>
> This is one of my gripes with the ecos setup. It would be nice if the
> memory layout were constrained to just one file, but there are a few
> places it shows up. You found the .h and .ldi file. Also look in
> hal_platform_setup.h. There are some chip select setups (which you
> may not need for the onboard sram) and if you are trying ROMRAM,
> there are some memory values in there. It's been a while since I
> looked at this stuff...
I was just looking at it recently - 3:30AM Saturday...
Not only are there some hard-coded addresses, but there are some subtle
assumptions about the relative positions of ROM and RAM (in the eb40 port
at least). There's also a subtle/clever way R11 and R12 are initialized
with a LDMIA instruction. (There's also a devious way to save a couple of
instructions! [the lower bits of R10 after the LDMIA instruction just so
happen to be the lower bits of R12 {which gets stuffed in the PC to flush
the pipeline}]).
This area (hal_platform_setup.h) is tricky because the code needs to
dynamically ascertain whether it is running in 1 of 3 possible address
spaces: 1) from ROM before remapping has occurred 2) from ROM after
remapping has occurred or 3) from RAM.
Scott
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss