From de1fe7f655c549e8dce5b34218221890fa5ccc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sun, 8 Sep 2013 10:08:28 +0300 Subject: CBMEM: Always have early initialisation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Assume EARLY_CBMEM_INIT=y everywhere and remove option from Kconfig. If romstage does not make the cbmem_initialize() call, features like COLLECT_TIMESTAMPS and early CBMEM_CONSOLE will execute during romstage, but that data will get lost as no CAR migration is executed. Change-Id: I5615645ed0f5fd78fbc372cf5c3da71a3134dd85 Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/3917 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/lib/Makefile.inc | 6 +----- src/lib/cbmem.c | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'src/lib') diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 44b5ebda65..1455e4cdd3 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -56,10 +56,6 @@ romstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c romstage-$(CONFIG_USBDEBUG) += usbdebug.c endif -ifneq ($(CONFIG_DYNAMIC_CBMEM),y) -romstage-$(CONFIG_EARLY_CBMEM_INIT) += cbmem.c -endif - romstage-y += compute_ip_checksum.c ifneq ($(CONFIG_HAVE_ARCH_MEMMOVE),y) romstage-y += memmove.c @@ -112,7 +108,7 @@ ramstage-y += dynamic_cbmem.c romstage-y += dynamic_cbmem.c else ramstage-y += cbmem.c -romstage-$(CONFIG_HAVE_ACPI_RESUME) += cbmem.c +romstage-$(CONFIG_CACHE_AS_RAM) += cbmem.c endif # CONFIG_DYNAMIC_CBMEM ramstage-y += cbmem_info.c diff --git a/src/lib/cbmem.c b/src/lib/cbmem.c index 495ee5a955..8d69435694 100644 --- a/src/lib/cbmem.c +++ b/src/lib/cbmem.c @@ -95,7 +95,6 @@ void cbmem_late_set_table(uint64_t base, uint64_t size) * - suspend/resume backup memory */ -#if CONFIG_EARLY_CBMEM_INIT || !defined(__PRE_RAM__) static void cbmem_init(void) { uint64_t baseaddr, size; @@ -120,7 +119,6 @@ static void cbmem_init(void) .size = size - CBMEM_TOC_RESERVED }; } -#endif int cbmem_reinit(void) { @@ -220,7 +218,6 @@ void *cbmem_find(u32 id) return (void *)NULL; } -#if CONFIG_EARLY_CBMEM_INIT || !defined(__PRE_RAM__) /* Returns True if it was not initialized before. */ int cbmem_initialize(void) { @@ -244,7 +241,6 @@ int cbmem_initialize(void) return rv; } -#endif #ifndef __PRE_RAM__ static void init_cbmem_post_device(void *unused) -- cgit v1.2.3