diff --git a/arch/Kconfig b/arch/Kconfig index 27dfe9344c4..c574947b2ca 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -58,6 +58,15 @@ config SYS_POWER_DEEP_SLEEP_SUPPORTED help This option signifies that the target supports the SYS_POWER_DEEP_SLEEP configuration option. + +config BOOTLOADER_CONTEXT_RESTORE_SUPPORTED + # Hidden + bool + default n + help + This option signifies that the target has options of bootloaders + that support context restore upon resume from deep sleep + # # End hidden PM feature configs # diff --git a/arch/x86/core/crt0.S b/arch/x86/core/crt0.S index d651225abf2..28d04c77429 100644 --- a/arch/x86/core/crt0.S +++ b/arch/x86/core/crt0.S @@ -200,7 +200,8 @@ __csSet: movl $_interrupt_stack, %esp addl $CONFIG_ISR_STACK_SIZE, %esp -#ifdef CONFIG_SYS_POWER_DEEP_SLEEP +#if defined(CONFIG_SYS_POWER_DEEP_SLEEP) && \ + !defined(CONFIG_BOOTLOADER_CONTEXT_RESTORE) /* * Invoke _sys_soc_resume_from_deep_sleep() hook to handle resume from * deep sleep. It should first check whether system is recovering from diff --git a/arch/x86/soc/intel_quark/quark_se/Kconfig.series b/arch/x86/soc/intel_quark/quark_se/Kconfig.series index feaa6670d39..ee574f4daef 100644 --- a/arch/x86/soc/intel_quark/quark_se/Kconfig.series +++ b/arch/x86/soc/intel_quark/quark_se/Kconfig.series @@ -23,6 +23,7 @@ config SOC_SERIES_QUARK_SE select XIP select SYS_POWER_LOW_POWER_STATE_SUPPORTED select SYS_POWER_DEEP_SLEEP_SUPPORTED + select BOOTLOADER_CONTEXT_RESTORE_SUPPORTED select HAS_QMSI help Enable support for Quark SE diff --git a/misc/Kconfig b/misc/Kconfig index 320fb7e6b2a..9342303284e 100644 --- a/misc/Kconfig +++ b/misc/Kconfig @@ -397,6 +397,16 @@ config BOOTLOADER_UNKNOWN at build time which method is to be used. When this option is enabled the board may have to do extra work to ensure a proper startup. +config BOOTLOADER_CONTEXT_RESTORE + bool + prompt "Boot loader has context restore support" + default y + depends on SYS_POWER_DEEP_SLEEP && BOOTLOADER_CONTEXT_RESTORE_SUPPORTED + help + This option signifies that the target has a bootloader + that restores CPU context upon resuming from deep sleep + power state. + config REBOOT bool "Reboot functionality" default n