summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-11-06 11:04:27 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-11-09 10:49:47 +0000
commit9dd1a12f9c3199fe9f678a4997bb163a1eb1bb96 (patch)
tree13440c2c992bf76005b3165671328d6ed154e5e9 /src/include
parent7e4bfe4b91cc8dbc18a4b940c26f372e471d49db (diff)
ELOG: Introduce elog_gsmi variants
This avoids a lot of if (CONFIG(ELOG_GSMI)) boilerplate. Change-Id: I87d25c820daedeb33b3b474a6632a89ea80b0867 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36647 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/elog.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/include/elog.h b/src/include/elog.h
index 1692a809fc..8d1b3ba067 100644
--- a/src/include/elog.h
+++ b/src/include/elog.h
@@ -243,6 +243,16 @@ static inline int elog_smbios_write_type15(unsigned long *current,
static inline int elog_add_extended_event(u8 type, u32 complement) { return 0; }
#endif
+#if CONFIG(ELOG_GSMI)
+#define elog_gsmi_add_event elog_add_event
+#define elog_gsmi_add_event_byte elog_add_event_byte
+#define elog_gsmi_add_event_word elog_add_event_word
+#else
+static inline int elog_gsmi_add_event(u8 event_type) { return 0; }
+static inline int elog_gsmi_add_event_byte(u8 event_type, u8 data) { return 0; }
+static inline int elog_gsmi_add_event_word(u8 event_type, u16 data) { return 0; }
+#endif
+
extern u32 gsmi_exec(u8 command, u32 *param);
#if CONFIG(ELOG_BOOT_COUNT)