fa9a0ab7da6cde0c19c26990738ee9cc8785a619
[coreboot.git] / src / mainboard / asus / a8v-e_se / Config.lb
1 ## 
2 ## This file is part of the coreboot project.
3 ## 
4 ## Copyright (C) 2007 AMD
5 ## (Written by Yinghai Lu <yinghailu@amd.com> for AMD)
6 ## Copyright (C) 2007 Rudolf Marek <r.marek@assembler.cz>
7 ## 
8 ## This program is free software; you can redistribute it and/or modify
9 ## it under the terms of the GNU General Public License as published by
10 ## the Free Software Foundation; either version 2 of the License, or
11 ## (at your option) any later version.
12 ## 
13 ## This program is distributed in the hope that it will be useful,
14 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 ## GNU General Public License for more details.
17 ## 
18 ## You should have received a copy of the GNU General Public License
19 ## along with this program; if not, write to the Free Software
20 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
21 ## 
22
23 include /config/nofailovercalculation.lb
24 default CONFIG_ROM_PAYLOAD = 1
25
26 arch i386 end 
27
28 driver mainboard.o
29 if HAVE_ACPI_TABLES
30   object acpi_tables.o
31   object fadt.o
32   makerule dsdt.c
33     depends "$(MAINBOARD)/dsdt.asl"
34     action  "iasl -p $(CURDIR)/dsdt -tc $(MAINBOARD)/dsdt.asl"
35     action  "mv dsdt.hex dsdt.c"
36   end
37   object ./dsdt.o
38 end
39 if HAVE_MP_TABLE object mptable.o end
40 if HAVE_PIRQ_TABLE object irq_tables.o end
41 # object reset.o
42
43   if CONFIG_USE_INIT
44     makerule ./cache_as_ram_auto.o
45       depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
46       action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(MAINBOARD)/cache_as_ram_auto.c -o $@"
47     end
48   else
49     makerule ./cache_as_ram_auto.inc
50       depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
51       action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -c -S $(MAINBOARD)/cache_as_ram_auto.c -o $@"
52       action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
53       action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
54     end
55   end
56
57 if USE_FALLBACK_IMAGE
58   mainboardinit cpu/x86/16bit/entry16.inc
59   ldscript /cpu/x86/16bit/entry16.lds
60   mainboardinit southbridge/via/k8t890/romstrap.inc
61   ldscript /southbridge/via/k8t890/romstrap.lds
62 end
63
64 mainboardinit cpu/x86/32bit/entry32.inc
65
66   if CONFIG_USE_INIT
67     ldscript /cpu/x86/32bit/entry32.lds
68   end
69   if CONFIG_USE_INIT
70     ldscript /cpu/amd/car/cache_as_ram.lds
71   end
72
73 if USE_FALLBACK_IMAGE
74   mainboardinit cpu/x86/16bit/reset16.inc
75   ldscript /cpu/x86/16bit/reset16.lds
76 else
77   mainboardinit cpu/x86/32bit/reset32.inc
78   ldscript /cpu/x86/32bit/reset32.lds
79 end
80
81   mainboardinit cpu/amd/car/cache_as_ram.inc
82
83 if USE_FALLBACK_IMAGE
84     ldscript /arch/i386/lib/failover.lds
85 end
86
87   if CONFIG_USE_INIT
88     initobject cache_as_ram_auto.o
89   else
90     mainboardinit ./cache_as_ram_auto.inc
91   end
92
93 config chip.h
94
95 chip northbridge/amd/amdk8/root_complex         # Root complex
96   device apic_cluster 0 on                      # APIC cluster
97     chip cpu/amd/socket_939                     # CPU
98       device apic 0 on end                      # APIC
99     end
100   end
101   device pci_domain 0 on                        # PCI domain
102     chip northbridge/amd/amdk8                  # mc0
103       device pci 18.0 on                        # Northbridge
104         # Devices on link 0, link 0 == LDT 0
105         chip southbridge/via/vt8237r            # Southbridge
106           register "ide0_enable" = "1"          # Enable IDE channel 0
107           register "ide1_enable" = "1"          # Enable IDE channel 1
108           register "ide0_80pin_cable" = "1"     # 80pin cable on IDE channel 0
109           register "ide1_80pin_cable" = "1"     # 80pin cable on IDE channel 1
110           register "fn_ctrl_lo" = "0"           # Enable SB functions
111           register "fn_ctrl_hi" = "0xad"        # Enable SB functions
112           device pci 0.0 on end                 # HT
113           device pci f.1 on end                 # IDE
114           device pci 11.0 on                    # LPC
115             chip drivers/generic/generic        # DIMM 0-0-0
116               device i2c 50 on end
117             end
118             chip drivers/generic/generic        # DIMM 0-0-1
119               device i2c 51 on end
120             end
121             chip drivers/generic/generic        # DIMM 0-1-0
122               device i2c 52 on end
123             end
124             chip drivers/generic/generic        # DIMM 0-1-1
125               device i2c 53 on end
126             end
127             chip superio/winbond/w83627ehg      # Super I/O
128               device pnp 2e.0 on                # Floppy
129                 io 0x60 = 0x3f0
130                 irq 0x70 = 6
131                 drq 0x74 = 2
132               end
133               device pnp 2e.1 on                # Parallel port
134                 io 0x60 = 0x378
135                 irq 0x70 = 7
136                 drq 0x74 = 3
137               end
138               device pnp 2e.2 on                # Com1
139                 io 0x60 = 0x3f8
140                 irq 0x70 = 4
141               end
142               device pnp 2e.3 off               # Com2 (N/A on this board)
143                 io 0x60 = 0x2f8
144                 irq 0x70 = 3
145               end
146               device pnp 2e.5 off               # PS/2 keyboard (off)
147               end
148               device pnp 2e.106 off             # Serial flash
149                 io 0x60 = 0x100
150               end
151               device pnp 2e.007 off             # GPIO 1
152               end
153               device pnp 2e.107 on              # Game port
154                 io 0x60 = 0x201
155               end
156               device pnp 2e.207 on              # MIDI
157                 io 0x62 = 0x330
158                 irq 0x70 = 0xa
159               end
160               device pnp 2e.307 off             # GPIO 6
161               end
162               device pnp 2e.8 off               # WDTO_PLED
163               end
164               device pnp 2e.009 on              # GPIO 2 on LDN 9 is in sio_setup
165               end
166               device pnp 2e.109 off             # GPIO 3
167               end
168               device pnp 2e.209 off             # GPIO 4
169               end
170               device pnp 2e.309 on              # GPIO5
171               end
172               device pnp 2e.a off               # ACPI
173               end
174               device pnp 2e.b on                # Hardware monitor
175                 io 0x60 = 0x290
176                 irq 0x70 = 0
177               end
178             end
179           end
180           device pci 12.0 off end               # VIA LAN (off, other chip used)
181         end
182         chip southbridge/via/k8t890             # "Southbridge" K8T890
183         end
184       end
185       device pci 18.1 on end
186       device pci 18.2 on end
187       device pci 18.3 on end
188     end
189   end
190 end