soc/intel/common: Add suppport for Extended VBT
With addition of new features in VBT its size got increased more than 6k and was unable to pass using mailbox 4 hence pass using mailbox 3 to kernel. BRANCH=none BUG=chrome-os-partner:60026 TEST=firmware screen and Chrome OS screen should come up. Change-Id: I359cf9bc402881161c9623cada689496716e04a5 Signed-off-by: Abhay Kumar <abhay.kumar@intel.com> Reviewed-on: https://review.coreboot.org/17585 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
committed by
Aaron Durbin
parent
35d7d586cd
commit
b1feb5189b
@@ -15,6 +15,7 @@
|
||||
|
||||
#include <console/console.h>
|
||||
#include <string.h>
|
||||
#include <cbmem.h>
|
||||
|
||||
#include "gma.h"
|
||||
#include "opregion.h"
|
||||
@@ -24,6 +25,7 @@ int init_igd_opregion(igd_opregion_t *opregion)
|
||||
{
|
||||
struct region_device vbt_rdev;
|
||||
optionrom_vbt_t *vbt;
|
||||
optionrom_vbt_t *ext_vbt;
|
||||
|
||||
if (locate_vbt(&vbt_rdev) == CB_ERR) {
|
||||
printk(BIOS_ERR, "VBT not found\n");
|
||||
@@ -43,8 +45,22 @@ int init_igd_opregion(igd_opregion_t *opregion)
|
||||
sizeof(opregion->header.signature));
|
||||
memcpy(opregion->header.vbios_version, vbt->coreblock_biosbuild,
|
||||
ARRAY_SIZE(vbt->coreblock_biosbuild));
|
||||
memcpy(opregion->vbt.gvd1, vbt, MIN(vbt->hdr_vbt_size,
|
||||
sizeof(opregion->vbt.gvd1)));
|
||||
/* Extended VBT support */
|
||||
if (vbt->hdr_vbt_size > sizeof(opregion->vbt.gvd1)) {
|
||||
ext_vbt = cbmem_add(CBMEM_ID_EXT_VBT, vbt->hdr_vbt_size);
|
||||
|
||||
if (ext_vbt == NULL) {
|
||||
printk(BIOS_ERR, "Unable to add Ext VBT to cbmem!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
memcpy(ext_vbt, vbt, vbt->hdr_vbt_size);
|
||||
opregion->mailbox3.rvda = (uintptr_t)ext_vbt;
|
||||
opregion->mailbox3.rvds = vbt->hdr_vbt_size;
|
||||
} else {
|
||||
/* Raw VBT size which can fit in gvd1 */
|
||||
memcpy(opregion->vbt.gvd1, vbt, vbt->hdr_vbt_size);
|
||||
}
|
||||
|
||||
/* 8KiB */
|
||||
opregion->header.size = sizeof(igd_opregion_t) / KiB;
|
||||
|
Reference in New Issue
Block a user