From 28cee59ca294422056d983fc06d5d8d5800a4390 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Thu, 8 Mar 2018 15:43:12 +0100 Subject: drivers/vpd: Add VPD support VPD reference: https://chromium.googlesource.com/chromiumos/platform/vpd/+/master/README.md Copy ChromeOS VPD driver to add support for VPD without CROMEOS. Possible use case: * Storing calibration data * Storing MAC address * Storing serial * Storing boot options + Now it's possible to define the VPD space by choosing one of the following enums: VPD_ANY, VPD_RW, VPD_RO. + CHROMEOS selects now VPD as part of it. + VPD is implemented as driver. Change-Id: Id9263bd39bf25d024e93daa57053fefcb1adc53a Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/25046 Reviewed-by: David Hendricks Tested-by: build bot (Jenkins) --- src/vendorcode/google/chromeos/vpd_mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/vendorcode/google/chromeos/vpd_mac.c') diff --git a/src/vendorcode/google/chromeos/vpd_mac.c b/src/vendorcode/google/chromeos/vpd_mac.c index 061997453a..e3ef04b669 100644 --- a/src/vendorcode/google/chromeos/vpd_mac.c +++ b/src/vendorcode/google/chromeos/vpd_mac.c @@ -17,7 +17,7 @@ #include #include -#include +#include /* * Decode string representation of the MAC address (a string of 12 hex @@ -84,8 +84,8 @@ void lb_table_add_macs_from_vpd(struct lb_header *header) * If there are no more MAC addresses of this template * in the VPD - move on. */ - if (!cros_vpd_gets(mac_addr_key, mac_addr_str, - sizeof(mac_addr_str))) + if (!vpd_gets(mac_addr_key, mac_addr_str, + sizeof(mac_addr_str), VPD_ANY)) break; if (!macs) { -- cgit v1.2.3