From d7ecfa7c152da59cf76b5dfd8ff4ef1313a74260 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 21 Oct 2011 14:37:52 -0700 Subject: Fix CMOS checksum calculation in libpayload. Change-Id: I64ea53fa098fbcfc76e0ebd5f049a2ee3d0a1024 Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/314 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones --- payloads/libpayload/drivers/options.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'payloads/libpayload') diff --git a/payloads/libpayload/drivers/options.c b/payloads/libpayload/drivers/options.c index fdb4be34bb..394c7920ec 100644 --- a/payloads/libpayload/drivers/options.c +++ b/payloads/libpayload/drivers/options.c @@ -41,7 +41,6 @@ static int options_checksum_valid(void) for(i = range_start; i <= range_end; i++) { checksum += nvram_read(i); } - checksum = (~checksum)&0xffff; checksum_old = ((nvram_read(checksum_location)<<8) | nvram_read(checksum_location+1)); @@ -59,7 +58,6 @@ void fix_options_checksum(void) for(i = range_start; i <= range_end; i++) { checksum += nvram_read(i); } - checksum = (~checksum)&0xffff; nvram_write((checksum >> 8), checksum_location); nvram_write((checksum & 0xff), checksum_location + 1); -- cgit v1.2.3