tests/x86: Check libc partition in page permissions test
Picolibc uses the libc partition for some variables, so make sure the test allows references to that data. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
f35f44147f
commit
661ff0527f
1 changed files with 10 additions and 0 deletions
|
@ -54,6 +54,12 @@ extern char __gcov_bss_start[];
|
||||||
extern char __gcov_bss_size[];
|
extern char __gcov_bss_size[];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <zephyr/sys/libc-hooks.h>
|
||||||
|
#ifdef Z_LIBC_PARTITION_EXISTS
|
||||||
|
extern char z_data_smem_z_libc_partition_part_start[];
|
||||||
|
extern char z_data_smem_z_libc_partition_part_size[];
|
||||||
|
#endif
|
||||||
|
|
||||||
static pentry_t get_entry(pentry_t *flags, void *addr)
|
static pentry_t get_entry(pentry_t *flags, void *addr)
|
||||||
{
|
{
|
||||||
int level;
|
int level;
|
||||||
|
@ -133,6 +139,10 @@ ZTEST(x86_pagetables, test_ram_perms)
|
||||||
expected = MMU_P | MMU_US;
|
expected = MMU_P | MMU_US;
|
||||||
} else if (IN_REGION(lnkr_pinned_rodata, pos)) {
|
} else if (IN_REGION(lnkr_pinned_rodata, pos)) {
|
||||||
expected = MMU_P | MMU_US | MMU_XD;
|
expected = MMU_P | MMU_US | MMU_XD;
|
||||||
|
#endif
|
||||||
|
#ifdef Z_LIBC_PARTITION_EXISTS
|
||||||
|
} else if (IN_REGION(z_data_smem_z_libc_partition_part, pos)) {
|
||||||
|
expected = MMU_P | MMU_RW | MMU_XD;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
/* We forced CONFIG_HW_STACK_PROTECTION off otherwise
|
/* We forced CONFIG_HW_STACK_PROTECTION off otherwise
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue