coreboot-kgpe-d16/src/drivers/elog
Aaron Durbin c41c6a4412 elog: fix improper assumption for year values
The elog format stores the year of the event in bcd format.
Semi-recently rtc_get() started returning the full year,
e.g. 2015. However, bin2bcd takes a uint8_t as a parameter.
Converting a full year (2015 or 0x7df) to a uint8_t results
in passing bad values (223 or 0xdf) to bin2bcd. In other words
the input value of bin2bcd needs to be a number between 0 and 99.
Therefore fix that mistake.

BUG=chrome-os-partner:47388
BRANCH=None
TEST=Events show up with correct year in eventlog now.

Change-Id: I9209cb9175c0b4925337e2e5d4fea8316b30022a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 95a86013234dc999c988291f636e2db3803cc24a
Original-Change-Id: I12734bc3a423ba9d739658b8edc402b8d445f22e
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/311263
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: http://review.coreboot.org/12410
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-11-13 00:52:48 +01:00
..
Kconfig tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
Makefile.inc ELOG: Add support for SMM and kernel GSMI driver 2012-07-26 00:19:42 +02:00
boot_count.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
elog.c elog: fix improper assumption for year values 2015-11-13 00:52:48 +01:00
elog_internal.h tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
gsmi.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00