This is the mail archive of the ecos-discuss@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]

Bug: enabling I-cache


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
-- 


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