This is the final patch that got everything working for me with the HP dl145g3.
[coreboot.git] / src / mainboard / hp / dl145_g3 / 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) 2007 University of Mannheim
8 ## Written by Philipp Degler <pdegler@rumms.uni-mannheim.e> for Uni of Mannheim
9 ##
10 ## Copyright (C) 2009 University of Heidelberg
11 ## Written by Mondrian Nuessle <nuessle@uni-hd.de> for Uni of Heidelberg
12 ##
13 ## This program is free software; you can redistribute it and/or modify
14 ## it under the terms of the GNU General Public License as published by
15 ## the Free Software Foundation; either version 2 of the License, or
16 ## (at your option) any later version.
17 ##
18 ## This program is distributed in the hope that it will be useful,
19 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 ## GNU General Public License for more details.
22 ##
23 ## You should have received a copy of the GNU General Public License
24 ## along with this program; if not, write to the Free Software
25 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
26 ##
27
28 include /config/nofailovercalculation.lb
29
30 arch i386 end
31
32 ##
33 ## Build the objects we have code for in this directory.
34 ##
35
36 driver mainboard.o
37
38 #needed by irq_tables and mptable and acpi_tables
39 object get_bus_conf.o
40
41 if HAVE_MP_TABLE object mptable.o end
42 if HAVE_PIRQ_TABLE object irq_tables.o end
43
44 if CONFIG_USE_INIT
45         makerule ./auto.o
46                 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
47                 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(MAINBOARD)/cache_as_ram_auto.c -o $@"
48         end
49 else
50         makerule ./auto.inc
51                 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
52                 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -c -S $(MAINBOARD)/cache_as_ram_auto.c -o $@"
53                 action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
54                 action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
55         end
56 end
57
58 ##
59 ## Build our 16 bit and 32 bit coreboot entry code
60 ##
61 if USE_FALLBACK_IMAGE
62         mainboardinit cpu/x86/16bit/entry16.inc
63         ldscript /cpu/x86/16bit/entry16.lds
64 end
65
66 mainboardinit cpu/x86/32bit/entry32.inc
67
68         if CONFIG_USE_INIT
69                 ldscript /cpu/x86/32bit/entry32.lds
70         end
71
72         if CONFIG_USE_INIT
73                 ldscript /cpu/amd/car/cache_as_ram.lds
74         end
75
76 ##
77 ## Build our reset vector (This is where coreboot is entered)
78 ##
79 if USE_FALLBACK_IMAGE
80         mainboardinit cpu/x86/16bit/reset16.inc
81         ldscript /cpu/x86/16bit/reset16.lds
82 else
83         mainboardinit cpu/x86/32bit/reset32.inc
84         ldscript /cpu/x86/32bit/reset32.lds
85 end
86
87 ##
88 ## Include an id string (For safe flashing)
89 ##
90 mainboardinit arch/i386/lib/id.inc
91 ldscript /arch/i386/lib/id.lds
92
93         ##
94         ## Setup Cache-As-Ram
95         ##
96         mainboardinit cpu/amd/car/cache_as_ram.inc
97
98 ###
99 ### This is the early phase of coreboot startup
100 ### Things are delicate and we test to see if we should
101 ### failover to another image.
102 ###
103 if USE_FALLBACK_IMAGE
104                 ldscript /arch/i386/lib/failover.lds
105 end
106
107 ###
108 ### O.k. We aren't just an intermediary anymore!
109 ###
110
111 ##
112 ## Setup RAM
113 ##
114         if CONFIG_USE_INIT
115                 initobject auto.o
116         else
117                 mainboardinit ./auto.inc
118         end
119
120
121 # config for hp/dl145_g3
122 chip northbridge/amd/amdk8/root_complex
123         device apic_cluster 0 on
124                 chip cpu/amd/socket_F
125                         device apic 0 on end
126                 end
127         end
128         device pci_domain 0 on
129                 chip northbridge/amd/amdk8  # northbridge
130                         device pci 18.0 on  # devices on link 0
131                                 chip southbridge/broadcom/bcm21000 # HT2100
132                                         device pci 0.0 on
133                                         end   # bridge to slot PCI-E 4x ??
134                                         device pci 1.0 on
135                                         end
136                                         device pci 2.0 on
137                                         end  # unused
138                                         device pci 3.0 on       # bridge to slot PCI-E 16x ??
139                                         end
140                                         device pci 4.0 on
141                                         end  # unused
142                                         device pci 5.0 on
143                                                 device pci 4.0 on end # BCM5715 NIC
144                                                 device pci 4.1 on end # BCM5715 NIC
145                                         end
146                                 end
147                                 chip southbridge/broadcom/bcm5785 # HT1000
148                                         device pci 0.0 on  # HT PXB  0x0036
149                                                 device pci d.0 on end # PCI/PCI-X bridge 0x0104
150                                                 device pci e.0 on end # SATA 0x024a
151                                         end
152                                         device pci 1.0 on end # Legacy  pci main  0x0205
153                                         device pci 1.1 on end # IDE     0x0214
154                                         device pci 1.2 on     # LPC     0x0234
155                                                 chip superio/nsc/pc87417
156                                                         device  pnp 4e.0 off  # Floppy
157                                                                 io 0x60 = 0x3f0
158                                                                 irq 0x70 = 6
159                                                                 drq 0x74 = 2
160                                                         end
161                                                         device pnp 4e.1 off  # Parallel Port
162                                                                         io 0x60 = 0x378
163                                                                 irq 0x70 = 7
164                                                         end
165                                                         device pnp 4e.2 off # Com 2
166                                                                         io 0x60 = 0x2f8
167                                                                 irq 0x70 = 3
168                                                         end
169                                                         device pnp 4e.3 off  # Com 1
170                                                                         io 0x60 = 0x3f8
171                                                                 irq 0x70 = 4
172                                                         end
173                                                         device pnp 4e.4 off end # SWC
174                                                         device pnp 4e.5 off end # Mouse
175                                                         device pnp 4e.6 off  # Keyboard
176                                                                         io 0x60 = 0x60
177                                                                         io 0x62 = 0x64
178                                                                 irq 0x70 = 1
179                                                         end
180                                                         device pnp 4e.7 off end # GPIO
181                                                         device pnp 4e.f off end # XBUS
182                                                         device pnp 4e.10 on #RTC
183                                                                 io 0x60 = 0x70
184                                                                 io 0x62 = 0x72
185                                                         end
186                                                 end # end superio
187                                         end # end pci 1.2
188                                         device pci 1.3 off end # WDTimer    0x0238
189                                         device pci 1.4 on end # XIOAPIC0   0x0235
190                                         device pci 1.5 on end # XIOAPIC1
191                                         device pci 1.6 on end # XIOAPIC2
192                                         device pci 2.0 on end # USB     0x0223
193                                         device pci 2.1 on end # USB
194                                         device pci 2.2 on end # USB
195                                         device pci 3.0 on end # VGA
196                                         
197                                         #bx_a013+ start
198                                         #chip drivers/pci/onboard    #SATA2
199                                         #       device pci 5.0 on end
200                                         #       device pci 5.1 on end
201                                         #       device pci 5.2 on end
202                                         #       device pci 5.3 on end
203                                         #end
204                                         #bx_a013+ end
205                                 end
206                         end
207                         device pci 18.0 on end
208                         device pci 18.0 on end
209                         device pci 18.1 on end
210                         device pci 18.2 on end
211                         device pci 18.3 on end
212       end # amdk8
213
214    end #pci_domain
215 end
216
217