[ECOS] Flash infrastructure rework
Sun Aug 22 13:02:00 GMT 2004
On Fri, 2004-08-20 at 10:37, Andrew Lunn wrote:
> On Fri, Aug 20, 2004 at 03:44:36PM +0100, Bart Veer wrote:
> > >> cyg_flash_code_overlaps(): I am not sure this can be cleanly
> > >> defined. For example, consider a platform with one flash chip
> > >> that uses bottom boot blocks. If we want to make efficient use
> > >> of this chip then we want to place the fis and fconfig data in
> > >> these boot blocks. Hence the first boot block will contain some
> > >> startup code followed by a jump to later in the flash, then
> > >> we'll have the fis and fconfig blocks, and then the rest of the
> > >> code. How would cyg_flash_code_overlaps() work with that
> > >> scenario?
> > Andrew> The HAL needs to be able to implement it. That is the only
> > Andrew> thing that knows what goes where. I didn't really like
> > Andrew> this function to start with, but redboot uses it quite a
> > Andrew> lot for user input sanity checking. We could remove it and
> > Andrew> hope the user knows what (s)he is doing.
> > HAL checks may not suffice if the application makes virtual vector
> > calls. RedBoot could get much the same functionality by detecting
> > CYG_HAL_STARTUP_ROM and looking for an overlap with its own fis entry,
> > without needing a dubious flash_code_overlaps() function. That won't
> > work 100% on all platforms, e.g. there may be startup types other than
> > ROM which also have RedBoot resident in flash, but it will work on
> > most.
> OK. Like i said, i didn't like this function, so im happy to remove
> it. Gary, what do you say?
I don't care what it's called, or how it works, but I firmly believe
that RedBoot needs a way to determine if the FLASH operation that the
user requests is about to destroy the FLASH/ROM environment. I know
that what's in there now is not perfect, but it catches 95%+ of the
cases. RedBoot needs some way to ask the FLASH infrastructure "if I
let you write/erase <here>, will I wake up in the morning?"
Gary Thomas <email@example.com>
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss