[coreboot-gerrit] Change in coreboot[master]: drivers/intel/fsp2_0: use common code to fetch vbt.bin

Patrick Georgi (Code Review) gerrit at coreboot.org
Wed Sep 27 18:36:42 CEST 2017


Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/21723


Change subject: drivers/intel/fsp2_0: use common code to fetch vbt.bin
......................................................................

drivers/intel/fsp2_0: use common code to fetch vbt.bin

No need for having two of everything in the coreboot codebase.

Change-Id: Ie1cdd1783dd5dababd1e97436a4ce1a4f068d5b3
Signed-off-by: Patrick Georgi <pgeorgi at google.com>
---
M src/drivers/intel/fsp2_0/graphics.c
1 file changed, 8 insertions(+), 4 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/21723/1

diff --git a/src/drivers/intel/fsp2_0/graphics.c b/src/drivers/intel/fsp2_0/graphics.c
index 3207e1d..84f2d6d 100644
--- a/src/drivers/intel/fsp2_0/graphics.c
+++ b/src/drivers/intel/fsp2_0/graphics.c
@@ -14,6 +14,7 @@
 #include <cbfs.h>
 #include <console/console.h>
 #include <fsp/util.h>
+#include <soc/intel/common/vbt.h>
 
 enum pixel_format {
 	pixel_rgbx_8bpc = 0,
@@ -95,13 +96,16 @@
 
 uintptr_t fsp_load_vbt(void)
 {
-	void *vbt;
+	struct region_device rdev;
+	void *vbt_data = NULL;
 
-	vbt = cbfs_boot_map_with_leak("vbt.bin", CBFS_TYPE_RAW, NULL);
-	if (!vbt)
+	if (locate_vbt(&rdev) != CB_ERR)
+		vbt_data = rdev_mmap_full(&rdev);
+
+	if (vbt_data == NULL)
 		printk(BIOS_NOTICE, "Could not locate a VBT file in CBFS\n");
 
-	return (uintptr_t)vbt;
+	return (uintptr_t)vbt_data;
 }
 
 int fill_lb_framebuffer(struct lb_framebuffer *framebuffer)

-- 
To view, visit https://review.coreboot.org/21723
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1cdd1783dd5dababd1e97436a4ce1a4f068d5b3
Gerrit-Change-Number: 21723
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/20170927/878f62f4/attachment.html>


More information about the coreboot-gerrit mailing list