Skip to content

Commit 012937e

Browse files
authored
Create mmu_map.diff
1 parent c32f580 commit 012937e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

patches/mmu_map.diff

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
diff --git a/components/esp_mm/esp_mmu_map.c b/components/esp_mm/esp_mmu_map.c
2+
index b7d927f8fe..6a8c4635f0 100644
3+
--- a/components/esp_mm/esp_mmu_map.c
4+
+++ b/components/esp_mm/esp_mmu_map.c
5+
@@ -315,6 +315,19 @@ esp_err_t esp_mmu_map_reserve_block_with_caps(size_t size, mmu_mem_caps_t caps,
6+
s_mmu_ctx.mem_regions[found_region_id].max_slot_size -= aligned_size;
7+
ESP_EARLY_LOGV(TAG, "found laddr is 0x%x", laddr);
8+
9+
+ mem_block_t *mem_block = NULL;
10+
+ mem_region_t *region = &s_mmu_ctx.mem_regions[found_region_id];
11+
+ TAILQ_FOREACH(mem_block, &region->mem_block_head, entries) {
12+
+ if (mem_block == TAILQ_FIRST(&region->mem_block_head) || mem_block == TAILQ_LAST(&region->mem_block_head, mem_block_head_)) {
13+
+ TAILQ_REMOVE(&region->mem_block_head, mem_block, entries);
14+
+ } else {
15+
+ // probably the reservation of MMU region should be disallowed for this case - already some MMU mappings exist?
16+
+ // assert/abort
17+
+ ESP_EARLY_LOGE(TAG, "already some MMU mappings exist?");
18+
+ abort();
19+
+ }
20+
+ }
21+
+
22+
uint32_t vaddr = 0;
23+
if (caps & MMU_MEM_CAP_EXEC) {
24+
vaddr = mmu_ll_laddr_to_vaddr(laddr, MMU_VADDR_INSTRUCTION);

0 commit comments

Comments
 (0)