[ECOS] Bug: enabling I-cache
Christoph Csebits
christoph.csebits@frequentis.com
Thu Sep 27 08:06:00 GMT 2001
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
--
More information about the Ecos-discuss
mailing list