Kill remaining unneeded CAR/ROMCC if-blocks.
[coreboot.git] / src / mainboard / msi / ms9185 / Config.lb
1 ##
2 ## This file is part of the coreboot project.
3 ##
4 ## Copyright (C) 2006 AMD
5 ## Written by Yinghai Lu <yinghailu@gmail.com> for AMD.
6 ##
7 ## Copyright (C) 2006 MSI
8 ## Written by bxshi <bingxunshi@gmail.com> for MSI.
9 ##
10 ## This program is free software; you can redistribute it and/or modify
11 ## it under the terms of the GNU General Public License as published by
12 ## the Free Software Foundation; either version 2 of the License, or
13 ## (at your option) any later version.
14 ##
15 ## This program is distributed in the hope that it will be useful,
16 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 ## GNU General Public License for more details.
19 ##
20 ## You should have received a copy of the GNU General Public License
21 ## along with this program; if not, write to the Free Software
22 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
23 ##
24
25 ##
26 ## Compute the location and size of where this firmware image
27 ## (coreboot plus bootloader) will live in the boot rom chip.
28 ##
29 if USE_FALLBACK_IMAGE
30        default ROM_SECTION_SIZE   = FALLBACK_SIZE
31        default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE )
32 else
33        default ROM_SECTION_SIZE   = ( ROM_SIZE - FALLBACK_SIZE )
34        default ROM_SECTION_OFFSET = 0
35 end
36
37 ##
38 ## Compute the start location and size size of
39 ## The coreboot bootloader.
40 ##
41 default PAYLOAD_SIZE            = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
42 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
43
44 ##
45 ## Compute where this copy of coreboot will start in the boot rom
46 ##
47 default _ROMBASE      = ( CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE )
48
49 ##
50 ## Compute a range of ROM that can cached to speed up coreboot,
51 ## execution speed.
52 ##
53 ## XIP_ROM_SIZE must be a power of 2.
54 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
55 ##
56 default XIP_ROM_SIZE=65536
57 default XIP_ROM_BASE = ( _ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE )
58
59 arch i386 end
60
61 ##
62 ## Build the objects we have code for in this directory.
63 ##
64
65 driver mainboard.o
66
67 #dir /drivers/si/3114
68
69 #needed by irq_tables and mptable and acpi_tables
70 object get_bus_conf.o
71
72 if HAVE_MP_TABLE
73        object mptable.o
74 end
75
76 if HAVE_PIRQ_TABLE
77        object irq_tables.o
78 end
79
80        if CONFIG_USE_INIT
81                # compile cache_as_ram.c to auto.o
82                makerule ./cache_as_ram_auto.o
83                        depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
84                        action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@"
85                end
86
87        else
88                #compile cache_as_ram.c to auto.inc
89                makerule ./cache_as_ram_auto.inc
90                        depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
91                        action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall $(DEBUG_CFLAGS) -c -S -o $@"
92                        action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
93                        action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
94                end
95
96        end
97 ##
98 ## Build our 16 bit and 32 bit coreboot entry code
99 ##
100
101 if USE_FALLBACK_IMAGE
102        mainboardinit cpu/x86/16bit/entry16.inc
103        ldscript /cpu/x86/16bit/entry16.lds
104 end
105
106 mainboardinit cpu/x86/32bit/entry32.inc
107         if CONFIG_USE_INIT
108                 ldscript /cpu/x86/32bit/entry32.lds
109         end
110
111         if CONFIG_USE_INIT
112                 ldscript /cpu/amd/car/cache_as_ram.lds
113         end
114
115 ##
116 ## Build our reset vector (This is where coreboot is entered)
117 ##
118 if USE_FALLBACK_IMAGE
119        mainboardinit cpu/x86/16bit/reset16.inc
120        ldscript /cpu/x86/16bit/reset16.lds
121 else
122        mainboardinit cpu/x86/32bit/reset32.inc
123        ldscript /cpu/x86/32bit/reset32.lds
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        ##
133        ## Setup Cache-As-Ram
134        ##
135        mainboardinit cpu/amd/car/cache_as_ram.inc
136
137 ###
138 ### This is the early phase of coreboot startup
139 ### Things are delicate and we test to see if we should
140 ### failover to another image.
141 ###
142 if USE_FALLBACK_IMAGE
143                ldscript /arch/i386/lib/failover.lds
144 end
145
146 ###
147 ### O.k. We aren't just an intermediary anymore!
148 ###
149
150 ##
151 ## Setup RAM
152 ##
153        if CONFIG_USE_INIT
154                initobject cache_as_ram_auto.o
155        else
156                mainboardinit ./cache_as_ram_auto.inc
157        end
158
159 ##
160 ## Include the secondary Configuration files
161 ##
162 config chip.h
163
164 # sample config for amd/serengeti_cheetah
165 chip northbridge/amd/amdk8/root_complex
166         device apic_cluster 0 on
167                 chip cpu/amd/socket_F
168                         device apic 0 on end
169                 end
170         end
171        device pci_domain 0 on
172                chip northbridge/amd/amdk8
173                        device pci 18.0 on end
174                        device pci 18.0 on end
175                        device pci 18.0 on #  northbridge
176                               #  devices on link 0
177                                 chip southbridge/broadcom/bcm5780 # HT2000
178                                         device pci 0.0 on end   # PXB 1 0x0130
179                                         device pci 1.0 on       # PXB 2 0x0130
180                                                 device pci 4.0 on end # GB E 0x1668 vid = 0x14e4
181                                                 device pci 4.1 on end # GB E 0x1669 vid = 0x14e4
182                                         end
183                                         device pci 2.0 on end # PCI E 1  #0x0132
184                                        device pci 3.0 on end # PCI E 2
185                                        device pci 4.0 on end # PCI E 3
186                                        device pci 5.0 on end # PCI E 4
187                                 end
188                                 chip southbridge/broadcom/bcm5785 # HT1000
189                                         device pci 0.0 on  # HT PXB  0x0036
190                                                 device pci d.0 on end # PPBX 0x0104
191                                                 device pci e.0 on end # SATA 0x024a
192                                                 device pci e.1 on end # SATA 0x024a bx_a001
193                                                 device pci e.2 on end # SATA 0x024a bx_a001
194                                                 device pci e.3 on end # SATA 0x024a bx_a001
195                                         end
196                                         device pci 1.0 on # Legacy  pci main  0x0205
197                                        end
198                                         device pci 1.1 on end # IDE        0x0214
199                                         device pci 1.2 on     # LPC        0x0234
200                                                 chip superio/nsc/pc87417
201                                                         device  pnp 2e.0 off  # Floppy
202                                                                  io 0x60 = 0x3f0
203                                                                 irq 0x70 = 6
204                                                                 drq 0x74 = 2
205                                                         end
206                                                         device pnp 2e.1 off  # Parallel Port
207                                                                  io 0x60 = 0x378
208                                                                 irq 0x70 = 7
209                                                         end
210                                                         device pnp 2e.2 off # Com 2
211                                                                  io 0x60 = 0x2f8
212                                                                 irq 0x70 = 3
213                                                         end
214                                                         device pnp 2e.3 on  # Com 1
215                                                                  io 0x60 = 0x3f8
216                                                                 irq 0x70 = 4
217                                                         end
218                                                         device pnp 2e.4 off end # SWC
219                                                         device pnp 2e.5 off end # Mouse
220                                                         device pnp 2e.6 on  # Keyboard
221                                                                  io 0x60 = 0x60
222                                                                  io 0x62 = 0x64
223                                                                 irq 0x70 = 1
224                                                         end
225                                                         device pnp 2e.7 off end # GPIO
226                                                         device pnp 2e.f off end # XBUS
227                                                         device pnp 2e.10 on #RTC
228                                                                 io 0x60 = 0x70
229                                                                 io 0x62 = 0x72
230                                                        end
231                                                 end
232                                         end
233                                         device pci 1.3 on end # WDTimer    0x0238
234                                         device pci 1.4 on end # XIOAPIC0   0x0235
235                                         device pci 1.5 on end # XIOAPIC1
236                                         device pci 1.6 on end # XIOAPIC2
237                                         device pci 2.0 on end # USB        0x0223
238                                         device pci 2.1 on end # USB
239                                         device pci 2.2 on end # USB
240                                         #when HT_CHAIN_END_UNITID_BASE (0,1) < HT_CHAIN_UNITID_BASE (6,,,,),
241                                         chip drivers/pci/onboard
242                                               device pci 3.0 on end # it is in bcm5785_0 bus, but the device id can not be changed even unitid is changed, fake one to get the rom_address
243                                                                     # if HT_CHAIN_END_UNITID_BASE=0, it is 4, if HT_CHAIN_END_UNITID_BASE=1, it is 3
244                                               register "rom_address" = "0xfff80000"
245                                         end
246                                        #bx_a013+ start
247                                        #chip drivers/pci/onboard    #SATA2
248                                        #       device pci 5.0 on end
249                                        #       device pci 5.1 on end
250                                        #       device pci 5.2 on end
251                                        #       device pci 5.3 on end
252                                        #end
253                                        #bx_a013+ end
254
255                                 end
256                                         #when HT_CHAIN_END_UNITID_BASE > HT_CHAIN_UNITID_BASE (6, ,,,,)
257 #                                        chip drivers/pci/onboard
258 #                                              device pci 0.0 on end # fake, will be disabled
259 #                                        end
260 #                                        chip drivers/pci/onboard
261 #                                              device pci 4.0 on end # it is in bcm5785_0 bus, but the device id can not be changed even unitid is changed
262 #                                              register "rom_address" = "0xfff80000"
263 #                                        end
264
265                        end #  device pci 18.0
266                        device pci 18.1 on end
267                        device pci 18.2 on end
268                        device pci 18.3 on end
269                end # amdk8
270        end #pci_domain
271 #        chip drivers/generic/debug
272 #              device pnp 0.0 off end # chip name
273 #                device pnp 0.1 on end # pci_regs_all
274 #                device pnp 0.2 off end # mem
275 #                device pnp 0.3 off end # cpuid
276 #                device pnp 0.4 off end # smbus_regs_all
277 #                device pnp 0.5 off end # dual core msr
278 #                device pnp 0.6 off end # cache size
279 #                device pnp 0.7 off end # tsc
280 #       end
281
282 end
283
284