tests: mem_protect/mem_map: pin test_page in memory
This pins the test_page in memory for tests about memory mapping. This is simply to make sure the whole array is in physical memory for mapping or else the mapping function would fail due to having nothing to map. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
ba94780662
commit
1203289143
1 changed files with 2 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <sys/mem_manage.h>
|
||||
#include <toolchain.h>
|
||||
#include <mmu.h>
|
||||
#include <linker/sections.h>
|
||||
|
||||
/* 32-bit IA32 page tables have no mechanism to restrict execution */
|
||||
#if defined(CONFIG_X86) && !defined(CONFIG_X86_64) && !defined(CONFIG_X86_PAE)
|
||||
|
@ -17,6 +18,7 @@
|
|||
#define BASE_FLAGS (K_MEM_CACHE_WB)
|
||||
volatile bool expect_fault;
|
||||
|
||||
__pinned_noinit
|
||||
static uint8_t __aligned(CONFIG_MMU_PAGE_SIZE)
|
||||
test_page[2 * CONFIG_MMU_PAGE_SIZE];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue