Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 1 | ## |
Stefan Reinauer | 7e61e45 | 2008-01-18 10:35:56 +0000 | [diff] [blame] | 2 | ## This file is part of the coreboot project. |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 3 | ## |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 4 | ## Copyright (C) 2007 AMD |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 5 | ## (Written by Yinghai Lu <yinghailu@amd.com> for AMD) |
| 6 | ## Copyright (C) 2007 Philipp Degler <pdegler@rumms.uni-mannheim.de> |
| 7 | ## (Thanks to LSRA University of Mannheim for their support) |
| 8 | ## |
| 9 | ## This program is free software; you can redistribute it and/or modify |
| 10 | ## it under the terms of the GNU General Public License as published by |
| 11 | ## the Free Software Foundation; either version 2 of the License, or |
| 12 | ## (at your option) any later version. |
| 13 | ## |
| 14 | ## This program is distributed in the hope that it will be useful, |
| 15 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | ## GNU General Public License for more details. |
| 18 | ## |
| 19 | ## You should have received a copy of the GNU General Public License |
| 20 | ## along with this program; if not, write to the Free Software |
| 21 | ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 22 | ## |
| 23 | |
Stefan Reinauer | 0867062 | 2009-06-30 15:17:49 +0000 | [diff] [blame] | 24 | ## CONFIG_XIP_ROM_SIZE must be a power of 2. |
| 25 | default CONFIG_XIP_ROM_SIZE = 64 * 1024 |
Carl-Daniel Hailfinger | b5e10bc | 2009-04-21 00:16:06 +0000 | [diff] [blame] | 26 | include /config/failovercalculation.lb |
| 27 | |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 28 | arch i386 end |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 29 | driver mainboard.o |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 30 | # Needed by irq_tables and mptable and acpi_tables. |
| 31 | object get_bus_conf.o |
Myles Watson | b8e2027 | 2009-10-15 13:35:47 +0000 | [diff] [blame] | 32 | if CONFIG_GENERATE_MP_TABLE object mptable.o end |
| 33 | if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 34 | if CONFIG_USE_INIT |
| 35 | makerule ./auto.o |
Stefan Reinauer | 0867062 | 2009-06-30 15:17:49 +0000 | [diff] [blame] | 36 | depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h" |
| 37 | action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@" |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 38 | end |
| 39 | else |
| 40 | makerule ./auto.inc |
Stefan Reinauer | 0867062 | 2009-06-30 15:17:49 +0000 | [diff] [blame] | 41 | depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h" |
| 42 | action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -c -S $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@" |
Stefan Reinauer | 4ed326b | 2008-11-28 12:09:17 +0000 | [diff] [blame] | 43 | action "perl -e 's/\.rodata/.rom.data/g' -pi $@" |
| 44 | action "perl -e 's/\.text/.section .rom.text/g' -pi $@" |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 45 | end |
| 46 | end |
Stefan Reinauer | 0867062 | 2009-06-30 15:17:49 +0000 | [diff] [blame] | 47 | if CONFIG_HAVE_FAILOVER_BOOT |
| 48 | if CONFIG_USE_FAILOVER_IMAGE |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 49 | mainboardinit cpu/x86/16bit/entry16.inc |
| 50 | ldscript /cpu/x86/16bit/entry16.lds |
| 51 | end |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 52 | else |
Stefan Reinauer | 0867062 | 2009-06-30 15:17:49 +0000 | [diff] [blame] | 53 | if CONFIG_USE_FALLBACK_IMAGE |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 54 | mainboardinit cpu/x86/16bit/entry16.inc |
| 55 | ldscript /cpu/x86/16bit/entry16.lds |
| 56 | end |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 57 | end |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 58 | mainboardinit cpu/x86/32bit/entry32.inc |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 59 | if CONFIG_USE_INIT |
| 60 | ldscript /cpu/x86/32bit/entry32.lds |
| 61 | ldscript /cpu/amd/car/cache_as_ram.lds |
| 62 | end |
Stefan Reinauer | 0867062 | 2009-06-30 15:17:49 +0000 | [diff] [blame] | 63 | if CONFIG_HAVE_FAILOVER_BOOT |
| 64 | if CONFIG_USE_FAILOVER_IMAGE |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 65 | mainboardinit cpu/x86/16bit/reset16.inc |
| 66 | ldscript /cpu/x86/16bit/reset16.lds |
| 67 | else |
| 68 | mainboardinit cpu/x86/32bit/reset32.inc |
| 69 | ldscript /cpu/x86/32bit/reset32.lds |
| 70 | end |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 71 | else |
Stefan Reinauer | 0867062 | 2009-06-30 15:17:49 +0000 | [diff] [blame] | 72 | if CONFIG_USE_FALLBACK_IMAGE |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 73 | mainboardinit cpu/x86/16bit/reset16.inc |
| 74 | ldscript /cpu/x86/16bit/reset16.lds |
| 75 | else |
| 76 | mainboardinit cpu/x86/32bit/reset32.inc |
| 77 | ldscript /cpu/x86/32bit/reset32.lds |
| 78 | end |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 79 | end |
Uwe Hermann | 336935c | 2008-09-30 15:02:40 +0000 | [diff] [blame] | 80 | # Include an ID string (for safe flashing). |
Patrick Georgi | 436f99b | 2009-11-27 16:55:13 +0000 | [diff] [blame^] | 81 | mainboardinit arch/i386/lib/id.inc |
| 82 | ldscript /arch/i386/lib/id.lds |
Uwe Hermann | 336935c | 2008-09-30 15:02:40 +0000 | [diff] [blame] | 83 | # ROMSTRAP table for CK804. |
Stefan Reinauer | 0867062 | 2009-06-30 15:17:49 +0000 | [diff] [blame] | 84 | if CONFIG_HAVE_FAILOVER_BOOT |
| 85 | if CONFIG_USE_FAILOVER_IMAGE |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 86 | mainboardinit southbridge/nvidia/ck804/romstrap.inc |
| 87 | ldscript /southbridge/nvidia/ck804/romstrap.lds |
| 88 | end |
| 89 | else |
Stefan Reinauer | 0867062 | 2009-06-30 15:17:49 +0000 | [diff] [blame] | 90 | if CONFIG_USE_FALLBACK_IMAGE |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 91 | mainboardinit southbridge/nvidia/ck804/romstrap.inc |
| 92 | ldscript /southbridge/nvidia/ck804/romstrap.lds |
| 93 | end |
| 94 | end |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 95 | mainboardinit cpu/amd/car/cache_as_ram.inc |
Stefan Reinauer | 0867062 | 2009-06-30 15:17:49 +0000 | [diff] [blame] | 96 | if CONFIG_HAVE_FAILOVER_BOOT |
| 97 | if CONFIG_USE_FAILOVER_IMAGE |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 98 | ldscript /arch/i386/lib/failover_failover.lds |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 99 | end |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 100 | else |
Stefan Reinauer | 0867062 | 2009-06-30 15:17:49 +0000 | [diff] [blame] | 101 | if CONFIG_USE_FALLBACK_IMAGE |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 102 | ldscript /arch/i386/lib/failover.lds |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 103 | end |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 104 | end |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 105 | if CONFIG_USE_INIT |
| 106 | initobject auto.o |
| 107 | else |
| 108 | mainboardinit ./auto.inc |
| 109 | end |
Stefan Reinauer | 3081bdf | 2009-04-01 13:43:21 +0000 | [diff] [blame] | 110 | config chip.h |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 111 | |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 112 | chip northbridge/amd/amdk8/root_complex # Root complex |
| 113 | device apic_cluster 0 on # APIC cluster |
| 114 | chip cpu/amd/socket_939 # Socket 939 CPU |
| 115 | device apic 0 on end # APIC |
| 116 | end |
| 117 | end |
Philipp Degler | cd3afc0 | 2007-05-24 20:39:48 +0000 | [diff] [blame] | 118 | |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 119 | device pci_domain 0 on # PCI domain |
| 120 | chip northbridge/amd/amdk8 # mc0 |
| 121 | device pci 18.0 on # Northbridge |
| 122 | # Devices on link 0, link 0 == LDT 0 |
| 123 | chip southbridge/nvidia/ck804 # Southbridge |
| 124 | device pci 0.0 on end # HT |
| 125 | device pci 1.0 on # LPC |
| 126 | chip superio/ite/it8712f # Super I/O |
Uwe Hermann | b816d33 | 2008-10-01 13:10:39 +0000 | [diff] [blame] | 127 | device pnp 2e.0 on # Floppy |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 128 | io 0x60 = 0x3f0 |
| 129 | irq 0x70 = 6 |
| 130 | drq 0x74 = 2 |
| 131 | end |
| 132 | device pnp 2e.1 on # Com1 |
| 133 | io 0x60 = 0x3f8 |
| 134 | irq 0x70 = 4 |
| 135 | end |
Uwe Hermann | b816d33 | 2008-10-01 13:10:39 +0000 | [diff] [blame] | 136 | device pnp 2e.2 off # Com2 (N/A on this board) |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 137 | io 0x60 = 0x2f8 |
| 138 | irq 0x70 = 3 |
| 139 | end |
| 140 | device pnp 2e.3 on # Parallel port |
| 141 | io 0x60 = 0x378 |
| 142 | irq 0x70 = 7 |
Uwe Hermann | b816d33 | 2008-10-01 13:10:39 +0000 | [diff] [blame] | 143 | drq 0x74 = 3 |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 144 | end |
| 145 | device pnp 2e.4 on # Environment controller |
| 146 | io 0x60 = 0x290 |
| 147 | io 0x62 = 0x0000 |
| 148 | irq 0x70 = 0x00 |
| 149 | end |
| 150 | device pnp 2e.5 on # PS/2 keyboard |
| 151 | io 0x60 = 0x60 |
| 152 | io 0x62 = 0x64 |
| 153 | irq 0x70 = 1 |
| 154 | irq 0x71 = 2 |
| 155 | end |
| 156 | device pnp 2e.6 on # PS/2 mouse |
| 157 | irq 0x70 = 12 |
| 158 | irq 0x71 = 2 |
| 159 | end |
| 160 | device pnp 2e.7 on # GPIO config |
Uwe Hermann | b816d33 | 2008-10-01 13:10:39 +0000 | [diff] [blame] | 161 | io 0x60 = 0x0800 |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 162 | # Set GPIO 1 & 2 |
| 163 | io 0x25 = 0x0000 |
| 164 | # Set GPIO 3 & 4 |
| 165 | io 0x27 = 0x2540 |
| 166 | # GPIO Polarity for Set 3 |
| 167 | io 0xb2 = 0x2100 |
| 168 | # GPIO Pin Internal Pull up for Set 3 |
| 169 | io 0xba = 0x0100 |
| 170 | # Simple I/O register config |
| 171 | io 0xc0 = 0x0000 |
| 172 | io 0xc2 = 0x2540 |
| 173 | io 0xc8 = 0x0000 |
| 174 | io 0xca = 0x0500 |
| 175 | end |
Uwe Hermann | b816d33 | 2008-10-01 13:10:39 +0000 | [diff] [blame] | 176 | device pnp 2e.8 on # Midi port |
| 177 | io 0x60 = 0x300 |
| 178 | irq 0x70 = 10 |
| 179 | end |
| 180 | device pnp 2e.9 on # Game port |
| 181 | io 0x60 = 0x201 |
| 182 | end |
| 183 | device pnp 2e.a off # IR (N/A on this board) |
| 184 | io 0x60 = 0x310 |
| 185 | irq 0x70 = 11 |
| 186 | end |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 187 | end |
| 188 | end |
| 189 | device pci 1.1 on # SM 0 |
| 190 | # chip drivers/generic/generic #dimm 0-0-0 |
| 191 | # device i2c 50 on end |
| 192 | # end |
| 193 | # chip drivers/generic/generic #dimm 0-0-1 |
| 194 | # device i2c 51 on end |
| 195 | # end |
| 196 | # chip drivers/generic/generic #dimm 0-1-0 |
| 197 | # device i2c 52 on end |
| 198 | # end |
| 199 | # chip drivers/generic/generic #dimm 0-1-1 |
| 200 | # device i2c 53 on end |
| 201 | # end |
| 202 | # chip drivers/generic/generic #dimm 1-0-0 |
| 203 | # device i2c 54 on end |
| 204 | # end |
| 205 | # chip drivers/generic/generic #dimm 1-0-1 |
| 206 | # device i2c 55 on end |
| 207 | # end |
| 208 | # chip drivers/generic/generic #dimm 1-1-0 |
| 209 | # device i2c 56 on end |
| 210 | # end |
| 211 | # chip drivers/generic/generic #dimm 1-1-1 |
| 212 | # device i2c 57 on end |
| 213 | # end |
| 214 | end |
| 215 | device pci 2.0 on end # USB 1.1 |
| 216 | device pci 2.1 on end # USB 2 |
Uwe Hermann | b816d33 | 2008-10-01 13:10:39 +0000 | [diff] [blame] | 217 | device pci 4.0 on end # Onboard audio (ACI) |
| 218 | device pci 4.1 off end # Onboard modem (MCI), N/A |
Uwe Hermann | 322076c | 2007-09-24 20:00:32 +0000 | [diff] [blame] | 219 | device pci 6.0 on end # IDE |
| 220 | device pci 7.0 on end # SATA 1 |
| 221 | device pci 8.0 on end # SATA 0 |
| 222 | device pci 9.0 on end # PCI |
| 223 | device pci a.0 on end # NIC |
| 224 | device pci b.0 on end # PCI E 3 |
| 225 | device pci c.0 on end # PCI E 2 |
| 226 | device pci d.0 on end # PCI E 1 |
| 227 | device pci e.0 on end # PCI E 0 |
| 228 | register "ide0_enable" = "1" |
| 229 | register "ide1_enable" = "1" |
| 230 | register "sata0_enable" = "1" |
| 231 | register "sata1_enable" = "1" |
| 232 | # register "mac_eeprom_smbus" = "3" |
| 233 | # register "mac_eeprom_addr" = "0x51" |
| 234 | end |
| 235 | end |
| 236 | device pci 18.1 on end |
| 237 | device pci 18.2 on end |
| 238 | device pci 18.3 on end |
| 239 | end |
| 240 | end |
| 241 | end |