Denis Carikli (GNUtoo@no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3990
-gerrit
commit ffc383684079d60e7d20403ef7c3877d580c57b4 Author: Denis 'GNUtoo' Carikli GNUtoo@no-log.org Date: Mon Oct 21 01:56:47 2013 +0200
Add a KEEP_BOOT_COUNT Kconfig option.
The use case of that option is to inform coreboot (trough the nvram) at the next boot, that the computer could not fully boot to boot to an usable state. In that case, the boot count is incremented by one.
Previously there was no way to tell coreboot that the computer really booted successfully, because it was assumed that if set_boot_successful was called in ramstage, then the computer would have booted successfully.
However many things can go wrong after that point, for instance the payload could fail to boot, or the operating system's kernel could fail to boot too, due to the wrong configurations passed to it by coreboot and the payload.
Change-Id: I01af053455eb6bd2f7a4f9d37e8c234ba8d55250 Signed-off-by: Denis 'GNUtoo' Carikli GNUtoo@no-log.org --- src/Kconfig | 7 +++++++ src/lib/fallback_boot.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/Kconfig b/src/Kconfig index 10f8c18..1ccc818 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -47,6 +47,13 @@ config CBFS_PREFIX Select the prefix to all files put into the image. It's "fallback" by default, "normal" is a common alternative.
+config KEEP_BOOT_COUNT + bool "Keep boot count" + depends on PC80_SYSTEM + help + If enabled, the boot count is not reset anymore in the ramstage. + This delegates that task to the software running after the ramstage. + config ALT_CBFS_LOAD_PAYLOAD bool "Use alternative cbfs_load_payload() implementation." default n diff --git a/src/lib/fallback_boot.c b/src/lib/fallback_boot.c index b956c94..7f5db63 100644 --- a/src/lib/fallback_boot.c +++ b/src/lib/fallback_boot.c @@ -3,7 +3,7 @@ #include <watchdog.h> #include <arch/io.h>
-#if CONFIG_PC80_SYSTEM +#if CONFIG_PC80_SYSTEM && !CONFIG_KEEP_BOOT_COUNT #include <pc80/mc146818rtc.h>
static void set_boot_successful(void)