There are more than a dozen targets in the v2 tree which refer to ROMCC
[coreboot.git] / src / mainboard / iwill / dk8x / Config.lb
1 ##
2 ## Compute the location and size of where this firmware image
3 ## (coreboot plus bootloader) will live in the boot rom chip.
4 ##
5 if USE_FALLBACK_IMAGE
6         default ROM_SECTION_SIZE   = FALLBACK_SIZE
7         default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE )
8 else
9         default ROM_SECTION_SIZE   = ( ROM_SIZE - FALLBACK_SIZE )
10         default ROM_SECTION_OFFSET = 0
11 end
12
13 ##
14 ## Compute the start location and size size of
15 ## The coreboot bootloader.
16 ##
17 default PAYLOAD_SIZE            = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
18 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
19
20 ##
21 ## Compute where this copy of coreboot will start in the boot rom
22 ##
23 default _ROMBASE      = ( CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE )
24
25 ##
26 ## Compute a range of ROM that can cached to speed up coreboot,
27 ## execution speed.
28 ##
29 ## XIP_ROM_SIZE must be a power of 2.
30 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
31 ##
32 default XIP_ROM_SIZE=65536
33 default XIP_ROM_BASE = ( _ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE )
34
35 ##
36 ## Set all of the defaults for an x86 architecture
37 ##
38
39 arch i386 end
40
41 ##
42 ## Build the objects we have code for in this directory.
43 ##
44
45 driver mainboard.o
46 if HAVE_MP_TABLE object mptable.o end
47 if HAVE_PIRQ_TABLE object irq_tables.o end
48 #object reset.o
49
50 if CONFIG_USE_INIT
51
52 makerule ./auto.o
53         depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
54         action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o auto.o" 
55 end
56
57 else    
58                 
59 makerule ./auto.inc
60         depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
61         action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall $(DEBUG_CFLAGS) -c -S -o $@"         
62         action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
63         action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
64 end
65
66 end
67
68 ##
69 ## Build our 16 bit and 32 bit coreboot entry code
70 ##
71 if USE_FALLBACK_IMAGE
72         mainboardinit cpu/x86/16bit/entry16.inc
73         ldscript /cpu/x86/16bit/entry16.lds
74 end
75
76 mainboardinit cpu/x86/32bit/entry32.inc
77
78         if CONFIG_USE_INIT
79                 ldscript /cpu/x86/32bit/entry32.lds
80         end
81
82         if CONFIG_USE_INIT
83                 ldscript      /cpu/amd/car/cache_as_ram.lds
84         end
85
86 ##
87 ## Build our reset vector (This is where coreboot is entered)
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 ##
98 ## Include an id string (For safe flashing)
99 ##
100 mainboardinit arch/i386/lib/id.inc
101 ldscript /arch/i386/lib/id.lds
102
103 ##
104 ## Setup Cache-As-Ram
105 ##
106 mainboardinit cpu/amd/car/cache_as_ram.inc
107
108 ###
109 ### This is the early phase of coreboot startup 
110 ### Things are delicate and we test to see if we should
111 ### failover to another image.
112 ###
113 if USE_FALLBACK_IMAGE
114        ldscript /arch/i386/lib/failover.lds
115 end
116
117 ###
118 ### O.k. We aren't just an intermediary anymore!
119 ###
120
121 ##
122 ## Setup RAM
123 ##
124 if CONFIG_USE_INIT
125 initobject auto.o
126 else
127 mainboardinit ./auto.inc
128 end
129
130 ##
131 ## Include the secondary Configuration files 
132 ##
133 config chip.h
134
135 chip northbridge/amd/amdk8/root_complex
136         device pci_domain 0 on
137                 chip northbridge/amd/amdk8
138                         device pci 18.0 on #  northbridge 
139                                 #  devices on link 0, link 0 == LDT 0 
140                                 chip southbridge/amd/amd8131
141                                         # the on/off keyword is mandatory
142                                         device pci 0.0 on end
143                                         device pci 0.1 on end
144                                         device pci 1.0 on end
145                                         device pci 1.1 on end
146                                 end
147                                 chip southbridge/amd/amd8111
148                                         # this "device pci 0.0" is the parent the next one
149                                         # PCI bridge
150                                         device pci 0.0 on
151                                                 device pci 0.0 on end
152                                                 device pci 0.1 on end
153                                                 device pci 0.2 on end
154                                                 device pci 1.0 off end
155                                         end
156                                         device pci 1.0 on
157                                                 chip superio/winbond/w83627thf
158                                                         device pnp 2e.0 on end
159                                                         device pnp 2e.1 on end
160                                                         device pnp 2e.2 on end
161                                                         device pnp 2e.3 on end
162                                                         device pnp 2e.4 on end
163                                                         device pnp 2e.5 on end
164                                                         device pnp 2e.6 on end
165                                                         device pnp 2e.7 on end 
166                                                         device pnp 2e.8 on end 
167                                                         device pnp 2e.9 on end 
168                                                         device pnp 2e.a on end 
169                                                 end
170                                         end
171                                         device pci 1.1 on end
172                                         device pci 1.2 on end
173                                         device pci 1.3 on end 
174                                         device pci 1.5 off end
175                                         device pci 1.6 off end
176                                 end
177                         end # LDT0
178                         device pci 18.0 on end # LDT1
179                         device pci 18.0 on end # LDT2
180                         device pci 18.1 on end
181                         device pci 18.2 on end
182                         device pci 18.3 on end
183                 end
184                 chip northbridge/amd/amdk8
185                         device pci 19.0 on end
186                         device pci 19.0 on end
187                         device pci 19.0 on end
188                         device pci 19.1 on end
189                         device pci 19.2 on end
190                         device pci 19.3 on end
191                 end
192         end 
193         device apic_cluster 0 on
194                 chip cpu/amd/socket_940
195                         device apic 0 on end
196                 end
197                 chip cpu/amd/socket_940
198                         device apic 1 on end
199                 end
200         end
201 end
202