<p>Daniel Kurtz would like Daniel Kurtz to <strong>review</strong> this change.</p><p><a href="https://review.coreboot.org/26527">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">elog: Only print TYPE_BOOT on S3-resume if CONFIG_ELOG_BOOT_COUNT<br><br>Previously, we were unconditionally adding a TYPE_BOOT message to the ELOG<br>on every boot (even S3 resume) if CONFIG_ELOG_BOOT_COUNT was disabled.<br>Now that boot_count_read() returns 0 for the !CONFIG_ELOG_BOOT_COUNT<br>case, the code becomes a bit simpler.<br><br>BUG=b:79865267<br>TEST=firmware_EventLog<br><br>Change-Id: I803fa4c3e03b6cc94751cf0ce34b78021ae2124e<br>Signed-off-by: Daniel Kurtz <djkurtz@chromium.org><br>---<br>M src/drivers/elog/elog.c<br>1 file changed, 1 insertion(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/26527/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c</span><br><span>index c8f221a..ff4f036 100644</span><br><span>--- a/src/drivers/elog/elog.c</span><br><span>+++ b/src/drivers/elog/elog.c</span><br><span>@@ -786,15 +786,10 @@</span><br><span> </span><br><span> #if !defined(__SMM__)</span><br><span>        /* Log boot count event except in S3 resume */</span><br><span style="color: hsl(0, 100%, 40%);">-#if IS_ENABLED(CONFIG_ELOG_BOOT_COUNT)</span><br><span> #if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)</span><br><span style="color: hsl(0, 100%, 40%);">-         if (!acpi_is_wakeup_s3())</span><br><span style="color: hsl(120, 100%, 40%);">+     if (!acpi_is_wakeup_s3())</span><br><span> #endif</span><br><span>          elog_add_event_dword(ELOG_TYPE_BOOT, boot_count_read());</span><br><span style="color: hsl(0, 100%, 40%);">-#else</span><br><span style="color: hsl(0, 100%, 40%);">-           /* If boot count is not implemented, fake it. */</span><br><span style="color: hsl(0, 100%, 40%);">-                elog_add_event_dword(ELOG_TYPE_BOOT, 0);</span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span> </span><br><span> #if IS_ENABLED(CONFIG_ARCH_X86)</span><br><span>        /* Check and log POST codes from previous boot */</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/26527">change 26527</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/26527"/><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: I803fa4c3e03b6cc94751cf0ce34b78021ae2124e </div>
<div style="display:none"> Gerrit-Change-Number: 26527 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Daniel Kurtz <djkurtz@google.com> </div>
<div style="display:none"> Gerrit-Reviewer: Daniel Kurtz <djkurtz@chromium.org> </div>