mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
fix(esp_mm): for existing mmap region, consider new offset for virtual addr
While returning virtual address for existing memory mapped region, newly supplied offset from the physical address was not getting considered. This was a regression present from ESP-IDF 5.1 release. Added test case in spi_flash component that fails without this fix. Closes https://github.com/espressif/esp-idf/issues/13929
This commit is contained in:
@@ -75,7 +75,7 @@ typedef uint32_t esp_paddr_t;
|
||||
* - ESP_ERR_NOT_SUPPORTED: Only on ESP32, PSRAM is not a supported physical memory target
|
||||
* - ESP_ERR_NOT_FOUND: No enough size free block to use
|
||||
* - ESP_ERR_NO_MEM: Out of memory, this API will allocate some heap memory for internal usage
|
||||
* - ESP_ERR_INVALID_STATE: Paddr is mapped already, this API will return corresponding vaddr_start of the previously mapped block.
|
||||
* - ESP_ERR_INVALID_STATE: Paddr is mapped already, this API will return corresponding `vaddr_start + new_block_offset` as per the previously mapped block.
|
||||
* Only to-be-mapped paddr block is totally enclosed by a previously mapped block will lead to this error. (Identical scenario will behave similarly)
|
||||
* new_block_start new_block_end
|
||||
* |-------- New Block --------|
|
||||
|
||||
Reference in New Issue
Block a user