From c7edf18f7c763762676eeb3bad084cd4c032cfcf Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Tue, 26 Sep 2017 19:34:35 +0200 Subject: soc/intel/common/opregion: Get rid of opregion.c Get rid of custom opregion implementation and use drivers/intel/gma/opregion implementation instead. Test: boot Windows 10 on google/chell and google/edgar using Tianocore payload with GOP init, observe Intel graphics driver loaded and functional. Change-Id: I5f78e9030df12da5369d142dda5c59e576ebcef7 Signed-off-by: Patrick Rudolph Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/21703 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/soc/intel/common/Kconfig | 4 --- src/soc/intel/common/Makefile.inc | 1 - src/soc/intel/common/opregion.c | 67 --------------------------------------- src/soc/intel/common/opregion.h | 24 -------------- 4 files changed, 96 deletions(-) delete mode 100644 src/soc/intel/common/opregion.c delete mode 100644 src/soc/intel/common/opregion.h (limited to 'src/soc/intel/common') diff --git a/src/soc/intel/common/Kconfig b/src/soc/intel/common/Kconfig index 95c09c78c4..c4e6514b85 100644 --- a/src/soc/intel/common/Kconfig +++ b/src/soc/intel/common/Kconfig @@ -50,10 +50,6 @@ config MMA_BLOBS_PATH default "3rdparty/blobs/soc/intel/kabylake/mma-blobs" if SOC_INTEL_KABYLAKE default "3rdparty/blobs/soc/intel/skylake/mma-blobs" if SOC_INTEL_SKYLAKE -config SOC_INTEL_COMMON_GFX_OPREGION - bool - default n - config SOC_INTEL_COMMON_SMI bool default n diff --git a/src/soc/intel/common/Makefile.inc b/src/soc/intel/common/Makefile.inc index e56ac7daaf..bfd6a77703 100644 --- a/src/soc/intel/common/Makefile.inc +++ b/src/soc/intel/common/Makefile.inc @@ -23,7 +23,6 @@ ramstage-y += util.c ramstage-$(CONFIG_MMA) += mma.c ramstage-$(CONFIG_SOC_INTEL_COMMON_ACPI_WAKE_SOURCE) += acpi_wake_source.c ramstage-y += vbt.c -ramstage-$(CONFIG_SOC_INTEL_COMMON_GFX_OPREGION) += opregion.c ramstage-$(CONFIG_SOC_INTEL_COMMON_NHLT) += nhlt.c bootblock-$(CONFIG_MAINBOARD_HAS_TPM_CR50) += tpm_tis.c diff --git a/src/soc/intel/common/opregion.c b/src/soc/intel/common/opregion.c deleted file mode 100644 index f35e12a0e7..0000000000 --- a/src/soc/intel/common/opregion.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2016 Intel Inc. - * - * 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 -#include -#include - -#include -#include "opregion.h" -#include "vbt.h" - -enum cb_err init_igd_opregion(igd_opregion_t *opregion) -{ - optionrom_vbt_t *vbt; - optionrom_vbt_t *ext_vbt; - - vbt = locate_vbt(); - - if (!vbt) { - printk(BIOS_ERR, "VBT couldn't be read\n"); - return CB_ERR; - } - - memset(opregion, 0, sizeof(igd_opregion_t)); - - memcpy(&opregion->header.signature, IGD_OPREGION_SIGNATURE, - sizeof(opregion->header.signature)); - memcpy(opregion->header.vbios_version, vbt->coreblock_biosbuild, - ARRAY_SIZE(vbt->coreblock_biosbuild)); - /* 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 CB_ERR; - } - - 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; - opregion->header.version = IGD_OPREGION_VERSION << 24; - - /* FIXME We just assume we're mobile for now */ - opregion->header.mailboxes = MAILBOXES_MOBILE; - - return CB_SUCCESS; -} diff --git a/src/soc/intel/common/opregion.h b/src/soc/intel/common/opregion.h deleted file mode 100644 index 7945a49ace..0000000000 --- a/src/soc/intel/common/opregion.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright (C) 2016 Intel Inc. - * - * 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. - */ - -#ifndef _COMMON_OPREGION_H_ -#define _COMMON_OPREGION_H_ - -#include - -/* Loads vbt and initializes opregion. Returns non-zero on success */ -enum cb_err init_igd_opregion(igd_opregion_t *opregion); - -#endif /* _COMMON_OPREGION_H_ */ -- cgit v1.2.3