summaryrefslogtreecommitdiff
path: root/libcpu
diff options
context:
space:
mode:
authorShell <[email protected]>2023-03-03 11:51:21 +0800
committerGitHub <[email protected]>2023-03-03 11:51:21 +0800
commit0de21341f9ee2fcf6292afc816ffacdab79b85f3 (patch)
treed6757e7b4e649f8616553abd740e1abbdeb8da59 /libcpu
parentb7c2d1ba42267820ed6f82384367e5981cdb3b33 (diff)
[fix] mm bugs (#7010)
* [fix] implementation fault on avl * [fix] mm may free varea allocated statically * [test] add test and benchmark for avl
Diffstat (limited to 'libcpu')
-rw-r--r--libcpu/aarch64/common/mmu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcpu/aarch64/common/mmu.c b/libcpu/aarch64/common/mmu.c
index b97eb1eb6b..83073a6314 100644
--- a/libcpu/aarch64/common/mmu.c
+++ b/libcpu/aarch64/common/mmu.c
@@ -205,6 +205,8 @@ void *rt_hw_mmu_map(rt_aspace_t aspace, void *v_addr, void *p_addr, size_t size,
if (ret != 0)
{
+ /* other types of return value are taken as programming error */
+ RT_ASSERT(ret == MMU_MAP_ERROR_NOPAGE);
/* error, undo map */
while (unmap_va != v_addr)
{