1 /* SPDX-License-Identifier: GPL-2.0-only */
5 #include <console/console.h>
6 #include <drivers/intel/gma/opregion.h>
7 #include <fsp/ramstage.h>
11 /* Locate VBT and pass it to FSP GOP */
12 void load_vbt(SILICON_INIT_UPD
*params
)
14 const optionrom_vbt_t
*vbt_data
= NULL
;
17 /* Check boot mode - for S3 resume path VBT loading is not needed */
18 if (acpi_is_wakeup_s3()) {
19 printk(BIOS_DEBUG
, "S3 resume do not pass VBT to GOP\n");
20 } else if (display_init_required()) {
22 vbt_data
= locate_vbt(&vbt_len
);
23 if (vbt_data
!= NULL
) {
24 if (CONFIG(DISPLAY_VBT
)) {
25 /* Display the vbt file contents */
26 printk(BIOS_DEBUG
, "VBT Data:\n");
27 hexdump(vbt_data
, vbt_len
);
28 printk(BIOS_DEBUG
, "\n");
30 printk(BIOS_DEBUG
, "Passing VBT to GOP\n");
32 printk(BIOS_DEBUG
, "VBT not found!\n");
35 printk(BIOS_DEBUG
, "Not passing VBT to GOP\n");
37 params
->GraphicsConfigPtr
= (u32
)vbt_data
;