tests: x86/pagetables: limit permission test under demand paging
When demand paging is enabled and not all generic sections are in physical memory at boot, only tests the permission up to the end of the pinned section. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
1203289143
commit
6a58c34aa6
1 changed files with 7 additions and 1 deletions
|
@ -80,7 +80,13 @@ void test_ram_perms(void)
|
||||||
|
|
||||||
pentry_t entry, flags, expected;
|
pentry_t entry, flags, expected;
|
||||||
|
|
||||||
for (pos = Z_KERNEL_VIRT_START; pos < Z_KERNEL_VIRT_END;
|
#ifdef CONFIG_LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT
|
||||||
|
const uint8_t *mem_range_end = Z_KERNEL_VIRT_END;
|
||||||
|
#else
|
||||||
|
const uint8_t *mem_range_end = (uint8_t *)lnkr_pinned_end;
|
||||||
|
#endif /* CONFIG_LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT */
|
||||||
|
|
||||||
|
for (pos = Z_KERNEL_VIRT_START; pos < mem_range_end;
|
||||||
pos += CONFIG_MMU_PAGE_SIZE) {
|
pos += CONFIG_MMU_PAGE_SIZE) {
|
||||||
if (pos == NULL) {
|
if (pos == NULL) {
|
||||||
/* We have another test specifically for NULL page */
|
/* We have another test specifically for NULL page */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue