<p>Marshall Dawson has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21855">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/amd/common: Expand UMA settings in agesawrapper<br><br>Use devicetree "register" values to set the UMA configuration that<br>will be passed to AGESA.  This reduces the number of overrides<br>required in the mainboard directory.  Note that any overrides<br>currently in place are not affected.<br><br>This patch also removes the implicit check of CONFIG_GFXUMA being<br>defined.  The symbol is a bool and is always defined.<br><br>Change-Id: Ibea5bcdbb57744905e77353438c876e059168e05<br>Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com><br>---<br>M src/soc/amd/common/agesawrapper.c<br>1 file changed, 23 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/21855/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/amd/common/agesawrapper.c b/src/soc/amd/common/agesawrapper.c<br>index a269130..659797a 100644<br>--- a/src/soc/amd/common/agesawrapper.c<br>+++ b/src/soc/amd/common/agesawrapper.c<br>@@ -13,10 +13,13 @@<br>  * GNU General Public License for more details.<br>  */<br> <br>+#include <device/device.h><br> #include <AGESA.h><br> #include <cbfs.h><br> #include <cbmem.h><br> #include <delay.h><br>+#include <chip.h><br>+#include <soc/pci_devs.h><br> #include <cpu/x86/mtrr.h><br> #include <FchPlatform.h><br> #include <heapManager.h><br>@@ -114,6 +117,14 @@<br>    AGESA_STATUS status;<br>  AMD_INTERFACE_PARAMS  AmdParamStruct;<br>         AMD_POST_PARAMS       *PostParams;<br>+   const struct soc_amd_stoneyridge_config *cfg;<br>+        const struct device *dev = dev_find_slot(0, GNB_DEVFN);<br>+      if (!dev || !dev->chip_info) {<br>+            printk(BIOS_ERR, "BUG! Could not find SoC devicetree config\n");<br>+           cfg = (struct soc_amd_stoneyridge_config *)NULL;<br>+     } else {<br>+             cfg = dev->chip_info;<br>+     }<br> <br>  LibAmdMemFill (&AmdParamStruct,<br>                  0,<br>@@ -130,10 +141,18 @@<br>      AmdCreateStruct (&AmdParamStruct);<br>        PostParams = (AMD_POST_PARAMS *)AmdParamStruct.NewStructPtr;<br> <br>-      // Do not use IS_ENABLED here.  CONFIG_GFXUMA should always have a value.  Allow<br>-     // the compiler to flag the error if CONFIG_GFXUMA is not set.<br>-       PostParams->MemConfig.UmaMode = CONFIG_GFXUMA ? UMA_AUTO : UMA_NONE;<br>-      PostParams->MemConfig.UmaSize = 0;<br>+        if (cfg) {<br>+           PostParams->MemConfig.UmaMode = cfg->uma_mode;<br>+         PostParams->MemConfig.UmaVersion = cfg->uma_type;<br>+              if (cfg->uma_mode == UMAMODE_SPECIFIED)<br>+                   PostParams->MemConfig.UmaSize = cfg->uma_size;<br>+         else<br>+                 PostParams->MemConfig.UmaSize = 0;<br>+        } else {<br>+             /* In case of a BIOS error, only attempt to set UMA. */<br>+              PostParams->MemConfig.UmaMode = IS_ENABLED(CONFIG_GFXUMA) ?<br>+                                       UMA_AUTO : UMA_NONE;<br>+ }<br>     PostParams->MemConfig.BottomIo = (UINT16)<br>                                   (CONFIG_BOTTOMIO_POSITION >> 24);<br> <br></pre><p>To view, visit <a href="https://review.coreboot.org/21855">change 21855</a>. To unsubscribe, 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/21855"/><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: Ibea5bcdbb57744905e77353438c876e059168e05 </div>
<div style="display:none"> Gerrit-Change-Number: 21855 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Marshall Dawson <marshalldawson3rd@gmail.com> </div>