diff options
author | Patrick Rudolph <siro@das-labor.org> | 2017-06-15 09:22:06 +0200 |
---|---|---|
committer | Patrick Rudolph <siro@das-labor.org> | 2017-07-24 16:48:30 +0000 |
commit | c1055ab07a96927eb738eefe68faa3c19ac060a2 (patch) | |
tree | 35ad9bd7d31a870c957bc1b1e822b2d4b79a4f67 /src/soc/intel/skylake/opregion.c | |
parent | 43be77db3185591a6bd04b36cd0135634816d82d (diff) |
soc/intel/skylake: Use common opregion implementation
Enable SOC_INTEL_COMMON_GFX_OPREGION for all FSP versions.
Allows to get rid of opregion.c, as it's no longer needed.
Change-Id: I39190488e12917a09dbf7ee3947a33940ebc290b
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20222
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Diffstat (limited to 'src/soc/intel/skylake/opregion.c')
-rw-r--r-- | src/soc/intel/skylake/opregion.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/soc/intel/skylake/opregion.c b/src/soc/intel/skylake/opregion.c deleted file mode 100644 index ef7d4ab968..0000000000 --- a/src/soc/intel/skylake/opregion.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2016 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#include <console/console.h> -#include <soc/ramstage.h> -#include <fsp/gop.h> -#include <stdlib.h> -#include <string.h> - -enum cb_err init_igd_opregion(igd_opregion_t *opregion) -{ - const optionrom_vbt_t *vbt; - uint32_t vbt_len; - - memset(opregion, 0, sizeof(igd_opregion_t)); - - /* Read VBT table from flash */ - vbt = fsp_get_vbt(&vbt_len); - if (!vbt) - die("vbt data not found"); - - memcpy(&opregion->header.signature, IGD_OPREGION_SIGNATURE, - sizeof(IGD_OPREGION_SIGNATURE) - 1); - memcpy(opregion->header.vbios_version, vbt->coreblock_biosbuild, - sizeof(u32)); - memcpy(opregion->vbt.gvd1, vbt, vbt->hdr_vbt_size < - sizeof(opregion->vbt.gvd1) ? vbt->hdr_vbt_size : - sizeof(opregion->vbt.gvd1)); - - /* Size, in KB, of the entire OpRegion structure (including header)*/ - opregion->header.size = sizeof(igd_opregion_t) / KiB; - opregion->header.version = IGD_OPREGION_VERSION; - - /* We just assume we're mobile for now */ - opregion->header.mailboxes = MAILBOXES_MOBILE; - - return CB_SUCCESS; -} |