This is the mail archive of the ecos-patches@sourceware.org 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: IO FLASH and caches


> I think the patch may be fundamentally flawed.

Yes, I also believe the problem lies somewhere else.

>
> If I understand correctly, the issue you are trying to address is that
> after a flash program operation that involves bypassing the cache, the
> data cache may still contain stale data from before. So you change the
> verify code to look at the uncached flash contents. The problem is
> that any subsequent code reading the flash may still get the stale
> data from the cache.

That's spot on.

> In other words, you have not solved the problem. All that the patch
> does is stop the verify code from reporting the problem.

Yes, I'm afraid that's the case.

> What should happen is that the flash driver does whatever is necessary
> to keep the cache and the flash contents coherent. I believe the V2
> AMD and Strata drivers should do the right thing. _V2_CACHED_ONLY
> should not be defined because the Nios II can bypass the cache when
> manipulating flash, so _INTSCACHE_DEFAULT_END() should sync and
> invalidate the data cache. When control returns to the generic flash
> code all stale data should have been removed from the cache so the
> verify code will see the new data.

I am running STRATA V2.
>From documentation I've got the impression that, if I can bypass the
caches by modifying the address, I don't need the
_INTSCACHE_DEFAULT_END macro. I guess this is wrong.

Thanks for helping.

Edgar

-- 
Edgar Grimberg
System Developer
Zylin AS
ZY1000 JTAG Debugger http://www.zylin.com/zy1000.html
Phone: (+47) 51 63 25 00


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