Add some missing license headers, consistency fixes for others (trivial).
[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                 chip drivers/pci/onboard
154                         device pci 02.0 on end # vga controller
155                         # register "rom_address" = "0xfffc0000" # 256 KB image
156                         # register "rom_address" = "0xfff80000" # 512 KB image
157                         # register "rom_address" = "0xfff00000" # 1 MB image
158                 end
159                 device pci 02.1 on end # display controller
160
161                 chip southbridge/intel/i82801gx
162                         register "pirqa_routing" = "0x05"
163                         register "pirqb_routing" = "0x07"
164                         register "pirqc_routing" = "0x05"
165                         register "pirqd_routing" = "0x07"
166                         register "pirqe_routing" = "0x80"
167                         register "pirqf_routing" = "0x80"
168                         register "pirqg_routing" = "0x80"
169                         register "pirqh_routing" = "0x06"
170
171                         # GPI routing
172                         #  0 No effect (default)
173                         #  1 SMI# (if corresponding ALT_GPI_SMI_EN bit is also set)
174                         #  2 SCI (if corresponding GPIO_EN bit is also set)
175                         register "gpi13_routing" = "1"
176                         register "gpe0_en" = "0x20000601"
177
178                         register "ide_legacy_combined" = "0x1"
179                         register "ide_enable_primary" = "0x1"
180                         register "ide_enable_secondary" = "0x0"
181                         register "sata_ahci" = "0x0"
182
183                         device pci 1b.0 on end # High Definition Audio
184                         device pci 1c.0 on end # PCIe
185                         device pci 1c.1 on end # PCIe
186                         device pci 1c.2 on end # PCIe
187                         #device pci 1c.3 off end # PCIe port 4
188                         #device pci 1c.4 off end # PCIe port 5
189                         #device pci 1c.5 off end # PCIe port 6
190                         device pci 1d.0 on end # USB UHCI
191                         device pci 1d.1 on end # USB UHCI
192                         device pci 1d.2 on end # USB UHCI
193                         device pci 1d.3 on end # USB UHCI
194                         device pci 1d.7 on end # USB2 EHCI
195                         device pci 1e.0 on end # PCI bridge
196                         #device pci 1e.2 off end # AC'97 Audio 
197                         #device pci 1e.3 off end # AC'97 Modem
198                         device pci 1f.0 on # LPC bridge
199                                 chip superio/smsc/lpc47m15x
200                                         device pnp 2e.0 off             # Floppy
201                                         end
202                                         device pnp 2e.3 off             # Parport
203                                         end
204                                         device pnp 2e.4 on
205                                                  io 0x60 = 0x3f8
206                                                 irq 0x70 = 4
207                                         end
208                                         device pnp 2e.5 on
209                                                  io 0x60 = 0x2f8
210                                                 irq 0x70 = 3
211                                                 irq 0xf1 = 4 # set IRMODE 0 # XXX not an irq
212                                         end
213                                         device pnp 2e.7 on              # Keyboard+Mouse
214                                                  io 0x60 = 0x60
215                                                  io 0x62 = 0x64
216                                                 irq 0x70 = 1
217                                                 irq 0x72 = 12
218                                                 irq 0xf0 = 0x82         # HW accel A20.
219                                         end
220                                         device pnp 2e.8 on              # GAME
221                                                 # all default
222                                         end
223                                         device pnp 2e.a on              # PME
224                                         end
225                                         device pnp 2e.b on              # MPU
226                                         end
227                                 end
228                         end
229                         #device pci 1f.1 off end # IDE
230                         device pci 1f.2 on end  # SATA
231                         device pci 1f.3 on end  # SMBus
232                         #device pci 1f.4 off end # Realtek ID Codec
233                 end
234         end
235 end