* Explicitly add __PRE_RAM__ where it should be added.
[coreboot.git] / src / mainboard / via / epia-n / failover.c
1 #define ASSEMBLY 1
2 #define __PRE_RAM__
3 #include <stdint.h>
4 #include <device/pci_def.h>
5 #include <device/pci_ids.h>
6 #include <arch/io.h>
7 #include "arch/romcc_io.h"
8 #include "pc80/mc146818rtc_early.c"
9
10 static unsigned long main(unsigned long bist)
11 {
12 #if 0
13         /* This is the primary cpu how should I boot? */
14         if (do_normal_boot()) {
15                 goto normal_image;
16         }
17         else {
18                 goto fallback_image;
19         }
20  normal_image:
21         asm volatile ("jmp __normal_image" 
22                 : /* outputs */ 
23                 : "a" (bist) /* inputs */
24                 : /* clobbers */
25                 );
26  cpu_reset:
27         asm volatile ("jmp __cpu_reset"
28                 : /* outputs */ 
29                 : "a"(bist) /* inputs */
30                 : /* clobbers */
31                 );
32  fallback_image:
33 #endif
34         return bist;
35 }