2 ## This file is part of the LinuxBIOS project.
4 ## Copyright (C) 2007 AMD
5 ## Written by Yinghai Lu <yinghailu@amd.com> for AMD.
7 ## Copyright (C) 2007 Rudolf Marek <r.marek@assembler.cz>
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.
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.
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
25 ## Compute the location and size of where this firmware image
26 ## (linuxBIOS plus bootloader) will live in the boot rom chip.
29 default ROM_SECTION_SIZE = FALLBACK_SIZE
30 default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE )
32 default ROM_SECTION_SIZE = ( ROM_SIZE - FALLBACK_SIZE )
33 default ROM_SECTION_OFFSET = 0
37 ## Compute the start location and size size of
38 ## The linuxBIOS bootloader.
40 default PAYLOAD_SIZE = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
41 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
42 default CONFIG_ROM_PAYLOAD = 1
45 ## Compute where this copy of linuxBIOS will start in the boot rom
47 default _ROMBASE = ( CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE )
50 ## Compute a range of ROM that can cached to speed up linuxBIOS,
53 ## XIP_ROM_SIZE must be a power of 2.
54 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
56 default XIP_ROM_SIZE=65536
57 default XIP_ROM_BASE = ( _ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE )
62 ## Build the objects we have code for in this directory.
71 depends "$(MAINBOARD)/dsdt.asl"
72 action "iasl -p $(PWD)/dsdt -tc $(MAINBOARD)/dsdt.asl"
73 action "mv dsdt.hex dsdt.c"
78 if HAVE_MP_TABLE object mptable.o end
79 if HAVE_PIRQ_TABLE object irq_tables.o end
84 makerule ./cache_as_ram_auto.o
85 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
86 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@"
89 makerule ./cache_as_ram_auto.inc
90 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
91 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
92 action "perl -e 's/.rodata/.rom.data/g' -pi $@"
93 action "perl -e 's/.text/.section .rom.text/g' -pi $@"
100 ## Build our 16 bit and 32 bit linuxBIOS entry code
103 if USE_FALLBACK_IMAGE
104 mainboardinit cpu/x86/16bit/entry16.inc
105 ldscript /cpu/x86/16bit/entry16.lds
106 mainboardinit southbridge/via/k8t890/romstrap.inc
107 ldscript /southbridge/via/k8t890/romstrap.lds
111 mainboardinit cpu/x86/32bit/entry32.inc
115 ldscript /cpu/x86/32bit/entry32.lds
119 ldscript /cpu/amd/car/cache_as_ram.lds
125 ## Build our reset vector (This is where linuxBIOS is entered)
128 if USE_FALLBACK_IMAGE
129 mainboardinit cpu/x86/16bit/reset16.inc
130 ldscript /cpu/x86/16bit/reset16.lds
132 mainboardinit cpu/x86/32bit/reset32.inc
133 ldscript /cpu/x86/32bit/reset32.lds
138 ## Setup Cache-As-Ram
140 mainboardinit cpu/amd/car/cache_as_ram.inc
144 ### This is the early phase of linuxBIOS startup
145 ### Things are delicate and we test to see if we should
146 ### failover to another image.
149 if USE_FALLBACK_IMAGE
151 ldscript /arch/i386/lib/failover.lds
162 initobject cache_as_ram_auto.o
164 mainboardinit ./cache_as_ram_auto.inc
169 ## Include the secondary Configuration files
175 chip northbridge/amd/amdk8/root_complex
176 device apic_cluster 0 on
177 chip cpu/amd/socket_939
182 device pci_domain 0 on
183 chip northbridge/amd/amdk8 #mc0
184 device pci 18.0 on # northbridge
185 # devices on link 0, link 0 == LDT 0
186 chip southbridge/via/vt8237r
188 register "ide0_enable" = "1"
189 register "ide1_enable" = "1"
190 #both cables are 80pin
191 register "ide0_80pin_cable" = "1"
192 register "ide1_80pin_cable" = "1"
193 #enables the functions of SB
194 register "fn_ctrl_lo" = "0"
195 register "fn_ctrl_hi" = "0xad"
197 device pci 0.0 on end # HT
198 device pci f.1 on end # IDE
199 device pci 11.0 on # LPC
200 chip drivers/generic/generic #dimm 0-0-0
203 chip drivers/generic/generic #dimm 0-0-1
206 chip drivers/generic/generic #dimm 0-1-0
209 chip drivers/generic/generic #dimm 0-1-1
213 chip superio/winbond/w83627ehg
214 device pnp 2e.0 on # Floppy
219 device pnp 2e.1 on # Parallel Port
224 device pnp 2e.2 on # Com1
228 device pnp 2e.3 off # Com2
232 device pnp 2e.5 off #keyb OFF
234 device pnp 2e.6 off # SERIAL_FLASH
237 device pnp 2e.7 off # GAME_MIDI_GIPO1
242 device pnp 2e.8 off end # WDTO_PLED
243 device pnp 2e.9 off end # GPIO2_GPIO3_GPIO4_GPIO5 0x30 0x9
252 device pnp 2e.a off end # ACPI
253 device pnp 2e.b on # HW Monitor
260 device pci 12.0 off end # VIA LAN is disabled, Asus used other chip
263 chip southbridge/via/k8t890
266 end # device pci 18.0
267 device pci 18.1 on end
268 device pci 18.2 on end
269 device pci 18.3 on end