summaryrefslogtreecommitdiff
path: root/src/lib/cbmem_console.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/cbmem_console.c')
-rw-r--r--src/lib/cbmem_console.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/cbmem_console.c b/src/lib/cbmem_console.c
index 0c56095732..783f336b9c 100644
--- a/src/lib/cbmem_console.c
+++ b/src/lib/cbmem_console.c
@@ -84,6 +84,13 @@ void cbmemc_init(void)
if (ENV_ROMSTAGE_OR_BEFORE) {
/* Pre-RAM environments use special buffer placed by linker script. */
init_console_ptr(_preram_cbmem_console, REGION_SIZE(preram_cbmem_console));
+ } else if (ENV_SMM) {
+ void *cbmemc = NULL;
+ size_t cbmemc_size = 0;
+
+ smm_get_cbmemc_buffer(&cbmemc, &cbmemc_size);
+
+ init_console_ptr(cbmemc, cbmemc_size);
} else {
/* Post-RAM uses static (BSS) buffer before CBMEM is reinitialized. */
init_console_ptr(static_console, sizeof(static_console));