Skip to content

Commit 4632f30

Browse files
hakonfamnordicjm
authored andcommitted
doc: ironside: add description of missing UICR fields.
Ref: NCSDK-35159 Signed-off-by: Håkon Amundsen <[email protected]>
1 parent 48cd642 commit 4632f30

File tree

1 file changed

+240
-2
lines changed

1 file changed

+240
-2
lines changed

doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_ironside.rst

Lines changed: 240 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ The following UICR fields are supported:
6060
| UICR.MPCCONF | Points to an array of memory-protection entries used to configure |
6161
| | global memory regions. |
6262
+----------------------+---------------------------------------------------------------------+
63+
| UICR.WDTSTART | Configures automatic start of a local watchdog timer before the |
64+
| | application core is booted, providing early system protection. |
65+
+----------------------+---------------------------------------------------------------------+
66+
| UICR.SECURESTORAGE | Defines secure storage configuration including address, and |
67+
| | partition sizes for cryptographic and ITS services. |
68+
+----------------------+---------------------------------------------------------------------+
69+
| UICR.SECONDARY | Configures secondary firmware boot settings including processor |
70+
| | selection, triggers, memory protection, and peripheral access. |
71+
+----------------------+---------------------------------------------------------------------+
6372

6473
.. note::
6574
If no UICR values are programmed, |ISE| applies a set of default configurations.
@@ -371,6 +380,118 @@ See the following table for a mapping between the devicetree input used by ``nrf
371380
/* gpio1 - P1.2 CTRLSEL = 3 */
372381
UICR_GPIO_PIN_CNF_CTRLSEL_SET(0x5f938400UL, 2, 3);
373382
383+
UICR.WDTSTART
384+
=============
385+
386+
UICR.WDTSTART configures the automatic start of a local watchdog timer before the application core is booted.
387+
This provides early system protection ensuring that the system can recover from early boot failures.
388+
389+
The UICR.WDTSTART configuration consists of three sub-registers:
390+
391+
UICR.WDTSTART.ENABLE
392+
Controls whether the watchdog timer automatic start feature is enabled.
393+
394+
UICR.WDTSTART.INSTANCE
395+
Specifies which watchdog timer instance to configure and start.
396+
The following are valid values:
397+
398+
* ``WDT0`` - Use watchdog timer instance 0
399+
* ``WDT1`` - Use watchdog timer instance 1
400+
401+
UICR.WDTSTART.CRV
402+
Sets the initial Counter Reload Value (CRV) for the watchdog timer.
403+
This value determines the watchdog timeout period.
404+
The CRV must be at least 15 (0xF) to ensure proper watchdog operation.
405+
406+
UICR.SECURESTORAGE
407+
==================
408+
409+
UICR.SECURESTORAGE configures the secure storage system used by |ISE| for persistent storage of cryptographic keys and trusted data.
410+
The secure storage is divided into separate partitions for different services and processor domains.
411+
The total size of all configurations specified in ``UICR.SECURESTORAGE.*`` must be aligned to a 4 KB boundary.
412+
For more information, see :ref:`ug_nrf54h20_ironside_se_secure_storage`.
413+
414+
The UICR.SECURESTORAGE configuration consists of the following sub-registers:
415+
416+
UICR.SECURESTORAGE.ENABLE
417+
Controls whether the secure storage feature is enabled.
418+
419+
UICR.SECURESTORAGE.ADDRESS
420+
Specifies the start address of the secure storage region in memory.
421+
This address must be aligned to a 4 KB boundary and must point to a valid memory region that can be used for secure storage.
422+
423+
UICR.SECURESTORAGE.CRYPTO
424+
Configures partition sizes for the cryptographic service within the secure storage.
425+
426+
UICR.SECURESTORAGE.CRYPTO.APPLICATIONSIZE1KB
427+
Sets the size of the ``APPLICATION`` domain partition for cryptographic storage, specified in 1 kiB blocks.
428+
429+
UICR.SECURESTORAGE.CRYPTO.RADIOCORESIZE1KB
430+
Sets the size of the ``RADIOCORE`` domain partition for cryptographic storage, specified in 1 kiB blocks.
431+
432+
UICR.SECURESTORAGE.ITS
433+
Configures partition sizes for the Internal Trusted Storage (ITS) service within the secure storage.
434+
435+
UICR.SECURESTORAGE.ITS.APPLICATIONSIZE1KB
436+
Sets the size of the ``APPLICATION`` domain partition for ITS, specified in 1 kiB blocks.
437+
438+
UICR.SECURESTORAGE.ITS.RADIOCORESIZE1KB
439+
Sets the size of the ``RADIOCORE`` domain partition for ITS, specified in 1 kiB blocks.
440+
441+
UICR.SECONDARY
442+
==============
443+
444+
UICR.SECONDARY configures the secondary firmware boot system, which allows |ISE| to boot alternative firmware in response to specific conditions or triggers.
445+
This feature enables a recovery firmware setup through a dual-firmware configuration that includes both main and recovery firmware.
446+
447+
The UICR.SECONDARY configuration consists of multiple sub-registers organized into functional groups:
448+
449+
UICR.SECONDARY.ENABLE
450+
Controls whether the secondary firmware boot feature is enabled.
451+
452+
UICR.SECONDARY.PROCESSOR
453+
Specifies which processor should be used to boot the secondary firmware.
454+
Valid values are:
455+
456+
* ``APPLICATION`` - Boot secondary firmware on the application domain CPU.
457+
* ``RADIOCORE`` - Boot secondary firmware on the radio core CPU.
458+
459+
UICR.SECONDARY.ADDRESS
460+
Sets the start address of the secondary firmware.
461+
This value is used as the initial value of the secure Vector Table Offset Register (VTOR) after CPU reset.
462+
The address must be aligned to a 4 KiB boundary.
463+
Bits [11:0] are ignored.
464+
465+
UICR.SECONDARY.TRIGGER
466+
Configures automatic triggers that cause |ISE| to boot the secondary firmware instead of the primary firmware.
467+
468+
UICR.SECONDARY.TRIGGER.ENABLE
469+
Controls whether automatic triggers are enabled to boot the secondary firmware.
470+
471+
UICR.SECONDARY.TRIGGER.RESETREAS
472+
Specifies which reset reasons will trigger an automatic boot into the secondary firmware.
473+
Multiple triggers can be enabled simultaneously by setting the corresponding bits:
474+
475+
* ``APPLICATIONWDT0`` - Application domain watchdog 0 reset
476+
* ``APPLICATIONWDT1`` - Application domain watchdog 1 reset
477+
* ``APPLICATIONLOCKUP`` - Application domain CPU lockup reset
478+
* ``RADIOCOREWDT0`` - Radio core watchdog 0 reset
479+
* ``RADIOCOREWDT1`` - Radio core watchdog 1 reset
480+
* ``RADIOCORELOCKUP`` - Radio core CPU lockup reset
481+
482+
UICR.SECONDARY.PROTECTEDMEM
483+
Identical to UICR.PROTECTEDMEM, but applies to the secondary firmware.
484+
485+
UICR.SECONDARY.WDTSTART
486+
Identical to UICR.WDTSTART, but applies to the secondary firmware boot process.
487+
Note that if RADIOCORE is specified in ``UICR.SECONDARY.PROCESSOR``, the WDT instances used are the ones in the radio core.
488+
489+
UICR.SECONDARY.PERIPHCONF
490+
Identical to UICR.PERIPHCONF, but applies to the secondary firmware boot process.
491+
492+
UICR.SECONDARY.MPCCONF
493+
Identical to UICR.MPCCONF, but applies to the secondary firmware boot process.
494+
374495
.. _ug_nrf54h20_ironside_se_programming:
375496

376497
Programming
@@ -500,6 +621,57 @@ When booting the application core, |ISE| does the following:
500621

501622
This allows the error report to be read by a debugger, if the device is not protected.
502623

624+
.. _ug_nrf54h20_ironside_se_secondary_firmware:
625+
626+
Secondary firmware
627+
******************
628+
629+
The secondary firmware feature provides an alternative boot path that can be triggered implicitly or explicitly.
630+
It can be used for different purposes, some examples are DFU applications in systems that don't use dual banking, recovery firmware, and analysis firmware.
631+
632+
.. note::
633+
The term "primary firmware" is rarely used when describing the firmware that is booted by default by IronSide SE, as it is implicit when the term "secondary" is not specified.
634+
635+
.. note::
636+
The term "secondary slot" and "secondary image" are used in the MCUboot context.
637+
This usage is unrelated to the "secondary firmware" described in this section.
638+
639+
Configuration and triggering
640+
=============================
641+
642+
Configuring a secondary firmware is optional and is done through the ``UICR.SECONDARY`` fields.
643+
644+
The secondary firmware can be triggered automatically, through ``CTRLAP.BOOTMODE`` or through an IPC service (``ironside_bootmode`` service).
645+
Any component that communicates with IronSide SE over IPC can leverage this service.
646+
Setting bit 5 in ``CTRLAP.BOOTMODE`` will also trigger secondary firmware.
647+
648+
IronSide SE automatically triggers the secondary firmware in any of the following situations:
649+
650+
* The integrity check of the memory specified in ``UICR.PROTECTEDMEM`` fails.
651+
* Any boot failure occurs, such as missing primary firmware or failure to apply ``UICR.PERIPHCONF`` or ``UICR.MPCCONF`` configurations.
652+
* A local domain is reset with a reason configured to trigger the secondary firmware.
653+
* Secondary firmware will be booted by IronSide SE if one of the triggers configured in ``UICR.SECONDARY.TRIGGER.RESETREAS`` occurs.
654+
655+
The secondary firmware can be protected using ``UICR.SECONDARY.PROTECTEDMEM`` for integrity checking, and can be updated by other components when protection is not enabled.
656+
657+
Protection
658+
==========
659+
660+
The secondary firmware can be protected through integrity checks by enabling ``UICR.SECONDARY.PROTECTEDMEM``.
661+
The ``PERIPHCONF`` entries for the secondary firmware can also be placed in memory covered by ``UICR.SECONDARY.PROTECTEDMEM`` to create a fully immutable secondary firmware and configuration.
662+
663+
If the integrity check of the memory specified in this configuration fails, the secondary firmware will not be booted.
664+
Instead, IronSide SE will attempt to boot the primary firmware, and information about the failure is available in the boot report and boot status.
665+
666+
Update
667+
======
668+
669+
As with the primary firmware, IronSide SE does not facilitate updating the secondary firmware.
670+
The secondary image can be updated by other components as long as ``UICR.SECONDARY.PROTECTEDMEM`` is not set.
671+
Using the secondary firmware as a bootloader capable of validating and updating a second image enables updating firmware in the secondary boot flow while having secure boot enabled through ``UICR.SECONDARY.PROTECTEDMEM``.
672+
673+
674+
503675
.. _ug_nrf54h20_ironside_se_cpuconf_service:
504676

505677
|ISE| CPUCONF service
@@ -539,6 +711,72 @@ The |NCS| defines the west ``ncs-ironside-se-update`` command to update |ISE| on
539711
This command takes a nRF54H20 SoC binary ZIP file and uses the |ISE| update service to update both the |ISE| and |ISE| Recovery (or optionally just one of them).
540712
For more information, see :ref:`abi_compatibility`.
541713

714+
.. _ug_nrf54h20_ironside_se_secure_storage:
715+
716+
Secure Storage
717+
**************
718+
719+
|ISE| provides secure storage functionality through the UICR.SECURESTORAGE configuration.
720+
This feature enables applications to store sensitive data in dedicated, encrypted storage regions that are protected by device-unique keys and access controls.
721+
722+
UICR.SECURESTORAGE Configuration
723+
================================
724+
725+
The UICR.SECURESTORAGE field configures secure storage regions for PSA Crypto keys and PSA Internal Trusted Storage (ITS) data.
726+
To leverage this secure storage functionality, applications must set the key location to ``PSA_KEY_LOCATION_LOCAL_STORAGE`` (``0x000000``).
727+
728+
The secure storage configuration includes two separate storage regions:
729+
730+
* **UICR.SECURESTORAGE.CRYPTO** - Used for PSA Crypto API operations when storing cryptographic keys
731+
* **UICR.SECURESTORAGE.ITS** - Used for PSA Internal Trusted Storage (ITS) API operations when storing general secure data
732+
733+
734+
Secure Storage through PSA Crypto API
735+
=====================================
736+
737+
When using the PSA Crypto API to operate on keys, the storage region specified by ``UICR.SECURESTORAGE.CRYPTO`` is automatically used if the key attributes are configured with **key location** set to ``PSA_KEY_LOCATION_LOCAL_STORAGE``.
738+
739+
This ensures that cryptographic keys are stored in the dedicated secure storage region rather than in regular application memory.
740+
741+
Secure storage through PSA Internal Trusted Storage (ITS) API
742+
=============================================================
743+
744+
When using the PSA ITS API for storing general secure data, the storage region specified by ``UICR.SECURESTORAGE.ITS`` is used automatically.
745+
No special configuration is required for PSA ITS operations, as they inherently use the secure storage when available.
746+
747+
Security Properties
748+
===================
749+
750+
The secure storage provided by |ISE| has the following security characteristics:
751+
752+
Access Control
753+
--------------
754+
755+
* **Domain Isolation**: Secure storage regions are not accessible by local domains directly.
756+
* **Ironside Exclusive Access**: Only the Ironside Secure Element can access the secure storage regions.
757+
* **Domain Separation**: Each local domain can only access its own secure storage data, ensuring isolation between different domains.
758+
759+
Data Protection
760+
---------------
761+
762+
* **Encryption**: All data stored in the secure storage regions is encrypted using device-unique keys.
763+
* **Integrity**: The stored data is protected against tampering through cryptographic integrity checks.
764+
* **Confidentiality**: The encryption ensures that stored data remains confidential even if the storage medium is physically accessed.
765+
766+
.. note::
767+
The device-unique encryption keys are managed entirely by |ISE| and are not accessible to application code.
768+
This ensures that the secure storage remains protected even in cases where application-level vulnerabilities exist.
769+
770+
Configuration Considerations
771+
============================
772+
773+
When configuring secure storage, consider the following:
774+
775+
* Ensure sufficient storage space is allocated in both ``UICR.SECURESTORAGE.CRYPTO`` and ``UICR.SECURESTORAGE.ITS`` regions based on your application's requirements
776+
* The sum of these to regions must be 4kB aligned.
777+
* The secure storage regions should be properly sized to accommodate the expected number of keys and data items
778+
* Access to secure storage is only available when the key location is explicitly set to ``PSA_KEY_LOCATION_LOCAL_STORAGE``
779+
542780
.. _ug_nrf54h20_ironside_se_bootmode_register_format:
543781

544782
CTRLAP.BOOTMODE register format
@@ -656,8 +894,8 @@ See the following table for a summary of the available boot commands:
656894
.. list-table::
657895
:header-rows: 1
658896

659-
* - Opcode
660-
- Command name
897+
* - Command name
898+
- Opcode
661899
- Description
662900
* - ``ERASEALL``
663901
- ``0x1``

0 commit comments

Comments
 (0)