Skip to content

Commit 5095516

Browse files
committed
[nrf fromlist] soc: nordic: uicr: Move GEN_UICR options into the main Zephyr tree
I initially added the GEN_UICR options to the gen_uicr image's Kconfig tree only to not pollute the main tree. But there is a lot of useful help text in the GEN_UICR option's Kconfig file that I would like users to be able to read/reference from the docs. To not increase the complexity of the Kconfig doc generator, we add the GEN_UICR options to the main tree and have them all be disabled for builds other than the gen_uicr image. Being in the main tree has the added benefit of being recognzied by the compliance checker. Upstream PR #: 98911 Signed-off-by: Sebastian Bøe <[email protected]>
1 parent cb89816 commit 5095516

File tree

3 files changed

+21
-44
lines changed

3 files changed

+21
-44
lines changed

scripts/ci/check_compliance.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,39 +1350,6 @@ def check_no_undef_outside_kconfig(self, kconf):
13501350
"FOO_LOG_LEVEL",
13511351
"FOO_SETTING_1",
13521352
"FOO_SETTING_2",
1353-
"GEN_UICR_APPROTECT_APPLICATION_PROTECTED",
1354-
"GEN_UICR_APPROTECT_CORESIGHT_PROTECTED",
1355-
"GEN_UICR_APPROTECT_RADIOCORE_PROTECTED",
1356-
"GEN_UICR_ERASEPROTECT",
1357-
"GEN_UICR_GENERATE_PERIPHCONF",
1358-
"GEN_UICR_LOCK",
1359-
"GEN_UICR_PROTECTEDMEM",
1360-
"GEN_UICR_PROTECTEDMEM_SIZE_BYTES",
1361-
"GEN_UICR_SECONDARY",
1362-
"GEN_UICR_SECONDARY_GENERATE_PERIPHCONF",
1363-
"GEN_UICR_SECONDARY_PROCESSOR_APPLICATION",
1364-
"GEN_UICR_SECONDARY_PROCESSOR_RADIOCORE",
1365-
"GEN_UICR_SECONDARY_PROCESSOR_VALUE",
1366-
"GEN_UICR_SECONDARY_PROTECTEDMEM",
1367-
"GEN_UICR_SECONDARY_PROTECTEDMEM_SIZE_BYTES",
1368-
"GEN_UICR_SECONDARY_TRIGGER",
1369-
"GEN_UICR_SECONDARY_TRIGGER_APPLICATIONLOCKUP",
1370-
"GEN_UICR_SECONDARY_TRIGGER_APPLICATIONWDT0",
1371-
"GEN_UICR_SECONDARY_TRIGGER_APPLICATIONWDT1",
1372-
"GEN_UICR_SECONDARY_TRIGGER_RADIOCORELOCKUP",
1373-
"GEN_UICR_SECONDARY_TRIGGER_RADIOCOREWDT0",
1374-
"GEN_UICR_SECONDARY_TRIGGER_RADIOCOREWDT1",
1375-
"GEN_UICR_SECONDARY_WDTSTART",
1376-
"GEN_UICR_SECONDARY_WDTSTART_CRV",
1377-
"GEN_UICR_SECONDARY_WDTSTART_INSTANCE_CODE",
1378-
"GEN_UICR_SECONDARY_WDTSTART_INSTANCE_WDT0",
1379-
"GEN_UICR_SECONDARY_WDTSTART_INSTANCE_WDT1",
1380-
"GEN_UICR_SECURESTORAGE",
1381-
"GEN_UICR_WDTSTART",
1382-
"GEN_UICR_WDTSTART_CRV",
1383-
"GEN_UICR_WDTSTART_INSTANCE_CODE",
1384-
"GEN_UICR_WDTSTART_INSTANCE_WDT0",
1385-
"GEN_UICR_WDTSTART_INSTANCE_WDT1",
13861353
"HEAP_MEM_POOL_ADD_SIZE_", # Used as an option matching prefix
13871354
"HUGETLBFS", # Linux, in boards/xtensa/intel_adsp_cavs25/doc
13881355
"IAR_BUFFERED_WRITE",

soc/nordic/common/uicr/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,14 @@ config IS_IRONSIDE_SE_SECONDARY_IMAGE
2525
This Kconfig is set by sysbuild to indicate that this image is a
2626
secondary firmware for Ironside SE. This is used by the UICR generation
2727
system to determine which PERIPHCONF partition to use.
28+
29+
config IS_GEN_UICR_IMAGE
30+
bool "UICR generator image indicator (informative only, do not change)"
31+
help
32+
This Kconfig is automatically set when building the gen_uicr image.
33+
It indicates that this is the UICR generator utility image and enables
34+
the UICR generator configuration options.
35+
36+
# Source UICR generator options when building the gen_uicr image
37+
# All options are disabled by default unless IS_GEN_UICR_IMAGE is set
38+
rsource "Kconfig.gen_uicr"

soc/nordic/common/uicr/gen_uicr/Kconfig renamed to soc/nordic/common/uicr/Kconfig.gen_uicr

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
menu "UICR generator options"
5+
depends on IS_GEN_UICR_IMAGE
56

67
config GEN_UICR_GENERATE_PERIPHCONF
78
bool "Generate PERIPHCONF hex alongside UICR"
@@ -11,7 +12,7 @@ config GEN_UICR_GENERATE_PERIPHCONF
1112
periphconf_partition partition.
1213

1314
config GEN_UICR_SECURESTORAGE
14-
bool "Enable UICR.SECURESTORAGE"
15+
bool "UICR.SECURESTORAGE"
1516
default y
1617
depends on $(dt_nodelabel_enabled,secure_storage_partition)
1718
help
@@ -33,7 +34,7 @@ config GEN_UICR_SECURESTORAGE
3334
- Combined subpartition sizes must equal secure_storage_partition size
3435

3536
config GEN_UICR_LOCK
36-
bool "Enable UICR.LOCK"
37+
bool "UICR.LOCK"
3738
help
3839
When enabled, locks the entire contents of the NVR0 page located in
3940
MRAM10. This includes all values in both the UICR and the BICR (Board
@@ -44,7 +45,7 @@ config GEN_UICR_LOCK
4445
unauthorized modification.
4546

4647
config GEN_UICR_ERASEPROTECT
47-
bool "Enable UICR.ERASEPROTECT"
48+
bool "UICR.ERASEPROTECT"
4849
depends on ! GEN_UICR_LOCK
4950
help
5051
When enabled, ERASEALL operations are blocked.
@@ -80,7 +81,7 @@ config GEN_UICR_APPROTECT_CORESIGHT_PROTECTED
8081
endmenu
8182

8283
config GEN_UICR_PROTECTEDMEM
83-
bool "Enable UICR.PROTECTEDMEM"
84+
bool "UICR.PROTECTEDMEM"
8485
help
8586
When enabled, the UICR generator will configure the
8687
protected memory region.
@@ -94,7 +95,7 @@ config GEN_UICR_PROTECTEDMEM_SIZE_BYTES
9495
This value must be divisible by 4096 (4 kiB).
9596

9697
config GEN_UICR_WDTSTART
97-
bool "Enable UICR.WDTSTART"
98+
bool "UICR.WDTSTART"
9899
help
99100
When enabled, the UICR generator will configure an application
100101
domain watchdog timer to start automatically before the
@@ -137,7 +138,7 @@ config GEN_UICR_WDTSTART_CRV
137138
Default value 65535 creates a 2-second timeout.
138139

139140
config GEN_UICR_SECONDARY_WDTSTART
140-
bool "Enable UICR.SECONDARY.WDTSTART"
141+
bool "UICR.SECONDARY.WDTSTART"
141142
depends on GEN_UICR_SECONDARY
142143
help
143144
When enabled, the UICR generator will configure the
@@ -181,7 +182,7 @@ config GEN_UICR_SECONDARY_WDTSTART_CRV
181182
Default value 65535 creates a 2-second timeout.
182183

183184
config GEN_UICR_SECONDARY
184-
bool "Enable UICR.SECONDARY.ENABLE"
185+
bool "UICR.SECONDARY.ENABLE"
185186

186187
if GEN_UICR_SECONDARY
187188

@@ -216,7 +217,7 @@ config GEN_UICR_SECONDARY_PROCESSOR_VALUE
216217
default 0x1730C77F if GEN_UICR_SECONDARY_PROCESSOR_RADIOCORE
217218

218219
config GEN_UICR_SECONDARY_TRIGGER
219-
bool "Enable UICR.SECONDARY.TRIGGER"
220+
bool "UICR.SECONDARY.TRIGGER"
220221
help
221222
When enabled, configures automatic triggers that cause IronSide SE
222223
to boot the secondary firmware instead of the primary firmware based
@@ -257,7 +258,7 @@ config GEN_UICR_SECONDARY_TRIGGER_RADIOCORELOCKUP
257258
endif # GEN_UICR_SECONDARY_TRIGGER
258259

259260
config GEN_UICR_SECONDARY_PROTECTEDMEM
260-
bool "Enable UICR.SECONDARY.PROTECTEDMEM"
261+
bool "UICR.SECONDARY.PROTECTEDMEM"
261262
depends on GEN_UICR_SECONDARY
262263
help
263264
When enabled, the UICR generator will configure the
@@ -274,5 +275,3 @@ config GEN_UICR_SECONDARY_PROTECTEDMEM_SIZE_BYTES
274275
endif # GEN_UICR_SECONDARY
275276

276277
endmenu
277-
278-
source "Kconfig.zephyr"

0 commit comments

Comments
 (0)