A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/espressif/esp-idf/commit/01dabff7c3a28c3fdd040581fee1949c2a12f6cc below:

Merge branch 'bugfix/fix_wrong_dcache_0_size_issue_on_s2_v5.0' into '… · espressif/esp-idf@01dabff · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+12

-4

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+12

-4

lines changed Original file line number Diff line number Diff line change

@@ -1,5 +1,5 @@

1 1

/*

2 -

* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD

2 +

* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD

3 3

*

4 4

* SPDX-License-Identifier: Apache-2.0

5 5

*/

@@ -394,20 +394,28 @@ IRAM_ATTR void esp_config_instruction_cache_mode(void)

394 394 395 395

IRAM_ATTR void esp_config_data_cache_mode(void)

396 396

{

397 +

#define CACHE_SIZE_0KB 99 //If Cache set to 0 KB, cache is bypassed, the cache size doesn't take into effect. Set this macro to a unique value for log

398 + 397 399

cache_size_t cache_size;

398 400

cache_ways_t cache_ways;

399 401

cache_line_size_t cache_line_size;

400 402 401 403

#if CONFIG_ESP32S2_INSTRUCTION_CACHE_8KB

402 -

#if CONFIG_ESP32S2_DATA_CACHE_8KB

404 +

#if CONFIG_ESP32S2_DATA_CACHE_0KB

405 +

Cache_Allocate_SRAM(CACHE_MEMORY_ICACHE_LOW, CACHE_MEMORY_INVALID, CACHE_MEMORY_INVALID, CACHE_MEMORY_INVALID);

406 +

cache_size = CACHE_SIZE_0KB;

407 +

#elif CONFIG_ESP32S2_DATA_CACHE_8KB

403 408

Cache_Allocate_SRAM(CACHE_MEMORY_ICACHE_LOW, CACHE_MEMORY_DCACHE_LOW, CACHE_MEMORY_INVALID, CACHE_MEMORY_INVALID);

404 409

cache_size = CACHE_SIZE_8KB;

405 410

#else

406 411

Cache_Allocate_SRAM(CACHE_MEMORY_ICACHE_LOW, CACHE_MEMORY_DCACHE_LOW, CACHE_MEMORY_DCACHE_HIGH, CACHE_MEMORY_INVALID);

407 412

cache_size = CACHE_SIZE_16KB;

408 413

#endif

409 414

#else

410 -

#if CONFIG_ESP32S2_DATA_CACHE_8KB

415 +

#if CONFIG_ESP32S2_DATA_CACHE_0KB

416 +

Cache_Allocate_SRAM(CACHE_MEMORY_ICACHE_LOW, CACHE_MEMORY_ICACHE_HIGH, CACHE_MEMORY_INVALID, CACHE_MEMORY_INVALID);

417 +

cache_size = CACHE_SIZE_0KB;

418 +

#elif CONFIG_ESP32S2_DATA_CACHE_8KB

411 419

Cache_Allocate_SRAM(CACHE_MEMORY_ICACHE_LOW, CACHE_MEMORY_ICACHE_HIGH, CACHE_MEMORY_DCACHE_LOW, CACHE_MEMORY_INVALID);

412 420

cache_size = CACHE_SIZE_8KB;

413 421

#else

@@ -422,7 +430,7 @@ IRAM_ATTR void esp_config_data_cache_mode(void)

422 430

#else

423 431

cache_line_size = CACHE_LINE_SIZE_32B;

424 432

#endif

425 -

ESP_EARLY_LOGI(TAG, "Data cache \t\t: size %dKB, %dWays, cache line size %dByte", cache_size == CACHE_SIZE_8KB ? 8 : 16, 4, cache_line_size == CACHE_LINE_SIZE_16B ? 16 : 32);

433 +

ESP_EARLY_LOGI(TAG, "Data cache \t\t: size %dKB, %dWays, cache line size %dByte", (cache_size == CACHE_SIZE_0KB) ? 0 : ((cache_size == CACHE_SIZE_8KB) ? 8 : 16), 4, cache_line_size == CACHE_LINE_SIZE_16B ? 16 : 32);

426 434

Cache_Set_DCache_Mode(cache_size, cache_ways, cache_line_size);

427 435

Cache_Invalidate_DCache_All();

428 436

}

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4