#pragma once // The SW IRQ is ID 129 on AM263x. Override it if needed. #ifndef RT_VIM_SW_IRQ #define RT_VIM_SW_IRQ 129 #endif // The SW IRQ must have the lowest priority. #define RT_VIM_SW_IRQ_PRIORITY 15 #define RT_VIM 0x50F00000U #define RT_VIM_IRQVEC_OFFSET 0x18 #define RT_VIM_FIQVEC_OFFSET 0x1C #define RT_VIM_IRQPRIMSK_OFFSET 0x28 #define RT_VIM_GROUPS_OFFSET 0x400 #define RT_VIM_GROUP_RAW_OFFSET 0x0 #define RT_VIM_GROUP_STS_OFFSET 0x4 #ifndef __ASSEMBLER__ #include #include static inline void vic_syscall_pend(void) { vim_set(RT_VIM_SW_IRQ); } rt_static_assert(VIM_BASE == RT_VIM, "RT_VIM is incorrect"); rt_static_assert(offsetof(struct vim, irqvec) == RT_VIM_IRQVEC_OFFSET, "RT_VIM_IRQVEC_OFFSET is incorrect"); rt_static_assert(offsetof(struct vim, fiqvec) == RT_VIM_FIQVEC_OFFSET, "RT_VIM_FIQVEC_OFFSET is incorrect"); rt_static_assert(offsetof(struct vim, irqprimsk) == RT_VIM_IRQPRIMSK_OFFSET, "RT_VIM_IRQPRIMSK_OFFSET is incorrect"); rt_static_assert(offsetof(struct vim, groups) == RT_VIM_GROUPS_OFFSET, "RT_VIM_GROUPS_OFFSET is incorrect"); rt_static_assert(offsetof(struct vim_group, raw) == RT_VIM_GROUP_RAW_OFFSET, "RT_VIM_GROUP_RAW_OFFSET is incorrect"); rt_static_assert(offsetof(struct vim_group, sts) == RT_VIM_GROUP_STS_OFFSET, "RT_VIM_GROUP_STS_OFFSET is incorrect"); #endif // !defined(__ASSEMBLER__)