aboutsummaryrefslogtreecommitdiff
path: root/platform/include/tfm_spm_hal.h
diff options
context:
space:
mode:
authorMate Toth-Pal <mate.toth-pal@arm.com>2018-10-02 12:55:47 +0200
committerMate Toth-Pal <mate.toth-pal@arm.com>2019-07-09 11:49:17 +0200
commit4341de0dd2c31b2e28bfaf588602ab9180ef7f40 (patch)
tree0bb64e6216e3183269d928cbae3f09f1af21f3e0 /platform/include/tfm_spm_hal.h
parentba9daa3fcd95173f691f01e19572e00e7173f7dd (diff)
downloadtrusted-firmware-m-4341de0dd2c31b2e28bfaf588602ab9180ef7f40.tar.gz
Core: Initial implementation of sec IRQ handling
This commit makes possible for partitions to define IRQ handlers that are executed in case of an interrupt is triggered, with the isolation required by TFM_LVL settings. Detailed changes: - Add template files to generate code for configuring IRQs, and set up IRQ handlers based on information provided in the partition's manifest - Add capability to Core to isolate the IRQ handlers - Add documentation Change-Id: I0e46b9a41fb4e20ca4c398acf5ce1d4027e8597f Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
Diffstat (limited to 'platform/include/tfm_spm_hal.h')
-rw-r--r--platform/include/tfm_spm_hal.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/platform/include/tfm_spm_hal.h b/platform/include/tfm_spm_hal.h
index 3458b17185..cb54186007 100644
--- a/platform/include/tfm_spm_hal.h
+++ b/platform/include/tfm_spm_hal.h
@@ -28,6 +28,11 @@
*/
struct tfm_spm_partition_platform_data_t;
+enum irq_target_state_t {
+ TFM_IRQ_TARGET_STATE_SECURE,
+ TFM_IRQ_TARGET_STATE_NON_SECURE,
+};
+
#if defined (TFM_PSA_API) || (TFM_LVL != 1)
/**
* \brief Holds SPM db fields that define the memory regions used by a
@@ -160,6 +165,42 @@ uint32_t tfm_spm_hal_get_ns_entry_point(void);
*/
void tfm_spm_hal_set_secure_irq_priority(int32_t irq_line, uint32_t priority);
+/**
+ * \brief Clears a pending IRQ
+ *
+ * \param[in] irq_line The IRQ to clear pending for.
+ */
+void tfm_spm_hal_clear_pending_irq(int32_t irq_line);
+
+/**
+ * \brief Enables an IRQ
+ *
+ * \param[in] irq_line The IRQ to be enabled.
+ */
+void tfm_spm_hal_enable_irq(int32_t irq_line);
+
+/**
+ * \brief Disables an IRQ
+ *
+ * \param[in] irq_line The IRQ to be disabled
+ */
+void tfm_spm_hal_disable_irq(int32_t irq_line);
+
+/**
+ * \brief Set the target state of an IRQ
+ *
+ * \param[in] irq_line The IRQ to set the priority for.
+ * \param[in] target_state Target state to ret for the IRQ.
+ *
+ * \return TFM_IRQ_TARGET_STATE_SECURE if interrupt is assigned
+ * to Secure
+ * TFM_IRQ_TARGET_STATE_NON_SECURE if interrupt is
+ * assigned to Non-Secure
+ */
+enum irq_target_state_t tfm_spm_hal_set_irq_target_state(
+ int32_t irq_line,
+ enum irq_target_state_t target_state);
+
#if (TFM_LVL != 1) && !defined(TFM_PSA_API)
/**
* \brief Configure the sandbox for a partition.