Fix CMOS checksum calculation in libpayload.

Change-Id: I64ea53fa098fbcfc76e0ebd5f049a2ee3d0a1024
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/314
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marcj303@gmail.com>
This commit is contained in:
Stefan Reinauer 2011-10-21 14:37:52 -07:00 committed by Patrick Georgi
parent 1c795ad109
commit d7ecfa7c15
1 changed files with 0 additions and 2 deletions

View File

@ -41,7 +41,6 @@ static int options_checksum_valid(void)
for(i = range_start; i <= range_end; i++) { for(i = range_start; i <= range_end; i++) {
checksum += nvram_read(i); checksum += nvram_read(i);
} }
checksum = (~checksum)&0xffff;
checksum_old = ((nvram_read(checksum_location)<<8) | nvram_read(checksum_location+1)); 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++) { for(i = range_start; i <= range_end; i++) {
checksum += nvram_read(i); checksum += nvram_read(i);
} }
checksum = (~checksum)&0xffff;
nvram_write((checksum >> 8), checksum_location); nvram_write((checksum >> 8), checksum_location);
nvram_write((checksum & 0xff), checksum_location + 1); nvram_write((checksum & 0xff), checksum_location + 1);