This is the mail archive of the ecos-patches@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: MPC8260 cache patch


Gary Thomas wrote:

Technically, this should not matter. The only time this would make any difference would be if the FLASH functions modified data that was already within the data cache. If the lines were left valid and then the cache disabled, when the cache was re-enabled, the lines in the cache could override the changes in memory, leading to an inconsistent state. So, for safety's sake, we should leave the invalidate calls in there. BTW, as far as I can see the only time this could cause a problem would be on the "inquire" function - the one that computes the size and shape of the FLASH. If that data were already in the cache, then things could go awry. The only other routines only write to the FLASH and should not be touching memory anyway.

I think this only applies to the simplest of operations. It only takes a read/write/read operation to risk problems. You could provoke this by just cksumming an area of flash before doing a write to it, and then cksumming it again, for example[1]. Unlikely, but, users given a CLI can do whatever they want :-).


More troublesome would be flash file systems of course, and they rely on the underlying drivers doing the right thing.

Jifl
[1] Talking of which, I'm I the only one still showing a mismatch between RedBoot cksum and Linux cksum? I thought all these issues were worked out not all that long ago.
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "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]