mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(esp_system): fix test rodata being prefetched into cache unexpectedly
This commit is contained in:
parent
05e74480f5
commit
71fb3d2f31
@ -60,7 +60,9 @@ TEST_CASE("spi_flash_cache_enabled() works on both CPUs", "[spi_flash][esp_flash
|
||||
|
||||
// This needs to sufficiently large array, otherwise it may end up in
|
||||
// DRAM (e.g. size <= 8 bytes && ARCH == RISCV)
|
||||
static const uint32_t s_in_rodata[8] = { 0x12345678, 0xfedcba98 };
|
||||
// And it needs to be >= and aligned to the cacheline size, otherwise it may be prefetched
|
||||
// to cache data memory before accessing it because of accessing other rodata in the same cacheline.
|
||||
static const __attribute__((aligned(128))) uint32_t s_in_rodata[32] = { 0x12345678, 0xfedcba98 };
|
||||
|
||||
static void reset_after_invalid_cache(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user