From 42dfb5cadde8d94fa06b4ce4cc4d3d73f4937859 Mon Sep 17 00:00:00 2001 From: Armando Date: Wed, 27 Jul 2022 10:59:47 +0800 Subject: [PATCH] esp_psram: improve mapping log when physical range is larger After this commit, when physical address is larger than vaddr range, driver will still map as much as it can, but also give a verbose level log to show the actual mapped size --- components/esp_psram/esp_psram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_psram/esp_psram.c b/components/esp_psram/esp_psram.c index df942c804a..e068edf58d 100644 --- a/components/esp_psram/esp_psram.c +++ b/components/esp_psram/esp_psram.c @@ -159,8 +159,8 @@ esp_err_t esp_psram_init(void) //----------------------------------Map the PSRAM physical range to MMU-----------------------------// intptr_t vaddr_start = mmu_get_psram_vaddr_start(); if (vaddr_start + psram_available_size > mmu_get_psram_vaddr_end()) { - ESP_EARLY_LOGV(TAG, "Virtual address not enough for PSRAM!"); psram_available_size = mmu_get_psram_vaddr_end() - vaddr_start; + ESP_EARLY_LOGV(TAG, "Virtual address not enough for PSRAM, map as much as we can. %dMB is mapped", psram_available_size / 1024 / 1024); } #if CONFIG_IDF_TARGET_ESP32