diff options
author | Stefan Reinauer <stepan@openbios.org> | 2005-12-04 17:08:31 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2005-12-04 17:08:31 +0000 |
commit | a09ab6dc531aa7d14706b6a912e5feb476426ab2 (patch) | |
tree | 5c1d565f16888112d90dd692fb57c615db16a3a1 /src/mainboard/technologic/ts5300/failover.c | |
parent | 648e8da0c2110edba650cad6d322b887930d3b7f (diff) |
get ts5300 compiling, it's mostly a copy of msm586seg
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2130 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/technologic/ts5300/failover.c')
-rw-r--r-- | src/mainboard/technologic/ts5300/failover.c | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/mainboard/technologic/ts5300/failover.c b/src/mainboard/technologic/ts5300/failover.c index bd0df4e89d..bdcb9eaed2 100644 --- a/src/mainboard/technologic/ts5300/failover.c +++ b/src/mainboard/technologic/ts5300/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; } |