From 20a9848230b4cf9d9b1b92939a21badeedbc9ae1 Mon Sep 17 00:00:00 2001 From: Ioannis Glaropoulos Date: Wed, 21 Oct 2020 15:48:41 +0200 Subject: [PATCH] arch: introduce option to force internal architectural state init We introduce an option that instructs Zephyr to perform the initialization of internal architectural state (e.g. ARCH-level HW registers and system control blocks) during early boot to the reset values. The option is available to the application developer but shall depend on whether the architecture supports the functionality. Signed-off-by: Ioannis Glaropoulos --- arch/Kconfig | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 555b623dfba..5ce7079e532 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -384,6 +384,24 @@ config EXTRA_EXCEPTION_INFO endmenu # Interrupt configuration +config INIT_ARCH_HW_AT_BOOT + bool "Initialize internal architecture state at boot" + depends on ARCH_SUPPORTS_ARCH_HW_INIT + help + This option instructs Zephyr to force the initialization + of the internal architectural state (for example ARCH-level + HW registers and system control blocks) during boot to + the reset values as specified by the corresponding + architecture manual. The option is useful when the Zephyr + firmware image is chain-loaded, for example, by a debugger + or a bootloader, and we need to guarantee that the internal + states of the architecture core blocks are restored to the + reset values (as specified by the architecture). + + Note: the functionality is architecture-specific. For the + implementation details refer to each architecture where + this feature is supported. + endmenu # @@ -417,6 +435,9 @@ config ARCH_HAS_NESTED_EXCEPTION_DETECTION config ARCH_SUPPORTS_COREDUMP bool +config ARCH_SUPPORTS_ARCH_HW_INIT + bool + config ARCH_HAS_EXTRA_EXCEPTION_INFO bool