diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Makefile.inc | 3 | ||||
-rw-r--r-- | src/lib/cbmem_console.c | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 5e3ce50e7f..f3da503b8b 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -220,6 +220,9 @@ smm-y += delay.c smm-y += fmap.c smm-y += cbfs.c memcmp.c smm-$(CONFIG_GENERIC_UDELAY) += timer.c +ifeq ($(CONFIG_DEBUG_SMI),y) +smm-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c +endif bootblock-y += version.c romstage-y += version.c 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)); |