Denis Carikli (GNUtoo(a)no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3990
-gerrit
commit 9822e81728a86b9687bea4351931097635b16dff
Author: Denis 'GNUtoo' Carikli <GNUtoo(a)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(a)no-log.org>
---
src/Kconfig | 8 ++++++++
src/lib/fallback_boot.c | 3 +++
2 files changed, 11 insertions(+)
diff --git a/src/Kconfig b/src/Kconfig
index 10f8c18..ac7b610 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -47,6 +47,14 @@ 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"
+ default n
+ 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 62bc0a5..e1acefd 100644
--- a/src/lib/fallback_boot.c
+++ b/src/lib/fallback_boot.c
@@ -17,8 +17,11 @@ void boot_successful(void)
vbe_textmode_console();
#endif
+
+#if !CONFIG_KEEP_BOOT_COUNT
/* Remember this was a successful boot */
set_boot_successful();
+#endif
/* turn off the boot watchdog */
watchdog_off();
Denis Carikli (GNUtoo(a)no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3991
-gerrit
commit c98d69ca7b5b71c0d664498d1d4a5f978e10f27f
Author: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org>
Date: Sun Oct 20 23:37:35 2013 +0200
lenovo/x60: Require only one failed boot to switch to fallback in X86_BOOTBLOCK_NORMAL mode.
src/arch/x86/Kconfig defines MAX_REBOOT_CNT as 3.
If that value is not overrided, then the Lenovo X60 coreboot image gets it too.
At the end of a successfull boot, with CONFIG_KEEP_BOOT_COUNT,
the Lenovo X60 increments its reboot_bits cmos option by one.
In case of a failed boot, the user probably doesn't know that coreboot will
only switch to fallback after 3 failed boots, and will act as if the laptop
will not boot anymore with its current coreboot image.
Change-Id: I746df11c933dfe62e01e1591479ca96a84907dc0
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org>
---
src/mainboard/lenovo/x60/Kconfig | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/mainboard/lenovo/x60/Kconfig b/src/mainboard/lenovo/x60/Kconfig
index 72aeef8..90d472c 100644
--- a/src/mainboard/lenovo/x60/Kconfig
+++ b/src/mainboard/lenovo/x60/Kconfig
@@ -54,6 +54,10 @@ config MAX_CPUS
int
default 2
+config MAX_REBOOT_CNT
+ int
+ default 1
+
config MAINBOARD_SMBIOS_MANUFACTURER
string
default "LENOVO"
Denis Carikli (GNUtoo(a)no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3990
-gerrit
commit a426095f4f88fe114bfe34bdb930c85f8a028054
Author: Denis 'GNUtoo' Carikli <GNUtoo(a)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(a)no-log.org>
---
src/Kconfig | 8 ++++++++
src/lib/fallback_boot.c | 3 +++
2 files changed, 11 insertions(+)
diff --git a/src/Kconfig b/src/Kconfig
index 10f8c18..ac7b610 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -47,6 +47,14 @@ 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"
+ default n
+ 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 62bc0a5..e1acefd 100644
--- a/src/lib/fallback_boot.c
+++ b/src/lib/fallback_boot.c
@@ -17,8 +17,11 @@ void boot_successful(void)
vbe_textmode_console();
#endif
+
+#if !CONFIG_KEEP_BOOT_COUNT
/* Remember this was a successful boot */
set_boot_successful();
+#endif
/* turn off the boot watchdog */
watchdog_off();
Denis Carikli (GNUtoo(a)no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3991
-gerrit
commit 577a673adc8c40ed04cfe94a5afbfde5b37791ef
Author: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org>
Date: Sun Oct 20 23:37:35 2013 +0200
lenovo/x60: Require only one failed boot to switch to fallback in X86_BOOTBLOCK_NORMAL mode.
src/arch/x86/Kconfig defines MAX_REBOOT_CNT as 3.
If that value is not overrided, then the Lenovo X60 coreboot image gets it too.
At the end of a successfull boot, with CONFIG_KEEP_BOOT_COUNT,
the Lenovo X60 increments its reboot_bits cmos option by one.
In case of a failed boot, the user probably doesn't know that coreboot will
only switch to fallback after 3 failed boots, and will act as if the laptop
will not boot anymore with its current coreboot image.
Change-Id: I746df11c933dfe62e01e1591479ca96a84907dc0
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org>
---
src/mainboard/lenovo/x60/Kconfig | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/mainboard/lenovo/x60/Kconfig b/src/mainboard/lenovo/x60/Kconfig
index 72aeef8..90d472c 100644
--- a/src/mainboard/lenovo/x60/Kconfig
+++ b/src/mainboard/lenovo/x60/Kconfig
@@ -54,6 +54,10 @@ config MAX_CPUS
int
default 2
+config MAX_REBOOT_CNT
+ int
+ default 1
+
config MAINBOARD_SMBIOS_MANUFACTURER
string
default "LENOVO"
Denis Carikli (GNUtoo(a)no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3990
-gerrit
commit 348af75d870e82700d43544cf9ce957300762ae9
Author: Denis 'GNUtoo' Carikli <GNUtoo(a)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(a)no-log.org>
---
src/Kconfig | 8 ++++++++
src/lib/fallback_boot.c | 3 +++
2 files changed, 11 insertions(+)
diff --git a/src/Kconfig b/src/Kconfig
index 10f8c18..ac7b610 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -47,6 +47,14 @@ 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"
+ default n
+ 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 a34090e..b1c24f4 100644
--- a/src/lib/fallback_boot.c
+++ b/src/lib/fallback_boot.c
@@ -17,8 +17,11 @@ void boot_successful(void)
vbe_textmode_console();
#endif
+
+#if !CONFIG_KEEP_BOOT_COUNT
/* Remember this was a successful boot */
set_boot_successful();
+#endif
/* turn off the boot watchdog */
watchdog_off();