change(heap): fix and clean memory caps defination in memory_layout

1. move startup_stack attr from soc_memory_type_desc_t to soc_memory_region_t and
   remove unused aliased_iram field
2. all of the last level of RAM is retention dma accessible on esp32c3
3. remove esp32c2 and later chips retention dma accessible memory caps
4. allow allocate memory from RTC_RAM with MALLOC_CAP_EXEC cap
This commit is contained in:
wuzhenghui
2023-09-13 17:37:34 +08:00
committed by BOT
parent 492c819357
commit 5926116644
11 changed files with 287 additions and 319 deletions

View File

@@ -69,7 +69,7 @@ void heap_caps_init(void)
for (size_t i = 1; i < num_regions; i++) {
soc_memory_region_t *a = &regions[i - 1];
soc_memory_region_t *b = &regions[i];
if (b->start == (intptr_t)(a->start + a->size) && b->type == a->type ) {
if (b->start == (intptr_t)(a->start + a->size) && b->type == a->type && b->startup_stack == a->startup_stack ) {
a->type = -1;
b->start = a->start;
b->size += a->size;
@@ -102,7 +102,7 @@ void heap_caps_init(void)
heap->start = region->start;
heap->end = region->start + region->size;
MULTI_HEAP_LOCK_INIT(&heap->heap_mux);
if (type->startup_stack) {
if (region->startup_stack) {
/* Will be registered when OS scheduler starts */
heap->heap = NULL;
} else {