Jonathan Zhang uploaded patch set #10 to this change.

View Change

drivers/vpd: add framework to search VPD in romstage

Summary:
Added a framework to search VPD in romstage before memory is
avilable. vpd_cbmem.c and vpd_premem.c are added for
code specific for premem environment and for environment that
cbmem can be used.

Added a call vpd_get_bool(). Given a key/value pair in VPD
binary blob, and name of a bool type variable, set the variable
value if there is a match.
Several checks are in place:
* The key/value length needs to be correct.
* The key name needs to match.
* THe value is either '1' or '0'.

Test Plan:
* Build an OCP MonoLake coreboot image, flash and run.

Tags:
Signed-off-by: Jonathan Zhang <jonzhang@fb.com>
Change-Id: Iebdba59419a555147fc40391cf17cc6879d9e1b2
---
M src/drivers/vpd/Makefile.inc
M src/drivers/vpd/vpd.c
M src/drivers/vpd/vpd.h
A src/drivers/vpd/vpd_cbmem.c
A src/drivers/vpd/vpd_lib.c
A src/drivers/vpd/vpd_lib.h
A src/drivers/vpd/vpd_premem.c
A src/drivers/vpd/vpd_premem.h
8 files changed, 397 insertions(+), 164 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/34634/10

To view, visit change 34634. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iebdba59419a555147fc40391cf17cc6879d9e1b2
Gerrit-Change-Number: 34634
Gerrit-PatchSet: 10
Gerrit-Owner: Jonathan Zhang <jonzhang@fb.com>
Gerrit-Reviewer: Andrey Petrov <andrey.petrov@gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Huang Jin <huang.jin@intel.com>
Gerrit-Reviewer: Hung-Te Lin <hungte@chromium.org>
Gerrit-Reviewer: Jonathan Zhang <jonzhang@fb.com>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Reviewer: Ɓukasz Siudut
Gerrit-MessageType: newpatchset