#pragma once /* The SSI should be routed to channel 126, which is the lowest priority. * This maps to bit 30 of the REQENA*3 registers. * NOTE: this is not the SSI's default VIM channel. */ #ifndef RT_VIM_SSI_CHANNEL #define RT_VIM_SSI_CHANNEL 126 #endif #define RT_VIM_REQENASET 0xFFFFFE30 #define RT_VIM_REQENACLR 0xFFFFFE40 #ifndef __ASSEMBLER__ #include #include #include static volatile uint32_t *const SYS_SSIR1 = (volatile uint32_t *)0xFFFFFFB0UL; #define SYS_SSIR1_KEY (UINT32_C(0x75) << 8) static inline void vic_syscall_pend(void) { *SYS_SSIR1 = SYS_SSIR1_KEY; } rt_static_assert(offsetof(struct vim, reqenaset) + VIM_BASE == RT_VIM_REQENASET, "RT_VIM_REQENASET is incorrect"); rt_static_assert(offsetof(struct vim, reqenaclr) + VIM_BASE == RT_VIM_REQENACLR, "RT_VIM_REQENACLR is incorrect"); #endif // !defined(__ASSEMBLER__)