aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/ports/ARMCAx-TZ
diff options
context:
space:
mode:
authorisiora <none@example.com>2018-01-19 16:50:34 +0000
committerisiora <none@example.com>2018-01-19 16:50:34 +0000
commit835954edca02c5457a8f73af77d8b8bc8d7ccd8b (patch)
tree7cc1a7038191a63222064824f3969a4be175258a /os/common/ports/ARMCAx-TZ
parentade8ceca0843c0e350a6396c8da114ec669a0658 (diff)
downloadChibiOS-835954edca02c5457a8f73af77d8b8bc8d7ccd8b.tar.gz
ChibiOS-835954edca02c5457a8f73af77d8b8bc8d7ccd8b.tar.bz2
ChibiOS-835954edca02c5457a8f73af77d8b8bc8d7ccd8b.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11356 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/common/ports/ARMCAx-TZ')
-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);