[coreboot-gerrit] New patch to review for coreboot: soc/intel/apollolake: Fix bitshift issue in bootblock
Andrey Petrov (andrey.petrov@intel.com)
gerrit at coreboot.org
Mon Jul 18 17:03:34 CEST 2016
Andrey Petrov (andrey.petrov at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15727
-gerrit
commit 445787823d0771d8e7061e7bda65045c30620783
Author: Andrey Petrov <andrey.petrov at intel.com>
Date: Mon Jul 18 07:59:03 2016 -0700
soc/intel/apollolake: Fix bitshift issue in bootblock
Fix issue where zero-sized BIOS region could cause bitshift
for '-1' which is an unspecified behavior.
Change-Id: Icb62bf413a1a0d293657503ef21fe97b5f9a5484
Signed-off-by: Andrey Petrov <andrey.petrov at intel.com>
---
src/soc/intel/apollolake/bootblock/bootblock.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/soc/intel/apollolake/bootblock/bootblock.c b/src/soc/intel/apollolake/bootblock/bootblock.c
index 8c1ff91..31144ff 100644
--- a/src/soc/intel/apollolake/bootblock/bootblock.c
+++ b/src/soc/intel/apollolake/bootblock/bootblock.c
@@ -98,7 +98,10 @@ static void cache_bios_region(void)
return;
/* Only the IFD BIOS region is memory mapped (at top of 4G) */
- rom_size = get_bios_size();
+ rom_size = get_bios_size();
+
+ if (!rom_size)
+ return;
/* Round to power of two */
alignment = 1 << (log2_ceil(rom_size));
More information about the coreboot-gerrit
mailing list