Skip to content

Commit 233d4c6

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

File tree

7 files changed

+164
-6
lines changed

7 files changed

+164
-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,9 +6,18 @@
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;
1111

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. */
20+
1221
/* This is not yet an exhaustive memory map, and contain only a minimum required to boot
1322
* the application core.
1423
*/
@@ -21,15 +30,40 @@
2130
#size-cells = <1>;
2231

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

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

31-
cpuflpr_code_partition: partition@b4000 {
32-
reg = <0xb4000 DT_SIZE_K(48)>;
65+
cpuapp_ironside_se_boot_report: memory@2f88fd00 {
66+
reg = <0x2f88fd00 0x200>;
3367
};
3468
};
3569
};

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_se)

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_se/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_SE_BOOT_REPORT ironside_se_boot_report.c)
5+
zephyr_include_directories(include)

soc/nordic/nrf54h/ironside_se/Kconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright (c) 2025 Nordic Semiconductor
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SOC_NRF54H20_IRONSIDE_SE_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_NRF54H20_IRONSIDE_SE_BOOT_REPORT_MAGIC
12+
hex
13+
default 0x4d69546f
14+
help
15+
Constant used to check if an Nordic IRONside SE boot report has been written.
16+
17+
config SOC_NRF54H20_IRONSIDE_SE_BOOT_REPORT_LOCAL_DOMAIN_CONTEXT_SIZE
18+
int
19+
default 32
20+
help
21+
Size of the local domain context in bytes
22+
23+
config SOC_NRF54H20_IRONSIDE_SE_BOOT_REPORT_RANDOM_DATA_SIZE
24+
int
25+
default 32
26+
help
27+
Size of the random data in bytes
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#ifndef ZEPHYR_SOC_NORDIC_NRF54H_IRONSIDE_SE_BOOT_REPORT_INCLUDE_NRF_IRONSIDE_SE_BOOT_REPORT_H_
7+
#define ZEPHYR_SOC_NORDIC_NRF54H_IRONSIDE_SE_BOOT_REPORT_INCLUDE_NRF_IRONSIDE_SE_BOOT_REPORT_H_
8+
9+
#include <stdint.h>
10+
#include <stddef.h>
11+
12+
#define IRONSIDE_SE_BOOT_REPORT_LOCAL_DOMAIN_CONTEXT_SIZE \
13+
CONFIG_SOC_NRF54H20_IRONSIDE_SE_BOOT_REPORT_LOCAL_DOMAIN_CONTEXT_SIZE
14+
#define IRONSIDE_SE_BOOT_REPORT_RANDOM_DATA_SIZE \
15+
CONFIG_SOC_NRF54H20_IRONSIDE_SE_BOOT_REPORT_RANDOM_DATA_SIZE
16+
17+
/** @brief UICR error description contained in the boot report. */
18+
struct ironside_se_boot_report_uicr_error {
19+
/** The type of error. A value of 0 indicates no error */
20+
uint32_t error_type;
21+
/** Error descrpitions specific to each type of UICR error */
22+
union {
23+
/** RFU */
24+
struct {
25+
uint32_t rfu[4];
26+
} rfu;
27+
} description;
28+
};
29+
30+
/** @brief IRONside boot report. */
31+
struct ironside_se_boot_report {
32+
/** Magic value used to identify valid boot report */
33+
uint32_t magic;
34+
/** Firmware version of IRONside SE. 8bit MAJOR.MINOR.PATCH.TWEAK */
35+
uint32_t ironside_se_version_int;
36+
/** Human readable extraversion of IRONside SE */
37+
char ironside_se_extraversion[12];
38+
/** Firmware version of IRONside SE recovery firmware. 8bit MAJOR.MINOR.PATCH.TWEAK */
39+
uint32_t ironside_se_recovery_version_int;
40+
/** Human readable extraversion of IRONside SE */
41+
char ironside_se_recovery_extraversion[12];
42+
/** Copy of SICR.UROT.UPDATE.STATUS.*/
43+
uint32_t ironside_update_status;
44+
/** See @ref ironside_se_boot_report_uicr_error */
45+
struct ironside_se_boot_report_uicr_error uicr_error_description;
46+
/** Data passed from booting local domain to local domain being booted */
47+
uint8_t local_domain_context[IRONSIDE_SE_BOOT_REPORT_LOCAL_DOMAIN_CONTEXT_SIZE];
48+
/** CSPRNG data */
49+
uint8_t random_data[IRONSIDE_SE_BOOT_REPORT_RANDOM_DATA_SIZE];
50+
/** Reserved for Future Use */
51+
uint32_t rfu[64];
52+
};
53+
54+
/**
55+
* @brief Get a pointer to the IRONside boot report.
56+
*
57+
* @param[out] report Will be set to point to the IRONside boot report.
58+
*
59+
* @return non-negative value if success, negative value otherwise.
60+
* @retval -EFAULT if the magic field in the report is incorrect.
61+
* @retval -EINVAL if @ref report is NULL.
62+
*/
63+
int ironside_se_boot_report_get(const struct ironside_se_boot_report **report);
64+
65+
#endif /* ZEPHYR_SOC_NORDIC_NRF54H_IRONSIDE_SE_BOOT_REPORT_INCLUDE_NRF_IRONSIDE_SE_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_se_boot_report.h>
9+
10+
#define IRONSIDE_SE_BOOT_REPORT_ADDR DT_REG_ADDR(DT_NODELABEL(cpuapp_ironside_se_boot_report))
11+
#define IRONSIDE_SE_BOOT_REPORT_MAGIC CONFIG_SOC_NRF54H20_IRONSIDE_SE_BOOT_REPORT_MAGIC
12+
13+
int ironside_se_boot_report_get(const struct ironside_se_boot_report **report)
14+
{
15+
const struct ironside_se_boot_report *tmp_report =
16+
(const struct ironside_se_boot_report *)IRONSIDE_SE_BOOT_REPORT_ADDR;
17+
18+
if (tmp_report->magic != IRONSIDE_SE_BOOT_REPORT_MAGIC) {
19+
return -EINVAL;
20+
}
21+
22+
*report = tmp_report;
23+
24+
return 0;
25+
}

0 commit comments

Comments
 (0)