summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/vbt.c
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2018-05-03 19:15:00 +0200
committerPatrick Georgi <pgeorgi@google.com>2018-05-04 19:14:03 +0000
commit765120383b235beeb1288ec5af875af25d4806c3 (patch)
tree9867a384d3da87ddc2e3648485a2f67daa01a555 /src/soc/intel/common/vbt.c
parentd2990ff5a3d620c2f989a1091eb86bb52942103d (diff)
downloadcoreboot-765120383b235beeb1288ec5af875af25d4806c3.tar.xz
soc/intel/common: Allow exporting the size of the VBT
Change-Id: Ib340aad846ea7cb61d650928b495efaa1fc2d641 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/26038 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/soc/intel/common/vbt.c')
-rw-r--r--src/soc/intel/common/vbt.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/soc/intel/common/vbt.c b/src/soc/intel/common/vbt.c
index 9e3cb3516b..50d3951179 100644
--- a/src/soc/intel/common/vbt.c
+++ b/src/soc/intel/common/vbt.c
@@ -33,7 +33,7 @@ const char *mainboard_vbt_filename(void)
static char vbt_data[8 * KiB];
static int vbt_data_used;
-void *locate_vbt(void)
+void *locate_vbt(size_t *vbt_size)
{
uint32_t vbtsig = 0;
@@ -48,6 +48,9 @@ void *locate_vbt(void)
if (file_size == 0)
return NULL;
+ if (vbt_size)
+ *vbt_size = file_size;
+
memcpy(&vbtsig, vbt_data, sizeof(vbtsig));
if (vbtsig != VBT_SIGNATURE) {
printk(BIOS_ERR, "Missing/invalid signature in VBT data file!\n");
@@ -72,5 +75,5 @@ void *vbt_get(void)
return NULL;
if (!display_init_required())
return NULL;
- return locate_vbt();
+ return locate_vbt(NULL);
}