Skip to content

Commit 01ef431

Browse files
authored
Merge pull request #15174 from OpenNuvoton/nuvoton_m2354_tfm_sram-bank_sector-map_scratch
M2354: Fix potential issues in TF-M
2 parents ae2bef4 + d0f7201 commit 01ef431

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

targets/TARGET_NUVOTON/TARGET_M2354/TARGET_TFM/TARGET_NU_M2354/COMPONENT_TFM_S_FW/partition/flash_layout.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
* 0x0010_0000 Secondary image area (2KB):
3232
* 0x0010_0000 Secure image secondary (320KB) (Dummy)
3333
* 0x0015_0000 Non-secure image secondary (576KB) (Dummy)
34-
* 0x001E_0000 Scratch area (4KB) (Dummy)
34+
* 0x001E_0000 Scratch area (16KB) (Dummy)
3535
*
3636
* SDH Flash:
3737
* 0x0000_0000 Secondary image area (896KB)
3838
* 0x0000_0000 Secure image secondary (320KB)
3939
* 0x0005_0000 Non-secure image secondary (576KB)
40-
* 0x0020_0000 Scratch area (4 KB)
40+
* 0x0020_0000 Scratch area (16 KB)
4141
*
4242
* Flash layout on M2354 with BL2 (multiple image boot):
4343
*
@@ -50,12 +50,12 @@
5050
* 0x0007_0000 Non-secure image primary slot (576KB)
5151
* 0x0010_0000 Secure image secondary slot (320KB) (Dummy)
5252
* 0x0015_0000 Non-secure image secondary slot (576KB) (Dummy)
53-
* 0x001E_0000 Scratch area (4KB) (Dummy)
53+
* 0x001E_0000 Scratch area (16KB) (Dummy)
5454
*
5555
* SDH Flash:
5656
* 0x0000_0000 Secure image secondary slot (320KB)
5757
* 0x0010_0000 Non-secure image secondary slot (576KB)
58-
* 0x0020_0000 Scratch area (2 KB)
58+
* 0x0020_0000 Scratch area (16 KB)
5959
*/
6060

6161
/* This header file is included from linker scatter file as well, where only a
@@ -123,13 +123,13 @@
123123
#if NU_UPDATE_STAGE_SDH
124124
#define FLASH_AREA_SCRATCH_ID (FLASH_AREA_2_ID + 1)
125125
#define FLASH_AREA_SCRATCH_OFFSET (0x200000)
126-
#define FLASH_AREA_SCRATCH_SIZE (0x1000)
126+
#define FLASH_AREA_SCRATCH_SIZE (0x4000)
127127
#define FLASH_DEVICE_ID_SCRATCH SDH_FLASH_DEVICE_ID
128128
#define FLASH_DEV_NAME_SCRATCH SDH_FLASH_DEV_NAME
129129
#else
130130
#define FLASH_AREA_SCRATCH_ID (FLASH_AREA_2_ID + 1)
131131
#define FLASH_AREA_SCRATCH_OFFSET (FLASH_AREA_2_OFFSET + FLASH_AREA_2_SIZE)
132-
#define FLASH_AREA_SCRATCH_SIZE (0x1000)
132+
#define FLASH_AREA_SCRATCH_SIZE (0x4000)
133133
#endif
134134

135135
/* The maximum number of status entries supported by the bootloader. */
@@ -181,13 +181,13 @@
181181
#if NU_UPDATE_STAGE_SDH
182182
#define FLASH_AREA_SCRATCH_ID (FLASH_AREA_3_ID + 1)
183183
#define FLASH_AREA_SCRATCH_OFFSET (0x200000)
184-
#define FLASH_AREA_SCRATCH_SIZE (0x1000)
184+
#define FLASH_AREA_SCRATCH_SIZE (0x4000)
185185
#define FLASH_DEVICE_ID_SCRATCH SDH_FLASH_DEVICE_ID
186186
#define FLASH_DEV_NAME_SCRATCH SDH_FLASH_DEV_NAME
187187
#else
188188
#define FLASH_AREA_SCRATCH_ID (FLASH_AREA_3_ID + 1)
189189
#define FLASH_AREA_SCRATCH_OFFSET (FLASH_AREA_3_OFFSET + FLASH_AREA_3_SIZE)
190-
#define FLASH_AREA_SCRATCH_SIZE (0x1000)
190+
#define FLASH_AREA_SCRATCH_SIZE (0x4000)
191191
#endif
192192

193193
/* The maximum number of status entries supported by the bootloader. */

0 commit comments

Comments
 (0)