coreboot-kgpe-d16/src
Julius Werner ffc2260d74 chromeos: vpd: Avoid reading uninitialized VPDs
This patch adds a check to the VPD parsing code to avoid reading the
whole thing if the first byte ('type' of the first VPD entry) is 0x00
or 0xff. These values match the TERMINATOR and IMPLICIT_TERMINATOR types
which should never occur as the first entry, so this usually means that
the VPD FMAP section has simply never been initialized correctly. This
early abort avoids wasting time to read the whole section from SPI flash
(which we'd otherwise have to since we're not going to find a Google VPD
2.0 header either).

BRANCH=None
BUG=None
TEST=Booted Oak, confirmed that VPD read times dropped from 100ms to
1.5ms.

Change-Id: I9fc473e06440aef4e1023238fb9e53d45097ee9d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 20a726237e03941ad626a6146700170a45ee7720
Original-Change-Id: I09bfec3c24d24214fa4e9180878b58d00454f399
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/322897
Original-Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://review.coreboot.org/13467
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-27 16:27:27 +01:00
..
acpi acpi/: add missing license header 2016-01-14 22:52:11 +01:00
arch arch/x86: Drop arch/pciconf.h 2016-01-26 20:22:44 +01:00
commonlib chromeos: Add timestamps to measure VPD read times 2016-01-27 16:27:18 +01:00
console console: Simplify bootblock console Kconfig selection logic 2016-01-21 05:37:27 +01:00
cpu cpu/amd/family_10h-family_15h: Move CBMEM storage out of CC6 save region 2016-01-24 23:23:23 +01:00
device arch/x86: Drop arch/pciconf.h 2016-01-26 20:22:44 +01:00
drivers intel/fsp1_1: Fix for passing VBT when vboot requests it 2016-01-22 13:04:29 +01:00
ec ec: Add support for EC used on Purism Librem laptops 2016-01-21 02:31:34 +01:00
include lib/memrange: allow stack allocated free list 2016-01-23 18:25:26 +01:00
lib arch/x86: link bootblock like other stages for C_ENVIRONMENT_BOOTBLOCK 2016-01-23 18:25:48 +01:00
mainboard ga-g41m-es2l: Instead of forcing native VGA, make it selectable 2016-01-26 04:43:22 +01:00
northbridge nb/intel/pineview: Increase MMCONF decoding to 256 busses 2016-01-26 04:51:38 +01:00
soc Braswell: Implement Gpio library functions to read RAMID 2016-01-26 05:12:02 +01:00
southbridge sb/intel/i82801gx: Clean up sata.c 2016-01-20 19:16:40 +01:00
superio header files: Fix guard name comments to match guard names 2016-01-18 04:07:53 +01:00
vendorcode chromeos: vpd: Avoid reading uninitialized VPDs 2016-01-27 16:27:27 +01:00
Kconfig Kconfig: Recommend not enabling UPDATE_IMAGE option 2016-01-22 19:22:07 +01:00