Debian Codegraph @

src/drivers/intel/fsp1_1/vbt.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
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>
10
11 /* Locate VBT and pass it to FSP GOP */
12 void load_vbt(SILICON_INIT_UPD *params)
13 {
14 const optionrom_vbt_t *vbt_data = NULL;
15 size_t vbt_len;
16
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");
29 }
30 printk(BIOS_DEBUG, "Passing VBT to GOP\n");
31 } else {
32 printk(BIOS_DEBUG, "VBT not found!\n");
33 }
34 } else {
35 printk(BIOS_DEBUG, "Not passing VBT to GOP\n");
36 }
37 params->GraphicsConfigPtr = (u32)vbt_data;
38 }