<p>Arthur Heymans has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/27119">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">nb/intel/i945: Fix domain resources<br><br>Fixed resources have to be registered early during<br>read_resources() phase, such that device allocator<br>will avoid them.<br><br>Change-Id: Iff5f1426015a908e988ff757055034c87085c0f5<br>Signed-off-by: Arthur Heymans <arthur@aheymans.xyz><br>---<br>M src/northbridge/intel/i945/northbridge.c<br>1 file changed, 13 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/27119/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/northbridge/intel/i945/northbridge.c b/src/northbridge/intel/i945/northbridge.c</span><br><span>index b8a2255..089d7e9 100644</span><br><span>--- a/src/northbridge/intel/i945/northbridge.c</span><br><span>+++ b/src/northbridge/intel/i945/northbridge.c</span><br><span>@@ -57,7 +57,7 @@</span><br><span>        return 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-static void pci_domain_set_resources(struct device *dev)</span><br><span style="color: hsl(120, 100%, 40%);">+static void mch_domain_read_resources(struct device *dev)</span><br><span> {</span><br><span>   uint32_t pci_tolm, tseg_sizek;</span><br><span>       uint8_t tolud;</span><br><span>@@ -66,6 +66,8 @@</span><br><span>   uint64_t uma_memory_base = 0, uma_memory_size = 0;</span><br><span>   uint64_t tseg_memory_base = 0, tseg_memory_size = 0;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+      pci_domain_read_resources(dev);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>    /* Can we find out how much memory we can use at most</span><br><span>         * this way?</span><br><span>          */</span><br><span>@@ -113,6 +115,14 @@</span><br><span>   ram_resource(dev, 4, 768, (tomk - 768));</span><br><span>     uma_resource(dev, 5, uma_memory_base >> 10, uma_memory_size >> 10);</span><br><span>      mmio_resource(dev, 6, tseg_memory_base >> 10, tseg_memory_size >> 10);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static void mch_domain_set_resources(struct device *dev)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+  struct resource *res;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       for (res = dev->resource_list; res; res = res->next)</span><br><span style="color: hsl(120, 100%, 40%);">+            report_resource_stored(dev, res, "");</span><br><span> </span><br><span>  assign_resources(dev->link_list);</span><br><span> }</span><br><span>@@ -122,8 +132,8 @@</span><br><span>       * See e7525/northbridge.c for an example.</span><br><span>    */</span><br><span> static struct device_operations pci_domain_ops = {</span><br><span style="color: hsl(0, 100%, 40%);">-       .read_resources   = pci_domain_read_resources,</span><br><span style="color: hsl(0, 100%, 40%);">-  .set_resources    = pci_domain_set_resources,</span><br><span style="color: hsl(120, 100%, 40%);">+ .read_resources   = mch_domain_read_resources,</span><br><span style="color: hsl(120, 100%, 40%);">+        .set_resources    = mch_domain_set_resources,</span><br><span>        .enable_resources = NULL,</span><br><span>    .init             = NULL,</span><br><span>    .scan_bus         = pci_domain_scan_bus,</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/27119">change 27119</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/27119"/><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: Iff5f1426015a908e988ff757055034c87085c0f5 </div>
<div style="display:none"> Gerrit-Change-Number: 27119 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Arthur Heymans <arthur@aheymans.xyz> </div>