<p>Subrata Banik has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/25562">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/intel/common: Configure all possible GFX DSM memory reserve range<br><br>Intel internal graphics preallocated memory size should be selected from<br>below lists as per Intel FSP UPD header:<br><br>0x00:0MB, 0x01:32MB, 0x02:64MB, 0x03:96MB, 0x04:128MB, 0x05:160MB,<br>0xF0:4MB, 0xF1:8MB, 0xF2:12MB, 0xF3:16MB, 0xF4:20MB, 0xF5:24MB,<br>0xF6:28MB, 0xF7:32MB, 0xF8:36MB, 0xF9:40MB, 0xFA:44MB, 0xFB:48MB,<br>0xFC:52MB, 0xFD:56MB, 0xFE:60MB<br><br>This patch ensures that coreboot can report the same preallocated<br>memory range for intel grapics during memory layout calculation.<br><br>TEST=Set IgdDvmt50PreAlloc UPD with different ranges between 4MB-60MB<br>and coreboot could able to calculate GFX DSM range accordingly.<br><br>Change-Id: I99735e9a2ee57626bd9d7258e700f7f39ef02e58<br>Signed-off-by: Subrata Banik <subrata.banik@intel.com><br>---<br>M src/soc/intel/common/block/systemagent/systemagent_early.c<br>1 file changed, 21 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/25562/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/soc/intel/common/block/systemagent/systemagent_early.c b/src/soc/intel/common/block/systemagent/systemagent_early.c</span><br><span>index 4abc15f..a24b3b6 100644</span><br><span>--- a/src/soc/intel/common/block/systemagent/systemagent_early.c</span><br><span>+++ b/src/soc/intel/common/block/systemagent/systemagent_early.c</span><br><span>@@ -144,11 +144,31 @@</span><br><span>         return pci_read_config16(SA_DEV_ROOT, GGC);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * Internal Graphics Pre-allocated Memory - As per Intel FSP UPD Header</span><br><span style="color: hsl(120, 100%, 40%);">+ * definition, size of memory preallocatred for internal graphics can be</span><br><span style="color: hsl(120, 100%, 40%);">+ * configured based on below lists:</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * 0x00:0MB, 0x01:32MB, 0x02:64MB, 0x03:96MB, 0x04:128MB, 0x05:160MB,</span><br><span style="color: hsl(120, 100%, 40%);">+ * 0xF0:4MB, 0xF1:8MB, 0xF2:12MB, 0xF3:16MB, 0xF4:20MB, 0xF5:24MB, 0xF6:28MB,</span><br><span style="color: hsl(120, 100%, 40%);">+ * 0xF7:32MB, 0xF8:36MB, 0xF9:40MB, 0xFA:44MB, 0xFB:48MB, 0xFC:52MB, 0xFD:56MB,</span><br><span style="color: hsl(120, 100%, 40%);">+ * 0xFE:60MB</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span> size_t sa_get_dsm_size(void)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-     return (((sa_get_ggc_reg() & G_GMS_MASK) >> G_GMS_OFFSET) * 32*MiB);</span><br><span style="color: hsl(120, 100%, 40%);">+        uint32_t prealloc_memory;</span><br><span style="color: hsl(120, 100%, 40%);">+     uint16_t ggc;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       ggc = sa_get_ggc_reg();</span><br><span style="color: hsl(120, 100%, 40%);">+       prealloc_memory = ((ggc & G_GMS_MASK) >> G_GMS_OFFSET);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   if (prealloc_memory < 0xF0)</span><br><span style="color: hsl(120, 100%, 40%);">+                return (prealloc_memory * 32*MiB);</span><br><span style="color: hsl(120, 100%, 40%);">+    else</span><br><span style="color: hsl(120, 100%, 40%);">+          return ((prealloc_memory - 0xEF) * 4*MiB);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static uintptr_t sa_get_gsm_base(void)</span><br><span> {</span><br><span>         /* All regions concerned for have 1 MiB alignment. */</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/25562">change 25562</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/25562"/><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: I99735e9a2ee57626bd9d7258e700f7f39ef02e58 </div>
<div style="display:none"> Gerrit-Change-Number: 25562 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Subrata Banik <subrata.banik@intel.com> </div>