lib/smbios: Improve Type9
[coreboot2.git] / src / drivers / intel / fsp1_1 / vbt.c
blob37471e5c83a384cc55e32934b9ea4546f7aa6f30
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <acpi/acpi.h>
4 #include <bootmode.h>
5 #include <console/console.h>
6 #include <drivers/intel/gma/opregion.h>
7 #include <fsp/ramstage.h>
8 #include <fsp/util.h>
9 #include <lib.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;
15 size_t vbt_len;
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()) {
21 /* Get VBT data */
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");
31 } else {
32 printk(BIOS_DEBUG, "VBT not found!\n");
34 } else {
35 printk(BIOS_DEBUG, "Not passing VBT to GOP\n");
37 params->GraphicsConfigPtr = (u32)vbt_data;