Skip to content

Commit df506fd

Browse files
committed
[nrf toup] soc: add ironside boot report
Signed-off-by: Håkon Amundsen <[email protected]>
1 parent e48bca4 commit df506fd

File tree

7 files changed

+169
-6
lines changed

7 files changed

+169
-6
lines changed

boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp_iron.dts

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,17 @@
66

77
#include "nrf54h20dk_nrf54h20_cpuapp.dts"
88

9-
/delete-node/&cpurad_rx_partitions;
9+
/* The code partitions are re-defined below, so delete the parent node. */
1010
/delete-node/&cpuapp_rx_partitions;
11+
12+
/* No radio support for IRON variant, don't allocate MRAM. */
13+
/delete-node/&cpurad_rx_partitions;
14+
15+
/* All of ram0x goes to cpuapp, delete these nodes to re-define below. */
16+
/delete-node/&cpuapp_ram0x_region;
17+
/delete-node/&cpurad_ram0x_region;
18+
19+
/* IPC mechanism for IRON variant differs, delete the old node. */
1120
/delete-node/&cpusec_cpuapp_ipc;
1221

1322
/* This is not yet an exhaustive memory map, and contain only a minimum required to boot
@@ -22,15 +31,40 @@
2231
#size-cells = <1>;
2332

2433
cpuapp_slot0_partition: partition@2c000 {
25-
reg = <0x2c000 DT_SIZE_K(480)>;
34+
reg = <0x2c000 DT_SIZE_K(736)>;
35+
};
36+
37+
cpuppr_code_partition: partition@e4000 {
38+
reg = <0xe4000 DT_SIZE_K(64)>;
39+
};
40+
41+
cpuflpr_code_partition: partition@f4000 {
42+
reg = <0xf4000 DT_SIZE_K(48)>;
43+
};
44+
};
45+
};
46+
47+
/ {
48+
reserved-memory {
49+
cpuapp_ram0x_region: memory@2f000000 {
50+
compatible = "nordic,owned-memory", "fixed-partitions";
51+
nordic,access = <NRF_OWNER_ID_APPLICATION NRF_PERM_RWS>;
52+
reg = <0x2f000000 DT_SIZE_K(768)>;
53+
status = "disabled";
54+
#address-cells = <1>;
55+
#size-cells = <1>;
56+
ranges = <0x0 0x2f000000 0xc0000>;
57+
cpuapp_data: memory@0{
58+
reg = <0x0 DT_SIZE_K(768)>;
59+
};
2660
};
2761

28-
cpuppr_code_partition: partition@a4000 {
29-
reg = <0xa4000 DT_SIZE_K(64)>;
62+
sysctrl_rom_report: memory@2f88ff00 {
63+
reg = <0x2f88ff00 0x100>;
3064
};
3165

32-
cpuflpr_code_partition: partition@b4000 {
33-
reg = <0xb4000 DT_SIZE_K(48)>;
66+
cpuapp_ironside_boot_report: memory@2f88fd00 {
67+
reg = <0x2f88fd00 0x200>;
3468
};
3569
};
3670
};

soc/nordic/nrf54h/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ zephyr_linker_sources(SECTIONS SORT_KEY zzz_place_align_at_end align.ld)
1818

1919
add_subdirectory(bicr)
2020
add_subdirectory(gpd)
21+
add_subdirectory(ironside_boot_report)

soc/nordic/nrf54h/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,4 @@ config SOC_NRF54H20_CPUFLPR
7474

7575
rsource "bicr/Kconfig"
7676
rsource "gpd/Kconfig"
77+
rsource "ironside_boot_report/Kconfig"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Nordic Semiconductor
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
zephyr_library_sources_ifdef(CONFIG_SOC_NRF54H20_IRONSIDE_BOOT_REPORT ironside_boot_report.c)
5+
zephyr_include_directories(include)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) 2025 Nordic Semiconductor
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SOC_NRF54H20_IRONSIDE_BOOT_REPORT
5+
bool "Nordic IRONside SE boot report"
6+
default y if SOC_NRF54H20_CPUAPP
7+
depends on SOC_NRF54H20_IRON
8+
help
9+
This option enables parsing of the Boot Report populated by Nordic IRONside SE.
10+
11+
config SOC_NRF54H_IRONSIDE_BOOT_REPORT_MAGIC
12+
hex
13+
default 0xe176928d
14+
help
15+
Constant used to check if an Nordic IRONside SE boot report has been written.
16+
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#ifndef ZEPHYR_SOC_NORDIC_NRF54H_IRONSIDE_BOOT_REPORT_INCLUDE_NRF_IRONSIDE_BOOT_REPORT_H_
7+
#define ZEPHYR_SOC_NORDIC_NRF54H_IRONSIDE_BOOT_REPORT_INCLUDE_NRF_IRONSIDE_BOOT_REPORT_H_
8+
9+
#include <stdint.h>
10+
#include <stddef.h>
11+
12+
13+
/** @brief UICR error description contained in the boot report. */
14+
struct ironside_boot_report_uicr_error {
15+
/** The type of error. A value of 0 indicates no error */
16+
uint32_t error_type;
17+
/** Error descrpitions specific to each type of UICR error */
18+
union {
19+
/** MPCCONF error */
20+
struct {
21+
/** The MPC error type */
22+
uint32_t err;
23+
/** Address to the MPC instance that triggered the error */
24+
uint32_t mpc_instance_address;
25+
/** The index of the MPCCONF entry that triggered the error */
26+
int32_t index;
27+
} mpcconf;
28+
/** PERIPHCONF error */
29+
struct {
30+
/** The SPU error type */
31+
uint32_t err;
32+
/** Address to the SPU instance that triggered the error */
33+
uint32_t spu_instance_address;
34+
/** Address to the peripheral index of the SPU that triggered the error */
35+
uint32_t peripheral;
36+
/** The index of the PERIPHCONF entry that triggered the error */
37+
int32_t index;
38+
} periphconf;
39+
/** ITS error */
40+
struct {
41+
uint32_t err;
42+
} its;
43+
} description;
44+
};
45+
46+
/** @brief IRONside boot report. */
47+
struct ironside_boot_report {
48+
/** Magic value used to identify valid boot report */
49+
uint32_t magic;
50+
/** Firmware version of IRONside SE. 8bit MAJOR.MINOR.PATCH.TWEAK */
51+
uint32_t ironside_version_int;
52+
/** Human readable extraversion of IRONside SE */
53+
char ironside_extraversion[12];
54+
/** Firmware version of IRONside SE recovery firmware. 8bit MAJOR.MINOR.PATCH.TWEAK */
55+
uint32_t ironside_recovery_version_int;
56+
/** Human readable extraversion of IRONside SE */
57+
char ironside_recovery_extraversion[12];
58+
/** Copy of SICR.UROT.UPDATE.STATUS.*/
59+
uint32_t ironside_update_status;
60+
/** See @ref ironside_boot_report_uicr_error */
61+
struct ironside_boot_report_uicr_error uicr_error_description;
62+
/** Data passed from booting local domain to local domain being booted */
63+
uint8_t local_domain_context[32];
64+
/** CSPRNG data */
65+
uint8_t random_data[32];
66+
/** Reserved for Future Use */
67+
uint32_t rfu[64];
68+
};
69+
70+
/**
71+
* @brief Get a pointer to the IRONside boot report.
72+
*
73+
* @param[out] report Will be set to point to the IRONside boot report.
74+
*
75+
* @return non-negative value if success, negative value otherwise.
76+
* @retval -EFAULT if the magic field in the report is incorrect.
77+
* @retval -EINVAL if @ref report is NULL.
78+
*/
79+
int ironside_boot_report_get(const struct ironside_boot_report **report);
80+
81+
#endif /* ZEPHYR_SOC_NORDIC_NRF54H_IRONSIDE_BOOT_REPORT_INCLUDE_NRF_IRONSIDE_BOOT_REPORT_H_ */
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <errno.h>
7+
#include <zephyr/devicetree.h>
8+
#include <nrf/ironside_boot_report.h>
9+
10+
#define IRONSIDE_BOOT_REPORT_ADDR DT_REG_ADDR(DT_NODELABEL(cpuapp_ironside_boot_report))
11+
#define IRONSIDE_BOOT_REPORT_MAGIC CONFIG_SOC_NRF54H_IRONSIDE_BOOT_REPORT_MAGIC
12+
13+
int ironside_boot_report_get(const struct ironside_boot_report **report)
14+
{
15+
const struct ironside_boot_report *tmp_report =
16+
(const struct ironside_boot_report *)IRONSIDE_BOOT_REPORT_ADDR;
17+
18+
if (tmp_report->magic != IRONSIDE_BOOT_REPORT_MAGIC) {
19+
return -EINVAL;
20+
}
21+
22+
*report = tmp_report;
23+
24+
return 0;
25+
}

0 commit comments

Comments
 (0)