5cea22a5c7dd6e8de5506724b1f48783a38c1460
[coreboot.git] / src / mainboard / intel / jarrell / Config.lb
1 ##
2 ## Only use the option table in a normal image
3 ##
4 default USE_OPTION_TABLE = !USE_FALLBACK_IMAGE
5
6 ##
7 ## Compute the location and size of where this firmware image
8 ## (linuxBIOS plus bootloader) will live in the boot rom chip.
9 ##
10 if USE_FALLBACK_IMAGE
11         default ROM_SECTION_SIZE   = FALLBACK_SIZE
12         default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE )
13 else
14         default ROM_SECTION_SIZE   = ( ROM_SIZE - FALLBACK_SIZE )
15         default ROM_SECTION_OFFSET = 0
16 end
17
18 ##
19 ## Compute the start location and size size of
20 ## The linuxBIOS bootloader.
21 ##
22 default PAYLOAD_SIZE            = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
23 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
24
25 ##
26 ## Compute where this copy of linuxBIOS will start in the boot rom
27 ##
28 default _ROMBASE      = ( CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE )
29
30 ##
31 ## Compute a range of ROM that can cached to speed up linuxBIOS,
32 ## execution speed.
33 ##
34 ## XIP_ROM_SIZE must be a power of 2.
35 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
36 ##
37 default XIP_ROM_SIZE=131072
38 default XIP_ROM_BASE = ( _ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE )
39
40 ##
41 ## Set all of the defaults for an x86 architecture
42 ##
43
44 arch i386 end
45
46 ##
47 ## Build the objects we have code for in this directory.
48 ##
49
50 driver mainboard.o
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 ##
56 ## Romcc output
57 ##
58 makerule ./failover.E
59         depends "$(MAINBOARD)/failover.c ./romcc" 
60         action "./romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
61 end
62
63 makerule ./failover.inc
64         depends "$(MAINBOARD)/failover.c ./romcc"
65         action "./romcc    -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
66 end
67
68 makerule ./auto.E 
69         depends "$(MAINBOARD)/auto.c option_table.h ./romcc" 
70         action  "./romcc -E -mcpu=p4 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
71 end
72 makerule ./auto.inc 
73         depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
74         action  "./romcc    -mcpu=p4 -fno-simplify-phi -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
75 end
76
77 ##
78 ## Build our 16 bit and 32 bit linuxBIOS entry code
79 ##
80 mainboardinit cpu/x86/16bit/entry16.inc
81 mainboardinit cpu/x86/32bit/entry32.inc
82 ldscript /cpu/x86/16bit/entry16.lds
83 ldscript /cpu/x86/32bit/entry32.lds
84
85 ##
86 ## Build our reset vector (This is where linuxBIOS is entered)
87 ##
88 if USE_FALLBACK_IMAGE 
89         mainboardinit cpu/x86/16bit/reset16.inc
90         ldscript /cpu/x86/16bit/reset16.lds
91 else
92         mainboardinit cpu/x86/32bit/reset32.inc
93         ldscript /cpu/x86/32bit/reset32.lds
94 end
95
96 ### Should this be in the northbridge code?
97 mainboardinit arch/i386/lib/cpu_reset.inc
98
99 ##
100 ## Include an id string (For safe flashing)
101 ##
102 mainboardinit arch/i386/lib/id.inc
103 ldscript /arch/i386/lib/id.lds
104
105 ###
106 ### This is the early phase of linuxBIOS startup 
107 ### Things are delicate and we test to see if we should
108 ### failover to another image.
109 ###
110 if USE_FALLBACK_IMAGE
111         ldscript /arch/i386/lib/failover.lds 
112         mainboardinit ./failover.inc
113 end
114
115 ###
116 ### O.k. We aren't just an intermediary anymore!
117 ###
118
119 ##
120 ## Setup RAM
121 ##
122 mainboardinit cpu/x86/fpu/enable_fpu.inc
123 mainboardinit cpu/x86/mmx/enable_mmx.inc
124 mainboardinit cpu/x86/sse/enable_sse.inc
125 mainboardinit ./auto.inc
126 mainboardinit cpu/x86/sse/disable_sse.inc
127 mainboardinit cpu/x86/mmx/disable_mmx.inc
128
129 ##
130 ## Include the secondary Configuration files 
131 ##
132 dir /pc80
133 config chip.h
134
135 chip northbridge/intel/e7520
136         device pci_domain 0 on 
137                 device pci 00.0 on end
138                 device pci 00.1 on end
139                 device pci 01.0 on end
140                 device pci 02.0 on 
141                         chip southbridge/intel/pxhd # pxhd1
142                                 device pci 00.0 on end
143                                 device pci 00.1 on end
144                                 device pci 00.2 on
145                                         chip drivers/generic/generic
146                                                 device pci 04.0 on end
147                                                 device pci 04.1 on end
148                                         end
149                                 end
150                                 device pci 00.3 on end
151                         end
152                 end
153                 device pci 06.0 on end
154                 chip southbridge/intel/i82801er # i82801er
155                         device pci 1d.0 on end
156                         device pci 1d.1 on end
157                         device pci 1d.2 on end
158                         device pci 1d.3 off end
159                         device pci 1d.7 on end
160                         device pci 1e.0 on
161                                 chip drivers/ati/ragexl
162                                         device pci 0c.0 on end
163                                 end
164                         end
165                         device pci 1f.0 on 
166                                 chip superio/nsc/pc87427
167                                         device pnp 2e.0 off end
168                                         device pnp 2e.2 on
169 #                                                io 0x60 = 0x2f8
170 #                                               irq 0x70 = 3
171                                                  io 0x60 = 0x3f8
172                                                 irq 0x70 = 4
173                                         end
174                                         device pnp 2e.3 on
175 #                                                io 0x60 = 0x3f8
176 #                                               irq 0x70 = 4
177                                                  io 0x60 = 0x2f8
178                                                 irq 0x70 = 3
179                                         end
180                                         device pnp 2e.4 off end
181                                         device pnp 2e.5 off end
182                                         device pnp 2e.6 on
183                                                  io 0x60 = 0x60
184                                                  io 0x62 = 0x64
185                                                 irq 0x70 = 1
186                                         end
187                                         device pnp 2e.7 off end
188                                         device pnp 2e.9 off end
189                                         device pnp 2e.a off end
190                                         device pnp 2e.f on end
191                                         device pnp 2e.10 off end
192                                         device pnp 2e.14 off end
193                                 end
194                         end
195                         device pci 1f.1 on end
196                         device pci 1f.2 off end
197                         device pci 1f.3 on end 
198                         device pci 1f.5 off end
199                         device pci 1f.6 off end
200                         register "gpio[40]" = "ICH5R_GPIO_USE_AS_GPIO"
201                         register "gpio[48]" = "ICH5R_GPIO_USE_AS_GPIO | ICH5R_GPIO_SEL_OUTPUT | ICH5R_GPIO_LVL_LOW"
202                         register "gpio[41]" = "ICH5R_GPIO_USE_AS_GPIO | ICH5R_GPIO_SEL_INPUT"
203                 end
204         end
205         device apic_cluster 0 on
206                 chip cpu/intel/socket_mPGA604_800Mhz # cpu 0
207                         device apic 0 on end
208                 end
209                 chip cpu/intel/socket_mPGA604_800Mhz # cpu 1
210                         device apic 6 on end
211                 end
212         end
213 end