Commit 997bf96
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 aa1a021 commit 997bf96
1 file changed
+14
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
| |||
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
161 | | - | |
| 165 | + | |
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
| |||
557 | 561 | | |
558 | 562 | | |
559 | 563 | | |
560 | | - | |
| 564 | + | |
561 | 565 | | |
562 | | - | |
563 | | - | |
564 | | - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
565 | 574 | | |
566 | 575 | | |
567 | 576 | | |
| |||
0 commit comments