blob: 38645588c727ff3cd69aa3b2878f8ae5ba3bc8f7 [file] [log] [blame]
Stefan Reinauer08670622009-06-30 15:17:49 +00001## CONFIG_XIP_ROM_SIZE must be a power of 2.
2default CONFIG_XIP_ROM_SIZE = 64 * 1024
Carl-Daniel Hailfingerb5e10bc2009-04-21 00:16:06 +00003include /config/nofailovercalculation.lb
4default CONFIG_ROM_PAYLOAD = 1
arch import user (historical)ef03afa2005-07-06 17:15:30 +00005
Myles Watsona67c354c2008-09-18 15:30:42 +00006arch i386 end
arch import user (historical)ef03afa2005-07-06 17:15:30 +00007
8
9##
10## Build the objects we have code for in this directory.
11##
12
13driver mainboard.o
14
15#dir /drivers/ati/ragexl
Myles Watsona67c354c2008-09-18 15:30:42 +000016
Yinghai Lu968bbe82005-12-06 23:34:09 +000017#needed by irq_tables and mptable and acpi_tables
18object get_bus_conf.o
19
Myles Watsonb8e20272009-10-15 13:35:47 +000020if CONFIG_GENERATE_MP_TABLE object mptable.o end
21if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end
arch import user (historical)6ca76362005-07-06 17:17:25 +000022
Myles Watsonb8e20272009-10-15 13:35:47 +000023if CONFIG_GENERATE_ACPI_TABLES
Myles Watson34b1d4e2009-03-10 20:56:54 +000024 object acpi_tables.o
25 makerule dsdt.c
Stefan Reinauer08670622009-06-30 15:17:49 +000026 depends "$(CONFIG_MAINBOARD)/dsdt.dsl"
27 action "iasl -p $(CURDIR)/dsdt -tc $(CONFIG_MAINBOARD)/dsdt.dsl"
Myles Watson34b1d4e2009-03-10 20:56:54 +000028 action "mv dsdt.hex dsdt.c"
29 end
30 object ./dsdt.o
31 #./ssdt.o is moved to northbridge/amd/amdk8/Config.lb
32 #./fadt.o is moved to southbridge/nvidia/ck804/Config.lb
33end
34
arch import user (historical)6ca76362005-07-06 17:17:25 +000035if CONFIG_USE_INIT
Myles Watsona67c354c2008-09-18 15:30:42 +000036 makerule ./auto.o
Stefan Reinauer08670622009-06-30 15:17:49 +000037 depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
38 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@"
Myles Watsona67c354c2008-09-18 15:30:42 +000039 end
40else
41 makerule ./auto.inc
Stefan Reinauer08670622009-06-30 15:17:49 +000042 depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
43 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -c -S $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@"
Stefan Reinauer4ed326b2008-11-28 12:09:17 +000044 action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
45 action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
Myles Watsona67c354c2008-09-18 15:30:42 +000046 end
arch import user (historical)6ca76362005-07-06 17:17:25 +000047end
48
arch import user (historical)ef03afa2005-07-06 17:15:30 +000049##
Stefan Reinauerf8ee1802008-01-18 15:08:58 +000050## Build our 16 bit and 32 bit coreboot entry code
arch import user (historical)ef03afa2005-07-06 17:15:30 +000051##
Stefan Reinauer08670622009-06-30 15:17:49 +000052if CONFIG_USE_FALLBACK_IMAGE
Myles Watsona67c354c2008-09-18 15:30:42 +000053 mainboardinit cpu/x86/16bit/entry16.inc
54 ldscript /cpu/x86/16bit/entry16.lds
Stefan Reinauer806e1462005-12-01 10:54:44 +000055end
56
arch import user (historical)ef03afa2005-07-06 17:15:30 +000057mainboardinit cpu/x86/32bit/entry32.inc
arch import user (historical)6ca76362005-07-06 17:17:25 +000058
arch import user (historical)6ca76362005-07-06 17:17:25 +000059 if CONFIG_USE_INIT
60 ldscript /cpu/x86/32bit/entry32.lds
61 end
62
63 if CONFIG_USE_INIT
Myles Watsona67c354c2008-09-18 15:30:42 +000064 ldscript /cpu/amd/car/cache_as_ram.lds
arch import user (historical)6ca76362005-07-06 17:17:25 +000065 end
arch import user (historical)ef03afa2005-07-06 17:15:30 +000066
67##
Stefan Reinauerf8ee1802008-01-18 15:08:58 +000068## Build our reset vector (This is where coreboot is entered)
arch import user (historical)ef03afa2005-07-06 17:15:30 +000069##
Stefan Reinauer08670622009-06-30 15:17:49 +000070if CONFIG_USE_FALLBACK_IMAGE
Myles Watsona67c354c2008-09-18 15:30:42 +000071 mainboardinit cpu/x86/16bit/reset16.inc
72 ldscript /cpu/x86/16bit/reset16.lds
arch import user (historical)ef03afa2005-07-06 17:15:30 +000073else
Myles Watsona67c354c2008-09-18 15:30:42 +000074 mainboardinit cpu/x86/32bit/reset32.inc
75 ldscript /cpu/x86/32bit/reset32.lds
arch import user (historical)ef03afa2005-07-06 17:15:30 +000076end
77
arch import user (historical)ef03afa2005-07-06 17:15:30 +000078##
79## Include an id string (For safe flashing)
80##
Patrick Georgi436f99b2009-11-27 16:55:13 +000081mainboardinit arch/i386/lib/id.inc
82ldscript /arch/i386/lib/id.lds
arch import user (historical)ef03afa2005-07-06 17:15:30 +000083
84##
85## ROMSTRAP table for CK804
86##
Stefan Reinauer08670622009-06-30 15:17:49 +000087if CONFIG_USE_FALLBACK_IMAGE
arch import user (historical)ef03afa2005-07-06 17:15:30 +000088 mainboardinit southbridge/nvidia/ck804/romstrap.inc
89 ldscript /southbridge/nvidia/ck804/romstrap.lds
90end
91
Myles Watsona67c354c2008-09-18 15:30:42 +000092 ##
93 ## Setup Cache-As-Ram
94 ##
95 mainboardinit cpu/amd/car/cache_as_ram.inc
arch import user (historical)6ca76362005-07-06 17:17:25 +000096
arch import user (historical)ef03afa2005-07-06 17:15:30 +000097###
Myles Watsona67c354c2008-09-18 15:30:42 +000098### This is the early phase of coreboot startup
arch import user (historical)ef03afa2005-07-06 17:15:30 +000099### Things are delicate and we test to see if we should
100### failover to another image.
101###
Stefan Reinauer08670622009-06-30 15:17:49 +0000102if CONFIG_USE_FALLBACK_IMAGE
Myles Watsona67c354c2008-09-18 15:30:42 +0000103 ldscript /arch/i386/lib/failover.lds
arch import user (historical)6ca76362005-07-06 17:17:25 +0000104end
arch import user (historical)ef03afa2005-07-06 17:15:30 +0000105
106###
107### O.k. We aren't just an intermediary anymore!
108###
109
110##
111## Setup RAM
112##
Myles Watsona67c354c2008-09-18 15:30:42 +0000113 if CONFIG_USE_INIT
114 initobject auto.o
115 else
116 mainboardinit ./auto.inc
117 end
arch import user (historical)6ca76362005-07-06 17:17:25 +0000118
arch import user (historical)ef03afa2005-07-06 17:15:30 +0000119##
Myles Watsona67c354c2008-09-18 15:30:42 +0000120## Include the secondary Configuration files
arch import user (historical)ef03afa2005-07-06 17:15:30 +0000121##
Stefan Reinauer3081bdf2009-04-01 13:43:21 +0000122config chip.h
arch import user (historical)ef03afa2005-07-06 17:15:30 +0000123
Myles Watsona3d6ea82009-10-06 20:36:34 +0000124include devicetree.cb