drivers/intel/fsp1_1: Fix vbt_len type
[coreboot.git] / src / drivers / intel / fsp1_1 / vbt.c
blobb6bb308ed9954f15eb55f1574a24977a9f0b740b
1 /*
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.
17 #include <bootmode.h>
18 #include <cbfs.h>
19 #include <console/console.h>
20 #include <drivers/intel/gma/opregion.h>
21 #include <fsp/ramstage.h>
22 #include <fsp/util.h>
23 #include <lib.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;
29 size_t vbt_len;
31 /* Check boot mode - for S3 resume path VBT loading is not needed */
32 if (s3_resume) {
33 printk(BIOS_DEBUG, "S3 resume do not pass VBT to GOP\n");
34 } else if (display_init_required()) {
35 /* Get VBT data */
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");
45 } else {
46 printk(BIOS_DEBUG, "VBT not found!\n");
48 } else {
49 printk(BIOS_DEBUG, "Not passing VBT to GOP\n");
51 params->GraphicsConfigPtr = (u32)vbt_data;