summaryrefslogtreecommitdiff
path: root/src/soc/intel/common
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2017-09-26 19:34:35 +0200
committerMartin Roth <martinroth@google.com>2018-03-30 07:19:52 +0000
commitc7edf18f7c763762676eeb3bad084cd4c032cfcf (patch)
tree08e309b6b6c3c45d87b3d86b4e5a0b8d2d311875 /src/soc/intel/common
parent0bcd86a14af2ee876e22cc2bcd7b1d4dee505cd3 (diff)
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 <siro@das-labor.org> Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/21703 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r--src/soc/intel/common/Kconfig4
-rw-r--r--src/soc/intel/common/Makefile.inc1
-rw-r--r--src/soc/intel/common/opregion.c67
-rw-r--r--src/soc/intel/common/opregion.h24
4 files changed, 0 insertions, 96 deletions
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 <console/console.h>
-#include <string.h>
-#include <cbmem.h>
-
-#include <drivers/intel/gma/opregion.h>
-#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 <drivers/intel/gma/opregion.h>
-
-/* Loads vbt and initializes opregion. Returns non-zero on success */
-enum cb_err init_igd_opregion(igd_opregion_t *opregion);
-
-#endif /* _COMMON_OPREGION_H_ */