This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: MPC8260 cache patch
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Patrick Doyle <wpd at delcomsys dot com>
- Cc: eCos patches <ecos-patches at sources dot redhat dot com>
- Date: 24 Mar 2003 13:08:58 -0700
- Subject: Re: MPC8260 cache patch
- References: <NFBBJAJICAKJPMMKDAGBEEFFDNAA.wpd@delcomsys.com>
On Mon, 2003-03-24 at 13:00, Patrick Doyle wrote:
> This one is probably for you, Gary.
>
> I ran into a problem wherein the data cache was not being properly synced
> prior to being invalidated (somewhere in one of the FLASH routines --
> 'flash_dev_query()', to be a little more precise). I tracked it down to the
> fact that the 'HAL_DCACHE_SYNC()' macro syncs the cache to memory by loading
> in the first 16 kBytes. But, if there are dirty cache lines in those first
> 16 kBytes, they do not get written back out to main memory. My simple fix
> is to double the region scanned from 16 kBytes to 32 kBytes. I would be
> glad to accept an alternative solution.
>
I understand what you're trying to do here. I recall a similar
discussion on the Linux/PPC lists a few days ago, so I'm going to
review that before we make this change.
One question - what do you have in the low 16K that would be in the
cache and how is it disturbing your FLASH routines?
I ask because I am loathe to just double the cost of doing a flush
unless it's 100% necessary.
Thanks.
--
------------------------------------------------------------
Gary Thomas |
MLB Associates | Consulting for the
+1 (970) 229-1963 | Embedded world
http://www.mlbassoc.com/ |
email: <gary at mlbassoc dot com> |
gpg: http://www.chez-thomas.org/gary/gpg_key.asc
------------------------------------------------------------