You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the following sysbuild settings which add corresponding
Kconfig settings for all the images in the build:
- SB_CONFIG_APPROTECT_USE_UICR
- SB_CONFIG_APPROTECT_LOCK
- SB_CONFIG_APPROTECT_USER_HANDLING
- SB_CONFIG_SECURE_APPROTECT_USE_UICR
- SB_CONFIG_SECURE_APPROTECT_LOCK
- SB_CONFIG_SECURE_APPROTECT_USER_HANDLING
Update AP-Protect documentation.
Signed-off-by: Markus Lassila <[email protected]>
Copy file name to clipboardExpand all lines: doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,15 @@ Build and configuration system
60
60
61
61
* Added the ``SB_CONFIG_MCUBOOT_NRF53_MULTI_IMAGE_UPDATE`` sysbuild Kconfig option that enables updating the network core on the nRF5340 SoC from external flash.
62
62
63
+
* Added AP-Protect sysbuild Kconfig options to enable the corresponding AP-Protect Kconfig options for all images in the build:
64
+
65
+
* ``SB_CONFIG_APPROTECT_LOCK`` for the :kconfig:option:`CONFIG_NRF_APPROTECT_LOCK` Kconfig option.
66
+
* ``SB_CONFIG_APPROTECT_USER_HANDLING`` for the :kconfig:option:`CONFIG_NRF_APPROTECT_USER_HANDLING` Kconfig option.
67
+
* ``SB_CONFIG_APPROTECT_USE_UICR`` for the :kconfig:option:`CONFIG_NRF_APPROTECT_USE_UICR` Kconfig option.
68
+
* ``SB_CONFIG_SECURE_APPROTECT_LOCK`` for the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_LOCK` Kconfig option.
69
+
* ``SB_CONFIG_SECURE_APPROTECT_USER_HANDLING`` for the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_USER_HANDLING` Kconfig option.
70
+
* ``SB_CONFIG_SECURE_APPROTECT_USE_UICR`` for the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_USE_UICR` Kconfig option.
71
+
63
72
* Removed the non-working support for configuring the NSIB signing key through the environmental or command line variable (``SB_SIGNING_KEY_FILE``) along with child image.
64
73
65
74
.. note::
@@ -1298,6 +1307,7 @@ Documentation
1298
1307
* The :ref:`dfu_tools_mcumgr_cli` page after it was removed from the Zephyr repository.
1299
1308
* The :ref:`ug_nrf54h20_suit_soc_binaries` page.
1300
1309
* The :ref:`ug_nrf54h20_suit_push` page documentating the SUIT push model-based update process.
1310
+
* The :ref:`app_secure_approtect` section to the :ref:`app_approtect` page.
1301
1311
1302
1312
* Restructured the :ref:`app_bootloaders` documentation and combined the DFU and bootloader articles.
1303
1313
Additionally, created a new bootloader :ref:`bootloader_quick_start`.
@@ -1320,3 +1330,4 @@ Documentation
1320
1330
This table replaces the subpage that was previously describing these features in more detail and was duplicating information available in other sections.
1321
1331
* The :ref:`nrf_security_drivers_cracen` section with a reference to the :ref:`ug_nrf54l_cryptography` page.
1322
1332
* The :ref:`ug_tfm` page with the correct list of samples demonstrating TF-M.
1333
+
* The :ref:`app_approtect_ncs` section on the :ref:`app_approtect` page with details on setting the Kconfig options and register values to enable AP-Protect.
Setting the :kconfig:option:`CONFIG_NRF_APPROTECT_LOCK` Kconfig option to ``y`` and compiling the firmware enables the software access protection mechanism for SoCs of the nRF53 Series and the SoC revisions of the nRF52 Series that feature the hardware and software type of AP-Protect.
177
+
178
+
Enabling the Kconfig option writes the debugger register in the ``SystemInit()`` function to lock the access port protection at every boot.
179
+
In addition to this, the ``UICR.APPROTECT`` register should be written as instructed in :ref:`app_approtect_uicr_approtect`.
180
+
181
+
.. note::
182
+
For multi-image builds, this Kconfig option needs to be set for the first image (usually a bootloader).
183
+
Otherwise, the software AP-Protect will not be sufficient as the debugger can be attached to the device after the first image opens the software AP-Protect with the :kconfig:option:`CONFIG_NRF_APPROTECT_USE_UICR` Kconfig option, which is the default value.
184
+
185
+
When using sysbuild, set the ``SB_CONFIG_APPROTECT_LOCK`` sysbuild Kconfig option, which enables the :kconfig:option:`CONFIG_NRF_APPROTECT_LOCK` Kconfig option for all images.
175
186
176
-
Setting the :kconfig:option:`CONFIG_NRF_APPROTECT_LOCK` Kconfig option to ``y`` and compiling the firmware is enough to enable the access port protection mechanism for SoCs of the nRF53 Series and those SoCs of the nRF52 Series that feature the hardware and software type of AP-Protect.
177
-
The access port protection configured in this way cannot be disabled without erasing the flash.
187
+
.. important::
188
+
On the nRF91x1 Series devices, the register setting related to the :kconfig:option:`CONFIG_NRF_APPROTECT_LOCK` Kconfig option does not persist in System ON IDLE mode.
189
+
You must lock the ``UICR.APPROTECT`` register to enable the hardware AP-Protect mechanism as instructed in :ref:`app_approtect_uicr_approtect`.
178
190
179
191
.. _app_approtect_ncs_user_handling:
180
192
181
-
Enabling AP-Protect with :kconfig:option:`CONFIG_NRF_APPROTECT_USER_HANDLING`
Setting the :kconfig:option:`CONFIG_NRF_APPROTECT_USER_HANDLING` Kconfig option to ``y`` and compiling the firmware allows you to handle the state of AP-Protect at a later stage.
196
+
Setting the :kconfig:option:`CONFIG_NRF_APPROTECT_USER_HANDLING` Kconfig option to ``y`` and compiling the firmware allows you to handle the state of the software AP-Protect at a later stage.
185
197
This option in fact does not touch the mechanism and keeps it closed.
186
198
187
199
You can use this option for example to implement the authenticated debug and lock.
188
200
See the SoC or SiP hardware documentation for more information.
189
201
202
+
.. note::
203
+
For multi-image builds, this Kconfig option has to be set for all images.
204
+
The default value is to open the device if the ``UICR.APPROTECT`` register is not set.
205
+
This allows the debugger to be attached to the device.
206
+
207
+
When using sysbuild, set the ``SB_CONFIG_APPROTECT_USER_HANDLING`` sysbuild Kconfig option, which enables the :kconfig:option:`CONFIG_NRF_APPROTECT_USER_HANDLING` Kconfig option for all images.
208
+
190
209
.. _app_approtect_ncs_use_uicr:
191
210
192
-
Enabling AP-Protect with :kconfig:option:`CONFIG_NRF_APPROTECT_USE_UICR`
Setting the :kconfig:option:`CONFIG_NRF_APPROTECT_USE_UICR` Kconfig option to ``y`` and compiling the firmware makes the AP-Protect disabled by default.
214
+
Setting the :kconfig:option:`CONFIG_NRF_APPROTECT_USE_UICR` Kconfig option to ``y`` and compiling the firmware makes the software AP-Protect disabled by default.
196
215
This is the default setting in the |NCS|.
197
216
198
217
You can start debugging the firmware without additional steps needed.
199
218
200
-
Once you are done debugging, run the following command to enable the access port protection:
219
+
.. _app_approtect_uicr_approtect:
220
+
221
+
Enabling hardware AP-Protect by locking the ``UICR.APPROTECT`` register
For the devices that are in a production environment, it is highly recommended to lock the ``UICR.APPROTECT`` register to prevent unauthorized access to the device.
225
+
If the access port protection is configured this way, it cannot be disabled without erasing the flash memory.
226
+
227
+
.. note::
228
+
This is the only mechanism supported by the nRF52 Series and the nRF9160 devices that do not support both hardware and software AP-Protect.
229
+
230
+
To lock the ``UICR.APPROTECT`` register, complete the following steps:
201
231
202
232
.. code-block:: console
203
233
204
234
nrfjprog --rbp ALL
205
235
206
-
This command enables the AP-Protect and resets the device.
236
+
This command enables the hardware AP-Protect (and Secure AP-Protect) and resets the device.
237
+
238
+
.. _app_secure_approtect:
239
+
240
+
Secure AP-Protect
241
+
=================
242
+
243
+
With :ref:`Trusted Firmware-M (TF-M) <ug_tfm>` comes :ref:`security by separation <app_boards_spe_nspe>`, enabling a Secure Processing Environment (SPE) that is isolated from the Non-Secure Processing Environment (NSPE).
244
+
TF-M is available for the nRF53 and nRF91 Series devices.
245
+
246
+
While AP-Protect blocks access to all CPU registers and memories, Secure AP-Protect limits the CPU access to the non-secure side only.
247
+
This allows debugging of the NSPE, while the SPE debugging is blocked.
248
+
249
+
The following Kconfig options for enabling Secure AP-Protect are available for the nRF91x1 and nRF53 Series devices:
In addition, you can enable hardware Secure AP-Protect by setting the ``UICR.SECUREAPPROTECT`` register as instructed in :ref:`app_secure_approtect_uicr_approtect`.
256
+
257
+
Enabling software Secure AP-Protect with :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_LOCK`
To enable only the Secure AP-Protect, run the following command:
260
+
Setting the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_LOCK` Kconfig option to ``y`` and compiling the firmware enables the secure access protection mechanism for SoCs of the nRF53 Series.
261
+
262
+
Enabling this Kconfig option writes the secure debugger register in the ``SystemInit()`` function to lock the secure access port protection at every boot.
263
+
In addition to this, the ``UICR.SECUREAPPROTECT`` register should be written as instructed in :ref:`app_secure_approtect_uicr_approtect`.
264
+
265
+
.. note::
266
+
For multi-image builds, this Kconfig option needs to be set for the first image (usually a bootloader).
267
+
Otherwise, the software Secure AP-Protect will not be sufficient as the debugger can be attached to the SPE after the first image opens the software Secure AP-Protect with the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_USE_UICR` Kconfig option, which is the default value.
268
+
269
+
When using sysbuild, set the sysbuild Kconfig option ``SB_CONFIG_SECURE_APPROTECT_LOCK``, which enables the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_LOCK` Kconfig option for all images.
270
+
271
+
.. important::
272
+
On the nRF91x1 Series devices, the register setting related to the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_LOCK` Kconfig option does not persist in System ON IDLE mode.
273
+
You must lock the ``UICR.SECUREAPPROTECT`` register to enable the hardware Secure AP-Protect mechanism as instructed in :ref:`app_secure_approtect_uicr_approtect`.
274
+
275
+
Enabling software Secure AP-Protect with :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_USER_HANDLING`
Setting the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_USER_HANDLING` Kconfig option to ``y`` and compiling the firmware allows you to handle the state of the software Secure AP-Protect at a later stage.
279
+
This option does not touch the mechanism and keeps it closed.
280
+
281
+
You can for example use this option to implement an authenticated debug and lock of the SPE.
282
+
See the SoC or SiP hardware documentation for more information.
283
+
284
+
.. note::
285
+
For multi-image builds, this Kconfig option needs to be set for all images.
286
+
The default value is to open the device if the ``UICR.SECUREAPPROTECT`` is not set.
287
+
This allows the debugger to be attached to the device.
288
+
289
+
When using sysbuild, set the ``SB_CONFIG_SECURE_APPROTECT_USER_HANDLING`` sysbuild Kconfig option, which enables the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_USER_HANDLING` Kconfig option for all images.
290
+
291
+
Enabling software Secure AP-Protect with :kconfig:option:`CONFIG_SECURE_NRF_APPROTECT_USE_UICR`
Setting the :kconfig:option:`CONFIG_NRF_SECURE_APPROTECT_USE_UICR` Kconfig option to ``y`` and compiling the firmware disables the software Secure AP-Protect mechanism by default.
295
+
This is the default setting in the |NCS|.
296
+
297
+
You can start debugging the SPE without additional steps needed.
298
+
299
+
.. _app_secure_approtect_uicr_approtect:
300
+
301
+
Enabling hardware Secure AP-Protect by locking the ``UICR.SECUREAPPROTECT`` register
0 commit comments