Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
main.c File Reference
#include <kernel_internal.h>
#include <zephyr/tc_util.h>
#include <zephyr/ztest.h>

Macros

#define PMP_TEST_FUNC_IDX   0
 

Typedefs

typedef void(* pmp_test_func_t) (void)
 

Functions

void k_sys_fatal_error_handler (unsigned int reason, const struct arch_esf *pEsf)
 Fatal error policy handler.
 
static void check_isr_stack_guard (void)
 
static void check_main_stack_guard (void)
 
void test_pmp (void)
 Verify RISC-V specific PMP stack guard regions.
 
 ZTEST_SUITE (riscv_pmp_no_mt, NULL, NULL, NULL, NULL, NULL)
 

Variables

static volatile ZTEST_BMEM bool valid_fault
 
static const pmp_test_func_t pmp_test_func []
 

Macro Definition Documentation

◆ PMP_TEST_FUNC_IDX

#define PMP_TEST_FUNC_IDX   0

Typedef Documentation

◆ pmp_test_func_t

typedef void(* pmp_test_func_t) (void)

Function Documentation

◆ check_isr_stack_guard()

static void check_isr_stack_guard ( void )
static

◆ check_main_stack_guard()

static void check_main_stack_guard ( void )
static

◆ test_pmp()

void test_pmp ( void )

Verify RISC-V specific PMP stack guard regions.

Manually write to the protected stack region to trigger fatal error.

◆ ZTEST_SUITE()

ZTEST_SUITE ( riscv_pmp_no_mt ,
NULL ,
NULL ,
NULL ,
NULL ,
NULL  )

Variable Documentation

◆ pmp_test_func

const pmp_test_func_t pmp_test_func[]
static
Initial value:
= {
}
static void check_isr_stack_guard(void)
Definition main.c:45
static void check_main_stack_guard(void)
Definition main.c:50

◆ valid_fault

volatile ZTEST_BMEM bool valid_fault
static