Duncan Laurie merged this change.

View Change

Approvals: build bot (Jenkins): Verified Duncan Laurie: Looks good to me, approved
post: during post_code, only call elog when enabled

Now that we call post_code in other stages other than RAMSTAGE, we need
to guard the elog calls with the appropriate condition in order to
compile correctly.

Change-Id: I766c276f28d46492fb05e0e3be71853e21f4e8e0
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32914
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
---
M src/console/post.c
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/console/post.c b/src/console/post.c
index b17a819..0719e5e 100644
--- a/src/console/post.c
+++ b/src/console/post.c
@@ -81,7 +81,7 @@
default:
printk(BIOS_WARNING, "POST: Unexpected post code "
"in previous boot: 0x%02x\n", code);
-#if CONFIG(ELOG)
+#if CONFIG(ELOG) && (ENV_RAMSTAGE || CONFIG(ELOG_PRERAM))
elog_add_event_word(ELOG_TYPE_LAST_POST_CODE, code);
#if CONFIG(CMOS_POST_EXTRA)
if (extra)

To view, visit change 32914. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I766c276f28d46492fb05e0e3be71853e21f4e8e0
Gerrit-Change-Number: 32914
Gerrit-PatchSet: 7
Gerrit-Owner: Jett Rink <jettrink@chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie@chromium.org>
Gerrit-Reviewer: Jett Rink <jettrink@chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: merged