From c31c4de681738fc264333cb12aecdb995b119a94 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Mon, 17 Oct 2011 08:58:27 -0700 Subject: nvramtool: Fix CMOS checksum to match coreboot (and /dev/nvram) Change-Id: I28b0dbad36403a31be83581107f40b3ca1332dcc Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/287 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- util/nvramtool/cmos_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/nvramtool') diff --git a/util/nvramtool/cmos_ops.c b/util/nvramtool/cmos_ops.c index 2bbc8a1df6..91c9f451ac 100644 --- a/util/nvramtool/cmos_ops.c +++ b/util/nvramtool/cmos_ops.c @@ -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); } /**************************************************************************** -- cgit v1.2.3