<p>Marshall Dawson has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21996">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">drivers/uart8250mem: Check for zero base address<br><br>Before adding a new UART to the coreboot/lb table, verify that it<br>has a non-zero base address.  This is consistent with all other<br>functions that use the uart_platform_base() function.<br><br>This was tested on google/kahlee by using an invalid UART number<br>and forcing the base address to 0.  Execution was able to complete<br>through depthcharge and into the OS.<br><br>Change-Id: I6d8183a461f0fedc254bf88de5ec96629a2a80ef<br>Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com><br>---<br>M src/drivers/uart/uart8250mem.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/21996/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/drivers/uart/uart8250mem.c b/src/drivers/uart/uart8250mem.c<br>index f293230..9eb50cb 100644<br>--- a/src/drivers/uart/uart8250mem.c<br>+++ b/src/drivers/uart/uart8250mem.c<br>@@ -154,6 +154,8 @@<br>    struct lb_serial serial;<br>      serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED;<br>   serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);<br>+       if (!serial.baseaddr)<br>+                return;<br>       serial.baud = CONFIG_TTYS0_BAUD;<br>      if (IS_ENABLED(CONFIG_DRIVERS_UART_8250MEM_32))<br>               serial.regwidth = sizeof(uint32_t);<br></pre><p>To view, visit <a href="https://review.coreboot.org/21996">change 21996</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/21996"/><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: I6d8183a461f0fedc254bf88de5ec96629a2a80ef </div>
<div style="display:none"> Gerrit-Change-Number: 21996 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Marshall Dawson <marshalldawson3rd@gmail.com> </div>