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