Various cosmetic and coding style fixes for ASUS A8V-E SE (trivial).
[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 if USE_FALLBACK_IMAGE
24   default ROM_SECTION_SIZE   = FALLBACK_SIZE
25   default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE )
26 else
27   default ROM_SECTION_SIZE   = ( ROM_SIZE - FALLBACK_SIZE )
28   default ROM_SECTION_OFFSET = 0
29 end
30
31 default PAYLOAD_SIZE             = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
32 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
33 default CONFIG_ROM_PAYLOAD       = 1
34 default _ROMBASE     = (CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE)
35 default XIP_ROM_SIZE = 65536
36 default XIP_ROM_BASE = (_ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE)
37
38 arch i386 end 
39
40 driver mainboard.o
41 if HAVE_ACPI_TABLES
42   object acpi_tables.o
43   object fadt.o
44   makerule dsdt.c
45     depends "$(MAINBOARD)/dsdt.asl"
46     action  "iasl -p $(PWD)/dsdt -tc $(MAINBOARD)/dsdt.asl"
47     action  "mv dsdt.hex dsdt.c"
48   end
49   object ./dsdt.o
50 end
51 if HAVE_MP_TABLE object mptable.o end
52 if HAVE_PIRQ_TABLE object irq_tables.o end
53 # object reset.o
54
55 if USE_DCACHE_RAM
56   if CONFIG_USE_INIT
57     makerule ./cache_as_ram_auto.o
58       depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
59       action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@"
60     end
61   else
62     makerule ./cache_as_ram_auto.inc
63       depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
64       action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
65       action "perl -e 's/.rodata/.rom.data/g' -pi $@"
66       action "perl -e 's/.text/.section .rom.text/g' -pi $@"
67     end
68   end
69 end
70
71 if USE_FALLBACK_IMAGE
72   mainboardinit cpu/x86/16bit/entry16.inc
73   ldscript /cpu/x86/16bit/entry16.lds
74   mainboardinit southbridge/via/k8t890/romstrap.inc
75   ldscript /southbridge/via/k8t890/romstrap.lds
76 end
77
78 mainboardinit cpu/x86/32bit/entry32.inc
79
80 if USE_DCACHE_RAM
81   if CONFIG_USE_INIT
82     ldscript /cpu/x86/32bit/entry32.lds
83   end
84   if CONFIG_USE_INIT
85     ldscript /cpu/amd/car/cache_as_ram.lds
86   end
87 end
88
89 if USE_FALLBACK_IMAGE
90   mainboardinit cpu/x86/16bit/reset16.inc
91   ldscript /cpu/x86/16bit/reset16.lds
92 else
93   mainboardinit cpu/x86/32bit/reset32.inc
94   ldscript /cpu/x86/32bit/reset32.lds
95 end
96
97 if USE_DCACHE_RAM
98   mainboardinit cpu/amd/car/cache_as_ram.inc
99 end
100
101 if USE_FALLBACK_IMAGE
102   if USE_DCACHE_RAM
103     ldscript /arch/i386/lib/failover.lds
104   end
105 end
106
107 if USE_DCACHE_RAM
108   if CONFIG_USE_INIT
109     initobject cache_as_ram_auto.o
110   else
111     mainboardinit ./cache_as_ram_auto.inc
112   end
113 end
114
115 if CONFIG_CHIP_NAME
116   config chip.h
117 end
118
119 chip northbridge/amd/amdk8/root_complex         # Root complex
120   device apic_cluster 0 on                      # APIC cluster
121     chip cpu/amd/socket_939                     # CPU
122       device apic 0 on end                      # APIC
123     end
124   end
125   device pci_domain 0 on                        # PCI domain
126     chip northbridge/amd/amdk8                  # mc0
127       device pci 18.0 on                        # Northbridge
128         # Devices on link 0, link 0 == LDT 0
129         chip southbridge/via/vt8237r            # Southbridge
130           register "ide0_enable" = "1"          # Enable IDE channel 0
131           register "ide1_enable" = "1"          # Enable IDE channel 1
132           register "ide0_80pin_cable" = "1"     # 80pin cable on IDE channel 0
133           register "ide1_80pin_cable" = "1"     # 80pin cable on IDE channel 1
134           register "fn_ctrl_lo" = "0"           # Enable SB functions
135           register "fn_ctrl_hi" = "0xad"        # Enable SB functions
136           device pci 0.0 on end                 # HT
137           device pci f.1 on end                 # IDE
138           device pci 11.0 on                    # LPC
139             chip drivers/generic/generic        # DIMM 0-0-0
140               device i2c 50 on end
141             end
142             chip drivers/generic/generic        # DIMM 0-0-1
143               device i2c 51 on end
144             end
145             chip drivers/generic/generic        # DIMM 0-1-0
146               device i2c 52 on end
147             end
148             chip drivers/generic/generic        # DIMM 0-1-1
149               device i2c 53 on end
150             end
151             chip superio/winbond/w83627ehg      # Super I/O
152               device pnp 2e.0 on                # Floppy
153                 io 0x60 = 0x3f0
154                 irq 0x70 = 6
155                 drq 0x74 = 2
156               end
157               device pnp 2e.1 on                # Parallel port
158                 io 0x60 = 0x378
159                 irq 0x70 = 7
160                 drq 0x74 = 3
161               end
162               device pnp 2e.2 on                # Com1
163                 io 0x60 = 0x3f8
164                 irq 0x70 = 4
165               end
166               device pnp 2e.3 off               # Com2 (N/A on this board)
167                 io 0x60 = 0x2f8
168                 irq 0x70 = 3
169               end
170               device pnp 2e.5 off               # PS/2 keyboard (off)
171               end
172               device pnp 2e.106 off             # Serial flash
173                 io 0x60 = 0x100
174               end
175               device pnp 2e.007 off             # GPIO 1
176               end
177               device pnp 2e.107 on              # Game port
178                 io 0x60 = 0x201
179               end
180               device pnp 2e.207 on              # MIDI
181                 io 0x62 = 0x330
182                 irq 0x70 = 0xa
183               end
184               device pnp 2e.307 off             # GPIO 6
185               end
186               device pnp 2e.8 off               # WDTO_PLED
187               end
188               device pnp 2e.009 on              # GPIO 2 on LDN 9 is in sio_setup
189               end
190               device pnp 2e.109 off             # GPIO 3
191               end
192               device pnp 2e.209 off             # GPIO 4
193               end
194               device pnp 2e.309 on              # GPIO5
195               end
196               device pnp 2e.a off               # ACPI
197               end
198               device pnp 2e.b on                # Hardware monitor
199                 io 0x60 = 0x290
200                 irq 0x70 = 0
201               end
202             end
203           end
204           device pci 12.0 off end               # VIA LAN (off, other chip used)
205         end
206         chip southbridge/via/k8t890             # "Southbridge" K8T890
207         end
208       end
209       device pci 18.1 on end
210       device pci 18.2 on end
211       device pci 18.3 on end
212     end
213   end
214 end