#
# Copyright (c) 2019 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

config DISABLE_FLASH_PATCH
	bool "Disable Cortex-M4 Flash Patch capabilities"
	depends on SOC_NRF52840 || SOC_NRF52833
	depends on REBOOT
	help
	  This disables the Flash Patch and Breakpoint (FPB) unit.
	  The flash patch can be used by malicious code to circumvent secure
	  boot checks. Note that disabling the FPB also disables
	  breakpoints.

config FLASH_PATCH_WARN
	bool
	depends on SOC_NRF52840 || SOC_NRF52833
	depends on !DISABLE_FLASH_PATCH
	depends on IS_SECURE_BOOTLOADER || MCUBOOT
	default y
