forked from Imagelibrary/rtems
ARM: PR2042: Provide stub for ARMv6-M
This commit is contained in:
@@ -76,7 +76,6 @@ extern "C" {
|
|||||||
|
|
||||||
#elif defined(__ARM_ARCH_6M__)
|
#elif defined(__ARM_ARCH_6M__)
|
||||||
# define CPU_MODEL_NAME "ARMv6M"
|
# define CPU_MODEL_NAME "ARMv6M"
|
||||||
# define ARM_MULTILIB_ARCH_V7M
|
|
||||||
|
|
||||||
#elif defined(__ARM_ARCH_7__)
|
#elif defined(__ARM_ARCH_7__)
|
||||||
# define CPU_MODEL_NAME "ARMv7"
|
# define CPU_MODEL_NAME "ARMv7"
|
||||||
|
|||||||
@@ -246,6 +246,8 @@ typedef struct {
|
|||||||
void *register_lr;
|
void *register_lr;
|
||||||
void *register_sp;
|
void *register_sp;
|
||||||
uint32_t isr_nest_level;
|
uint32_t isr_nest_level;
|
||||||
|
#else
|
||||||
|
void *register_sp;
|
||||||
#endif
|
#endif
|
||||||
} Context_Control;
|
} Context_Control;
|
||||||
|
|
||||||
@@ -259,9 +261,10 @@ extern uint32_t arm_cpu_mode;
|
|||||||
|
|
||||||
static inline uint32_t arm_interrupt_disable( void )
|
static inline uint32_t arm_interrupt_disable( void )
|
||||||
{
|
{
|
||||||
|
uint32_t level;
|
||||||
|
|
||||||
#if defined(ARM_MULTILIB_ARCH_V4)
|
#if defined(ARM_MULTILIB_ARCH_V4)
|
||||||
uint32_t arm_switch_reg;
|
uint32_t arm_switch_reg;
|
||||||
uint32_t level;
|
|
||||||
|
|
||||||
__asm__ volatile (
|
__asm__ volatile (
|
||||||
ARM_SWITCH_TO_ARM
|
ARM_SWITCH_TO_ARM
|
||||||
@@ -271,10 +274,7 @@ static inline uint32_t arm_interrupt_disable( void )
|
|||||||
ARM_SWITCH_BACK
|
ARM_SWITCH_BACK
|
||||||
: [arm_switch_reg] "=&r" (arm_switch_reg), [level] "=&r" (level)
|
: [arm_switch_reg] "=&r" (arm_switch_reg), [level] "=&r" (level)
|
||||||
);
|
);
|
||||||
|
|
||||||
return level;
|
|
||||||
#elif defined(ARM_MULTILIB_ARCH_V7M)
|
#elif defined(ARM_MULTILIB_ARCH_V7M)
|
||||||
uint32_t level;
|
|
||||||
uint32_t basepri = 0x80;
|
uint32_t basepri = 0x80;
|
||||||
|
|
||||||
__asm__ volatile (
|
__asm__ volatile (
|
||||||
@@ -283,9 +283,11 @@ static inline uint32_t arm_interrupt_disable( void )
|
|||||||
: [level] "=&r" (level)
|
: [level] "=&r" (level)
|
||||||
: [basepri] "r" (basepri)
|
: [basepri] "r" (basepri)
|
||||||
);
|
);
|
||||||
|
#else
|
||||||
|
level = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
return level;
|
return level;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void arm_interrupt_enable( uint32_t level )
|
static inline void arm_interrupt_enable( uint32_t level )
|
||||||
@@ -564,11 +566,11 @@ typedef struct {
|
|||||||
|
|
||||||
typedef CPU_Exception_frame CPU_Interrupt_frame;
|
typedef CPU_Exception_frame CPU_Interrupt_frame;
|
||||||
|
|
||||||
#elif defined(ARM_MULTILIB_ARCH_V7M)
|
#else /* !defined(ARM_MULTILIB_ARCH_V4) */
|
||||||
|
|
||||||
typedef void CPU_Interrupt_frame;
|
typedef void CPU_Interrupt_frame;
|
||||||
|
|
||||||
#endif /* defined(ARM_MULTILIB_ARCH_V7M) */
|
#endif /* !defined(ARM_MULTILIB_ARCH_V4) */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user