diff options
author | Patrick Georgi <pgeorgi@google.com> | 2017-09-27 15:24:58 +0200 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2017-10-05 21:19:47 +0000 |
commit | 8269096bd9c6d1aae85de1eb3481f8b94b4e8278 (patch) | |
tree | 783a3ba675f3894c3c4efe1747c888a81dbeb285 /src/drivers | |
parent | ae565463b6a7ad4edad76ff8e2f52e1176bf8783 (diff) |
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@google.com>
Reviewed-on: https://review.coreboot.org/21723
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/intel/fsp2_0/graphics.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/drivers/intel/fsp2_0/graphics.c b/src/drivers/intel/fsp2_0/graphics.c index 3207e1d5b5..84f2d6dc21 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 @@ enum cb_err fsp_fill_lb_framebuffer(struct lb_framebuffer *framebuffer) 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) |