Repository navigation
Conversation
|
FYI @lgirdwood @harajend This PR is a subset/alternative to #11303 . Tested on target hardware and passes the test. Additionally, with #11322 vpage can be enabled again on this target. |
There was a problem hiding this comment.
🟡 Changes recommended
The fallback can discard an in-L2 library reservation and register overlapping vpage memory.
1 open issue
What changed in this PR
Adds configuration checks to Zephyr’s vpage allocator to prevent size underflow and keep mappings within physical L2 memory.
Changes:
- Reject allocation and free operations when no vpage region exists.
- Validate available space before registering the region.
| File | Description |
|---|---|
| zephyr/lib/vpage.c | Adds region-availability guards and initialization bounds checks. |
Review effort: Balanced
| * physical L2 size for now until support is added to | ||
| * Zephyr mm_drv_intel_adsp_mtl_tlb.c and friends | ||
| */ | ||
| end = l2_end; |
| /* | ||
| * TODO: on demand mapping currently only supports | ||
| * cached mappings, so we need to limit vpages to | ||
| * physical L2 size for now until support is added to |
There was a problem hiding this comment.
Related Zephyr PR to address this limitation zephyrproject-rtos/zephyr#122801
PR 11323: test resultsRun date: 2026-10-21 18:34 UTC Tested commit: 094223665204347d915ac112f85b4945c5335f9d |
|
V2 pushed:
|
|
@lgirdwood One option is to just drop this immediate version and directly go with your #11303 (when the Zephyr dependency is in place). |
The calculation of 'remaining_ram' ended up overflowing if the configuration did not allow for enough space for vpage region. Catch this case and disable vpage safely. Also add a separate check to ensure vpage is not allocated beyond physical memory. This is a temporary limitation as Zephyr TLB driver only maps the cached alias when a page is mapped at runtime, and this leads to faults when vpage is used via a coherent alias (leading to e.g. "EXCCAUSE 29 (store prohibited)"). Co-developed-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2f904d0 to
0942236
Compare
|
V3 pushed:
|

The calculation of 'remaining_ram' ended up overflowing if the configuration did not allow for enough space for vpage region. Catch this case and disable vpage safely.
Also add a separate check to ensure vpage is not allocated beyond physical memory. This is a temporary limitation as Zephyr TLB driver only maps the cached alias when a page is mapped at runtime, and this leads to faults when vpage is used via a coherent alias (leading to e.g. "EXCCAUSE 29 (store prohibited)").
Co-developed-by: Liam Girdwood liam.r.girdwood@linux.intel.com