aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2017-06-13 15:53:45 -0700
committerJulius Werner <jwerner@chromium.org>2018-01-19 15:21:12 -0800
commit1c5f5031f38ed77688298d419727a6f0930e0673 (patch)
tree0ce47576b2e24073a1f22ce3d808da2364e3f9c6 /include
parent890abc33e46349fb01aed443ad7128b82ba34f3d (diff)
downloadplatform_external_arm-trusted-firmware-1c5f5031f38ed77688298d419727a6f0930e0673.tar.gz
platform_external_arm-trusted-firmware-1c5f5031f38ed77688298d419727a6f0930e0673.tar.bz2
platform_external_arm-trusted-firmware-1c5f5031f38ed77688298d419727a6f0930e0673.zip
coreboot: Add support for CBMEM console
coreboot supports an in-memory console to store firmware logs even when no serial console is available. It is widely supported by coreboot-compatible bootloaders (including SeaBIOS and GRUB) and can be read by the Linux kernel. This patch allows BL31 to add its own log messages to this console. The driver will be registered automatically if coreboot support is compiled in and detects the presence of a console buffer in the coreboot tables. Change-Id: I31254dfa0c2fdeb7454634134b5707b4b4154907 Signed-off-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/drivers/coreboot/cbmem_console.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/drivers/coreboot/cbmem_console.h b/include/drivers/coreboot/cbmem_console.h
new file mode 100644
index 000000000..4fca36f61
--- /dev/null
+++ b/include/drivers/coreboot/cbmem_console.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef __CBMEM_CONSOLE_H__
+#define __CBMEM_CONSOLE_H__
+
+#include <console.h>
+
+#define CONSOLE_T_CBMC_BASE CONSOLE_T_DRVDATA
+#define CONSOLE_T_CBMC_SIZE (CONSOLE_T_DRVDATA + REGSZ)
+
+#ifndef __ASSEMBLER__
+
+typedef struct {
+ console_t console;
+ uintptr_t base;
+ uint32_t size;
+} console_cbmc_t;
+
+int console_cbmc_register(uintptr_t base, console_cbmc_t *console);
+
+#endif /* __ASSEMBLER__ */
+
+#endif /* __CBMEM_CONSOLE_H__ */