<p>Arthur Heymans has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/27245">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">nb/intel/x4x: Don't use PCI operations on the pci_domain device<br><br>The pci_domain just happens to have bus, device and function set to 0,<br>which is why to code works.<br><br>This patch still keeps adding the fixed resources in the pci_domain<br>ops since moving it to the PCI ops which could properly use the<br>function argument for PCI operations would require all PCI IDs to be<br>added or else breakages are to be expected.<br><br>Change-Id: Iabfd15884ec8feb846d01b6af3c4afe5c1494feb<br>Signed-off-by: Arthur Heymans <arthur@aheymans.xyz><br>---<br>M src/northbridge/intel/x4x/northbridge.c<br>1 file changed, 7 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/27245/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/northbridge/intel/x4x/northbridge.c b/src/northbridge/intel/x4x/northbridge.c</span><br><span>index 3e50229..08e5e1c 100644</span><br><span>--- a/src/northbridge/intel/x4x/northbridge.c</span><br><span>+++ b/src/northbridge/intel/x4x/northbridge.c</span><br><span>@@ -44,16 +44,18 @@</span><br><span> </span><br><span>  pci_domain_read_resources(dev);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+   struct device *mch = dev_find_slot(0, PCI_DEVFN(0, 0));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>    /* Top of Upper Usable DRAM, including remap */</span><br><span style="color: hsl(0, 100%, 40%);">- touud = pci_read_config16(dev, D0F0_TOUUD);</span><br><span style="color: hsl(120, 100%, 40%);">+   touud = pci_read_config16(mch, D0F0_TOUUD);</span><br><span>  touud <<= 20;</span><br><span> </span><br><span>      /* Top of Lower Usable DRAM */</span><br><span style="color: hsl(0, 100%, 40%);">-  tolud = pci_read_config16(dev, D0F0_TOLUD) & 0xfff0;</span><br><span style="color: hsl(120, 100%, 40%);">+      tolud = pci_read_config16(mch, D0F0_TOLUD) & 0xfff0;</span><br><span>     tolud <<= 16;</span><br><span> </span><br><span>      /* Top of Memory - does not account for any UMA */</span><br><span style="color: hsl(0, 100%, 40%);">-      tom = pci_read_config16(dev, D0F0_TOM) & 0x01ff;</span><br><span style="color: hsl(120, 100%, 40%);">+  tom = pci_read_config16(mch, D0F0_TOM) & 0x01ff;</span><br><span>         tom <<= 26;</span><br><span> </span><br><span>        printk(BIOS_DEBUG, "TOUUD 0x%llx TOLUD 0x%08x TOM 0x%llx\n",</span><br><span>@@ -63,7 +65,7 @@</span><br><span> </span><br><span>       /* Graphics memory comes next */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-    const u16 ggc = pci_read_config16(dev, D0F0_GGC);</span><br><span style="color: hsl(120, 100%, 40%);">+     const u16 ggc = pci_read_config16(mch, D0F0_GGC);</span><br><span>    printk(BIOS_DEBUG, "IGD decoded, subtracting ");</span><br><span> </span><br><span>       /* Graphics memory */</span><br><span>@@ -79,7 +81,7 @@</span><br><span>    uma_sizek += gsm_sizek;</span><br><span> </span><br><span>  printk(BIOS_DEBUG, "TSEG decoded, subtracting ");</span><br><span style="color: hsl(0, 100%, 40%);">-     reg8 = pci_read_config8(dev, D0F0_ESMRAMC);</span><br><span style="color: hsl(120, 100%, 40%);">+   reg8 = pci_read_config8(mch, D0F0_ESMRAMC);</span><br><span>  reg8 >>= 1;</span><br><span>    reg8 &= 3;</span><br><span>       switch (reg8) {</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/27245">change 27245</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/27245"/><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-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Iabfd15884ec8feb846d01b6af3c4afe5c1494feb </div>
<div style="display:none"> Gerrit-Change-Number: 27245 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Arthur Heymans <arthur@aheymans.xyz> </div>