09e3419b742ca1731d5e3bb35dd81f15eb160bf8
[coreboot.git] / src / mainboard / via / pc2500e / Config.lb
1 ##
2 ## This file is part of the coreboot project.
3 ##
4 ## Copyright (C) 2008 Uwe Hermann <uwe@hermann-uwe.de>
5 ##
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 2 of the License, or
9 ## (at your option) any later version.
10 ##
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ## GNU General Public License for more details.
15 ##
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program; if not, write to the Free Software
18 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19 ##
20
21 ## CONFIG_XIP_ROM_SIZE must be a power of 2.
22 default CONFIG_XIP_ROM_SIZE = 64 * 1024
23 include /config/nofailovercalculation.lb
24
25 arch i386 end
26 driver mainboard.o
27 if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end
28 if CONFIG_GENERATE_MP_TABLE object mptable.o end
29 if CONFIG_GENERATE_ACPI_TABLES
30         object fadt.o
31         object dsdt.o
32         object acpi_tables.o
33 end
34 makerule ./failover.E
35         depends "$(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c ../romcc"
36         action "../romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c -o $@"
37 end
38 makerule ./failover.inc
39         depends "$(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c ../romcc"
40         action "../romcc    -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/../../../arch/i386/lib/failover.c -o $@"
41 end
42 makerule ./auto.E
43         depends "$(CONFIG_MAINBOARD)/auto.c option_table.h ../romcc"
44         action  "../romcc -E -mcpu=c3 -O -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/auto.c -o $@"
45 end
46 makerule ./auto.inc
47         depends "$(CONFIG_MAINBOARD)/auto.c option_table.h ../romcc"
48         action  "../romcc    -mcpu=c3 -O -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/auto.c -o $@"
49 end
50 mainboardinit cpu/x86/16bit/entry16.inc
51 mainboardinit cpu/x86/32bit/entry32.inc
52 ldscript /cpu/x86/16bit/entry16.lds
53 ldscript /cpu/x86/32bit/entry32.lds
54 if CONFIG_USE_FALLBACK_IMAGE
55         mainboardinit cpu/x86/16bit/reset16.inc
56         ldscript /cpu/x86/16bit/reset16.lds
57 else
58         mainboardinit cpu/x86/32bit/reset32.inc
59         ldscript /cpu/x86/32bit/reset32.lds
60 end
61 mainboardinit arch/i386/lib/cpu_reset.inc
62 mainboardinit arch/i386/lib/id.inc
63 ldscript /arch/i386/lib/id.lds
64 if CONFIG_USE_FALLBACK_IMAGE
65         ldscript /arch/i386/lib/failover.lds
66         mainboardinit ./failover.inc
67 end
68 mainboardinit cpu/x86/fpu/enable_fpu.inc
69 mainboardinit cpu/x86/mmx/enable_mmx.inc
70 mainboardinit ./auto.inc
71 mainboardinit cpu/x86/mmx/disable_mmx.inc
72 dir /pc80
73 config chip.h
74
75 chip northbridge/via/cn700                      # Northbridge
76   device pci_domain 0 on                        # PCI domain
77     device pci 0.0 on end                       # AGP Bridge
78     device pci 0.1 on end                       # Error Reporting
79     device pci 0.2 on end                       # Host Bus Control
80     device pci 0.3 on end                       # Memory Controller
81     device pci 0.4 on end                       # Power Management
82     device pci 0.7 on end                       # V-Link Controller
83     device pci 1.0 on end                       # PCI Bridge
84     chip southbridge/via/vt8237r                # Southbridge
85       # Enable both IDE channels.
86       register "ide0_enable" = "1"
87       register "ide1_enable" = "1"
88       # Both cables are 40pin.
89       register "ide0_80pin_cable" = "0"
90       register "ide1_80pin_cable" = "0"
91       device pci f.0 on end                     # SATA
92       device pci f.1 on end                     # IDE
93       register "fn_ctrl_lo" = "0x80"
94       register "fn_ctrl_hi" = "0x1d"
95       device pci 10.0 on end                    # UHCI
96       device pci 10.1 on end                    # UHCI
97       device pci 10.2 on end                    # UHCI
98       device pci 10.3 on end                    # UHCI
99       device pci 10.4 on end                    # EHCI
100       device pci 10.5 on end                    # UDCI
101       device pci 11.0 on                        # Southbridge LPC
102         chip superio/ite/it8716f                # Super I/O
103           device pnp 2e.0 on                    # Floppy
104             io 0x60 = 0x3f0
105             irq 0x70 = 6
106             drq 0x74 = 2
107           end
108           device pnp 2e.1 on                    # COM1
109             io 0x60 = 0x3f8
110             irq 0x70 = 4
111           end
112           device pnp 2e.2 off                   # COM2 (N/A on this board)
113             io 0x60 = 0x2f8
114             irq 0x70 = 3
115           end
116           device pnp 2e.3 on                    # Parallel port
117             io 0x60 = 0x378
118             irq 0x70 = 7
119             drq 0x74 = 3
120           end
121           device pnp 2e.4 on                    # Environment controller
122             io 0x60 = 0x290
123             io 0x62 = 0x0000
124             irq 0x70 = 9
125           end
126           device pnp 2e.5 off                   # PS/2 keyboard (not used)
127             io 0x60 = 0x60
128             io 0x62 = 0x64
129             irq 0x70 = 1
130           end
131           device pnp 2e.6 off                   # PS/2 mouse (not used)
132             irq 0x70 = 12
133           end
134           device pnp 2e.7 on                    # GPIO
135             io 0x60 = 0x0000
136             io 0x62 = 0x0800
137             io 0x64 = 0x0000
138           end
139           device pnp 2e.8 off                   # MIDI port (N/A)
140             io 0x60 = 0x300
141             irq 0x70 = 10
142           end
143           device pnp 2e.9 off                   # Game port (N/A)
144             io 0x60 = 0x201
145           end
146           device pnp 2e.a on                    # Consumer IR
147             io 0x60 = 0x310
148             irq 0x70 = 11
149           end
150         end
151       end
152       device pci 11.5 on end                    # AC'97 audio
153       # device pci 11.6 off end                 # AC'97 modem (N/A)
154       device pci 12.0 on end                    # Ethernet
155     end
156   end
157   device apic_cluster 0 on                      # APIC cluster
158     chip cpu/via/model_c7                       # VIA C7
159       device apic 0 on end                      # APIC
160     end
161   end
162 end