[coreboot-gerrit] Change in coreboot[master]: soc/intel/common: Allow exporting the size of the VBT
Patrick Georgi (Code Review)
gerrit at coreboot.org
Thu May 3 19:17:56 CEST 2018
Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/26038
Change subject: soc/intel/common: Allow exporting the size of the VBT
......................................................................
soc/intel/common: Allow exporting the size of the VBT
Change-Id: Ib340aad846ea7cb61d650928b495efaa1fc2d641
Signed-off-by: Patrick Georgi <pgeorgi at google.com>
---
M src/soc/intel/common/vbt.c
M src/soc/intel/common/vbt.h
2 files changed, 10 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/26038/1
diff --git a/src/soc/intel/common/vbt.c b/src/soc/intel/common/vbt.c
index 9e3cb35..50d3951 100644
--- a/src/soc/intel/common/vbt.c
+++ b/src/soc/intel/common/vbt.c
@@ -33,7 +33,7 @@
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 @@
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 @@
return NULL;
if (!display_init_required())
return NULL;
- return locate_vbt();
+ return locate_vbt(NULL);
}
diff --git a/src/soc/intel/common/vbt.h b/src/soc/intel/common/vbt.h
index 615af4b..1bc536e 100644
--- a/src/soc/intel/common/vbt.h
+++ b/src/soc/intel/common/vbt.h
@@ -27,8 +27,11 @@
*/
const char *mainboard_vbt_filename(void);
-/* locate vbt.bin file. Returns a pointer to its content. */
-void *locate_vbt(void);
+/*
+ * locate vbt.bin file. Returns a pointer to its content.
+ * If vbt_size is non-NULL, also return the vbt's size.
+ */
+void *locate_vbt(size_t *vbt_size);
/*
* Returns VBT pointer and mapping after checking prerequisites for Pre OS
* Graphics initialization
--
To view, visit https://review.coreboot.org/26038
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib340aad846ea7cb61d650928b495efaa1fc2d641
Gerrit-Change-Number: 26038
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <pgeorgi at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180503/80a01c50/attachment-0001.html>
More information about the coreboot-gerrit
mailing list