change(system): heap_caps_alloc returns aligned memory if caps indicate a need for it

The implicit promise of heap_alloc_caps() and friends is that the memory it
returns is fit for the purpose as requested in the caps field. Before
this commit, that did not happen; e.g. DMA-capable memory wass returned
from a correct region, but not aligned/sized to something the DMA subsystem
can handle.

This commit adds an API to the esp_mm component that is then used by the
heap component to adjust allocation alignment, caps and size dependent on
the hardware requirement of the requested allocation caps.
This commit is contained in:
Jeroen Domburg
2024-04-23 12:59:39 +08:00
parent 3f632df143
commit df4195062d
15 changed files with 323 additions and 53 deletions

View File

@@ -168,7 +168,7 @@ __attribute__((always_inline))
static inline uint32_t cache_ll_get_line_size(uint32_t cache_level, cache_type_t type, uint32_t cache_id)
{
uint32_t size = 0;
size = Cache_Get_Cache_Line_Size();
size = Cache_Get_Line_Size();
return size;
}