aboutsummaryrefslogtreecommitdiff
path: root/platform/ext
diff options
context:
space:
mode:
authorRaef Coles <raef.coles@arm.com>2021-10-07 13:10:23 +0100
committerDavid Hu <david.hu@arm.com>2021-10-12 05:30:27 +0200
commit79bbd956da64fab1cab454842f0a374748d97053 (patch)
tree246c5554c0e57b3d980f688bbf68136f290e0022 /platform/ext
parent9846bef4f32f8fb90287356125a780d4d3b5d45a (diff)
downloadtrusted-firmware-m-79bbd956da64fab1cab454842f0a374748d97053.tar.gz
Platform: Fix nucleo_l552ze_q flash layout
Fix errors added in recent OTP HAL patches. Change-Id: I07f4a05514daf74a169f8ca372681b3604d191e8 Signed-off-by: Raef Coles <raef.coles@arm.com>
Diffstat (limited to 'platform/ext')
-rw-r--r--platform/ext/target/stm/nucleo_l552ze_q/include/flash_layout.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/platform/ext/target/stm/nucleo_l552ze_q/include/flash_layout.h b/platform/ext/target/stm/nucleo_l552ze_q/include/flash_layout.h
index b2a6051438..5bc0a5c7d1 100644
--- a/platform/ext/target/stm/nucleo_l552ze_q/include/flash_layout.h
+++ b/platform/ext/target/stm/nucleo_l552ze_q/include/flash_layout.h
@@ -26,7 +26,7 @@
*
* Flash layout on nucleo_l552ze_q with BL2 (multiple image boot):
*
- * 0x0000_0000 BL2 - MCUBoot (72 KB)
+ * 0x0000_0000 BL2 - MCUBoot (38 KB)
* 0x0000_e000 OTP / NV counters area (8 KB)
* 0x0001_0000 Secure Storage Area (8 KB)
* 0x0001_2000 Internal Trusted Storage Area (8 KB)
@@ -37,7 +37,7 @@
*
* Flash layout on nucleo_l552ze_q with BL2 (multiple image boot, layout for test):
* No Firmware update , ITS, PS in RAM.
- * 0x0000_0000 BL2 - MCUBoot (72 KB)
+ * 0x0000_0000 BL2 - MCUBoot (38 KB)
* 0x0000_e000 OTP / NV counters area area (8 KB)
* 0x0001_0000 Secure Storage Area (8 KB)
* 0x0001_2000 Internal Trusted Storage Area (8 KB)
@@ -73,17 +73,17 @@
/* scratch area */
#define FLASH_AREA_SCRATCH_OFFSET (FLASH_AREA_BL2_NOHDP_OFFSET+FLASH_AREA_BL2_NOHDP_SIZE)
-#define FLASH_AREA_SCRATCH_SIZE (0x2000)
-/* according to test flash layout can change */
-#if defined(FLASH_LAYOUT_FOR_TEST)
+#define FLASH_AREA_SCRATCH_SIZE (0x0)
/* OTP_definitions */
#define FLASH_OTP_NV_COUNTERS_SECTOR_SIZE FLASH_AREA_IMAGE_SECTOR_SIZE
-#define FLASH_OTP_NV_COUNTERS_AREA_OFFSET (FLASH_ITS_AREA_OFFSET + \
- FLASH_ITS_AREA_SIZE)
+#define FLASH_OTP_NV_COUNTERS_AREA_OFFSET (FLASH_AREA_SCRATCH_OFFSET + \
+ FLASH_AREA_SCRATCH_SIZE)
#define FLASH_OTP_NV_COUNTERS_AREA_SIZE (FLASH_OTP_NV_COUNTERS_SECTOR_SIZE + \
FLASH_OTP_NV_COUNTERS_SECTOR_SIZE)
+/* according to test flash layout can change */
+#if defined(FLASH_LAYOUT_FOR_TEST)
/* fix me with test config PS and ITS in RAM */
/* Secure Storage (PS) Service definitions */
#define FLASH_PS_AREA_SIZE (0x2000)
@@ -103,11 +103,6 @@
#define FLASH_AREA_0_SIZE (FLASH_S_PARTITION_SIZE)
#else
-/* OTP_definitions */
-#define FLASH_OTP_NV_COUNTERS_AREA_OFFSET (FLASH_ITS_AREA_OFFSET + \
- FLASH_ITS_AREA_SIZE)
-#define FLASH_OTP_NV_COUNTERS_SECTOR_SIZE FLASH_AREA_IMAGE_SECTOR_SIZE
-
/* fix me with test config PS and ITS in RAM */
/* Secure Storage (PS) Service definitions */
#define FLASH_PS_AREA_SIZE (0x2000)
@@ -150,8 +145,6 @@
#define MCUBOOT_MAX_IMG_SECTORS ((2 * FLASH_PARTITION_SIZE) / \
FLASH_AREA_IMAGE_SECTOR_SIZE)
-#define FLASH_OTP_NV_COUNTERS_AREA_SIZE (FLASH_AREA_IMAGE_SECTOR_SIZE * 2)
-
#define SECURE_IMAGE_OFFSET (0x0)
#define SECURE_IMAGE_MAX_SIZE FLASH_S_PARTITION_SIZE