|
37 | 37 |
|
38 | 38 | #include "image.h" |
39 | 39 | #include "hal.h" |
| 40 | +#include "target.h" |
40 | 41 | #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) && (!defined(FLAGS_HOME) || !defined(DISABLE_BACKUP)) |
41 | 42 |
|
42 | 43 |
|
@@ -297,7 +298,8 @@ void hal_tz_sau_init(void) |
297 | 298 | /* SAU is set up before staging. Set up all areas as secure. */ |
298 | 299 |
|
299 | 300 | /* Non-secure callable: NSC functions area */ |
300 | | - sau_init_region(0, 0x0C040000, 0x0C05FFFF, 1); |
| 301 | + sau_init_region(0, WOLFBOOT_NSC_ADDRESS, |
| 302 | + WOLFBOOT_NSC_ADDRESS + WOLFBOOT_NSC_SIZE - 1, 1); |
301 | 303 |
|
302 | 304 | /* Secure: application flash area (first bank) */ |
303 | 305 | sau_init_region(1, WOLFBOOT_PARTITION_BOOT_ADDRESS, FLASH_BANK2_BASE - 1, 0); |
@@ -331,10 +333,11 @@ void hal_tz_sau_init(void) |
331 | 333 | void hal_tz_sau_init(void) |
332 | 334 | { |
333 | 335 | /* Non-secure callable: NSC functions area */ |
334 | | - sau_init_region(0, 0x0C038000, 0x0C040000, 1); |
| 336 | + sau_init_region(0, WOLFBOOT_NSC_ADDRESS, |
| 337 | + WOLFBOOT_NSC_ADDRESS + WOLFBOOT_NSC_SIZE - 1, 1); |
335 | 338 |
|
336 | 339 | /* Non-secure: application flash area */ |
337 | | - sau_init_region(1, 0x08040000, 0x0807FFFF, 0); |
| 340 | + sau_init_region(1, WOLFBOOT_PARTITION_BOOT_ADDRESS, WOLFBOOT_PARTITION_BOOT_ADDRESS + 2 * WOLFBOOT_PARTITION_SIZE - 1, 0); |
338 | 341 |
|
339 | 342 | /* Non-secure RAM region in SRAM1/SRAM2 */ |
340 | 343 | sau_init_region(2, 0x20020000, 0x2003FFFF, 0); |
|
0 commit comments