summaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-05-21 13:48:04 -0600
committerDuncan Laurie <dlaurie@chromium.org>2019-05-22 14:21:42 +0000
commitba44a27f7fcc50677e2b0789f61fce2df8f6d620 (patch)
tree99bfc0e0af908603218487bd857b40f9f6f0f5b1 /src/console
parent402fe20e3e10f0f2aa1329eb60970e56bf92986e (diff)
downloadcoreboot-ba44a27f7fcc50677e2b0789f61fce2df8f6d620.tar.xz
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>
Diffstat (limited to 'src/console')
-rw-r--r--src/console/post.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/console/post.c b/src/console/post.c
index b17a819d97..0719e5e7df 100644
--- a/src/console/post.c
+++ b/src/console/post.c
@@ -81,7 +81,7 @@ void cmos_post_log(void)
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)