summaryrefslogtreecommitdiff
path: root/payloads/libpayload/libc
diff options
context:
space:
mode:
authorKan Yan <kyan@google.com>2017-01-05 19:42:53 -0800
committerMartin Roth <martinroth@google.com>2017-01-13 17:40:10 +0100
commitb6cadc6465e2fbc8aa768fbeb210fc646676f08e (patch)
tree943f9f06d0e1ec417b43daf672ca4356c68bc6d3 /payloads/libpayload/libc
parent828ef4ca36922df876e4a847a4f5abd62b144854 (diff)
downloadcoreboot-b6cadc6465e2fbc8aa768fbeb210fc646676f08e.tar.xz
libpayload: Add VPD address into lib_sysinfo
BUG=chrome-os-partner:56947 TEST=Verifed country code can be parsed from VPD in depthcharge. BRANCH=None Change-Id: I2fbbd4a784c50538331747e1ef78c33c6b8a679b Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: acea6e2a200e8bd78fd458255ac7fad307406989 Original-Change-Id: I4616fefc6a377d7830397cdadb493927358e25cc Original-Signed-off-by: Kan Yan <kyan@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/425819 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/18124 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'payloads/libpayload/libc')
-rw-r--r--payloads/libpayload/libc/coreboot.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c
index 9fc6a692bd..10b801c5ed 100644
--- a/payloads/libpayload/libc/coreboot.c
+++ b/payloads/libpayload/libc/coreboot.c
@@ -228,6 +228,12 @@ static void cb_parse_boot_media_params(unsigned char *ptr,
info->boot_media_size = bmp->boot_media_size;
}
+static void cb_parse_vpd(void *ptr, struct sysinfo_t *info)
+{
+ struct cb_cbmem_tab *const cbmem = (struct cb_cbmem_tab *)ptr;
+ info->chromeos_vpd = phys_to_virt(cbmem->cbmem_tab);
+}
+
#if IS_ENABLED(CONFIG_LP_TIMER_RDTSC)
static void cb_parse_tsc_info(void *ptr, struct sysinfo_t *info)
{
@@ -398,6 +404,9 @@ int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
cb_parse_tsc_info(ptr, info);
break;
#endif
+ case CB_TAG_VPD:
+ cb_parse_vpd(ptr, info);
+ break;
default:
cb_parse_arch_specific(rec, info);
break;