[coreboot-gerrit] Patch set updated for coreboot: 8611263 X86 Kconfig: Make the MAX_REBOOT_CNT selectable in X86_BOOTBLOCK_NORMAL mode.

Denis Carikli (GNUtoo@no-log.org) gerrit at coreboot.org
Sun Nov 3 12:11:47 CET 2013

Denis Carikli (GNUtoo at no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3991


commit 861126370589f69af0bb46c3748cc90ced3f7fb2
Author: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
Date:   Sun Oct 20 23:37:35 2013 +0200

    X86 Kconfig: Make the MAX_REBOOT_CNT selectable in X86_BOOTBLOCK_NORMAL mode.
    src/arch/x86/Kconfig defined MAX_REBOOT_CNT as 3.
    In the bootblock, the reboot_bits cmos option is increased by one at each boot.
    If the boot is successful, the respective nvram settings have to be reset to
      boot on the normal/ prefix next time.
    If KEEP_BOOT_COUNT is selected, it has to be done after the ramstage,
      if not, it's done in the ramstage.
    In case of a failed boot, the reboot_bits keeps increasing until it reach
      KEEP_BOOT_COUNT. Once it is reached, it will swtich to fallback/ at next boot.
    With KEEP_BOOT_COUNT beeing hidden in make menuconfig, and set to 3,
      the user probably won't know that coreboot will only switch to fallback after
      3 failed boots, and will act as if the computer will not boot anymore with its
      current coreboot image.
    This patch makes KEEP_BOOT_COUNT with a default of 1.
    This patch was tested on the Lenovo X60.
    Change-Id: I746df11c933dfe62e01e1591479ca96a84907dc0
    Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
 src/arch/x86/Kconfig | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index b4e8eb0..9cf1e17 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -42,12 +42,6 @@ config STACK_SIZE
 	default 0x1000
-# Maximum reboot count
-# TODO: Improve description.
-	int
-	default 3
 # This is something you almost certainly don't want to mess with.
 # How many SIPIs do we send when starting up APs and cores?
 # The answer in 2000 or so was '2'. Nowadays, on many systems,
@@ -72,6 +66,20 @@ config X86_BOOTBLOCK_NORMAL
+# Maximum reboot count
+	int "Number of failed boot attempts before switching back to fallback/"
+	default 1
+	depends on X86_BOOTBLOCK_NORMAL
+	help
+	 Note that the minimum number of reset a machine has to do to boot
+	 can vary across machines.
+	 If you set it to a number that is less that the machine minimum,
+	 the machine will then switch to fallback/ during the next boot.
+	 Once in fallback/, the machine will keep that settings unless
+	 the nvram is reset, which will make it switch to fallback/
+	 again during the next boot.
 	bool "Keep boot count"
 	default n

More information about the coreboot-gerrit mailing list