19#ifndef ZEPHYR_INCLUDE_ARCH_RISCV_THREAD_H_
20#define ZEPHYR_INCLUDE_ARCH_RISCV_THREAD_H_
25#if !defined(RV_FP_TYPE) && defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
26#ifdef CONFIG_CPU_HAS_FPU_DOUBLE_PRECISION
27#define RV_FP_TYPE uint64_t
29#define RV_FP_TYPE uint32_t
33#ifdef CONFIG_RISCV_PMP
35#define RISCV_PMP_CFG_NUM (CONFIG_PMP_SLOTS >> 3)
37#define RISCV_PMP_CFG_NUM (CONFIG_PMP_SLOTS >> 2)
41#ifdef CONFIG_PMP_STACK_GUARD
49#define PMP_REGION_NUM_FOR_STACK_GUARD 6
50#define PMP_CFG_CSR_NUM_FOR_STACK_GUARD 2
63#if !defined(CONFIG_RISCV_ISA_RV32E)
76#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
92typedef struct _callee_saved _callee_saved_t;
94#define PMP_M_MODE_SLOTS 8
97#ifdef CONFIG_USERSPACE
98 unsigned long priv_stack_start;
99 unsigned long u_mode_pmpaddr_regs[CONFIG_PMP_SLOTS];
100 unsigned long u_mode_pmpcfg_regs[CONFIG_PMP_SLOTS /
sizeof(
unsigned long)];
101 unsigned int u_mode_pmp_domain_offset;
102 unsigned int u_mode_pmp_end_index;
103 unsigned int u_mode_pmp_update_nr;
105#ifdef CONFIG_PMP_STACK_GUARD
106 unsigned int m_mode_pmp_end_index;
112typedef struct _thread_arch _thread_arch_t;
#define RV_FP_TYPE
Definition: thread.h:29
#define PMP_M_MODE_SLOTS
Definition: thread.h:94
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90