This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Bug: enabling I-cache
- To: eCos mailing list <ecos-discuss at sources dot redhat dot com>
- Subject: [ECOS] Bug: enabling I-cache
- From: Christoph Csebits <christoph dot csebits at frequentis dot com>
- Date: Thu, 27 Sep 2001 17:03:46 +0200
hi,
it seems there is a bug, in flash_hwr_init
of the following (at least) files:
arm/ebsa285/current/src/ebsa285_flash.c
arm/iq80310/current/src/iq80310_flash.c
arm/sa1100mm/current/src/sa1100mm_flash.c
intel/strata/current/src/strata.c
>HAL_DCACHE_SYNC(); // Should guarantee this code will run
>HAL_ICACHE_DISABLE(); // is also required to avoid old contents
>
>stat = (*_flash_query)(data);
>
>HAL_ICACHE_ENABLE();
The I-cache is always enabled, regardless of its origin state.
-> better:
>int cache_state;
>
>HAL_ICACHE_IS_ENABLED(cache_state);
>HAL_ICACHE_DISABLE(); // is also required to avoid old contents
>
>stat = (*_flash_query)(data);
>
>if (cache_state) {
> HAL_ICACHE_ENABLE();
>}
regards, christoph
--