Skip to content

Commit

Permalink
samples: matter: Enable Fprotect to secure factory data.
Browse files Browse the repository at this point in the history
Enabled FPROTECT in the Matter samples working on nRF54L15
to protect Matter Factory Data.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
  • Loading branch information
ArekBalysNordic authored and rlubos committed Sep 2, 2024
1 parent 27bec4f commit 9fec64a
Show file tree
Hide file tree
Showing 19 changed files with 46 additions and 51 deletions.
11 changes: 0 additions & 11 deletions samples/matter/light_bulb/boards/nrf54l15pdk_nrf54l15_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

CONFIG_FPU=n
CONFIG_PM=n
CONFIG_HWINFO_NRF=n

# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L
CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n

# Currently, without tickless kernel, the SYSCOUNTER value after the software
# reset is not set properly and due to that the first system interrupt is not called
# in the proper time - the SYSCOUNTER value is set to the value from before
# reset + 1. Hence, the reboot time increases more and more.
# To avoid it enable tickles kernel for mcuboot.
CONFIG_TICKLESS_KERNEL=y

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

CONFIG_FPU=n
CONFIG_PM=n
CONFIG_HWINFO_NRF=n

# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L
# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L_ns
CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n

# TODO: KRKNWK-19382: Disable NFC commissioning due to an issue with definitions for ns build.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# TODO: Workaround Fprotect is not supported on nRF54l15 yet.
CONFIG_FPROTECT=n
# TODO: Workaround, disable memory guard to avoid false faults in application after boot
CONFIG_HW_STACK_PROTECTION=n

Expand All @@ -18,10 +16,22 @@ CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

# TODO: NCSDK-28931: Cannot use fprotect twice, so disable it in MCUboot to
# test protecting Matter factory data. It can be enabled while there is a support
# for protection more than one region.
CONFIG_FPROTECT=n

# required by SPI driver
CONFIG_MULTITHREADING=y

CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y

# Adjust the maximum sectors to the app image size of ~1.4MB
CONFIG_BOOT_MAX_IMG_SECTORS=512

# Currently, without tickless kernel, the SYSCOUNTER value after the software
# reset is not set properly and due to that the first system interrupt is not called
# in the proper time - the SYSCOUNTER value is set to the value from before
# reset + 1. Hence, the reboot time increases more and more.
# To avoid it enable tickles kernel for mcuboot.
CONFIG_TICKLESS_KERNEL=y
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

CONFIG_FPU=n
CONFIG_PM=n
CONFIG_HWINFO_NRF=n

# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L
CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CONFIG_FPU=n
CONFIG_PM=n
CONFIG_HWINFO_NRF=n

# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L
# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L_ns
CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n

# TODO: KRKNWK-19382: Disable NFC commissioning due to an issue with definitions for ns build.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# TODO: Workaround Fprotect is not supported on nRF54l15 yet.
CONFIG_FPROTECT=n
# TODO: Workaround, disable memory guard to avoid false faults in application after boot
CONFIG_HW_STACK_PROTECTION=n

Expand All @@ -18,6 +16,11 @@ CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

# TODO: NCSDK-28931: Cannot use fprotect twice, so disable it in MCUboot to
# test protecting Matter factory data. It can be enabled while there is a support
# for protection more than one region.
CONFIG_FPROTECT=n

# required by SPI driver
CONFIG_MULTITHREADING=y

Expand Down
4 changes: 0 additions & 4 deletions samples/matter/lock/boards/nrf54l15pdk_nrf54l15_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

CONFIG_FPU=n
CONFIG_PM=n
CONFIG_HWINFO_NRF=n

# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L
CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CONFIG_FPU=n
CONFIG_PM=n
CONFIG_HWINFO_NRF=n

# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L
# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L_ns
CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n

# TODO: KRKNWK-19382: Disable NFC commissioning due to an issue with definitions for ns build.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# TODO: Workaround Fprotect is not supported on nRF54l15 yet.
CONFIG_FPROTECT=n
# TODO: Workaround, disable memory guard to avoid false faults in application after boot
CONFIG_HW_STACK_PROTECTION=n

Expand All @@ -18,6 +16,11 @@ CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

# TODO: NCSDK-28931: Cannot use fprotect twice, so disable it in MCUboot to
# test protecting Matter factory data. It can be enabled while there is a support
# for protection more than one region.
CONFIG_FPROTECT=n

# required by SPI driver
CONFIG_MULTITHREADING=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

CONFIG_FPU=n
CONFIG_PM=n
CONFIG_HWINFO_NRF=n

# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L
CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CONFIG_FPU=n
CONFIG_PM=n
CONFIG_HWINFO_NRF=n

# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L
# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L_ns
CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# TODO: Workaround Fprotect is not supported on nRF54l15 yet.
CONFIG_FPROTECT=n
# TODO: Workaround, disable memory guard to avoid false faults in application after boot
CONFIG_HW_STACK_PROTECTION=n

Expand All @@ -18,6 +16,11 @@ CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

# TODO: NCSDK-28931: Cannot use fprotect twice, so disable it in MCUboot to
# test protecting Matter factory data. It can be enabled while there is a support
# for protection more than one region.
CONFIG_FPROTECT=n

# required by SPI driver
CONFIG_MULTITHREADING=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# TODO: Workaround Fprotect is not supported on nRF54l15 yet.
# TODO: NCSDK-28931: Cannot use fprotect twice, so disable it in MCUboot to
# test protecting Matter factory data. It can be enabled while there is a support
# for protection more than one region.
CONFIG_FPROTECT=n
# TODO: Workaround, disable memory guard to avoid false faults in application after boot
CONFIG_HW_STACK_PROTECTION=n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

CONFIG_FPU=n
CONFIG_PM=n
CONFIG_HWINFO_NRF=n

# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L
CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CONFIG_FPU=n
CONFIG_PM=n
CONFIG_HWINFO_NRF=n

# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L
# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L_ns
CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n

# TODO: KRKNWK-19382: Disable NFC commissioning due to an issue with definitions for ns build.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# TODO: Workaround Fprotect is not supported on nRF54l15 yet.
CONFIG_FPROTECT=n
# TODO: Workaround, disable memory guard to avoid false faults in application after boot
CONFIG_HW_STACK_PROTECTION=n

Expand All @@ -18,6 +16,11 @@ CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

# TODO: NCSDK-28931: Cannot use fprotect twice, so disable it in MCUboot to
# test protecting Matter factory data. It can be enabled while there is a support
# for protection more than one region.
CONFIG_FPROTECT=n

# required by SPI driver
CONFIG_MULTITHREADING=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ CONFIG_BT_LL_SOFTDEVICE_MULTIROLE=y

CONFIG_FPU=n
CONFIG_PM=n
CONFIG_HWINFO_NRF=n

# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L
CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n

# nRF54L15 requires bigger stack sizes than nRF52/nRF53 families
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CONFIG_FPU=n
CONFIG_PM=n
CONFIG_HWINFO_NRF=n

# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L
# TODO: Workaround to be removed once Zephyr's CONFIG_FPROTECT is supported on nRF54L_ns
CONFIG_CHIP_FACTORY_DATA_WRITE_PROTECT=n

# TODO: KRKNWK-19382: Disable NFC commissioning due to an issue with definitions for ns build.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# TODO: Workaround Fprotect is not supported on nRF54l15 yet.
CONFIG_FPROTECT=n
# TODO: Workaround, disable memory guard to avoid false faults in application after boot
CONFIG_HW_STACK_PROTECTION=n

Expand All @@ -18,6 +16,11 @@ CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

# TODO: NCSDK-28931: Cannot use fprotect twice, so disable it in MCUboot to
# test protecting Matter factory data. It can be enabled while there is a support
# for protection more than one region.
CONFIG_FPROTECT=n

# required by SPI driver
CONFIG_MULTITHREADING=y

Expand Down

0 comments on commit 9fec64a

Please sign in to comment.