This is the mail archive of the ecos-devel@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: Flash driver for MSys DOC2000


Iztok Zupet wrote:
> 
> Hello:
> 
>   Last Year I.ve written myself a DOC2000 flash driver for the PC target. It
> works fine with RedBoot and the application. I partitioned the flash disk
> into two partitions (one for RedBoot and one for application). The system
> BIOS boots the RedBoot flash image form the first partition (disk like boot).
> 
>  There's one crucial problem using such flash devices in Ecos. The Ecos
> expects the device to be memory mapped for read access. So my driver
> maintains a phisycal memory image of the flash disk ( on behalf of
> application memory).

A fair workaround. But the assumption of the "generic" (high level) flash
driver is indeed where the problem lies.

>  Up to now, it seems to me there's only one solution, namely to use virtual
> memory (and page fault exeptions), to bring the required flash disk region
> into memory on memory read reqest. But unfortunately the exeption handling
> for the PC target isn't done yet, the only exeption handler there is GDB.

That would be quite complex and wasteful - after all once a page is
allocated it will stay allocated unless you have some complex VM system.
And you'll have to keep enough memory reserved to cope with allocations.

No, I'm sure the better answer is to modify the generic flash layer by
adding code that makes it change behaviour according to a #define that may
be provided by the low level driver.

Jifl
-- 
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


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