<p>Marshall Dawson has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21096">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/amd/stoneyridge: Check UART index<br><br>Verify that the caller to uart_platform_base() sends a valid index.<br>The Stoney Ridge APU has only two internal UARTs.<br><br>Change-Id: I9432571712bae15a604f4280ea5e0f81fd68604d<br>Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com><br>---<br>M src/soc/amd/stoneyridge/uart.c<br>1 file changed, 2 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/21096/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/amd/stoneyridge/uart.c b/src/soc/amd/stoneyridge/uart.c<br>index 9cc0c94..016d77b 100644<br>--- a/src/soc/amd/stoneyridge/uart.c<br>+++ b/src/soc/amd/stoneyridge/uart.c<br>@@ -13,11 +13,13 @@<br>  * GNU General Public License for more details.<br>  */<br> <br>+#include <assert.h><br> #include <console/uart.h><br> #include <soc/southbridge.h><br> <br> uintptr_t uart_platform_base(int idx)<br> {<br>+  assert(idx <= 1 && idx >= 0);<br>   return (uintptr_t)(APU_UART0_BASE + 0x2000 * (idx & 1));<br> }<br> <br></pre><p>To view, visit <a href="https://review.coreboot.org/21096">change 21096</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/21096"/><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: I9432571712bae15a604f4280ea5e0f81fd68604d </div>
<div style="display:none"> Gerrit-Change-Number: 21096 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Marshall Dawson <marshalldawson3rd@gmail.com> </div>