18#ifndef __RV_GENERIC_H__
19#define __RV_GENERIC_H__
25#define __VSF_HEADER_ONLY_SHOW_ARCH_INFO__
27#undef __VSF_HEADER_ONLY_SHOW_ARCH_INFO__
35#ifndef __LITTLE_ENDIAN
36# define __LITTLE_ENDIAN 1
39# define __BYTE_ORDER __LITTLE_ENDIAN
42#ifndef __VSF_ARCH_SYSTIMER_BITS
43# define __VSF_ARCH_SYSTIMER_BITS 64
47#ifndef VSF_ARCH_SWI_NUM
48# define VSF_ARCH_SWI_NUM 0
53#ifndef VSF_ARCH_CFG_CALLSTACK_TRACE
54# define VSF_ARCH_CFG_CALLSTACK_TRACE DISABLED
59#define vsf_arch_wakeup()
63#if VSF_SYSTIMER_CFG_IMPL_MODE != VSF_SYSTIMER_CFG_IMPL_NONE
64# if VSF_SYSTIMER_CFG_IMPL_MODE == VSF_SYSTIMER_IMPL_TICK_MODE
80 __asm
volatile(
"csrr %0, mstatus" :
"=r"(result) : );
87 __asm
volatile(
"csrrs %0, mstatus, %1" :
"=r"(result) :
"r"(level));
94 __asm
volatile(
"csrrci %0, mstatus, 8" :
"=r"(result) :);
101 __asm
volatile(
"csrrsi %0, mstatus, 8" :
"=r"(result) :);
107 __asm
volatile(
"wfi" : :);
110static VSF_CAL_ALWAYS_INLINE
void vsf_arch_set_stack(
uintptr_t stack)
112 __asm
volatile(
"mv sp, %0" : :
"r"(stack) : );
115static VSF_CAL_ALWAYS_INLINE
uintptr_t vsf_arch_get_stack(
void)
118 __asm
volatile(
"mv %0, sp" :
"=r"(result) : );
122#if VSF_ARCH_CFG_CALLSTACK_TRACE == ENABLED
vsf_gint_state_t vsf_disable_interrupt(void)
Definition arm9_generic.c:176
vsf_gint_state_t vsf_get_interrupt(void)
Definition arm9_generic.c:164
void vsf_arch_sleep(uint32_t mode)
Definition arm9_generic.c:193
vsf_gint_state_t vsf_enable_interrupt(void)
Definition arm9_generic.c:181
vsf_gint_state_t vsf_set_interrupt(vsf_gint_state_t level)
Definition arm9_generic.c:169
uint64_t vsf_systimer_tick_t
Definition cortex_a_generic.h:73
unsigned int uint32_t
Definition lvgl.h:43
signed int int32_t
Definition lvgl.h:44
int32_t vsf_systimer_tick_signed_t
Definition mcs51_generic.h:58
uint32_t vsf_gint_state_t
Definition rv_generic.h:71
void vsf_arch_add_text_region(vsf_arch_text_region_t *region)
Definition cortex_m_generic.c:523
uint_fast16_t vsf_arch_get_callstack(uintptr_t sp, uintptr_t *callstack, uint_fast16_t callstack_num)
Definition cortex_m_generic.c:533
uint32_t uintptr_t
Definition stdint.h:38
unsigned int uint_fast32_t
Definition stdint.h:27
unsigned long long uint64_t
Definition stdint.h:11
unsigned short uint_fast16_t
Definition stdint.h:25
Definition vsf_arch_abstraction.h:60