Remove drivers/pci/onboard. The only purpose was for option ROMs, which are
[coreboot.git] / src / mainboard / intel / d945gclf / Config.lb
1 ##
2 ## This file is part of the coreboot project.
3 ## 
4 ## Copyright (C) 2007-2008 coresystems GmbH
5 ##
6 ## This program is free software; you can redistribute it and/or
7 ## modify it under the terms of the GNU General Public License as
8 ## published by the Free Software Foundation; version 2 of the License.
9 ##
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ## GNU General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 ##
19
20 ##
21 ## This mainboard requires DCACHE_AS_RAM enabled. It won't work without.
22 ## 
23
24 ##
25 ## Only use the option table in a normal image
26 ##
27 default CONFIG_USE_OPTION_TABLE = !CONFIG_USE_FALLBACK_IMAGE
28
29 ##
30 ## Image size calculation
31 ##
32
33 include /config/nofailovercalculation.lb
34
35 ##
36 ## Set all of the defaults for an x86 architecture
37 ##
38
39 arch i386 end
40
41 ##
42 ## Build the objects we have code for in this directory.
43 ##
44
45 driver mainboard.o
46 driver rtl8168.o
47 if CONFIG_GENERATE_MP_TABLE object mptable.o end
48 if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end
49 if CONFIG_HAVE_SMI_HANDLER smmobject mainboard_smi.o end
50
51 if CONFIG_GENERATE_ACPI_TABLES
52         object fadt.o
53         object acpi_tables.o
54         makerule dsdt.c
55                 depends "$(CONFIG_MAINBOARD)/dsdt.asl"
56                 action  "$(CONFIG_CROSS_COMPILE)cpp -D__ACPI__ -P $(CPPFLAGS) -I$(CONFIG_MAINBOARD)  $(CONFIG_MAINBOARD)/dsdt.asl -o $(CURDIR)/dsdt.asl"
57                 action  "iasl -p dsdt -tc $(CURDIR)/dsdt.asl"
58                 action  "mv $(CURDIR)/dsdt.hex dsdt.c"
59         end
60         object ./dsdt.o
61 end
62
63 object reset.o
64
65 if CONFIG_USE_INIT
66
67 makerule ./auto.o
68         depends "$(CONFIG_MAINBOARD)/auto.c option_table.h"
69         action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I.  -c $(CONFIG_MAINBOARD)/auto.c -o $@"
70 end
71
72 else
73
74 makerule ./auto.inc
75         depends "$(CONFIG_MAINBOARD)/auto.c option_table.h"
76         action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -c -S $(CONFIG_MAINBOARD)/auto.c -o $@"
77         action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
78         action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
79 end
80
81 end
82
83 ##
84 ## Build our 16 bit and 32 bit coreboot entry code
85 ##
86 mainboardinit cpu/x86/16bit/entry16.inc
87 mainboardinit cpu/x86/32bit/entry32.inc
88 ldscript /cpu/x86/16bit/entry16.lds
89 if CONFIG_USE_INIT
90         ldscript /cpu/x86/32bit/entry32.lds
91         ldscript /cpu/x86/car/cache_as_ram.lds
92 end
93
94 ##
95 ## Build our reset vector (This is where coreboot is entered)
96 ##
97 if CONFIG_USE_FALLBACK_IMAGE 
98         mainboardinit cpu/x86/16bit/reset16.inc
99         ldscript /cpu/x86/16bit/reset16.lds
100 else
101         mainboardinit cpu/x86/32bit/reset32.inc
102         ldscript /cpu/x86/32bit/reset32.lds
103 end
104
105
106 ##
107 ## Include an id string (For safe flashing)
108 ##
109 mainboardinit arch/i386/lib/id.inc
110 ldscript /arch/i386/lib/id.lds
111
112 ##
113 ## Setup Cache-As-Ram
114 ##
115 mainboardinit cpu/intel/model_106cx/cache_as_ram.inc
116
117 ###
118 ### This is the early phase of coreboot startup 
119 ### Things are delicate and we test to see if we should
120 ### failover to another image.
121 ###
122 if CONFIG_USE_FALLBACK_IMAGE
123         ldscript /arch/i386/lib/failover.lds
124 end
125
126 ###
127 ### O.k. We aren't just an intermediary anymore!
128 ###
129
130 if CONFIG_USE_INIT
131 initobject auto.o
132 else
133 mainboardinit ./auto.inc
134 end
135
136 ##
137 ## Include the secondary Configuration files 
138 ##
139 dir /pc80
140 config chip.h
141
142 chip northbridge/intel/i945
143
144         device apic_cluster 0 on
145                 chip cpu/intel/socket_441
146                         device apic 0 on end
147                 end
148         end
149
150         device pci_domain 0 on 
151                 device pci 00.0 on end # host bridge
152                 device pci 01.0 off end # i945 PCIe root port
153                 device pci 02.0 on end # vga controller
154                 device pci 02.1 on end # display controller
155
156                 chip southbridge/intel/i82801gx
157                         register "pirqa_routing" = "0x05"
158                         register "pirqb_routing" = "0x07"
159                         register "pirqc_routing" = "0x05"
160                         register "pirqd_routing" = "0x07"
161                         register "pirqe_routing" = "0x80"
162                         register "pirqf_routing" = "0x80"
163                         register "pirqg_routing" = "0x80"
164                         register "pirqh_routing" = "0x06"
165
166                         # GPI routing
167                         #  0 No effect (default)
168                         #  1 SMI# (if corresponding ALT_GPI_SMI_EN bit is also set)
169                         #  2 SCI (if corresponding GPIO_EN bit is also set)
170                         register "gpi13_routing" = "1"
171                         register "gpe0_en" = "0x20000601"
172
173                         register "ide_legacy_combined" = "0x1"
174                         register "ide_enable_primary" = "0x1"
175                         register "ide_enable_secondary" = "0x0"
176                         register "sata_ahci" = "0x0"
177
178                         device pci 1b.0 on end # High Definition Audio
179                         device pci 1c.0 on end # PCIe
180                         device pci 1c.1 on end # PCIe
181                         device pci 1c.2 on end # PCIe
182                         #device pci 1c.3 off end # PCIe port 4
183                         #device pci 1c.4 off end # PCIe port 5
184                         #device pci 1c.5 off end # PCIe port 6
185                         device pci 1d.0 on end # USB UHCI
186                         device pci 1d.1 on end # USB UHCI
187                         device pci 1d.2 on end # USB UHCI
188                         device pci 1d.3 on end # USB UHCI
189                         device pci 1d.7 on end # USB2 EHCI
190                         device pci 1e.0 on end # PCI bridge
191                         #device pci 1e.2 off end # AC'97 Audio 
192                         #device pci 1e.3 off end # AC'97 Modem
193                         device pci 1f.0 on # LPC bridge
194                                 chip superio/smsc/lpc47m15x
195                                         device pnp 2e.0 off             # Floppy
196                                         end
197                                         device pnp 2e.3 off             # Parport
198                                         end
199                                         device pnp 2e.4 on
200                                                  io 0x60 = 0x3f8
201                                                 irq 0x70 = 4
202                                         end
203                                         device pnp 2e.5 on
204                                                  io 0x60 = 0x2f8
205                                                 irq 0x70 = 3
206                                                 irq 0xf1 = 4 # set IRMODE 0 # XXX not an irq
207                                         end
208                                         device pnp 2e.7 on              # Keyboard+Mouse
209                                                  io 0x60 = 0x60
210                                                  io 0x62 = 0x64
211                                                 irq 0x70 = 1
212                                                 irq 0x72 = 12
213                                                 irq 0xf0 = 0x82         # HW accel A20.
214                                         end
215                                         device pnp 2e.8 on              # GAME
216                                                 # all default
217                                         end
218                                         device pnp 2e.a on              # PME
219                                         end
220                                         device pnp 2e.b on              # MPU
221                                         end
222                                 end
223                         end
224                         #device pci 1f.1 off end # IDE
225                         device pci 1f.2 on end  # SATA
226                         device pci 1f.3 on end  # SMBus
227                         #device pci 1f.4 off end # Realtek ID Codec
228                 end
229         end
230 end