Commit 76252e7
committed
zephyr: alloc: ace: calculate L3 heap size based on actual IMR size
Updates the L3 heap management to dynamically calculate heap size
based on the actual IMR size reported by hardware registers
instead of using hardcoded values.
Only initializes the L3 heap when the IMR is actually available
and being used, as determined by the ace_imr_used() function,
improving robustness by preventing the initialization
of unavailable memory regions.
Adds proper memory mapping when MMU is enabled, which maps
the physical L3 heap memory to a virtual address with appropriate
permissions (read/write with write-back caching).
MMU mapping is required because it is no longer a fixed region with
fixed mapping in Zephyr.
This change makes the L3 heap allocation more flexible and
adaptable to different hardware configurations.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>1 parent 15d0fdf commit 76252e7
1 file changed
+19
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
217 | 221 | | |
218 | 222 | | |
219 | 223 | | |
220 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
221 | 227 | | |
222 | 228 | | |
223 | 229 | | |
| |||
651 | 657 | | |
652 | 658 | | |
653 | 659 | | |
654 | | - | |
| 660 | + | |
655 | 661 | | |
656 | | - | |
657 | | - | |
658 | | - | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
659 | 673 | | |
660 | 674 | | |
661 | 675 | | |
| |||
0 commit comments