aboutsummaryrefslogtreecommitdiff
path: root/src/include/console/simnow.h
diff options
context:
space:
mode:
authorFred Reitberger <reitbergerfred@gmail.com>2023-02-01 16:00:54 -0500
committerFelix Held <felix-coreboot@felixheld.de>2023-02-09 10:01:20 +0000
commita02176debb88a6e838c3b5f888010ae138b79127 (patch)
tree3b2df0135653dc16ca2a20e1d5d758d258159f60 /src/include/console/simnow.h
parentd7b7460d6e8a9fbd32c41e91a9d00dc536953310 (diff)
console: Add SimNow console logging
The AMD SimNow tool supports fast logging through an IO port. Add a new console to support SimNow logging through port 80. TEST=observe significant speed improvements on SimNow console log Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com> Change-Id: I42a431f48ea14ba4adacbd4a32e15abe7c5e4951 Reviewed-on: https://review.coreboot.org/c/coreboot/+/72751 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/include/console/simnow.h')
-rw-r--r--src/include/console/simnow.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/include/console/simnow.h b/src/include/console/simnow.h
new file mode 100644
index 0000000000..9a9d6792b8
--- /dev/null
+++ b/src/include/console/simnow.h
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef CONSOLE_SIMNOW_H
+#define CONSOLE_SIMNOW_H
+
+#include <stdint.h>
+
+void simnow_console_init(void);
+void simnow_console_tx_byte(unsigned char data);
+
+#define __SIMNOW_CONSOLE_ENABLE__ CONFIG(CONSOLE_AMD_SIMNOW)
+
+#if __SIMNOW_CONSOLE_ENABLE__
+static inline void __simnow_console_init(void)
+{
+ simnow_console_init();
+}
+
+static inline void __simnow_console_tx_byte(u8 data)
+{
+ simnow_console_tx_byte(data);
+}
+#else
+static inline void __simnow_console_init(void) {}
+static inline void __simnow_console_tx_byte(u8 data) {}
+#endif
+
+#endif /* CONSOLE_SIMNOW_H */