From a034dca42cc1638e4917e38b98e7dc6b434f2357 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Wed, 27 May 2009 14:19:31 +0000 Subject: Move coreboot_ram and coreboot_apc to CBFS. This allows to reduce the size of the bootblock (done for kontron/986lcd-m) Signed-off-by: Patrick Georgi Acked-by: Ronald G. Minnich git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4315 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/arch/i386/lib/Config.lb | 7 ++++++- src/arch/i386/lib/cbfs_and_run.c | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/arch/i386/lib/cbfs_and_run.c (limited to 'src/arch/i386/lib') diff --git a/src/arch/i386/lib/Config.lb b/src/arch/i386/lib/Config.lb index 3356b8f4f5..52da9d5e59 100644 --- a/src/arch/i386/lib/Config.lb +++ b/src/arch/i386/lib/Config.lb @@ -1,6 +1,7 @@ uses CONFIG_USE_INIT uses CONFIG_USE_PRINTK_IN_CAR uses USE_FAILOVER_IMAGE +uses CONFIG_CBFS object c_start.S object cpu.c @@ -14,5 +15,9 @@ initobject printk_init.o if USE_FAILOVER_IMAGE else - initobject copy_and_run.o + if CONFIG_CBFS + initobject cbfs_and_run.o + else + initobject copy_and_run.o + end end diff --git a/src/arch/i386/lib/cbfs_and_run.c b/src/arch/i386/lib/cbfs_and_run.c new file mode 100644 index 0000000000..eaded11223 --- /dev/null +++ b/src/arch/i386/lib/cbfs_and_run.c @@ -0,0 +1,23 @@ +/* by yhlu 6.2005 + moved from nrv2v.c and some lines from crt0.S + 2006/05/02 - stepan: move nrv2b to an extra file. +*/ + +#include +#include + +void cbfs_and_run_core(char *filename, unsigned ebp) +{ + u8 *dst; + print_debug("Jumping to image.\r\n"); + dst = cbfs_load_stage(filename); + print_debug("Jumping to image.\r\n"); + + __asm__ volatile ( + "movl %%eax, %%ebp\n\t" + "cli\n\t" + "jmp *%%edi\n\t" + :: "a"(ebp), "D"(dst) + ); + +} -- cgit v1.2.3