diff options
author | Eric Biederman <ebiederm@xmission.com> | 2004-11-04 11:04:33 +0000 |
---|---|---|
committer | Eric Biederman <ebiederm@xmission.com> | 2004-11-04 11:04:33 +0000 |
commit | 018d8dd60f2cc0c82faac0ee2657daa163dd43e7 (patch) | |
tree | 528de120d262a9df05ce8b6119f593c85fa6b809 /src/mainboard/digitallogic/adl855pc/failover.c | |
parent | 4403f6082372d069e3cabe0918d9af5f9c1dccf6 (diff) |
- Update abuild.sh so it will rebuild successfull builds
- Move pci_set_method out of hardwaremain.c
- Re-add debugging name field but only include the CONFIG_CHIP_NAME is
enabled. All instances are now wrapped in CHIP_NAME
- Many minor cleanups so most ports build.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1737 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/digitallogic/adl855pc/failover.c')
-rw-r--r-- | src/mainboard/digitallogic/adl855pc/failover.c | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/mainboard/digitallogic/adl855pc/failover.c b/src/mainboard/digitallogic/adl855pc/failover.c index bd0df4e89d..bdcb9eaed2 100644 --- a/src/mainboard/digitallogic/adl855pc/failover.c +++ b/src/mainboard/digitallogic/adl855pc/failover.c @@ -5,25 +5,28 @@ #include <arch/io.h> #include "arch/romcc_io.h" #include "pc80/mc146818rtc_early.c" -#include "cpu/p6/boot_cpu.c" -static void main(void) +static unsigned long main(unsigned long bist) { - /* for now, just always assume failure */ - -#if 0 - /* Is this a cpu reset? */ - if (cpu_init_detected()) { - if (last_boot_normal()) { - asm("jmp __normal_image"); - } else { - asm("jmp __cpu_reset"); - } - } - /* This is the primary cpu how should I boot? */ - else if (do_normal_boot()) { - asm("jmp __normal_image"); + if (do_normal_boot()) { + goto normal_image; + } + else { + goto fallback_image; } -#endif + normal_image: + asm volatile ("jmp __normal_image" + : /* outputs */ + : "a" (bist) /* inputs */ + : /* clobbers */ + ); + cpu_reset: + asm volatile ("jmp __cpu_reset" + : /* outputs */ + : "a"(bist) /* inputs */ + : /* clobbers */ + ); + fallback_image: + return bist; } |