Revision: linuxbios@linuxbios.org--devel/freebios--devel--2.0--patch-25
[coreboot.git] / src / mainboard / eaglelion / 5bcm / failover.c
1 #define ASSEMBLY 1
2 #include <stdint.h>
3 #include <device/pci_def.h>
4 #include <device/pci_ids.h>
5 #include <arch/io.h>
6 #include "arch/romcc_io.h"
7 #include "pc80/mc146818rtc_early.c"
8
9 static unsigned long main(unsigned long bist)
10 {
11         /* This is the primary cpu how should I boot? */
12         if (do_normal_boot()) {
13                 goto normal_image;
14         }
15         else {
16                 goto fallback_image;
17         }
18  normal_image:
19         asm volatile ("jmp __normal_image" 
20                 : /* outputs */ 
21                 : "a" (bist) /* inputs */
22                 : /* clobbers */
23                 );
24  cpu_reset:
25         asm volatile ("jmp __cpu_reset"
26                 : /* outputs */ 
27                 : "a"(bist) /* inputs */
28                 : /* clobbers */
29                 );
30  fallback_image:
31         return bist;
32 }