From 84641c81834841fa6cdad19d06b06c05ba899825 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Sat, 29 Aug 2020 02:52:09 +0200 Subject: nb/intel/haswell: Add HASWELL_HIDE_PEG_FROM_MRC option The MRC will perform PCI enumeration, and if it detects a VGA device in a PEG slot, it will disable the IGD and not reserve any memory for it. Since the memory map is locked by the time MRC finishes, the IGD can not be enabled afterwards. Changing this behavior requires patching the MRC. Hiding the PEG devices from MRC allows the IGD to be used even when a dedicated graphics card is present. However, MRC will not program the PEG AFE settings as it should, which can cause stability problems at higher PCIe link speeds. Thus, restrict this workaround to only run when the HASWELL_HIDE_PEG_FROM_MRC option is enabled. This allows the IGD to be disabled and the PEG AFE settings to be programmed when a dedicated graphics card is to be enabled, which results in increased stability. The most ideal way to fix this problem for good is to implement native platform init. Native init is necessary to make Nvidia Optimus usable. Tested on Asrock B85M Pro4, using the PEG slot with a dedicated graphics card as well as without. Graphics in both situations function properly. Change-Id: I4d825b1c41d8705bfafe28d8ecb0a511788901f0 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/45534 Reviewed-by: Paul Menzel Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/northbridge/intel/haswell/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/northbridge/intel/haswell/Kconfig') diff --git a/src/northbridge/intel/haswell/Kconfig b/src/northbridge/intel/haswell/Kconfig index 84be33df4e..04ab373ce2 100644 --- a/src/northbridge/intel/haswell/Kconfig +++ b/src/northbridge/intel/haswell/Kconfig @@ -78,6 +78,15 @@ config MRC_FILE The path and filename of the file to use as System Agent binary. +config HASWELL_HIDE_PEG_FROM_MRC + bool "Hide PEG devices from MRC to work around hardcoded MRC behavior" + default y + help + If set, hides all PEG devices from MRC. This allows the iGPU + to be used even when a dedicated graphics card is present. + However, it prevents MRC from programming PEG AFE registers, + which can make PEG devices unstable. When unsure, choose N. + config PRE_GRAPHICS_DELAY int "Graphics initialization delay in ms" default 0 -- cgit v1.2.3