diff options
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/i386/Config.lb | 1 | ||||
-rw-r--r-- | src/arch/ppc/Config.lb | 6 | ||||
-rw-r--r-- | src/arch/ppc/init/ppc_main.c | 20 |
3 files changed, 10 insertions, 17 deletions
diff --git a/src/arch/i386/Config.lb b/src/arch/i386/Config.lb index 4c6278acb5..380d05ba4d 100644 --- a/src/arch/i386/Config.lb +++ b/src/arch/i386/Config.lb @@ -13,7 +13,6 @@ if CONFIG_CBFS if CONFIG_USE_FAILOVER_IMAGE else initobject /src/lib/cbfs.o - initobject /src/console/vsprintf.o initobject /src/lib/lzma.o end end diff --git a/src/arch/ppc/Config.lb b/src/arch/ppc/Config.lb index 1a5ad840e7..aba64c1f98 100644 --- a/src/arch/ppc/Config.lb +++ b/src/arch/ppc/Config.lb @@ -1,3 +1,4 @@ +uses CONFIG_CBFS ldscript init/ldscript.lb makerule coreboot.strip @@ -10,6 +11,11 @@ makerule coreboot.rom action "cp $< $@" end +if CONFIG_CBFS + initobject /src/lib/cbfs.o + initobject /src/lib/lzma.o +end + dir init dir lib dir boot diff --git a/src/arch/ppc/init/ppc_main.c b/src/arch/ppc/init/ppc_main.c index 4dd4487ae8..150deeea67 100644 --- a/src/arch/ppc/init/ppc_main.c +++ b/src/arch/ppc/init/ppc_main.c @@ -5,12 +5,7 @@ #include <board.h> #include <sdram.h> - -extern unsigned _iseg[]; -extern unsigned _liseg[]; -extern unsigned _eliseg[]; - -void (*payload)(void) = (void (*)(void))_iseg; +#include <cbfs.h> /* * At this point we're running out of flash with our @@ -25,8 +20,7 @@ extern void flush_dcache(void); void ppc_main(void) { - unsigned *from; - unsigned *to; + void (*payload)(void); /* * very early board initialization @@ -49,15 +43,9 @@ void ppc_main(void) flush_dcache(); /* - * Relocate payload (text & data) if necessary + * Relocate payload (text & data) */ - if (_liseg != _iseg) { - from = _liseg; - to = _iseg; - while (from < _eliseg) - *to++ = *from++; - } - + payload = cbfs_load_stage("fallback/coreboot_ram"); payload(); /* NOT REACHED */ |