aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvinash Mehta <avinash.mehta@arm.com>2019-12-16 12:55:04 +0000
committerTushar Khandelwal <tushar.khandelwal@arm.com>2020-01-24 14:41:28 +0000
commit2569f6de92e6039717200f196ec0a6b77a38556d (patch)
treeb51e3fff437024f1d89fd101fe87e625b5e931f3
parente4acc1854c98d41fc2cf262ec753bf6bb671551a (diff)
add API for disabling txn termination errorsCORSTONE-700-2020.02.10
This change disables the error generation in response for transaction generating a Configuration Access Error, this in turn enables the tamper interrupt to be generated as otherwise HardFault is generated along with tamper interrup and the PC ends up in HardFault handler. Change-Id: Icd065f6482f964347914297079c4f6299045a61c Signed-off-by: Avinash Mehta <avinash.mehta@arm.com>
-rwxr-xr-xmodule/firewall/src/firewall.c7
-rwxr-xr-xmodule/firewall/src/mod_firewall.c5
-rwxr-xr-xproduct/corstone-700/include/firewall.h6
3 files changed, 18 insertions, 0 deletions
diff --git a/module/firewall/src/firewall.c b/module/firewall/src/firewall.c
index be91e61..1038434 100755
--- a/module/firewall/src/firewall.c
+++ b/module/firewall/src/firewall.c
@@ -192,6 +192,13 @@ void fc_pe_disable(void)
;
}
+void fc_disable_txn_term_error(void *base_addr)
+{
+ uint32_t *ptr = (uint32_t *)base_addr;
+ /* Write 0 to ERR bit field of FW_CTRL register */
+ *ptr = 0;
+}
+
void fc_select_region(uint32_t region_id)
{
struct _firewall_pe_rwe_reg_map_t *ptr =
diff --git a/module/firewall/src/mod_firewall.c b/module/firewall/src/mod_firewall.c
index 0b35874..f3bbf0d 100755
--- a/module/firewall/src/mod_firewall.c
+++ b/module/firewall/src/mod_firewall.c
@@ -418,6 +418,11 @@ static int firewall_init(
if (!config->firewall_initialized) {
mpu_configure();
se_firewall_setup();
+ /**
+ * Disable error generation in response for transaction generating a
+ * Configuration Access Error
+ */
+ fc_disable_txn_term_error((void *)HOST_FIREWALL_BASE);
host_firewall_setup();
}
return FWK_SUCCESS;
diff --git a/product/corstone-700/include/firewall.h b/product/corstone-700/include/firewall.h
index feabbb4..13c9b33 100755
--- a/product/corstone-700/include/firewall.h
+++ b/product/corstone-700/include/firewall.h
@@ -193,6 +193,12 @@ void fc_pe_enable(void);
void fc_pe_disable(void);
/**
+ * \brief Disables the error generation in response for transaction generating
+ * a Configuration Access Error
+ */
+void fc_disable_txn_term_error(void *base_addr);
+
+/**
* \brief Selects a region in the selected Firewall Component
*/
void fc_select_region(uint32_t region_id);