|
1 | 1 | /*
|
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. |
3 | 4 | *
|
4 | 5 | * SPDX-License-Identifier: Apache-2.0
|
5 | 6 | *
|
|
21 | 22 |
|
22 | 23 | /* Flash layout on Musca-S1 with BL2(multiple image boot, boot from MRAM):
|
23 | 24 | * 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 |
33 | 37 | *
|
34 | 38 | * Flash layout on Musca-S1 with BL2(single image boot):
|
35 | 39 | * 0x0A00_0000 BL2 - MCUBoot(128 KB)
|
|
39 | 43 | * 0x0A10_0000 Secondary image area (896 KB):
|
40 | 44 | * 0x0A10_0000 Secure image secondary (384 KB)
|
41 | 45 | * 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 |
46 | 51 | * /lib/ext/cryptocell-312-runtime/shared/hw/include/musca_s1/ \
|
47 | 52 | * dx_reg_base_host.h Do not change one without changing the other.
|
48 |
| - * 0x0A1E_A100 Unused |
| 53 | + * 0x0A1E_E100 Unused |
49 | 54 | *
|
50 | 55 | * Flash layout on Musca-S1 without BL2:
|
51 | 56 | * 0x0A00_0000 Secure image
|
52 |
| - * 0x0A07_0000 Non-secure image |
| 57 | + * 0x0A08_0000 Non-secure image |
53 | 58 | */
|
54 | 59 |
|
55 | 60 | /* This header file is included from linker scatter file as well, where only a
|
|
137 | 142 | #error "Only MCUBOOT_IMAGE_NUMBER 1 and 2 are supported!"
|
138 | 143 | #endif /* MCUBOOT_IMAGE_NUMBER */
|
139 | 144 |
|
140 |
| -/* Note: FLASH_SST_AREA_OFFSET, FLASH_ITS_AREA_OFFSET and |
| 145 | +/* Note: FLASH_PS_AREA_OFFSET, FLASH_ITS_AREA_OFFSET and |
141 | 146 | * FLASH_NV_COUNTERS_AREA_OFFSET point to offsets in flash, but reads and writes
|
142 | 147 | * to these addresses are redirected to Code SRAM by Driver_Flash.c.
|
143 | 148 | */
|
144 |
| -#define FLASH_SST_AREA_OFFSET (FLASH_AREA_SCRATCH_OFFSET + \ |
| 149 | +#define FLASH_PS_AREA_OFFSET (FLASH_AREA_SCRATCH_OFFSET + \ |
145 | 150 | FLASH_AREA_SCRATCH_SIZE)
|
146 |
| -#define FLASH_SST_AREA_SIZE (0x5000) /* 20 KB */ |
| 151 | +#define FLASH_PS_AREA_SIZE (0x5000) /* 20 KB */ |
147 | 152 |
|
148 | 153 | /* 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) |
151 | 156 | #define FLASH_ITS_AREA_SIZE (0x4000) /* 16 KB */
|
152 | 157 |
|
153 | 158 | /* NV Counters definitions */
|
|
173 | 178 | */
|
174 | 179 | #define FLASH_DEV_NAME Driver_FLASH0
|
175 | 180 |
|
176 |
| -/* Secure Storage (SST) Service definitions |
| 181 | +/* Protected Storage (PS) Service definitions |
177 | 182 | * Note: Further documentation of these definitions can be found in the
|
178 |
| - * TF-M SST Integration Guide. |
| 183 | + * TF-M PS Integration Guide. |
179 | 184 | */
|
180 |
| -#define SST_FLASH_DEV_NAME Driver_FLASH0 |
| 185 | +#define PS_FLASH_DEV_NAME Driver_FLASH0 |
181 | 186 |
|
182 | 187 | /* In this target the CMSIS driver requires only the offset from the base
|
183 | 188 | * address instead of the full memory address.
|
184 | 189 | */
|
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) |
191 | 197 | /* 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) |
197 | 199 |
|
198 | 200 | /* Internal Trusted Storage (ITS) Service definitions
|
199 | 201 | * Note: Further documentation of these definitions can be found in the
|
|
209 | 211 | #define ITS_FLASH_AREA_ADDR FLASH_ITS_AREA_OFFSET
|
210 | 212 | /* Dedicated flash area for ITS */
|
211 | 213 | #define ITS_FLASH_AREA_SIZE FLASH_ITS_AREA_SIZE
|
| 214 | +#define ITS_RAM_FS_SIZE ITS_FLASH_AREA_SIZE |
212 | 215 | #define ITS_SECTOR_SIZE FLASH_AREA_IMAGE_SECTOR_SIZE
|
213 | 216 | /* Number of ITS_SECTOR_SIZE per block */
|
214 | 217 | #define ITS_SECTORS_PER_BLOCK (0x1)
|
215 | 218 | /* Specifies the smallest flash programmable unit in bytes */
|
216 | 219 | #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) |
221 | 220 |
|
222 | 221 | /* NV Counters definitions */
|
223 | 222 | #define TFM_NV_COUNTERS_AREA_ADDR FLASH_NV_COUNTERS_AREA_OFFSET
|
|
0 commit comments