987012976c214a992c811301f9511749a5aaf813
[coreboot.git] / src / mainboard / tyan / s2882 / Config.lb
1 uses HAVE_MP_TABLE
2 uses HAVE_PIRQ_TABLE
3 uses USE_FALLBACK_IMAGE
4 uses USE_NORMAL_IMAGE
5 uses AMD8111_DEV
6 uses MAINBOARD
7 uses ARCH
8 #
9 #
10 ###
11 ### Set all of the defaults for an x86 architecture
12 ###
13 #
14 #
15 ###
16 ### Build the objects we have code for in this directory.
17 ###
18 ##object mainboard.o
19 config chip.h
20 register "fixup_scsi" = "1" 
21 register "fixup_vga" = "1"
22
23
24 driver mainboard.o
25 driver adaptec_scsi.o
26 #driver si_sata.o
27 #driver intel_nic.o
28 object static_devices.o
29 if HAVE_MP_TABLE object mptable.o end
30 if HAVE_PIRQ_TABLE object irq_tables.o end
31 #
32 arch i386 end
33 #cpu k8 end
34 #
35 ###
36 ### Build our 16 bit and 32 bit linuxBIOS entry code
37 ###
38 mainboardinit cpu/i386/entry16.inc
39 mainboardinit cpu/i386/entry32.inc
40 ldscript /cpu/i386/entry16.lds
41 ldscript /cpu/i386/entry32.lds
42 #
43 ###
44 ### Build our reset vector (This is where linuxBIOS is entered)
45 ###
46 if USE_FALLBACK_IMAGE 
47   mainboardinit cpu/i386/reset16.inc 
48   ldscript /cpu/i386/reset16.lds 
49 else
50 #  print "NO FALLBACK USED!"
51 end
52
53 if USE_NORMAL_IMAGE
54   mainboardinit cpu/i386/reset32.inc 
55   ldscript /cpu/i386/reset32.lds 
56 end
57 #
58 #### Should this be in the northbridge code?
59 mainboardinit arch/i386/lib/cpu_reset.inc
60 #
61 ###
62 ### Include an id string (For safe flashing)
63 ###
64 mainboardinit arch/i386/lib/id.inc
65 ldscript /arch/i386/lib/id.lds
66 #
67 ####
68 #### This is the early phase of linuxBIOS startup 
69 #### Things are delicate and we test to see if we should
70 #### failover to another image.
71 ####
72 #option MAX_REBOOT_CNT=2
73 if USE_FALLBACK_IMAGE
74   ldscript /arch/i386/lib/failover.lds 
75 end
76 #
77 ###
78 ### Setup our mtrrs
79 ###
80 mainboardinit cpu/k8/earlymtrr.inc
81 ###
82 ### Only the bootstrap cpu makes it here.
83 ### Failover if we need to 
84 ###
85 #
86 if USE_FALLBACK_IMAGE
87   mainboardinit ./failover.inc
88 #  mainboardinit southbridge/amd/amd8111/cmos_boot_failover.inc 
89 end
90
91 #
92 #
93 ###
94 ### Setup the serial port
95 ###
96 #mainboardinit superiowinbond/w83627hf/setup_serial.inc
97 mainboardinit pc80/serial.inc
98 mainboardinit arch/i386/lib/console.inc
99 #
100 ####
101 #### O.k. We aren't just an intermediary anymore!
102 ####
103 #
104 ###
105 ### When debugging disable the watchdog timer
106 ###
107 ##option MAXIMUM_CONSOLE_LOGLEVEL=7
108 #default MAXIMUM_CONSOLE_LOGLEVEL=7
109 #option DISABLE_WATCHDOG= (MAXIMUM_CONSOLE_LOGLEVEL >= 8) 
110 #if DISABLE_WATCHDOG
111 #  mainboardinit southbridgeamd/amd8111/disable_watchdog.inc 
112 #end
113 #
114 #if USE_FALLBACK_IMAGE mainboardinit arch/i386/lib/noop_failover.inc  end
115 #
116 ###
117 ### Romcc output
118 ###
119 #makerule ./failover.E dep "$(MAINBOARD)/failover.c" act "$(CPP) -I$(TOP)/src $(CPPFLAGS) $(MAINBOARD)/failover.c > ./failever.E"
120 #makerule ./failover.inc dep "./romcc ./failover.E" act "./romcc -O ./failover.E > failover.inc"
121 #mainboardinit .failover.inc
122
123 makerule ./failover.E
124         depends "$(MAINBOARD)/failover.c" 
125         action "$(CPP) -I$(TOP)/src $(ROMCCPPFLAGS) $(CPPFLAGS) $(MAINBOARD)/failover.c > ./failover.E"
126 end
127
128 makerule ./failover.inc
129         depends "./romcc ./failover.E"
130         action "./romcc -O -o failover.inc --label-prefix=failover ./failover.E"end
131
132 makerule ./auto.E 
133         depends "$(MAINBOARD)/auto.c" 
134         action  "$(CPP) -I$(TOP)/src $(ROMCCPPFLAGS) $(CPPFLAGS) $(MAINBOARD)/auto.c > ./auto.E"
135 end
136 makerule ./auto.inc 
137         depends "./romcc ./auto.E"
138         action "./romcc -O -mcpu=k8 -o auto.inc --label-prefix=auto ./auto.E" 
139 #       action  "./romcc -mcpu=k8  -O ./auto.E > auto.inc"
140 end
141 mainboardinit cpu/k8/enable_mmx_sse.inc
142 mainboardinit ./auto.inc
143 mainboardinit cpu/k8/disable_mmx_sse.inc
144 #
145 ###
146 ### Setup RAM
147 ###
148 #mainboardinit ram/ramtest.inc
149 #mainboardinit southbridge/amd/amd8111/smbus.inc
150 #mainboardinit sdram/generic_dump_spd.inc
151 #
152 ###
153 ### Include the secondary Configuration files 
154 ###
155 northbridge amd/amdk8
156 end
157 southbridge amd/amd8111 "amd8111"
158 end
159 southbridge amd/amd8131 "amd8131"
160 end
161 #mainboardinit archi386/smp/secondary.inc
162 #superio NSC/pc87360
163 #       register "com1" = "{1}"
164 #       register "lpt" = "{1}"
165 #end
166 dir /pc80
167 ##dir /src/superio/winbond/w83627hf
168 dir /bioscall
169 dir /cpu/k8
170 cpu k8 "cpu0"
171   register "up" = "{.chip = &amd8131, .ht_width=8, .ht_speed=200}"
172 end
173
174 cpu k8 "cpu1"
175 end