Patch Set 3:

I still don't understand why you need to add all those complicated routes.
Seems like you are using the VPD format that is compatible with Google VPD 2.0,
then why not just call vpd_gets?

Even if we want to add a , this still looks bloated.

If you want to add a simple wrapper for identifying 1/0 values a better implementation is:

 bool vpd_get_bool(const char *key, bool default_value);

or

 int vpd_get_int(const char *key, int *result); // returns -1 on failure so we can detect 'non-exist'.

The reason is that this functionality is used before FSP API is called. At that time, DRAM is not initialized, and thus the (more convenient) functions such as vpd_gets() as defined in src/drivers/vpd/vpd.h are not available. src/drivers/vpd/vpd.c is not built for romstage.

After the split of a single patch into a patch set, this design constraint looks less obvious. I will update the commit message to state such constraint explicitly. Thanks!

View Change

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: 3
Gerrit-Owner: 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: 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: jonzhang@fb.com
Gerrit-Reviewer: Ɓukasz Siudut
Gerrit-Comment-Date: Fri, 02 Aug 2019 16:01:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment