protect: move us_heap to userspace_data_s

Refactor heap pointer storage by moving us_heap field from userspace_s
to the nested userspace_data_s structure, enabling future extensibility
of user-space data without modifying the core userspace_s interface across
all board-specific implementations.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5
2025-09-05 16:26:05 +08:00
committed by Xiang Xiao
parent 03d9d78adf
commit 5db4278173
48 changed files with 494 additions and 93 deletions
+1 -1
View File
@@ -62,7 +62,7 @@
* structure from the userspace interface.
*/
# define UMM_HEAP(i) ((struct mm_heap_s *const *)USERSPACE->us_heap)[i]
# define UMM_HEAP(i) ((struct mm_heap_s *const *)USERSPACE_HEAP)[i]
#else
/* Otherwise, the user heap data structures are in common .bss */
+1 -1
View File
@@ -179,7 +179,7 @@ void up_allocate_heap(void **heap_start, size_t *heap_size)
#ifdef CONFIG_BUILD_PROTECTED
struct mm_heap_s *const *heap =
(struct mm_heap_s *const *)USERSPACE->us_heap;
(struct mm_heap_s *const *)USERSPACE_HEAP;
void *const *bssend = (void *const *)USERSPACE->us_bssend;
void *const *heapend = (void *const *)USERSPACE->us_heapend;