From cbf5bdfe67e90f780b9f5b2f8cb9cd6e0d46682d Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Tue, 10 Sep 2013 00:07:21 +0300 Subject: CBMEM: Always select CAR_MIGRATION MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If romstage does not make cbmem_initialize() call, linker should optimize the code for CAR migration away. This simplifies design of CBMEM console by a considerable amount. As console buffer is now migrated within cbmem_initialize() call there is no longer need for cbmemc_reinit() call made at end of romstage. Change-Id: I8675ecaafb641fa02675e9ba3f374caa8e240f1d Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/3916 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/mainboard/emulation/qemu-i440fx/romstage.c | 5 ----- src/mainboard/emulation/qemu-q35/romstage.c | 5 ----- src/mainboard/google/butterfly/romstage.c | 5 ----- src/mainboard/google/link/romstage.c | 5 ----- src/mainboard/google/parrot/romstage.c | 5 ----- src/mainboard/google/stout/romstage.c | 5 ----- src/mainboard/intel/emeraldlake2/romstage.c | 5 ----- src/mainboard/kontron/ktqm77/romstage.c | 5 ----- src/mainboard/lenovo/t60/romstage.c | 5 ----- src/mainboard/lenovo/x60/romstage.c | 5 ----- src/mainboard/samsung/lumpy/romstage.c | 5 ----- src/mainboard/samsung/stumpy/romstage.c | 5 ----- src/mainboard/via/epia-m850/romstage.c | 1 - 13 files changed, 61 deletions(-) (limited to 'src/mainboard') diff --git a/src/mainboard/emulation/qemu-i440fx/romstage.c b/src/mainboard/emulation/qemu-i440fx/romstage.c index 70c720263a..db8891ee21 100644 --- a/src/mainboard/emulation/qemu-i440fx/romstage.c +++ b/src/mainboard/emulation/qemu-i440fx/romstage.c @@ -51,11 +51,6 @@ void main(unsigned long bist) cbmem_was_initted = !cbmem_initialize(); timestamp_init(rdtsc()); - timestamp_sync(); timestamp_add_now(TS_START_ROMSTAGE); -#if CONFIG_CONSOLE_CBMEM - /* Keep this the last thing this function does. */ - cbmemc_reinit(); -#endif } diff --git a/src/mainboard/emulation/qemu-q35/romstage.c b/src/mainboard/emulation/qemu-q35/romstage.c index abc9474f2c..fae5095af0 100644 --- a/src/mainboard/emulation/qemu-q35/romstage.c +++ b/src/mainboard/emulation/qemu-q35/romstage.c @@ -53,11 +53,6 @@ void main(unsigned long bist) cbmem_was_initted = !cbmem_initialize(); timestamp_init(rdtsc()); - timestamp_sync(); timestamp_add_now(TS_START_ROMSTAGE); -#if CONFIG_CONSOLE_CBMEM - /* Keep this the last thing this function does. */ - cbmemc_reinit(); -#endif } diff --git a/src/mainboard/google/butterfly/romstage.c b/src/mainboard/google/butterfly/romstage.c index 670fc005ee..f56884d949 100644 --- a/src/mainboard/google/butterfly/romstage.c +++ b/src/mainboard/google/butterfly/romstage.c @@ -273,10 +273,5 @@ void main(unsigned long bist) #if CONFIG_CHROMEOS init_chromeos(boot_mode); #endif - timestamp_sync(); timestamp_add_now(TS_END_ROMSTAGE); -#if CONFIG_CONSOLE_CBMEM - /* Keep this the last thing this function does. */ - cbmemc_reinit(); -#endif } diff --git a/src/mainboard/google/link/romstage.c b/src/mainboard/google/link/romstage.c index aaecfc6230..27a22f7d2f 100644 --- a/src/mainboard/google/link/romstage.c +++ b/src/mainboard/google/link/romstage.c @@ -316,10 +316,5 @@ void main(unsigned long bist) #if CONFIG_CHROMEOS init_chromeos(boot_mode); #endif - timestamp_sync(); timestamp_add_now(TS_END_ROMSTAGE); -#if CONFIG_CONSOLE_CBMEM - /* Keep this the last thing this function does. */ - cbmemc_reinit(); -#endif } diff --git a/src/mainboard/google/parrot/romstage.c b/src/mainboard/google/parrot/romstage.c index 444386f1fd..2fe61d6449 100644 --- a/src/mainboard/google/parrot/romstage.c +++ b/src/mainboard/google/parrot/romstage.c @@ -274,10 +274,5 @@ void main(unsigned long bist) #if CONFIG_CHROMEOS init_chromeos(boot_mode); #endif - timestamp_sync(); timestamp_add_now(TS_END_ROMSTAGE); -#if CONFIG_CONSOLE_CBMEM - /* Keep this the last thing this function does. */ - cbmemc_reinit(); -#endif } diff --git a/src/mainboard/google/stout/romstage.c b/src/mainboard/google/stout/romstage.c index 464ddea893..a0700af2eb 100644 --- a/src/mainboard/google/stout/romstage.c +++ b/src/mainboard/google/stout/romstage.c @@ -326,10 +326,5 @@ void main(unsigned long bist) #if CONFIG_CHROMEOS init_chromeos(boot_mode); #endif - timestamp_sync(); timestamp_add_now(TS_END_ROMSTAGE); -#if CONFIG_CONSOLE_CBMEM - /* Keep this the last thing this function does. */ - cbmemc_reinit(); -#endif } diff --git a/src/mainboard/intel/emeraldlake2/romstage.c b/src/mainboard/intel/emeraldlake2/romstage.c index 09dc60b23b..7691116276 100644 --- a/src/mainboard/intel/emeraldlake2/romstage.c +++ b/src/mainboard/intel/emeraldlake2/romstage.c @@ -328,10 +328,5 @@ void main(unsigned long bist) #if CONFIG_CHROMEOS init_chromeos(boot_mode); #endif - timestamp_sync(); timestamp_add_now(TS_END_ROMSTAGE); -#if CONFIG_CONSOLE_CBMEM - /* Keep this the last thing this function does. */ - cbmemc_reinit(); -#endif } diff --git a/src/mainboard/kontron/ktqm77/romstage.c b/src/mainboard/kontron/ktqm77/romstage.c index 22fff4201b..773079d4e8 100644 --- a/src/mainboard/kontron/ktqm77/romstage.c +++ b/src/mainboard/kontron/ktqm77/romstage.c @@ -322,10 +322,5 @@ void main(unsigned long bist) } #endif post_code(0x3f); - timestamp_sync(); timestamp_add_now(TS_END_ROMSTAGE); -#if CONFIG_CONSOLE_CBMEM - /* Keep this the last thing this function does. */ - cbmemc_reinit(); -#endif } diff --git a/src/mainboard/lenovo/t60/romstage.c b/src/mainboard/lenovo/t60/romstage.c index 42514e3af6..1b7e693d80 100644 --- a/src/mainboard/lenovo/t60/romstage.c +++ b/src/mainboard/lenovo/t60/romstage.c @@ -343,11 +343,6 @@ void main(unsigned long bist) } #endif - timestamp_sync(); timestamp_add_now(TS_END_ROMSTAGE); -#if CONFIG_CONSOLE_CBMEM - /* Keep this the last thing this function does. */ - cbmemc_reinit(); -#endif } diff --git a/src/mainboard/lenovo/x60/romstage.c b/src/mainboard/lenovo/x60/romstage.c index 97317f8ef5..26a7b9b6fa 100644 --- a/src/mainboard/lenovo/x60/romstage.c +++ b/src/mainboard/lenovo/x60/romstage.c @@ -347,11 +347,6 @@ void main(unsigned long bist) } #endif - timestamp_sync(); timestamp_add_now(TS_END_ROMSTAGE); -#if CONFIG_CONSOLE_CBMEM - /* Keep this the last thing this function does. */ - cbmemc_reinit(); -#endif } diff --git a/src/mainboard/samsung/lumpy/romstage.c b/src/mainboard/samsung/lumpy/romstage.c index d7b165b6d6..6c87f88fa2 100644 --- a/src/mainboard/samsung/lumpy/romstage.c +++ b/src/mainboard/samsung/lumpy/romstage.c @@ -347,10 +347,5 @@ void main(unsigned long bist) #if CONFIG_CHROMEOS init_chromeos(boot_mode); #endif - timestamp_sync(); timestamp_add_now(TS_END_ROMSTAGE); -#if CONFIG_CONSOLE_CBMEM - /* Keep this the last thing this function does. */ - cbmemc_reinit(); -#endif } diff --git a/src/mainboard/samsung/stumpy/romstage.c b/src/mainboard/samsung/stumpy/romstage.c index b0ac5a892d..ee715e7a95 100644 --- a/src/mainboard/samsung/stumpy/romstage.c +++ b/src/mainboard/samsung/stumpy/romstage.c @@ -354,10 +354,5 @@ void main(unsigned long bist) #if CONFIG_CHROMEOS init_chromeos(boot_mode); #endif - timestamp_sync(); timestamp_add_now(TS_END_ROMSTAGE); -#if CONFIG_CONSOLE_CBMEM - /* Keep this the last thing this function does. */ - cbmemc_reinit(); -#endif } diff --git a/src/mainboard/via/epia-m850/romstage.c b/src/mainboard/via/epia-m850/romstage.c index 8bbb1f5cb2..473e60e1a2 100644 --- a/src/mainboard/via/epia-m850/romstage.c +++ b/src/mainboard/via/epia-m850/romstage.c @@ -95,7 +95,6 @@ void main(unsigned long bist) /* We got RAM working, now we can write the timestamps to RAM */ cbmem_initialize(); - timestamp_sync(); timestamp_add_now(TS_END_ROMSTAGE); /* FIXME: See if this is needed or take this out please */ /* Disable Memcard and SDIO */ -- cgit v1.2.3