From 5ce0fe117626b10f327fe279f64856cde575946c Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Tue, 25 Jul 2017 16:11:36 +0200 Subject: Port cmos.default handling to C environment bootblock Gather related code in the new file drivers/pc80/rtc/mc146818rtc_boot.c, call sanitize_cmos() from C environment bootblock. Change-Id: Ia5c64de208a5986299c0508d0e11eeb8473deef1 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/20768 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/arch/x86/include/arch/bootblock_romcc.h | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/arch/x86/include') diff --git a/src/arch/x86/include/arch/bootblock_romcc.h b/src/arch/x86/include/arch/bootblock_romcc.h index 600d360749..827e40e985 100644 --- a/src/arch/x86/include/arch/bootblock_romcc.h +++ b/src/arch/x86/include/arch/bootblock_romcc.h @@ -11,9 +11,7 @@ * GNU General Public License for more details. */ -#include #include -#include #ifdef CONFIG_BOOTBLOCK_RESETS #include CONFIG_BOOTBLOCK_RESETS @@ -45,21 +43,3 @@ static void bootblock_mainboard_init(void) #endif } #endif - -#if IS_ENABLED(CONFIG_USE_OPTION_TABLE) -static void sanitize_cmos(void) -{ - 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; - cmos_disable_rtc(); - for (i = 14; i < 128; i++) - cmos_write_inner(cmos_default[i], i); - cmos_enable_rtc(); - } - } -} -#endif -- cgit v1.2.3