tests: kernel: userspace: correct address of thread priv stack start
In ARM architecture z_priv_stack_find() returns the start of a thread's privilege stack; we do not need to subtract the length of a (possible) stack guard. This commit corrects the assigning of the start address of a thread privilege stack in test/kerne/mem_protect/mem_protect/userspace. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
c06a74cd80
commit
02a3c52084
1 changed files with 1 additions and 2 deletions
|
@ -1095,8 +1095,7 @@ void test_main(void)
|
|||
k_mem_domain_add_thread(&dom0, k_current_get());
|
||||
|
||||
#if defined(CONFIG_ARM)
|
||||
priv_stack_ptr = (int *)z_priv_stack_find(ztest_thread_stack) -
|
||||
MPU_GUARD_ALIGN_AND_SIZE;
|
||||
priv_stack_ptr = (int *)z_priv_stack_find(ztest_thread_stack);
|
||||
|
||||
#endif
|
||||
k_thread_access_grant(k_current_get(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue