From d8e6d4085ffd10d399551a2ec75a57fd1f594fec Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Thu, 15 Nov 2012 14:57:27 +0100 Subject: bootblock: Guard CMOS rewrite in disable/enable RTC This ensures that there's only one disable/enable cycle for the entire rewrite instead for every single byte. Change-Id: Ic06e6dcb08976d158ff784660838c0fbad875176 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/1869 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/arch/x86/include/bootblock_common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/arch') diff --git a/src/arch/x86/include/bootblock_common.h b/src/arch/x86/include/bootblock_common.h index c9674f4a9c..4a128bce68 100644 --- a/src/arch/x86/include/bootblock_common.h +++ b/src/arch/x86/include/bootblock_common.h @@ -27,9 +27,11 @@ static void sanitize_cmos(void) 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(cmos_default[i], i); } + cmos_enable_rtc(); } } } -- cgit v1.2.3