This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: JFFS2 filesystem and eCos code on the same chip?


Gary Thomas wrote:
On Tue, 2002-10-15 at 07:28, Andrew Lunn wrote:

On Tue, Oct 15, 2002 at 03:26:22PM +0200, llandre wrote:

Is it possible to have the JFFS2 file system and eCos binary code on the same physical chip?
The flash driver API functions copy themselves itself into RAM before
doing anything with the flash. Redboot uses this feature.

Firstly, it's not common to actually be executing from FLASH.  RedBoot
does this, and an application can do so as well, but the more common
case is for programs to execute out of RAM.
I'm not sure I'd make that generalisation. XIP is an obvious way to reduce costs in final production boards for applications where performance isn't critical (assuming it's slower, which it isn't always).

It's not much of an issue in the fairly high end *development* boards us guys tend to use I agree :-).

> That noted, the drivers
are designed to handle this case anyway by insisting that the access
routines are in RAM before running them.


What i don't know about is if this is thread safe. Does the flash code
disable interrupts while its doing dangerous things? You need to check
the code, or probably Gary knows.
This is an interesting observation.  Currently nothing specific is being
done about interrupts.  It probably should, so I'll think about it.
In fact, it definitely should if e.g. you are running out of Flash! I'll raise a bugzilla bug for this unless you want to deal with it imminently - it can at least be conditionalized on CYG_HAL_STARTUP_ROM.

It isn't obvious that it should be done all the time though as although the case of XIP is pretty glaring, other situations aren't - if it was a RAM or ROMRAM program and the app only accesses flash via e.g. JFFS2 then it's no big deal.

And indeed Jay mentions watchdogs, and the problem of having ints disabled for a long time.

Perhaps we should only do it for CYG_HAL_STARTUP_ROM and the user can shoot themselves in the head/foot/wherever if they want.

Jifl
--
eCosCentric http://www.eCosCentric.com/ <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine


--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]