File tree Expand file tree Collapse file tree 4 files changed +24
-1
lines changed
samples/boards/nordic/nrf_ironside/update Expand file tree Collapse file tree 4 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 3
3
4
4
config UPDATE_BLOB_ADDRESS
5
5
hex "Address of the update blob"
6
- default 0xe100000
6
+ default 0x0e100000
7
7
help
8
8
Address of the update blob. The default value matches the placement of the
9
9
update blobs delivered with the IronSide SE firmware.
Original file line number Diff line number Diff line change @@ -49,6 +49,22 @@ config NRF_IRONSIDE_UPDATE_SERVICE
49
49
help
50
50
Service used to update the IronSide SE firmware.
51
51
52
+ config NRF_IRONSIDE_UPDATE_SERVICE_MIN_ADDRESS
53
+ hex
54
+ default 0x0e100000
55
+ help
56
+ Minimum value of address passed to the update service.
57
+ The update needs to be located within MRAM11.
58
+
59
+ config NRF_IRONSIDE_UPDATE_SERVICE_MAX_ADDRESS
60
+ hex
61
+ default 0x0e1d8000
62
+ help
63
+ Maximum value of address passed to the update service.
64
+ The biggest update (USLOT) occupies 160kB, so this address is set so that a 160kB
65
+ update would still be within the limit of MRAM11 (0x0e200000).
66
+
67
+
52
68
config NRF_IRONSIDE_BOOT_REPORT
53
69
bool "IronSide boot report"
54
70
depends on $(dt_nodelabel_exists,ironside_se_boot_report)
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ struct ironside_update_blob {
62
62
* @param update Pointer to update blob
63
63
*
64
64
* @retval 0 on a successful request (although the update itself may still fail).
65
+ * @retval -EFAULT if the address of the update is outside of the accepted range.
65
66
* @retval -IRONSIDE_UPDATE_ERROR_NOT_PERMITTED if missing access to the update candidate.
66
67
* @retval -IRONSIDE_UPDATE_ERROR_SICR_WRITE_FAILED if writing update parameters to SICR failed.
67
68
* @retval Positive error status if reported by IronSide call (see error codes in @ref call.h).
Original file line number Diff line number Diff line change 3
3
* SPDX-License-Identifier: Apache-2.0
4
4
*/
5
5
6
+ #include <errno.h>
6
7
#include <nrf_ironside/update.h>
7
8
#include <nrf_ironside/call.h>
8
9
@@ -11,6 +12,11 @@ int ironside_update(const struct ironside_update_blob *update)
11
12
int err ;
12
13
struct ironside_call_buf * const buf = ironside_call_alloc ();
13
14
15
+ if ((uintptr_t )update < CONFIG_NRF_IRONSIDE_UPDATE_SERVICE_MIN_ADDRESS ||
16
+ (uintptr_t )update > CONFIG_NRF_IRONSIDE_UPDATE_SERVICE_MAX_ADDRESS ) {
17
+ return - EFAULT ;
18
+ }
19
+
14
20
buf -> id = IRONSIDE_CALL_ID_UPDATE_SERVICE_V0 ;
15
21
buf -> args [IRONSIDE_UPDATE_SERVICE_UPDATE_PTR_IDX ] = (uintptr_t )update ;
16
22
You can’t perform that action at this time.
0 commit comments