<p>Duncan Laurie has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20368">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">libpayload: corebootfb: Add null check for framebuffer address<br><br>If the framebuffer address is zero the corebootfb_init() function<br>should abort and not attempt to use it for video, otherwise it<br>will likely hang.<br><br>This was tested by booting on a board that does not have a display<br>attached and includes the previous patch to zero the framebuffer<br>structure in the coreboot tables.<br><br>Change-Id: I53ca2e947a7915cebb31b51e11ac6c310d9d6c55<br>Signed-off-by: Duncan Laurie <dlaurie@chromium.org><br>---<br>M payloads/libpayload/drivers/video/corebootfb.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/68/20368/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/payloads/libpayload/drivers/video/corebootfb.c b/payloads/libpayload/drivers/video/corebootfb.c<br>index 46f891f..1aeac12 100644<br>--- a/payloads/libpayload/drivers/video/corebootfb.c<br>+++ b/payloads/libpayload/drivers/video/corebootfb.c<br>@@ -237,6 +237,8 @@<br>         fbinfo = virt_to_phys(lib_sysinfo.framebuffer);<br> <br>    fbaddr = FI->physical_address;<br>+    if (fbaddr == 0)<br>+             return -1;<br> <br>         coreboot_video_console.columns = FI->x_resolution / FONT_WIDTH;<br>    coreboot_video_console.rows = FI->y_resolution / FONT_HEIGHT;<br></pre><p>To view, visit <a href="https://review.coreboot.org/20368">change 20368</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/20368"/><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: I53ca2e947a7915cebb31b51e11ac6c310d9d6c55 </div>
<div style="display:none"> Gerrit-Change-Number: 20368 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Duncan Laurie <dlaurie@chromium.org> </div>