aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/common/ports/ARMCAx-TZ/chcore.h13
-rw-r--r--os/common/ports/ARMCAx-TZ/chsmc.c3
2 files changed, 8 insertions, 8 deletions
diff --git a/os/common/ports/ARMCAx-TZ/chcore.h b/os/common/ports/ARMCAx-TZ/chcore.h
index e639ae9f4..9d3790338 100644
--- a/os/common/ports/ARMCAx-TZ/chcore.h
+++ b/os/common/ports/ARMCAx-TZ/chcore.h
@@ -433,21 +433,20 @@ static inline bool port_is_isr_context(void) {
/**
* @brief Kernel-lock action.
- * @details In this port it disables the FIQ sources and keeps IRQ sources
- * disabled.
+ * @details In this port it disables the FIQ sources and keeps IRQ state.
*/
static inline void port_lock(void) {
- __asm volatile ("msr CPSR_c, #0xDF" : : : "memory");
+ __asm volatile ("cpsid f" : : : "memory");
}
/**
* @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) {
- __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.
- * @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) {
- __asm volatile ("msr CPSR_c, #0x9F" : : : "memory");
+ __asm volatile ("msr CPSR_c, #0x1F" : : : "memory");
}
/**
diff --git a/os/common/ports/ARMCAx-TZ/chsmc.c b/os/common/ports/ARMCAx-TZ/chsmc.c
index 8aead3865..f24a77716 100644
--- a/os/common/ports/ARMCAx-TZ/chsmc.c
+++ b/os/common/ports/ARMCAx-TZ/chsmc.c
@@ -99,6 +99,7 @@ void smcInit(void) {
/**
* @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 The service thread is resumed.
*
@@ -184,7 +185,7 @@ msg_t smcServiceWaitRequest(smc_service_t *svcp)
chSysLock();
if (_ns_thread) {
- /* Ack previous service invocation */
+ /* Ack the previous service invocation */
chThdResumeI(&_ns_thread, MSG_OK);
}
r = chThdSuspendTimeoutS(&svcp->svct, TIME_INFINITE);