mail.coreboot.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

coreboot-gerrit

Download
Threads by month
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2013 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
coreboot-gerrit@coreboot.org

October 2013

  • 1 participants
  • 159 discussions
Patch set updated for coreboot: 9822e81 Add a KEEP_BOOT_COUNT Kconfig option.
by Denis Carikli Oct. 27, 2013

Oct. 27, 2013
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();
1 0
0 0
New patch to review for coreboot: 2609ca9 Lenovo X60: Native VGA init: Fix compilation.
by Denis Carikli Oct. 27, 2013

Oct. 27, 2013
Denis Carikli (GNUtoo(a)no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3997 -gerrit commit 2609ca93987772d9638aaa75f6f2f6a2377bebd0 Author: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org> Date: Sun Oct 27 19:07:55 2013 +0100 Lenovo X60: Native VGA init: Fix compilation. Without that fix, we have: build/lib/ramstage.o: In function `vbe_mode_info_valid': [...]/src/lib/edid.c:1451: multiple definition of `vbe_mode_info_valid' build/mainboard/lenovo/x60/ramstage.o:[...]/src/mainboard/lenovo/x60/i915.c:200: first defined here build/lib/ramstage.o: In function `fill_lb_framebuffer': [...]/src/lib/edid.c:1454: multiple definition of `fill_lb_framebuffer' build/mainboard/lenovo/x60/ramstage.o:[...]/src/mainboard/lenovo/x60/i915.c:204: first defined here When we compile with CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT=y Change-Id: I1162f4e53861a269eba2f94d41e014da48d536e7 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org> --- src/device/Kconfig | 5 +++++ src/lib/Makefile.inc | 2 ++ src/mainboard/lenovo/x60/Kconfig | 1 + 3 files changed, 8 insertions(+) diff --git a/src/device/Kconfig b/src/device/Kconfig index 4087f6f..f3b5155 100644 --- a/src/device/Kconfig +++ b/src/device/Kconfig @@ -25,6 +25,11 @@ config MAINBOARD_HAS_NATIVE_VGA_INIT bool default n +# Only set this in the mainboard +config MAINBOARD_DO_EDID + bool + default n + config MAINBOARD_DO_NATIVE_VGA_INIT bool "Use native graphics initialization" depends on MAINBOARD_HAS_NATIVE_VGA_INIT diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index b0d9366..2a2a4eb 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -97,7 +97,9 @@ ramstage-$(CONFIG_BOOTSPLASH) += jpeg.c ramstage-$(CONFIG_TRACE) += trace.c ramstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c ramstage-$(CONFIG_COVERAGE) += libgcov.c +ifneq ($(CONFIG_MAINBOARD_DO_EDID),y) ramstage-$(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) += edid.c +endif ramstage-y += memrange.c ramstage-$(CONFIG_COOP_MULTITASKING) += thread.c ramstage-$(CONFIG_TIMER_QUEUE) += timer_queue.c diff --git a/src/mainboard/lenovo/x60/Kconfig b/src/mainboard/lenovo/x60/Kconfig index 90d472c..9441e7b 100644 --- a/src/mainboard/lenovo/x60/Kconfig +++ b/src/mainboard/lenovo/x60/Kconfig @@ -24,6 +24,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy select HAVE_ACPI_RESUME select USE_OPTION_TABLE select MAINBOARD_HAS_NATIVE_VGA_INIT + select MAINBOARD_DO_EDID select EARLY_CBMEM_INIT config MAINBOARD_DIR
1 0
0 0
Patch set updated for coreboot: 3cc9a7e Move set_boot_successful to drivers/pc80/mc146818rtc.c
by Denis Carikli Oct. 27, 2013

Oct. 27, 2013
Denis Carikli (GNUtoo(a)no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3996 -gerrit commit 3cc9a7e05bab55fb324a0bfadcadf808d06fef8f Author: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org> Date: Sun Oct 27 17:58:11 2013 +0100 Move set_boot_successful to drivers/pc80/mc146818rtc.c set_boot_successful depends on CONFIG_PC80_SYSTEM, it also is specific to the mc146818 RTC. Change-Id: I57d28d7c81ea595ce06bd4ec9c4981fa71566db9 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org> --- src/drivers/pc80/mc146818rtc.c | 29 +++++++++++++++++++++++++++++ src/include/fallback.h | 4 +++- src/include/pc80/mc146818rtc.h | 2 ++ src/lib/fallback_boot.c | 27 ++------------------------- 4 files changed, 36 insertions(+), 26 deletions(-) diff --git a/src/drivers/pc80/mc146818rtc.c b/src/drivers/pc80/mc146818rtc.c index be52454..c9cc8ab 100644 --- a/src/drivers/pc80/mc146818rtc.c +++ b/src/drivers/pc80/mc146818rtc.c @@ -322,3 +322,32 @@ void rtc_check_update_cmos_date(u8 has_century) rtc_update_cmos_date(has_century); } } + +#if CONFIG_USE_OPTION_TABLE +/* Reset the boot count if the boot is considered successfull */ +void set_boot_successful(void) +{ + /* Remember I successfully booted by setting + * the initial boot direction + * to the direction that I booted. + */ + unsigned char index, byte; + index = inb(RTC_PORT(0)) & 0x80; + index |= RTC_BOOT_BYTE; + outb(index, RTC_PORT(0)); + + byte = inb(RTC_PORT(1)); + byte &= 0xfe; + byte |= (byte & (1 << 1)) >> 1; + + /* If we are in normal mode set the boot count to 0 */ + if(byte & 1) + byte &= 0x0f; + outb(byte, RTC_PORT(1)); +} +#else +void set_boot_successful(void) +{ + /* Nothing to do. */ +} +#endif diff --git a/src/include/fallback.h b/src/include/fallback.h index 7f3c823..e91a819 100644 --- a/src/include/fallback.h +++ b/src/include/fallback.h @@ -7,6 +7,8 @@ void boot_successful(void); #endif /* __ASSEMBLER__ */ -#define RTC_BOOT_BYTE 48 +#if !CONFIG_PC80_SYSTEM +void set_boot_successful(void); +#endif #endif /* FALLBACK_H */ diff --git a/src/include/pc80/mc146818rtc.h b/src/include/pc80/mc146818rtc.h index 170a433..24cc111 100644 --- a/src/include/pc80/mc146818rtc.h +++ b/src/include/pc80/mc146818rtc.h @@ -14,6 +14,7 @@ #define RTC_REG_C 12 #define RTC_REG_D 13 +#define RTC_BOOT_BYTE 48 /********************************************************************** * register details @@ -171,6 +172,7 @@ static inline void cmos_write32(u8 offset, u32 value) void rtc_init(int invalid); void rtc_check_update_cmos_date(u8 has_century); #if CONFIG_USE_OPTION_TABLE +void set_boot_successful(void); int set_option(const char *name, void *val); int get_option(void *dest, const char *name); unsigned read_option_lowlevel(unsigned start, unsigned size, unsigned def); diff --git a/src/lib/fallback_boot.c b/src/lib/fallback_boot.c index b956c94..62bc0a5 100644 --- a/src/lib/fallback_boot.c +++ b/src/lib/fallback_boot.c @@ -3,31 +3,8 @@ #include <watchdog.h> #include <arch/io.h> -#if CONFIG_PC80_SYSTEM -#include <pc80/mc146818rtc.h> - -static void set_boot_successful(void) -{ - /* Remember I successfully booted by setting - * the initial boot direction - * to the direction that I booted. - */ - unsigned char index, byte; - index = inb(RTC_PORT(0)) & 0x80; - index |= RTC_BOOT_BYTE; - outb(index, RTC_PORT(0)); - - byte = inb(RTC_PORT(1)); - byte &= 0xfe; - byte |= (byte & (1 << 1)) >> 1; - - /* If we are in normal mode set the boot count to 0 */ - if(byte & 1) - byte &= 0x0f; - outb(byte, RTC_PORT(1)); -} -#else -static void set_boot_successful(void) +#if !CONFIG_PC80_SYSTEM +void set_boot_successful(void) { /* To be implemented */ }
1 0
0 0
Patch set updated for coreboot: e0817b6 lenovo/x60: export reboot_bits nvram configuration.
by Denis Carikli Oct. 27, 2013

Oct. 27, 2013
Denis Carikli (GNUtoo(a)no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3992 -gerrit commit e0817b6e09493d14c8902b96b41f78dbe9070331 Author: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org> Date: Sat Oct 26 22:35:46 2013 +0200 lenovo/x60: export reboot_bits nvram configuration. This permits any software running after the ramstage to tell coreboot that the boot was successfull. Change-Id: I6b19160dcf1ea1948360db71d02e344a3bcb44ef Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org> --- src/mainboard/lenovo/x60/cmos.layout | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/mainboard/lenovo/x60/cmos.layout b/src/mainboard/lenovo/x60/cmos.layout index ab51a84..d622dcd 100644 --- a/src/mainboard/lenovo/x60/cmos.layout +++ b/src/mainboard/lenovo/x60/cmos.layout @@ -71,7 +71,7 @@ entries # RTC_BOOT_BYTE (coreboot hardcoded) 384 1 e 4 boot_option 385 1 e 4 last_boot -388 4 r 0 reboot_bits +388 4 e 10 reboot_bits #390 2 r 0 unused? # ----------------------------------------------------------------- @@ -146,6 +146,22 @@ enumerations 8 1 Yes 9 0 Secondary 9 1 Primary +10 0 0 +10 1 1 +10 2 2 +10 3 3 +10 4 4 +10 5 5 +10 6 6 +10 7 7 +10 8 8 +10 9 9 +10 10 10 +10 11 11 +10 12 12 +10 13 13 +10 14 14 +10 15 15 # ----------------------------------------------------------------- checksums
1 0
0 0
Patch set updated for coreboot: a426095 Add a KEEP_BOOT_COUNT Kconfig option.
by Denis Carikli Oct. 27, 2013

Oct. 27, 2013
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();
1 0
0 0
Patch set updated for coreboot: c98d69c lenovo/x60: Require only one failed boot to switch to fallback in X86_BOOTBLOCK_NORMAL mode.
by Denis Carikli Oct. 27, 2013

Oct. 27, 2013
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"
1 0
0 0
Patch set updated for coreboot: cf0e1b0 Move set_boot_successful to drivers/pc80/mc146818rtc.c
by Denis Carikli Oct. 27, 2013

Oct. 27, 2013
Denis Carikli (GNUtoo(a)no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3996 -gerrit commit cf0e1b0693c420b33d0ad937df6c227f27bc5cbf Author: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org> Date: Sun Oct 27 17:58:11 2013 +0100 Move set_boot_successful to drivers/pc80/mc146818rtc.c set_boot_successful depends on CONFIG_PC80_SYSTEM, it also is specific to the mc146818 RTC. Change-Id: I57d28d7c81ea595ce06bd4ec9c4981fa71566db9 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org> --- src/drivers/pc80/mc146818rtc.c | 29 +++++++++++++++++++++++++++++ src/include/fallback.h | 4 +++- src/include/pc80/mc146818rtc.h | 2 ++ src/lib/fallback_boot.c | 25 +------------------------ 4 files changed, 35 insertions(+), 25 deletions(-) diff --git a/src/drivers/pc80/mc146818rtc.c b/src/drivers/pc80/mc146818rtc.c index be52454..c9cc8ab 100644 --- a/src/drivers/pc80/mc146818rtc.c +++ b/src/drivers/pc80/mc146818rtc.c @@ -322,3 +322,32 @@ void rtc_check_update_cmos_date(u8 has_century) rtc_update_cmos_date(has_century); } } + +#if CONFIG_USE_OPTION_TABLE +/* Reset the boot count if the boot is considered successfull */ +void set_boot_successful(void) +{ + /* Remember I successfully booted by setting + * the initial boot direction + * to the direction that I booted. + */ + unsigned char index, byte; + index = inb(RTC_PORT(0)) & 0x80; + index |= RTC_BOOT_BYTE; + outb(index, RTC_PORT(0)); + + byte = inb(RTC_PORT(1)); + byte &= 0xfe; + byte |= (byte & (1 << 1)) >> 1; + + /* If we are in normal mode set the boot count to 0 */ + if(byte & 1) + byte &= 0x0f; + outb(byte, RTC_PORT(1)); +} +#else +void set_boot_successful(void) +{ + /* Nothing to do. */ +} +#endif diff --git a/src/include/fallback.h b/src/include/fallback.h index 7f3c823..e91a819 100644 --- a/src/include/fallback.h +++ b/src/include/fallback.h @@ -7,6 +7,8 @@ void boot_successful(void); #endif /* __ASSEMBLER__ */ -#define RTC_BOOT_BYTE 48 +#if !CONFIG_PC80_SYSTEM +void set_boot_successful(void); +#endif #endif /* FALLBACK_H */ diff --git a/src/include/pc80/mc146818rtc.h b/src/include/pc80/mc146818rtc.h index 170a433..24cc111 100644 --- a/src/include/pc80/mc146818rtc.h +++ b/src/include/pc80/mc146818rtc.h @@ -14,6 +14,7 @@ #define RTC_REG_C 12 #define RTC_REG_D 13 +#define RTC_BOOT_BYTE 48 /********************************************************************** * register details @@ -171,6 +172,7 @@ static inline void cmos_write32(u8 offset, u32 value) void rtc_init(int invalid); void rtc_check_update_cmos_date(u8 has_century); #if CONFIG_USE_OPTION_TABLE +void set_boot_successful(void); int set_option(const char *name, void *val); int get_option(void *dest, const char *name); unsigned read_option_lowlevel(unsigned start, unsigned size, unsigned def); diff --git a/src/lib/fallback_boot.c b/src/lib/fallback_boot.c index b956c94..a34090e 100644 --- a/src/lib/fallback_boot.c +++ b/src/lib/fallback_boot.c @@ -3,30 +3,7 @@ #include <watchdog.h> #include <arch/io.h> -#if CONFIG_PC80_SYSTEM -#include <pc80/mc146818rtc.h> - -static void set_boot_successful(void) -{ - /* Remember I successfully booted by setting - * the initial boot direction - * to the direction that I booted. - */ - unsigned char index, byte; - index = inb(RTC_PORT(0)) & 0x80; - index |= RTC_BOOT_BYTE; - outb(index, RTC_PORT(0)); - - byte = inb(RTC_PORT(1)); - byte &= 0xfe; - byte |= (byte & (1 << 1)) >> 1; - - /* If we are in normal mode set the boot count to 0 */ - if(byte & 1) - byte &= 0x0f; - outb(byte, RTC_PORT(1)); -} -#else +#if !CONFIG_PC80_SYSTEM static void set_boot_successful(void) { /* To be implemented */
1 0
0 0
Patch set updated for coreboot: 1eadd81 lenovo/x60: export reboot_bits nvram configuration.
by Denis Carikli Oct. 27, 2013

Oct. 27, 2013
Denis Carikli (GNUtoo(a)no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3992 -gerrit commit 1eadd816a4660b9e9dfe3cd7bd83da2cd0353568 Author: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org> Date: Sat Oct 26 22:35:46 2013 +0200 lenovo/x60: export reboot_bits nvram configuration. This permits any software running after the ramstage to tell coreboot that the boot was successfull. Change-Id: I6b19160dcf1ea1948360db71d02e344a3bcb44ef Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org> --- src/mainboard/lenovo/x60/cmos.layout | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/mainboard/lenovo/x60/cmos.layout b/src/mainboard/lenovo/x60/cmos.layout index ab51a84..d622dcd 100644 --- a/src/mainboard/lenovo/x60/cmos.layout +++ b/src/mainboard/lenovo/x60/cmos.layout @@ -71,7 +71,7 @@ entries # RTC_BOOT_BYTE (coreboot hardcoded) 384 1 e 4 boot_option 385 1 e 4 last_boot -388 4 r 0 reboot_bits +388 4 e 10 reboot_bits #390 2 r 0 unused? # ----------------------------------------------------------------- @@ -146,6 +146,22 @@ enumerations 8 1 Yes 9 0 Secondary 9 1 Primary +10 0 0 +10 1 1 +10 2 2 +10 3 3 +10 4 4 +10 5 5 +10 6 6 +10 7 7 +10 8 8 +10 9 9 +10 10 10 +10 11 11 +10 12 12 +10 13 13 +10 14 14 +10 15 15 # ----------------------------------------------------------------- checksums
1 0
0 0
Patch set updated for coreboot: 348af75 Add a KEEP_BOOT_COUNT Kconfig option.
by Denis Carikli Oct. 27, 2013

Oct. 27, 2013
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();
1 0
0 0
Patch set updated for coreboot: 577a673 lenovo/x60: Require only one failed boot to switch to fallback in X86_BOOTBLOCK_NORMAL mode.
by Denis Carikli Oct. 27, 2013

Oct. 27, 2013
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"
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • ...
  • 16
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.