Skip to content

Commit 456da3d

Browse files
hakonfamrlubos
authored andcommitted
doc: nrf54h20: add description of sdfw bootstatus
Ref: NCSDK-30107 Signed-off-by: Håkon Amundsen <[email protected]> (cherry picked from commit a52b459)
1 parent 3ecd951 commit 456da3d

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

doc/nrf/app_dev/device_guides/working_with_nrf/nrf54h/ug_nrf54h20_debugging.rst

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,87 @@ One of the potential root causes of fatal errors in an application are stack ove
122122
Read the Stack Overflows section on the :ref:`zephyr:fatal` page in the Zephyr documentation to learn about stack overflows and how to debug them.
123123

124124
You can also use a separate module, such as Zephyr's :ref:`zephyr:thread_analyzer`, to make sure that the stack sizes used by your application are big enough to avoid stack overflows.
125+
126+
Debugging errors reported by SDFW
127+
*********************************
128+
129+
The Secure Domain Firmware (SDFW) report errors through the ``CTRL-AP.BOOTSTATUS`` register.
130+
You can read this value using the ``nrfutil device x-boot-status-get`` command:
131+
132+
.. parsed-literal::
133+
:class: highlight
134+
135+
nrfutil device x-boot-status-get --help
136+
137+
SDFW errors
138+
===========
139+
140+
A value of ``0`` indicates *no error*, while any other value signifies that an error has occurred.
141+
142+
.. note::
143+
``0`` is the reset value of this register.
144+
Therefore, a device experiencing erratic behavior might still report ``0`` incorrectly.
145+
For example, this may occur if the device is in a boot loop.
146+
147+
148+
Several components report errors through this register.
149+
The first 4 bits of the first byte is reserved for future use and must be ``0``, the second 4 bits of the bootstatus indicate which component reported an error:
150+
151+
* System Controller ROM -> ``0x01``
152+
* Secure Domain ROM -> ``0x02``
153+
* System Controller Firmware -> ``0x0A``
154+
* Secure Domain Firmware -> ``0x0B``
155+
156+
.. note::
157+
Each one of these values has a different handling of the remaining bits.
158+
This chapter only describes the semantics for Secure Domain Firmware errors (``0x0B******``).
159+
160+
161+
The second byte describes the boot step within the SDFW booting process that reported the failure.
162+
For more information, see `SDFW Boot Steps`_
163+
The last two bytes contain the lower 16 bits of the error code.
164+
165+
For example, ``0x0BA1FF62`` indicates that the SDFW reported an error in the BICR validate step (``0xA1``) with error message ``0xFF62``, or ``-158``.
166+
167+
SDFW Boot Steps
168+
---------------
169+
170+
The boot steps are defined as follows:
171+
172+
.. parsed-literal::
173+
:class: highlight
174+
175+
#define BOOTSTATUS_STEP_START_GRTC 0x06
176+
#define BOOTSTATUS_STEP_SDFW_UPDATE 0x30
177+
#define BOOTSTATUS_STEP_BELLBOARD_CONFIG 0x4F
178+
#define BOOTSTATUS_STEP_SUIT_INIT 0x6F
179+
#define BOOTSTATUS_STEP_DOMAIN_ALLOCATE 0x8F
180+
#define BOOTSTATUS_STEP_MEMORY_FINALIZE 0x91
181+
#define BOOTSTATUS_STEP_TRACEHOST_INIT 0x93
182+
#define BOOTSTATUS_STEP_CURRENT_LIMITED 0xA0
183+
#define BOOTSTATUS_STEP_BICR_VALIDATE 0xA1
184+
#define BOOTSTATUS_STEP_DOMAIN_BOOT 0xAF
185+
#define BOOTSTATUS_STEP_ADAC 0xC0
186+
#define BOOTSTATUS_STEP_SERVICES 0xCF
187+
188+
Errors are not accumulated, as only one error is reported even if multiple boot steps fail.
189+
The SDFW chooses which error to report if multiple errors occur.
190+
The types of errors that can overwrite other errors are the following:
191+
192+
* An update of SDFW has failed.
193+
* The SDFW is unable to initialize the ADAC over CTRL-AP communication.
194+
195+
The following is a short description of the failures related to the boot steps:
196+
197+
* ``BOOTSTATUS_STEP_START_GRTC`` - SDFW was unable to initialize the driver used for the GRTC.
198+
* ``BOOTSTATUS_STEP_SDFW_UPDATE`` - SDROM was instructed to install an update before last reset, and is indicating that an error occurred while performing the update.
199+
* ``BOOTSTATUS_STEP_BELLBOARD_CONFIG`` - SDFW was unable to apply the static bellboard configuration.
200+
* ``BOOTSTATUS_STEP_SUIT_INIT`` - A SUIT related error occurred.
201+
* ``BOOTSTATUS_STEP_DOMAIN_ALLOCATE`` - An error occurred while allocating global resources.
202+
* ``BOOTSTATUS_STEP_MEMORY_FINALIZE`` - SDFW was unable to apply the required memory protection configuration.
203+
* ``BOOTSTATUS_STEP_TRACEHOST_INIT`` - An error occurred when initializing the trace host.
204+
* ``BOOTSTATUS_STEP_CURRENT_LIMITED`` - System Controller ROM booted the system in current limited mode due to an issue in the BICR.
205+
* ``BOOTSTATUS_STEP_BICR_VALIDATE`` - SDFW discovered an invalid BICR. Note that not seeing this issue does not imply that there are no issues in the BICR.
206+
* ``BOOTSTATUS_STEP_DOMAIN_BOOT`` - An error occurred while booting the local domains.
207+
* ``BOOTSTATUS_STEP_ADAC`` - An error occurred while initializing the ADAC transport.
208+
* ``BOOTSTATUS_STEP_SERVICES`` - An error occurred while initializing the SSF server.

0 commit comments

Comments
 (0)