Apply linuxbios-rename-other-payload-options.patch
[coreboot.git] / src / mainboard / tyan / s2735 / Config.lb
1 ##
2 ## Compute the location and size of where this firmware image
3 ## (linuxBIOS plus bootloader) will live in the boot rom chip.
4 ##
5 if USE_FALLBACK_IMAGE
6         default ROM_SECTION_SIZE   = FALLBACK_SIZE
7         default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE )
8 else
9         default ROM_SECTION_SIZE   = ( ROM_SIZE - FALLBACK_SIZE )
10         default ROM_SECTION_OFFSET = 0
11 end
12
13 ##
14 ## Compute the start location and size size of
15 ## The linuxBIOS bootloader.
16 ##
17 default PAYLOAD_SIZE            = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
18 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
19 default CONFIG_ROM_PAYLOAD     = 1
20
21 ##
22 ## Compute where this copy of linuxBIOS will start in the boot rom
23 ##
24 default _ROMBASE      = ( CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE )
25
26 ##
27 ## Compute a range of ROM that can cached to speed up linuxBIOS,
28 ## execution speed.
29 ##
30 ## XIP_ROM_SIZE must be a power of 2.
31 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
32 ##
33 default XIP_ROM_SIZE=65536
34 default XIP_ROM_BASE = ( _ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE )
35
36 arch i386 end 
37
38
39 ##
40 ## Build the objects we have code for in this directory.
41 ##
42
43 driver mainboard.o
44 if HAVE_MP_TABLE object mptable.o end
45 if HAVE_PIRQ_TABLE object irq_tables.o end
46 object reset.o
47 if USE_DCACHE_RAM
48
49 if CONFIG_USE_INIT
50
51 makerule ./auto.o
52         depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
53         action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o auto.o"
54 end
55
56 else
57
58 makerule ./auto.inc
59         depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
60         action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
61         action "perl -e 's/.rodata/.rom.data/g' -pi $@"
62         action "perl -e 's/.text/.section .rom.text/g' -pi $@"
63 end
64
65 end
66 else
67
68 ##
69 ## Romcc output
70 ##
71 makerule ./failover.E
72         depends "$(MAINBOARD)/failover.c ./romcc"
73         action "./romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
74 end
75
76 makerule ./failover.inc
77         depends "$(MAINBOARD)/failover.c ./romcc"
78         action "./romcc    -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
79 end
80
81 makerule ./auto.E
82         depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
83         action  "./romcc -E -mcpu=k8 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
84 end
85 makerule ./auto.inc
86         depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
87         action  "./romcc    -mcpu=k8 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
88 end
89
90 end
91
92 ##
93 ## Build our 16 bit and 32 bit linuxBIOS entry code
94 ##
95 mainboardinit cpu/x86/16bit/entry16.inc
96 mainboardinit cpu/x86/32bit/entry32.inc
97 ldscript /cpu/x86/16bit/entry16.lds
98 if USE_DCACHE_RAM
99         if CONFIG_USE_INIT
100                 ldscript /cpu/x86/32bit/entry32.lds
101         end
102
103         if CONFIG_USE_INIT
104                 ldscript      /cpu/x86/car/cache_as_ram.lds
105         end
106 end
107
108
109 ##
110 ## Build our reset vector (This is where linuxBIOS is entered)
111 ##
112 if USE_FALLBACK_IMAGE 
113         mainboardinit cpu/x86/16bit/reset16.inc 
114         ldscript /cpu/x86/16bit/reset16.lds 
115 else
116         mainboardinit cpu/x86/32bit/reset32.inc 
117         ldscript /cpu/x86/32bit/reset32.lds 
118 end
119
120 if USE_DCACHE_RAM
121 else
122 ### Should this be in the northbridge code?
123 mainboardinit arch/i386/lib/cpu_reset.inc
124 end
125
126 ##
127 ## Include an id string (For safe flashing)
128 ##
129 mainboardinit arch/i386/lib/id.inc
130 ldscript /arch/i386/lib/id.lds
131
132 if USE_DCACHE_RAM
133 ##
134 ## Setup Cache-As-Ram
135 ##
136 mainboardinit cpu/x86/car/cache_as_ram.inc
137 end
138
139 ###
140 ### This is the early phase of linuxBIOS startup 
141 ### Things are delicate and we test to see if we should
142 ### failover to another image.
143 ###
144 if USE_FALLBACK_IMAGE
145 if USE_DCACHE_RAM
146        ldscript /arch/i386/lib/failover.lds
147 else
148        ldscript /arch/i386/lib/failover.lds
149         mainboardinit ./failover.inc
150 end
151 end
152
153 ##
154 ## Setup RAM
155 ##
156 if USE_DCACHE_RAM
157
158 if CONFIG_USE_INIT
159 initobject auto.o
160 else
161 mainboardinit ./auto.inc
162 end
163
164 else
165 # ROMCC
166 mainboardinit cpu/x86/fpu/enable_fpu.inc
167 mainboardinit cpu/x86/mmx/enable_mmx.inc
168 mainboardinit cpu/x86/sse/enable_sse.inc
169 mainboardinit ./auto.inc
170 mainboardinit cpu/x86/sse/disable_sse.inc
171 mainboardinit cpu/x86/mmx/disable_mmx.inc
172
173 end
174
175 ##
176 ## Include the secondary Configuration files 
177 ##
178 if CONFIG_CHIP_NAME
179         config chip.h
180 end
181
182
183 # sample config for tyan/s2735
184 chip northbridge/intel/e7501
185         device pci_domain 0 on
186                 device pci 0.0 on end
187                 device pci 0.1 on end
188                 device pci 2.0 on
189                         chip southbridge/intel/i82870
190                                 device pci 1c.0 on end
191                                 device pci 1d.0 on 
192                                         chip drivers/pci/onboard
193                                                 device pci 1.0 on end # intel lan
194                                                 device pci 1.1 on end
195                                         end
196                                 end
197                                 device pci 1e.0 on end
198                                 device pci 1f.0 on end
199                         end
200                 end
201                 device pci 6.0 on end
202                 chip southbridge/intel/i82801er
203                         device pci 1d.0 on end
204                         device pci 1d.1 on end
205                         device pci 1d.2 on end
206                         device pci 1d.3 on end
207                         device pci 1d.7 on end
208                         device pci 1e.0 on 
209                                 chip drivers/pci/onboard
210                                         device pci 1.0 on end # intel lan 10/100
211                                 end
212                                 chip drivers/pci/onboard
213                                         device pci 2.0 on end # ati 
214                                 end
215                         end
216                         device pci 1f.0 on
217                                 chip superio/winbond/w83627hf
218                                         device pnp 2e.0 on #  Floppy
219                                                 io 0x60 = 0x3f0
220                                                 irq 0x70 = 6
221                                                 drq 0x74 = 2
222                                         end
223                                         device pnp 2e.1 off #  Parallel Port
224                                                 io 0x60 = 0x378
225                                                 irq 0x70 = 7
226                                         end
227                                         device pnp 2e.2 on #  Com1
228                                                 io 0x60 = 0x3f8
229                                                 irq 0x70 = 4
230                                         end
231                                         device pnp 2e.3 on #  Com2
232                                                 io 0x60 = 0x2f8
233                                                 irq 0x70 = 3
234                                         end
235                                         device pnp 2e.5 on #  Keyboard
236                                                 io 0x60 = 0x60
237                                                 io 0x62 = 0x64
238                                                 irq 0x70 = 1
239                                                 irq 0x72 = 12
240                                         end
241                                         device pnp 2e.6 off #  CIR
242                                                 io 0x60 = 0x100
243                                         end
244                                         device pnp 2e.7 off #  GAME_MIDI_GIPO1
245                                                 io 0x60 = 0x220
246                                                 io 0x62 = 0x300
247                                                 irq 0x70 = 9
248                                         end                               
249                                         device pnp 2e.8 off end #  GPIO2
250                                         device pnp 2e.9 off end #  GPIO3
251                                         device pnp 2e.a off end #  ACPI
252                                         device pnp 2e.b on #  HW Monitor
253                                                 io 0x60 = 0x290
254                                                 irq 0x70 = 5
255                                         end
256                                 end
257                         end
258                         device pci 1f.1 off end
259                         device pci 1f.2 on end
260                         device pci 1f.3 on end
261                         device pci 1f.5 off end
262                         device pci 1f.6 off end
263                 end # SB
264         end # PCI_DOMAIN
265         device apic_cluster 0 on
266                 chip cpu/intel/socket_mPGA604_533Mhz
267                         device apic 0 on end
268                 end
269                 chip cpu/intel/socket_mPGA604_533Mhz
270                         device apic 6 on end
271                 end
272         end
273 end
274