Edward O'Callaghan (eocallaghan@alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5505
-gerrit
commit d09afda76752ebc74b34edced57ad760be8ff73f Author: Edward O'Callaghan eocallaghan@alterapraxis.com Date: Tue Apr 15 17:11:56 2014 +1000
drivers/elog: Ensure ELOG_BOOT_COUNT_CMOS_OFFSET >16bytes
The ELOG_BOOT_COUNT_CMOS_OFFSET compile-time constant must be >16 bytes as not to interfere with the standard RTC region. Let us ensure the user specified value is a sane one as we do with ELOG_FLASH_BASE.
Change-Id: Id56b4ceeef34386dac9176669e732641ae031d60 Signed-off-by: Edward O'Callaghan eocallaghan@alterapraxis.com --- src/drivers/elog/boot_count.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/drivers/elog/boot_count.c b/src/drivers/elog/boot_count.c index 9ea828d..dca3508 100644 --- a/src/drivers/elog/boot_count.c +++ b/src/drivers/elog/boot_count.c @@ -34,12 +34,13 @@ # include "option_table.h" # define BOOT_COUNT_CMOS_OFFSET (CMOS_VSTART_boot_count_offset >> 3) #else -# if defined(CONFIG_ELOG_BOOT_COUNT_CMOS_OFFSET) +# if defined(CONFIG_ELOG_BOOT_COUNT_CMOS_OFFSET) && \ + (CONFIG_ELOG_BOOT_COUNT_CMOS_OFFSET > 16) # define BOOT_COUNT_CMOS_OFFSET CONFIG_ELOG_BOOT_COUNT_CMOS_OFFSET # else # error "Must define CONFIG_ELOG_BOOT_COUNT_CMOS_OFFSET" -# endif -#endif +# endif /* CONFIG_ELOG_BOOT_COUNT_CMOS_OFFSET > 16 */ +#endif /* CONFIG_USE_OPTION_TABLE */
#define BOOT_COUNT_SIGNATURE 0x4342 /* 'BC' */