summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Kconfig9
-rw-r--r--src/arch/x86/include/bootblock_common.h2
-rw-r--r--src/drivers/pc80/mc146818rtc.c3
3 files changed, 13 insertions, 1 deletions
diff --git a/src/Kconfig b/src/Kconfig
index 4c80f34573..a0758bcf22 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -116,6 +116,15 @@ config USE_OPTION_TABLE
Enable this option if coreboot shall read options from the "CMOS"
NVRAM instead of using hard-coded values.
+config STATIC_OPTION_TABLE
+ bool "Load default configuration values into CMOS on each boot"
+ default n
+ depends on USE_OPTION_TABLE
+ help
+ Enable this option to reset "CMOS" NVRAM values to default on
+ every boot. Use this if you want the NVRAM configuration to
+ never be modified from its default values.
+
config COMPRESS_RAMSTAGE
bool "Compress ramstage with LZMA"
default y
diff --git a/src/arch/x86/include/bootblock_common.h b/src/arch/x86/include/bootblock_common.h
index 276b514b31..b4100b73a2 100644
--- a/src/arch/x86/include/bootblock_common.h
+++ b/src/arch/x86/include/bootblock_common.h
@@ -32,7 +32,7 @@ static void bootblock_mainboard_init(void)
#if CONFIG_USE_OPTION_TABLE
static void sanitize_cmos(void)
{
- if (cmos_error() || !cmos_chksum_valid()) {
+ if (cmos_error() || !cmos_chksum_valid() || IS_ENABLED(CONFIG_STATIC_OPTION_TABLE)) {
unsigned char *cmos_default = (unsigned char*)walkcbfs("cmos.default");
if (cmos_default) {
int i;
diff --git a/src/drivers/pc80/mc146818rtc.c b/src/drivers/pc80/mc146818rtc.c
index b18f22f43d..fe669caa98 100644
--- a/src/drivers/pc80/mc146818rtc.c
+++ b/src/drivers/pc80/mc146818rtc.c
@@ -56,6 +56,9 @@ static void cmos_reset_date(void)
static int cmos_checksum_valid(int range_start, int range_end, int cks_loc)
{
+ if (IS_ENABLED(CONFIG_STATIC_OPTION_TABLE))
+ return 1;
+
int i;
u16 sum, old_sum;
sum = 0;