<p>Richard Spiegel has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/28295">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">vendorcode/amd/pi/00670F00/Lib/AmdLib.c: Remove IdsErrorStop<br><br>Function IdsErrorStop() is only used within AmdLib.c function<br>LibAmdMsrRead(), which in turn is only used once within PspBaseLib.c and<br>three times inside AmdLib.c, all with well defined MSR addresses.<br>IdsErrorStop() is used as a trap if MSR address is 0 or 0xFFFFFFFF, which<br>clearly it's not. Therefor it can be safely removed from AmdLib.c.<br><br>BUG=b:112885948<br>TEST=Build grunt<br><br>Change-Id: I47ffcbd4fbae28b6d711a340f0ac3f3b007e8e4f<br>Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com><br>---<br>M src/vendorcode/amd/pi/00670F00/Lib/amdlib.c<br>1 file changed, 0 insertions(+), 27 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/95/28295/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/vendorcode/amd/pi/00670F00/Lib/amdlib.c b/src/vendorcode/amd/pi/00670F00/Lib/amdlib.c</span><br><span>index b03beee..8a4113f 100644</span><br><span>--- a/src/vendorcode/amd/pi/00670F00/Lib/amdlib.c</span><br><span>+++ b/src/vendorcode/amd/pi/00670F00/Lib/amdlib.c</span><br><span>@@ -266,9 +266,6 @@</span><br><span>   IN OUT   AMD_CONFIG_PARAMS *ConfigPtr</span><br><span>   )</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-  if ((MsrAddress == 0xFFFFFFFF) || (MsrAddress == 0x00000000)) {</span><br><span style="color: hsl(0, 100%, 40%);">-         IdsErrorStop(MsrAddress);</span><br><span style="color: hsl(0, 100%, 40%);">-  }</span><br><span>   *Value = __readmsr (MsrAddress);</span><br><span> }</span><br><span> </span><br><span>@@ -574,27 +571,3 @@</span><br><span>   }</span><br><span>   return MmioIsEnabled;</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-BOOLEAN</span><br><span style="color: hsl(0, 100%, 40%);">-IdsErrorStop (</span><br><span style="color: hsl(0, 100%, 40%);">-  IN      UINT32 FileCode</span><br><span style="color: hsl(0, 100%, 40%);">-  )</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-   struct POST {</span><br><span style="color: hsl(0, 100%, 40%);">-           UINT16 deadlo;</span><br><span style="color: hsl(0, 100%, 40%);">-          UINT32 messagelo;</span><br><span style="color: hsl(0, 100%, 40%);">-               UINT16 deadhi;</span><br><span style="color: hsl(0, 100%, 40%);">-          UINT32 messagehi;</span><br><span style="color: hsl(0, 100%, 40%);">-       } post = {0xDEAD, FileCode, 0xDEAD, FileCode};</span><br><span style="color: hsl(0, 100%, 40%);">-  UINT16 offset = 0;</span><br><span style="color: hsl(0, 100%, 40%);">-      UINT16 j;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-       while(1) {</span><br><span style="color: hsl(0, 100%, 40%);">-              offset %= sizeof(struct POST) / 2;</span><br><span style="color: hsl(0, 100%, 40%);">-              WriteIo16(80, *((UINT16 *)&post)+offset);</span><br><span style="color: hsl(0, 100%, 40%);">-           ++offset;</span><br><span style="color: hsl(0, 100%, 40%);">-               for (j=0; j<250; ++j) {</span><br><span style="color: hsl(0, 100%, 40%);">-                      ReadIo8(80);</span><br><span style="color: hsl(0, 100%, 40%);">-            }</span><br><span style="color: hsl(0, 100%, 40%);">-       }</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/28295">change 28295</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/28295"/><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: I47ffcbd4fbae28b6d711a340f0ac3f3b007e8e4f </div>
<div style="display:none"> Gerrit-Change-Number: 28295 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Spiegel <richard.spiegel@silverbackltd.com> </div>