| 1 |
|
| 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 |
|
| 12 |
void load_vbt(SILICON_INIT_UPD *params) |
| 13 |
{ |
| 14 |
const optionrom_vbt_t *vbt_data = NULL; |
| 15 |
size_t vbt_len; |
| 16 |
|
| 17 |
|
| 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 |
|
| 22 |
vbt_data = locate_vbt(&vbt_len); |
| 23 |
if (vbt_data != NULL) { |
| 24 |
if (CONFIG(DISPLAY_VBT)) { |
| 25 |
|
| 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 |
} |