|
Zephyr Project API
3.1.0
A Scalable Open Source RTOS
|
#include <ztest.h>#include <zephyr/sys/mem_manage.h>#include <zephyr/toolchain.h>#include <mmu.h>#include <zephyr/linker/sections.h>Macros | |
| #define | BASE_FLAGS (K_MEM_CACHE_WB) |
| #define | BUF_SIZE 5003 |
| #define | BUF_OFFSET 1238 |
Functions | |
| void | k_sys_fatal_error_handler (unsigned int reason, const z_arch_esf_t *pEsf) |
| Fatal error policy handler. More... | |
| void | test_z_phys_map_rw (void) |
| void | test_z_phys_map_exec (void) |
| void | test_z_phys_map_side_effect (void) |
| void | test_z_phys_unmap (void) |
| void | test_k_mem_map_unmap (void) |
| void | test_k_mem_map_guard_before (void) |
| void | test_k_mem_map_guard_after (void) |
| void | test_k_mem_map_exhaustion (void) |
| void | test_main (void) |
Variables | |
| volatile bool | expect_fault |
| static __pinned_noinit uint8_t | test_page [2 *CONFIG_MMU_PAGE_SIZE] |
| #define BASE_FLAGS (K_MEM_CACHE_WB) |
| #define BUF_OFFSET 1238 |
| #define BUF_SIZE 5003 |
| void test_k_mem_map_exhaustion | ( | void | ) |
| void test_k_mem_map_guard_after | ( | void | ) |
Test that the "after" guard page is in place for k_mem_map().
| void test_k_mem_map_guard_before | ( | void | ) |
Test that the "before" guard page is in place for k_mem_map().
| void test_k_mem_map_unmap | ( | void | ) |
Basic k_mem_map() and k_mem_unmap() functionality
Does not exercise K_MEM_MAP_* control flags, just default behavior
| void test_main | ( | void | ) |
test case main entry
| void test_z_phys_map_exec | ( | void | ) |
Show that mapping with/without K_MEM_PERM_EXEC works as expected
| void test_z_phys_map_rw | ( | void | ) |
Show that mapping an irregular size buffer works and RW flag is respected
| void test_z_phys_map_side_effect | ( | void | ) |
Show that memory mapping doesn't have unintended side effects
| void test_z_phys_unmap | ( | void | ) |
Test that z_phys_unmap() unmaps the memory and it is no longer accessible afterwards.
| volatile bool expect_fault |
|
static |