nvramtool: Fix CMOS checksum to match coreboot (and /dev/nvram)

Change-Id: I28b0dbad36403a31be83581107f40b3ca1332dcc
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/287
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Stefan Reinauer 2011-10-17 08:58:27 -07:00 committed by Patrick Georgi
parent d1bc331855
commit c31c4de681
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ uint16_t cmos_checksum_compute(void)
for (i = cmos_checksum_start; i <= cmos_checksum_end; i++)
sum += cmos_read_byte(i);
return ~((uint16_t) (sum & 0xffff));
return (uint16_t)(sum & 0xffff);
}
/****************************************************************************