summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Kconfig8
-rw-r--r--src/lib/fallback_boot.c5
2 files changed, 11 insertions, 2 deletions
diff --git a/src/Kconfig b/src/Kconfig
index a0758bcf22..6cabc70e2f 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -236,6 +236,14 @@ config BOOTBLOCK_SOURCE
default "bootblock_simple.c" if BOOTBLOCK_SIMPLE
default "bootblock_normal.c" if BOOTBLOCK_NORMAL
+config SKIP_MAX_REBOOT_CNT_CLEAR
+ bool "Do not clear reboot count after successful boot"
+ default n
+ depends on EXPERT
+ help
+ Do not clear the reboot count immediately after successful boot.
+ Set to allow the payload to control normal/fallback image recovery.
+
config UPDATE_IMAGE
bool "Update existing coreboot.rom image"
default n
diff --git a/src/lib/fallback_boot.c b/src/lib/fallback_boot.c
index b956c94a15..74572df323 100644
--- a/src/lib/fallback_boot.c
+++ b/src/lib/fallback_boot.c
@@ -22,8 +22,9 @@ static void set_boot_successful(void)
byte |= (byte & (1 << 1)) >> 1;
/* If we are in normal mode set the boot count to 0 */
- if(byte & 1)
- byte &= 0x0f;
+ if (!IS_ENABLED(CONFIG_SKIP_MAX_REBOOT_CNT_CLEAR))
+ if(byte & 1)
+ byte &= 0x0f;
outb(byte, RTC_PORT(1));
}
#else