summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-12-21 08:55:47 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-01-27 22:44:17 +0100
commit8659e4072e19130099ac4a81b204d594a6d3fb7d (patch)
tree0f2dca86b701833e6be89f794ae39ac9c5dee501 /src/arch
parent4d10750d1341f9831547e69d66b57ad512cfd6fb (diff)
CBMEM console: Fix and enhance pre-RAM support
Use the value of CONSOLE_PRERAM_BUFFER_SIZE to determine if we can do CBMEM console in bootblock and romstage. Kconfig forces it to zero if _BASE is unset or we cannot do CAR migration on x86. Add CBMEM console to bootblock, except for x86. Only one of bootblock and romstage clears the pre-RAM buffer. To start with empty console log on S3 wakeup, ramstage now clears previous contents of CBMEM buffer if there was no pre-RAM buffer. Unify Kconfig variable naming. TODO: ARM configurations do not define PRERAM_BUFFER_BASE values. Change-Id: I70d82da629529dbfd7bc9491223abd703cbc0115 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/7862 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm/Kconfig4
-rw-r--r--src/arch/arm/bootblock.ld4
-rw-r--r--src/arch/arm/romstage.ld2
-rw-r--r--src/arch/arm64/bootblock.ld2
-rw-r--r--src/arch/arm64/romstage.ld2
-rw-r--r--src/arch/riscv/romstage.ld2
6 files changed, 7 insertions, 9 deletions
diff --git a/src/arch/arm/Kconfig b/src/arch/arm/Kconfig
index 1c3a339bd9..124dc3fcd5 100644
--- a/src/arch/arm/Kconfig
+++ b/src/arch/arm/Kconfig
@@ -24,10 +24,6 @@ config ARM_BOOTBLOCK_CUSTOM
bool
default n
-config CBMEM_CONSOLE_PRERAM_BASE
- hex
- depends on CONSOLE_CBMEM
-
config CPU_HAS_BOOTBLOCK_INIT
bool
default n
diff --git a/src/arch/arm/bootblock.ld b/src/arch/arm/bootblock.ld
index c1a6ccf575..5b91f4bd70 100644
--- a/src/arch/arm/bootblock.ld
+++ b/src/arch/arm/bootblock.ld
@@ -49,8 +49,8 @@ SECTIONS
*(.sbss.*);
} : to_load = 0xff
- preram_cbmem_console = CONFIG_CBMEM_CONSOLE_PRERAM_BASE;
- verstage_preram_cbmem_console = CONFIG_CBMEM_CONSOLE_PRERAM_BASE;
+ preram_cbmem_console = CONFIG_CONSOLE_PRERAM_BUFFER_BASE;
+ verstage_preram_cbmem_console = CONFIG_CONSOLE_PRERAM_BUFFER_BASE;
/DISCARD/ : {
*(.comment)
diff --git a/src/arch/arm/romstage.ld b/src/arch/arm/romstage.ld
index 8c3204609f..34e9eaa1d1 100644
--- a/src/arch/arm/romstage.ld
+++ b/src/arch/arm/romstage.ld
@@ -69,7 +69,7 @@ SECTIONS
_end = .;
- preram_cbmem_console = CONFIG_CBMEM_CONSOLE_PRERAM_BASE;
+ preram_cbmem_console = CONFIG_CONSOLE_PRERAM_BUFFER_BASE;
/* Discard the sections we don't need/want */
/DISCARD/ : {
diff --git a/src/arch/arm64/bootblock.ld b/src/arch/arm64/bootblock.ld
index acce1f13f2..907d009b7d 100644
--- a/src/arch/arm64/bootblock.ld
+++ b/src/arch/arm64/bootblock.ld
@@ -49,6 +49,8 @@ SECTIONS
*(.sbss.*);
} : to_load = 0xff
+ preram_cbmem_console = CONFIG_CONSOLE_PRERAM_BUFFER_BASE;
+
/DISCARD/ : {
*(.comment)
*(.note)
diff --git a/src/arch/arm64/romstage.ld b/src/arch/arm64/romstage.ld
index d05fdd1861..a8d092c2f5 100644
--- a/src/arch/arm64/romstage.ld
+++ b/src/arch/arm64/romstage.ld
@@ -76,7 +76,7 @@ SECTIONS
_end = .;
- preram_cbmem_console = CONFIG_CBMEM_CONSOLE_PRERAM_BASE;
+ preram_cbmem_console = CONFIG_CONSOLE_PRERAM_BUFFER_BASE;
/* Discard the sections we don't need/want */
/DISCARD/ : {
diff --git a/src/arch/riscv/romstage.ld b/src/arch/riscv/romstage.ld
index 839c285c41..a58aee3d04 100644
--- a/src/arch/riscv/romstage.ld
+++ b/src/arch/riscv/romstage.ld
@@ -76,7 +76,7 @@ SECTIONS
_end = .;
- /*preram_cbmem_console = CONFIG_CBMEM_CONSOLE_PRERAM_BASE;*/
+ /*preram_cbmem_console = CONFIG_CONSOLE_PRERAM_BUFFER_BASE;*/
/* Discard the sections we don't need/want */
/DISCARD/ : {