Skip to content

Commit c1e6d1a

Browse files
committed
ARM_MUSCA_S1: Partition update
1 parent 685bc3c commit c1e6d1a

File tree

5 files changed

+41
-45
lines changed

5 files changed

+41
-45
lines changed

targets/TARGET_ARM_SSG/TARGET_MUSCA_S1/partition/flash_layout.h

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
2-
* Copyright (c) 2018-2020 Arm Limited. All rights reserved.
2+
* Copyright (c) 2018-2021 Arm Limited. All rights reserved.
3+
* Copyright (c) 2020 Cypress Semiconductor Corporation. All rights reserved.
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*
@@ -21,15 +22,18 @@
2122

2223
/* Flash layout on Musca-S1 with BL2(multiple image boot, boot from MRAM):
2324
* 0x0A00_0000 BL2 - MCUBoot(128 KB)
24-
* 0x0A02_0000 Secure image primary (320 KB)
25-
* 0x0A07_0000 Non-secure image primary (512 KB)
26-
* 0x0A0F_0000 Secure image secondary (320 KB)
27-
* 0x0A14_0000 Non-secure image secondary (512 KB)
28-
* 0x0A1C_0000 Scratch Area (16 KB)
29-
* 0x0A1C_4000 Secure Storage Area (20 KB)
30-
* 0x0A1C_9000 Internal Trusted Storage Area (16 KB)
31-
* 0x0A1C_D000 NV counters area (4 KB)
32-
* 0x0A1C_E000 Unused
25+
* 0x0A02_0000 Secure image primary (384 KB)
26+
* 0x0A08_0000 Non-secure image primary (512 KB)
27+
* 0x0A10_0000 Secure image secondary (384 KB)
28+
* 0x0A16_0000 Non-secure image secondary (512 KB)
29+
* 0x0A1E_0000 Scratch Area (16 KB)
30+
* 0x0A1E_4000 Protected Storage Area (20 KB)
31+
* 0x0A1E_9000 Internal Trusted Storage Area (16 KB)
32+
* 0x0A1E_D000 NV counters area (4 KB)
33+
* 0x0A1E_E000 TF-M key area (256 bytes) This area is referred to in
34+
* /lib/ext/cryptocell-312-runtime/shared/hw/include/musca_s1/ \
35+
* dx_reg_base_host.h Do not change one without changing the other.
36+
* 0x0A1E_E100 Unused
3337
*
3438
* Flash layout on Musca-S1 with BL2(single image boot):
3539
* 0x0A00_0000 BL2 - MCUBoot(128 KB)
@@ -39,17 +43,18 @@
3943
* 0x0A10_0000 Secondary image area (896 KB):
4044
* 0x0A10_0000 Secure image secondary (384 KB)
4145
* 0x0A16_0000 Non-secure image secondary (512 KB)
42-
* 0x0A1E_0000 Secure Storage Area (20 KB)
43-
* 0x0A1E_5000 Internal Trusted Storage Area (16 KB)
44-
* 0x0A1E_9000 NV counters area (4 KB)
45-
* 0x0A1E_A000 TF-M key area (256 bytes) This area is referred to in
46+
* 0x0A1E_0000 Scratch Area (16 KB)
47+
* 0x0A1E_4000 Protected Storage Area (20 KB)
48+
* 0x0A1E_9000 Internal Trusted Storage Area (16 KB)
49+
* 0x0A1E_D000 NV counters area (4 KB)
50+
* 0x0A1E_E000 TF-M key area (256 bytes) This area is referred to in
4651
* /lib/ext/cryptocell-312-runtime/shared/hw/include/musca_s1/ \
4752
* dx_reg_base_host.h Do not change one without changing the other.
48-
* 0x0A1E_A100 Unused
53+
* 0x0A1E_E100 Unused
4954
*
5055
* Flash layout on Musca-S1 without BL2:
5156
* 0x0A00_0000 Secure image
52-
* 0x0A07_0000 Non-secure image
57+
* 0x0A08_0000 Non-secure image
5358
*/
5459

5560
/* This header file is included from linker scatter file as well, where only a
@@ -137,17 +142,17 @@
137142
#error "Only MCUBOOT_IMAGE_NUMBER 1 and 2 are supported!"
138143
#endif /* MCUBOOT_IMAGE_NUMBER */
139144

140-
/* Note: FLASH_SST_AREA_OFFSET, FLASH_ITS_AREA_OFFSET and
145+
/* Note: FLASH_PS_AREA_OFFSET, FLASH_ITS_AREA_OFFSET and
141146
* FLASH_NV_COUNTERS_AREA_OFFSET point to offsets in flash, but reads and writes
142147
* to these addresses are redirected to Code SRAM by Driver_Flash.c.
143148
*/
144-
#define FLASH_SST_AREA_OFFSET (FLASH_AREA_SCRATCH_OFFSET + \
149+
#define FLASH_PS_AREA_OFFSET (FLASH_AREA_SCRATCH_OFFSET + \
145150
FLASH_AREA_SCRATCH_SIZE)
146-
#define FLASH_SST_AREA_SIZE (0x5000) /* 20 KB */
151+
#define FLASH_PS_AREA_SIZE (0x5000) /* 20 KB */
147152

148153
/* Internal Trusted Storage (ITS) Service definitions */
149-
#define FLASH_ITS_AREA_OFFSET (FLASH_SST_AREA_OFFSET + \
150-
FLASH_SST_AREA_SIZE)
154+
#define FLASH_ITS_AREA_OFFSET (FLASH_PS_AREA_OFFSET + \
155+
FLASH_PS_AREA_SIZE)
151156
#define FLASH_ITS_AREA_SIZE (0x4000) /* 16 KB */
152157

153158
/* NV Counters definitions */
@@ -173,27 +178,24 @@
173178
*/
174179
#define FLASH_DEV_NAME Driver_FLASH0
175180

176-
/* Secure Storage (SST) Service definitions
181+
/* Protected Storage (PS) Service definitions
177182
* Note: Further documentation of these definitions can be found in the
178-
* TF-M SST Integration Guide.
183+
* TF-M PS Integration Guide.
179184
*/
180-
#define SST_FLASH_DEV_NAME Driver_FLASH0
185+
#define PS_FLASH_DEV_NAME Driver_FLASH0
181186

182187
/* In this target the CMSIS driver requires only the offset from the base
183188
* address instead of the full memory address.
184189
*/
185-
#define SST_FLASH_AREA_ADDR FLASH_SST_AREA_OFFSET
186-
/* Dedicated flash area for SST */
187-
#define SST_FLASH_AREA_SIZE FLASH_SST_AREA_SIZE
188-
#define SST_SECTOR_SIZE FLASH_AREA_IMAGE_SECTOR_SIZE
189-
/* Number of SST_SECTOR_SIZE per block */
190-
#define SST_SECTORS_PER_BLOCK (0x1)
190+
#define PS_FLASH_AREA_ADDR FLASH_PS_AREA_OFFSET
191+
/* Dedicated flash area for PS */
192+
#define PS_FLASH_AREA_SIZE FLASH_PS_AREA_SIZE
193+
#define PS_RAM_FS_SIZE PS_FLASH_AREA_SIZE
194+
#define PS_SECTOR_SIZE FLASH_AREA_IMAGE_SECTOR_SIZE
195+
/* Number of PS_SECTOR_SIZE per block */
196+
#define PS_SECTORS_PER_BLOCK (0x1)
191197
/* Specifies the smallest flash programmable unit in bytes */
192-
#define SST_FLASH_PROGRAM_UNIT (0x1)
193-
/* The maximum asset size to be stored in the SST area */
194-
#define SST_MAX_ASSET_SIZE (2048)
195-
/* The maximum number of assets to be stored in the SST area */
196-
#define SST_NUM_ASSETS (10)
198+
#define PS_FLASH_PROGRAM_UNIT (0x1)
197199

198200
/* Internal Trusted Storage (ITS) Service definitions
199201
* Note: Further documentation of these definitions can be found in the
@@ -209,15 +211,12 @@
209211
#define ITS_FLASH_AREA_ADDR FLASH_ITS_AREA_OFFSET
210212
/* Dedicated flash area for ITS */
211213
#define ITS_FLASH_AREA_SIZE FLASH_ITS_AREA_SIZE
214+
#define ITS_RAM_FS_SIZE ITS_FLASH_AREA_SIZE
212215
#define ITS_SECTOR_SIZE FLASH_AREA_IMAGE_SECTOR_SIZE
213216
/* Number of ITS_SECTOR_SIZE per block */
214217
#define ITS_SECTORS_PER_BLOCK (0x1)
215218
/* Specifies the smallest flash programmable unit in bytes */
216219
#define ITS_FLASH_PROGRAM_UNIT (0x1)
217-
/* The maximum asset size to be stored in the ITS area */
218-
#define ITS_MAX_ASSET_SIZE (512)
219-
/* The maximum number of assets to be stored in the ITS area */
220-
#define ITS_NUM_ASSETS (10)
221220

222221
/* NV Counters definitions */
223222
#define TFM_NV_COUNTERS_AREA_ADDR FLASH_NV_COUNTERS_AREA_OFFSET

targets/TARGET_ARM_SSG/TARGET_MUSCA_S1/partition/region_defs.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017-2020 Arm Limited. All rights reserved.
2+
* Copyright (c) 2017-2021 Arm Limited. All rights reserved.
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -19,10 +19,6 @@
1919
#ifndef __REGION_DEFS_H__
2020
#define __REGION_DEFS_H__
2121

22-
#ifndef BL2
23-
#define BL2
24-
#endif
25-
2622
#include "flash_layout.h"
2723

2824
#define BL2_HEAP_SIZE (0x0001000)

targets/targets.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4686,7 +4686,8 @@
46864686
"CMSIS_NVIC_VIRTUAL",
46874687
"LPTICKER_DELAY_TICKS=3",
46884688
"MBED_MPU_CUSTOM",
4689-
"BL2"
4689+
"BL2",
4690+
"MCUBOOT_IMAGE_NUMBER=2"
46904691
],
46914692
"extra_labels_add": [
46924693
"ARM_SSG",

0 commit comments

Comments
 (0)