aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorChris Brand <chris.brand@cypress.com>2020-05-21 16:30:47 -0700
committerDavid Hu <david.hu@arm.com>2020-06-16 03:55:08 +0000
commit2b2154f4a5ec73edb5087c921b875d2a87377cac (patch)
tree65ac2978704e1aff7bce5acdcded6be1b9bcabaf /platform
parentce8d38a83710cddd5c35de54aeacd2bea5b4fcf5 (diff)
downloadtrusted-firmware-m-2b2154f4a5ec73edb5087c921b875d2a87377cac.tar.gz
Platform: PSoC64: Change SMPU regions used
Rather than using SMPU region 10, use 8. Later versions of the bootloader use the higher-numbered SMPU regions. Signed-off-by: Chris Brand <chris.brand@cypress.com> Change-Id: Idac3c9bbbffb1a67c9d12e04d74082f8e0826170
Diffstat (limited to 'platform')
-rw-r--r--platform/ext/target/cypress/psoc64/CMSIS_Driver/Config/RTE_Device.h4
-rw-r--r--platform/ext/target/cypress/psoc64/smpu_config.h30
2 files changed, 17 insertions, 17 deletions
diff --git a/platform/ext/target/cypress/psoc64/CMSIS_Driver/Config/RTE_Device.h b/platform/ext/target/cypress/psoc64/CMSIS_Driver/Config/RTE_Device.h
index 17830710cc..5e38b0cc48 100644
--- a/platform/ext/target/cypress/psoc64/CMSIS_Driver/Config/RTE_Device.h
+++ b/platform/ext/target/cypress/psoc64/CMSIS_Driver/Config/RTE_Device.h
@@ -62,7 +62,7 @@
// <e> MPC (Memory Protection Controller) [Driver_SMPU8]
// <i> Configuration settings for Driver_SMPU8 in component ::Drivers:MPC
-#define RTE_SMPU8 0
+#define RTE_SMPU8 1
// </e> MPC (Memory Protection Controller) [Driver_SMPU8]
// <e> MPC (Memory Protection Controller) [Driver_SMPU9]
@@ -72,7 +72,7 @@
// <e> MPC (Memory Protection Controller) [Driver_SMPU10]
// <i> Configuration settings for Driver_SMPU10 in component ::Drivers:MPC
-#define RTE_SMPU10 1
+#define RTE_SMPU10 0
// </e> MPC (Memory Protection Controller) [Driver_SMPU10]
// <e> MPC (Memory Protection Controller) [Driver_SMPU11]
diff --git a/platform/ext/target/cypress/psoc64/smpu_config.h b/platform/ext/target/cypress/psoc64/smpu_config.h
index 76a8b7e307..152e05db3d 100644
--- a/platform/ext/target/cypress/psoc64/smpu_config.h
+++ b/platform/ext/target/cypress/psoc64/smpu_config.h
@@ -181,7 +181,7 @@
#error "SMPU6_REGIONSIZE should match S_UNPRIV_DATA_SIZE"
#endif
-/* SMPUs 7 and 10 - 160KB of privileged secure data at S_DATA_PRIV_START in SRAM */
+/* SMPUs 7 and 8 - 160KB of privileged secure data at S_DATA_PRIV_START in SRAM */
#define SMPU7_BASE S_RAM_ALIAS(0)
#define SMPU7_REGIONSIZE PROT_SIZE_128KB_BIT_SHIFT
#define SMPU7_SUBREGION_DIS (CY_PROT_SUBREGION_DIS0 | \
@@ -212,11 +212,11 @@
#error "Flash layout has changed - S_DATA_PRIV_START isn't subregion 2 of SMPU7"
#endif
-#define SMPU10_BASE S_RAM_ALIAS(0x20000)
-#define SMPU10_REGIONSIZE PROT_SIZE_64KB_BIT_SHIFT
-#define SMPU10_SLAVE_CONFIG {\
- .address = (void *)SMPU10_BASE, \
- .regionSize = (cy_en_prot_size_t) SMPU10_REGIONSIZE, \
+#define SMPU8_BASE S_RAM_ALIAS(0x20000)
+#define SMPU8_REGIONSIZE PROT_SIZE_64KB_BIT_SHIFT
+#define SMPU8_SLAVE_CONFIG {\
+ .address = (void *)SMPU8_BASE, \
+ .regionSize = (cy_en_prot_size_t) SMPU8_REGIONSIZE, \
.subregions = ALL_ENABLED, \
.userPermission = CY_PROT_PERM_DISABLED, \
.privPermission = CY_PROT_PERM_RW, \
@@ -224,24 +224,24 @@
.pcMatch = false, \
.pcMask = SECURE_PCS_MASK, \
}
-#define SMPU10_MASTER_CONFIG COMMON_SMPU_MASTER_CONFIG
+#define SMPU8_MASTER_CONFIG COMMON_SMPU_MASTER_CONFIG
/* SMPU requires base address aligned to size */
-#if SMPU10_BASE % REGIONSIZE_TO_BYTES(SMPU10_REGIONSIZE)
-#error "Flash layout has changed - SMPU10 needs updating"
+#if SMPU8_BASE % REGIONSIZE_TO_BYTES(SMPU8_REGIONSIZE)
+#error "Flash layout has changed - SMPU8 needs updating"
#endif
/*
- * SMPU10 must immediately follow SMPU7
+ * SMPU8 must immediately follow SMPU7
*/
-#if SMPU10_BASE != (SMPU7_BASE + REGIONSIZE_TO_BYTES(SMPU7_REGIONSIZE))
-#error "Flash layout has changed - SMPU10 doesn't immediately follow SMPU7"
+#if SMPU8_BASE != (SMPU7_BASE + REGIONSIZE_TO_BYTES(SMPU7_REGIONSIZE))
+#error "Flash layout has changed - SMPU8 doesn't immediately follow SMPU7"
#endif
-/* SMPU7 and SMPU10 should exactly cover the privileged secure SRAM */
+/* SMPU7 and SMPU8 should exactly cover the privileged secure SRAM */
#if ((6*REGIONSIZE_TO_BYTES(SMPU7_REGIONSIZE)/8) + \
- REGIONSIZE_TO_BYTES(SMPU10_REGIONSIZE)) != S_PRIV_DATA_SIZE
-#error "SMPU7_REGIONSIZE+SMPU10_REGIONSIZE should match S_PRIV_DATA_SIZE"
+ REGIONSIZE_TO_BYTES(SMPU8_REGIONSIZE)) != S_PRIV_DATA_SIZE
+#error "SMPU7_REGIONSIZE+SMPU8_REGIONSIZE should match S_PRIV_DATA_SIZE"
#endif
#endif /* __SMPU_CONFIG_H__ */