diff options
author | Timothy Pearson <tpearson@raptorengineeringinc.com> | 2015-03-16 11:47:45 -0500 |
---|---|---|
committer | Aaron Durbin <adurbin@google.com> | 2015-03-17 04:22:23 +0100 |
commit | 447240808c62cb877e343c40802a35d01ed198fb (patch) | |
tree | 40bb21ed6a464d2395e318ba130029a5a522cbf8 /src/lib | |
parent | 87200e2aa327bb53b7594e058aa42f7aba693109 (diff) | |
download | coreboot-447240808c62cb877e343c40802a35d01ed198fb.tar.xz |
lib: Add Kconfig option to enable/disable auto fallback control
Under certain conditions, e.g. automated testing, it is useful
to have the payload (e.g. Linux) reset the reboot_bits CMOS
value. This allows automated recovery in the case of coreboot
starting properly but the payload failing to start due to bad
configuration data provided by the coreboot image under test.
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Change-Id: Ifc8f565f8292941d90b2e520cc9c5993b41e9cdd
Reviewed-on: http://review.coreboot.org/8698
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/fallback_boot.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 |