Skip to content

Commit f1eff2a

Browse files
committed
soc: nordic: uicr: Add support for uicr.SECONDARY.PROCESSOR
Add support for uicr.SECONDARY.PROCESSOR. Signed-off-by: Sebastian Bøe <[email protected]>
1 parent 06daf0e commit f1eff2a

File tree

4 files changed

+46
-11
lines changed

4 files changed

+46
-11
lines changed

scripts/ci/check_compliance.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,7 @@ def check_no_undef_outside_kconfig(self, kconf):
12681268
"GEN_UICR_GENERATE_PERIPHCONF", # Used in specialized build tool, not part of main Kconfig
12691269
"GEN_UICR_SECONDARY", # Used in specialized build tool, not part of main Kconfig
12701270
"GEN_UICR_SECONDARY_GENERATE_PERIPHCONF", # Used in specialized build tool, not part of main Kconfig
1271+
"GEN_UICR_SECONDARY_PROCESSOR_VALUE", # Used in specialized build tool, not part of main Kconfig
12711272
"GEN_UICR_SECURESTORAGE", # Used in specialized build tool, not part of main Kconfig
12721273
"HEAP_MEM_POOL_ADD_SIZE_", # Used as an option matching prefix
12731274
"HUGETLBFS", # Linux, in boards/xtensa/intel_adsp_cavs25/doc

soc/nordic/common/uicr/gen_uicr.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,12 @@ def main() -> None:
439439
type=lambda s: int(s, 0),
440440
help="Absolute flash address of the secondary firmware (decimal or 0x-prefixed hex)",
441441
)
442+
parser.add_argument(
443+
"--secondary-processor",
444+
default=0xBD2328A8,
445+
type=lambda s: int(s, 0),
446+
help="Processor to boot for the secondary firmware ",
447+
)
442448
parser.add_argument(
443449
"--secondary-periphconf-address",
444450
default=None,
@@ -562,6 +568,7 @@ def main() -> None:
562568
if args.secondary:
563569
uicr.SECONDARY.ENABLE = ENABLED_VALUE
564570
uicr.SECONDARY.ADDRESS = args.secondary_address
571+
uicr.SECONDARY.PROCESSOR = args.secondary_processor
565572

566573
# Handle secondary periphconf if provided
567574
if args.out_secondary_periphconf_hex:

soc/nordic/common/uicr/gen_uicr/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ if(CONFIG_GEN_UICR_SECONDARY)
154154

155155
list(APPEND secondary_args
156156
--secondary-address ${SECONDARY_ADDRESS}
157+
--secondary-processor ${CONFIG_GEN_UICR_SECONDARY_PROCESSOR_VALUE}
157158
)
158159

159160
if(CONFIG_GEN_UICR_SECONDARY_GENERATE_PERIPHCONF)

soc/nordic/common/uicr/gen_uicr/Kconfig

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,6 @@ config GEN_UICR_GENERATE_PERIPHCONF
1010
When enabled, the UICR generator will populate the
1111
periphconf_partition partition.
1212

13-
config GEN_UICR_SECONDARY
14-
bool "Enable UICR.SECONDARY.ENABLE"
15-
16-
config GEN_UICR_SECONDARY_GENERATE_PERIPHCONF
17-
bool "Generate SECONDARY.PERIPHCONF hex alongside UICR"
18-
default y
19-
depends on GEN_UICR_SECONDARY
20-
help
21-
When enabled, the UICR generator will populate the
22-
secondary_periphconf_partition partition.
23-
2413
config GEN_UICR_SECURESTORAGE
2514
bool "Enable UICR.SECURESTORAGE"
2615
default y
@@ -43,6 +32,43 @@ config GEN_UICR_SECURESTORAGE
4332
- At least one subpartition must be defined
4433
- Combined subpartition sizes must equal secure_storage_partition size
4534

35+
config GEN_UICR_SECONDARY
36+
bool "Enable UICR.SECONDARY.ENABLE"
37+
38+
if GEN_UICR_SECONDARY
39+
40+
config GEN_UICR_SECONDARY_GENERATE_PERIPHCONF
41+
bool "Generate SECONDARY.PERIPHCONF hex alongside UICR"
42+
default y
43+
help
44+
When enabled, the UICR generator will populate the
45+
secondary_periphconf_partition partition.
46+
47+
choice GEN_UICR_SECONDARY_PROCESSOR
48+
prompt "Secondary processor selection"
49+
default GEN_UICR_SECONDARY_PROCESSOR_APPLICATION
50+
help
51+
Processor to boot for the secondary firmware.
52+
53+
config GEN_UICR_SECONDARY_PROCESSOR_APPLICATION
54+
bool "APPLICATION processor"
55+
help
56+
Boot secondary firmware on the APPLICATION processor.
57+
58+
config GEN_UICR_SECONDARY_PROCESSOR_RADIOCORE
59+
bool "RADIOCORE processor"
60+
help
61+
Boot secondary firmware on the RADIOCORE processor.
62+
63+
endchoice
64+
65+
config GEN_UICR_SECONDARY_PROCESSOR_VALUE
66+
hex
67+
default 0xBD2328A8 if GEN_UICR_SECONDARY_PROCESSOR_APPLICATION
68+
default 0x1730C77F if GEN_UICR_SECONDARY_PROCESSOR_RADIOCORE
69+
70+
endif # GEN_UICR_SECONDARY
71+
4672
endmenu
4773

4874
source "Kconfig.zephyr"

0 commit comments

Comments
 (0)