git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11356 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
isiora 2018-01-19 16:50:34 +00:00
parent ade8ceca08
commit 835954edca
2 changed files with 8 additions and 8 deletions

View File

@ -433,21 +433,20 @@ static inline bool port_is_isr_context(void) {
/** /**
* @brief Kernel-lock action. * @brief Kernel-lock action.
* @details In this port it disables the FIQ sources and keeps IRQ sources * @details In this port it disables the FIQ sources and keeps IRQ state.
* disabled.
*/ */
static inline void port_lock(void) { static inline void port_lock(void) {
__asm volatile ("msr CPSR_c, #0xDF" : : : "memory"); __asm volatile ("cpsid f" : : : "memory");
} }
/** /**
* @brief Kernel-unlock action. * @brief Kernel-unlock action.
* @details In this port it enables the FIQ sources. * @details In this port it enables the FIQ sources and keeps IRQ state.
*/ */
static inline void port_unlock(void) { static inline void port_unlock(void) {
__asm volatile ("msr CPSR_c, #0x9F" : : : "memory"); __asm volatile ("cpsie f" : : : "memory");
} }
/** /**
@ -488,11 +487,11 @@ static inline void port_suspend(void) {
/** /**
* @brief Enables all the interrupt sources. * @brief Enables all the interrupt sources.
* @note In this port it enables the FIQ sources. * @note In this port it enables the FIQ and IRQ sources.
*/ */
static inline void port_enable(void) { static inline void port_enable(void) {
__asm volatile ("msr CPSR_c, #0x9F" : : : "memory"); __asm volatile ("msr CPSR_c, #0x1F" : : : "memory");
} }
/** /**

View File

@ -99,6 +99,7 @@ void smcInit(void) {
/** /**
* @brief The trusted service call entry point. * @brief The trusted service call entry point.
* @pre The foreign interrupts are disabled.
* @post A request is passed to the thread registered for the service. * @post A request is passed to the thread registered for the service.
* @post The service thread is resumed. * @post The service thread is resumed.
* *
@ -184,7 +185,7 @@ msg_t smcServiceWaitRequest(smc_service_t *svcp)
chSysLock(); chSysLock();
if (_ns_thread) { if (_ns_thread) {
/* Ack previous service invocation */ /* Ack the previous service invocation */
chThdResumeI(&_ns_thread, MSG_OK); chThdResumeI(&_ns_thread, MSG_OK);
} }
r = chThdSuspendTimeoutS(&svcp->svct, TIME_INFINITE); r = chThdSuspendTimeoutS(&svcp->svct, TIME_INFINITE);