Skip to content

Commit

Permalink
tests: protection: add riscv support
Browse files Browse the repository at this point in the history
Execute tests are disabled for RISC-V because is isn't able
to set an execution restriction. From RISC-V documentation:
  "Instruction address-translation and protection are unaffected
  by the setting of MPRV"
MPRV is used to apply memory protection restriction when CPU is
running in machine mode (kernel).

Signed-off-by: Alexandre Mergnat <[email protected]>
  • Loading branch information
amergnat authored and nashif committed Nov 9, 2020
1 parent 39208c2 commit 0a5b259
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/kernel/mem_protect/protection/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
#define SKIP_EXECUTE_TESTS
#endif

/* RISC-V have no mechanism to restrict execution */
#if defined(CONFIG_RISCV)
#define SKIP_EXECUTE_TESTS
#endif

#define INFO(fmt, ...) printk(fmt, ##__VA_ARGS__)

void k_sys_fatal_error_handler(unsigned int reason, const z_arch_esf_t *pEsf)
Expand Down

0 comments on commit 0a5b259

Please sign in to comment.