From 12aba82e55c02470ed80b7682efa8b4e8f702bc1 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Thu, 30 Apr 2009 07:07:22 +0000 Subject: Refactor copy_and_run so that it uses a single code base instead of 3 (with one of them way too much assembler code). On the way, I had to make some changes to the way the code is built, which is an effort I want to expand over time. Right now, large portions of the in-ROM part of coreboot is compiled as a single file, with lots of .c files including other .c files. That has its justification for pre-raminit code, but it also affects lots of post-raminit code (memcpy doesn't really make sense before raminit, or at least CAR) The coreboot_apc code (AMD boards) gained some .c includes because I don't know that part of the code enough to really rework it and only have limited possibilities to test it. The includes should give an identical situation for this part of the code. This change was posted as set of 6 patches to the list, but they were mostly split for review purposes, hence commit them all at once. They can still be backed up using the patch files, if necessary. Signed-off-by: Patrick Georgi Acked-by: Ronald G. Minnich git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4233 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/arch/i386/lib/Config.lb | 11 ++++++----- src/arch/i386/lib/console.c | 6 ------ 2 files changed, 6 insertions(+), 11 deletions(-) (limited to 'src/arch/i386/lib') diff --git a/src/arch/i386/lib/Config.lb b/src/arch/i386/lib/Config.lb index e7d895ccc2..3356b8f4f5 100644 --- a/src/arch/i386/lib/Config.lb +++ b/src/arch/i386/lib/Config.lb @@ -1,5 +1,6 @@ uses CONFIG_USE_INIT uses CONFIG_USE_PRINTK_IN_CAR +uses USE_FAILOVER_IMAGE object c_start.S object cpu.c @@ -9,9 +10,9 @@ object pci_ops_mmconf.c object pci_ops_auto.c object exception.c -if CONFIG_USE_INIT - if CONFIG_USE_PRINTK_IN_CAR - initobject printk_init.o - end -end +initobject printk_init.o +if USE_FAILOVER_IMAGE +else + initobject copy_and_run.o +end diff --git a/src/arch/i386/lib/console.c b/src/arch/i386/lib/console.c index abeb2d90a1..47015bc75c 100644 --- a/src/arch/i386/lib/console.c +++ b/src/arch/i386/lib/console.c @@ -13,12 +13,6 @@ static void __console_tx_byte(unsigned char byte) #include "console_printk.c" -#if CONFIG_USE_INIT == 0 -// do_printk -#include "../../../console/vtxprintf.c" -#include "printk_init.c" -#endif - #endif /* CONFIG_USE_PRINTK_IN_CAR */ #ifndef COREBOOT_EXTRA_VERSION -- cgit v1.2.3