<p>Tristan Corrick <strong>uploaded patch set #6</strong> to this change.</p><p><a href="https://review.coreboot.org/c/coreboot/+/30272">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">nb/intel/haswell: Add support for PCIe graphics<br><br>There are two different paths added for PEG link training.<br><br>*The first path*: If it's okay for the IGD to be disabled, the link<br>training is done in early romstage. The MRC will then set (and lock)<br>GGC, and, if there is a device of VGA class present in a PEG slot,<br>disable the IGD:<br><br>    Before the MRC: GGC = 0x0208, DEVEN = 0x00000039.<br>     After the MRC:  GGC = 0x0003, DEVEN = 0x00000029.<br><br>*The second path*: If the IGD needs to be kept enabled, the link<br>training is done in ramstage. This is because the MRC will always<br>disable the IGD if there is a device of VGA class in a PEG slot, but<br>it can't see the device until link training is done.<br><br>The second path can, unfortunately, lead to an increase in boot time, as<br>the training needs to be complete before the PEG bus is scanned. When<br>there are multiple PEG devices, the training occurs in parallel, limiting<br>the impact on boot time.<br><br>The worst case occurs when `CONFIG_ONBOARD_VGA_IS_PRIMARY` is set (which<br>is not the default), the IGD is enabled, and there is an unpopulated PEG<br>slot. This leads to the PEG training always hitting the timeout, which<br>is 100 ms of wasted time.<br><br>Only PEG2 is supported. An extra (unknown) training sequence is said to<br>be needed for PEG3.<br><br>The ACPI _PRT method is not yet generated, so legacy interrupt routing<br>doesn't work for devices with multiple functions.<br><br>Tested on an ASRock H81M-HDS. Using an x1 PCIe card in the PEG slot<br>works fine. Using a Radeon HD 6450 graphics card also works under<br>GNU/Linux, both using the display from the Radeon HD 6450, and when the<br>IGD is used for display output and `DRI_PRIME=1` is set.<br><br>Link training for the x1 PCIe card takes about 30 ms. For the Radeon<br>HD 6450, it's about 15 ms.<br><br>Change-Id: I786ecb6eccad8de89778af7e736ed664323e220e<br>Signed-off-by: Tristan Corrick <tristan@corrick.kiwi><br>---<br>M src/northbridge/intel/haswell/Makefile.inc<br>M src/northbridge/intel/haswell/early_init.c<br>M src/northbridge/intel/haswell/haswell.h<br>A src/northbridge/intel/haswell/peg.c<br>4 files changed, 183 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/30272/6</pre><p>To view, visit <a href="https://review.coreboot.org/c/coreboot/+/30272">change 30272</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/c/coreboot/+/30272"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I786ecb6eccad8de89778af7e736ed664323e220e </div>
<div style="display:none"> Gerrit-Change-Number: 30272 </div>
<div style="display:none"> Gerrit-PatchSet: 6 </div>
<div style="display:none"> Gerrit-Owner: Tristan Corrick <tristan@corrick.kiwi> </div>
<div style="display:none"> Gerrit-Reviewer: Martin Roth <martinroth@google.com> </div>
<div style="display:none"> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> </div>
<div style="display:none"> Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org> </div>
<div style="display:none"> Gerrit-Reviewer: Tristan Corrick <tristan@corrick.kiwi> </div>
<div style="display:none"> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>