2 * This file is part of the coreboot project.
4 * Copyright (C) 2015 Google Inc.
5 * Copyright (C) 2015 Intel Corp.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
19 #include <console/console.h>
20 #include <drivers/intel/gma/opregion.h>
21 #include <fsp/ramstage.h>
25 /* Locate VBT and pass it to FSP GOP */
26 void load_vbt(uint8_t s3_resume
, SILICON_INIT_UPD
*params
)
28 const optionrom_vbt_t
*vbt_data
= NULL
;
31 /* Check boot mode - for S3 resume path VBT loading is not needed */
33 printk(BIOS_DEBUG
, "S3 resume do not pass VBT to GOP\n");
34 } else if (display_init_required()) {
36 vbt_data
= locate_vbt(&vbt_len
);
37 if (vbt_data
!= NULL
) {
38 if (IS_ENABLED(CONFIG_DISPLAY_VBT
)) {
39 /* Display the vbt file contents */
40 printk(BIOS_DEBUG
, "VBT Data:\n");
41 hexdump(vbt_data
, vbt_len
);
42 printk(BIOS_DEBUG
, "\n");
44 printk(BIOS_DEBUG
, "Passing VBT to GOP\n");
46 printk(BIOS_DEBUG
, "VBT not found!\n");
49 printk(BIOS_DEBUG
, "Not passing VBT to GOP\n");
51 params
->GraphicsConfigPtr
= (u32
)vbt_data
;