Index: firmware/target/arm/system-pp502x.c =================================================================== --- firmware/target/arm/system-pp502x.c (revision 31026) +++ firmware/target/arm/system-pp502x.c (working copy) @@ -209,6 +209,12 @@ GPIOL_INT_EN = 0; } +static void ICODE_ATTR cpucache_fill(void) { + register volatile char *p; + for (p = (volatile char *)0; p < (volatile char *)0x2000; p += 0x10) + (void)*p; +} + void ICODE_ATTR cpucache_commit(void) { if (CACHE_CTL & CACHE_CTL_ENABLE) @@ -228,6 +234,7 @@ while ((CACHE_CTL & CACHE_CTL_BUSY) != 0); nop; nop; nop; nop; } + cpucache_fill(); } void cpucache_invalidate(void) __attribute__((alias("cpucache_commit_discard"))); @@ -257,6 +264,7 @@ /* enable cache */ CACHE_CTL |= CACHE_CTL_INIT | CACHE_CTL_ENABLE | CACHE_CTL_RUN; nop; nop; nop; nop; + cpucache_fill(); } #endif /* BOOTLOADER || HAVE_BOOTLOADER_USB_MODE */