2e1986369eb5099c9f39376fb20997254210d855
[coreboot.git] / src / mainboard / intel / xe7501devkit / Config.lb
1 ##################################################################
2 ## BEGIN BOILERPLATE - DO NOT EDIT
3 ##
4 ## Compute the location and size of where this firmware image
5 ## (linuxBIOS plus payload) will live in the boot rom chip.
6 ##
7 if USE_FALLBACK_IMAGE
8 # The fallback image uses FALLBACK_SIZE bytes at the end of the ROM
9
10         default ROM_SECTION_SIZE   = FALLBACK_SIZE
11         default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE )
12
13 else
14 # The normal image goes at the beginning of the LinuxBIOS ROM region
15 # and uses all the remaining space
16
17         default ROM_SECTION_SIZE   = ( ROM_SIZE - FALLBACK_SIZE )
18         default ROM_SECTION_OFFSET = 0
19 end
20
21 ##
22 ## Compute where this copy of linuxBIOS will start in the boot rom
23 ##
24 default _ROMBASE      = ( CONFIG_ROM_STREAM_START + PAYLOAD_SIZE )
25
26 ##
27 ## Compute a range of ROM that can cached to speed up linuxBIOS,
28 ## execution speed.
29 ##
30 ## XIP_ROM_SIZE must be a power of 2.
31 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
32 default XIP_ROM_SIZE = 65536
33 default XIP_ROM_BASE = ((( _ROMBASE + ROM_IMAGE_SIZE ) / XIP_ROM_SIZE ) * XIP_ROM_SIZE - XIP_ROM_SIZE )
34
35 ## END BOILERPLATE
36 ##################################################################
37
38 arch i386 end 
39
40 ##
41 ## Build the objects we have code for in this directory.
42 ##
43
44 driver mainboard.o
45 if HAVE_MP_TABLE                object mptable.o         end
46 if HAVE_PIRQ_TABLE              object irq_tables.o      end
47 if HAVE_ACPI_TABLES     object acpi_tables.o end
48 object reset.o
49
50 # Include the VGA option ROM, but only if we're compiled to use it
51 if CONFIG_PCI_ROM_RUN
52         if CONFIG_CONSOLE_VGA   
53                 object vgarom.S
54         else
55                 object no_vgarom.S
56         end
57 else
58         object no_vgarom.S
59 end
60
61 ##
62 ## Romcc output
63 ##
64 makerule ./failover.E
65         depends "$(MAINBOARD)/failover.c ./romcc"
66         action "./romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
67 end
68
69 makerule ./failover.inc
70         depends "$(MAINBOARD)/failover.c ./romcc"
71         action "./romcc    -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
72 end
73
74 makerule ./auto.E
75         depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
76         action  "./romcc -E -mcpu=p4 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
77 end
78 makerule ./auto.inc
79         depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
80         action  "./romcc    -mcpu=p4 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
81 end
82
83 ##
84 ## Build our 16 bit and 32 bit linuxBIOS entry code
85 ##
86 mainboardinit cpu/x86/16bit/entry16.inc
87 mainboardinit cpu/x86/32bit/entry32.inc
88 ldscript /cpu/x86/16bit/entry16.lds
89 ldscript /cpu/x86/32bit/entry32.lds
90
91 ##
92 ## Build our reset vector (This is where linuxBIOS is entered)
93 ##
94 if HAVE_FALLBACK_BOOT
95     if USE_FALLBACK_IMAGE 
96             mainboardinit cpu/x86/16bit/reset16.inc 
97             ldscript /cpu/x86/16bit/reset16.lds
98     else
99             mainboardinit cpu/x86/32bit/reset32.inc 
100             ldscript /cpu/x86/32bit/reset32.lds 
101     end
102 else
103         mainboardinit cpu/x86/16bit/reset16.inc 
104         ldscript /cpu/x86/16bit/reset16.lds
105 end
106
107 ### Should this be in the northbridge code?
108 mainboardinit arch/i386/lib/cpu_reset.inc
109
110 ##
111 ## Include an id string (For safe flashing)
112 ##
113 mainboardinit arch/i386/lib/id.inc
114 ldscript /arch/i386/lib/id.lds
115
116 ###
117 ### This is the early phase of linuxBIOS startup 
118 ### Things are delicate and we test to see if we should
119 ### failover to another image.
120 ###
121 if USE_FALLBACK_IMAGE
122         ldscript /arch/i386/lib/failover.lds 
123         mainboardinit ./failover.inc
124 end
125
126 ###
127 ### O.k. We aren't just an intermediary anymore!
128 ###
129
130 ##
131 ## Setup RAM
132 ##
133 mainboardinit cpu/x86/fpu/enable_fpu.inc
134 mainboardinit cpu/x86/mmx/enable_mmx.inc
135 mainboardinit cpu/x86/sse/enable_sse.inc
136 mainboardinit ./auto.inc
137 mainboardinit cpu/x86/sse/disable_sse.inc
138 mainboardinit cpu/x86/mmx/disable_mmx.inc
139
140 ##
141 ## Include the secondary Configuration files 
142 ##
143 dir /pc80
144
145 if CONFIG_CHIP_NAME
146         config chip.h
147 end
148
149 # based on sample config for tyan/s2735
150 chip northbridge/intel/e7501
151         device pci_domain 0 on
152                 device pci 0.0 on end                           # Chipset host controller
153         device pci 0.1 on end                           # Host RASUM controller
154         device pci 2.0 on                                       # Hub interface B
155                 chip southbridge/intel/i82870                   # P64H2
156                         device pci 1c.0 on end                                  # IOAPIC - bus B
157                         device pci 1d.0 on end                                  # Hub to PCI-B bridge   
158                     device pci 1e.0 on end                                      # IOAPIC - bus A                        
159                     device pci 1f.0 on end                                      # Hub to PCI-A bridge
160                 end
161                 end
162                 device pci 3.0 off end                          # Hub interface C (82808AA connector - disable for now)
163         device pci 4.0 on                                       # Hub interface D
164                 chip southbridge/intel/i82870                   # P64H2
165                         device pci 1c.0 on end                                  # IOAPIC - bus B
166                         device pci 1d.0 on end                                  # Hub to PCI-B bridge
167                     device pci 1e.0 on end                                      # IOAPIC - bus A
168                     device pci 1f.0 on end                                      # Hub to PCI-A bridge
169                 end
170                 end
171         device pci 6.0 on end                           # E7501 Power management registers? (undocumented)
172         chip southbridge/intel/i82801ca
173                         device pci 1d.0 off end                                 # USB (might not work, Southbridge code needs looking at)
174                     device pci 1d.1 off end                                     # USB (not populated)
175                     device pci 1d.2 off end                                     # USB (not populated)
176                     device pci 1e.0 on                                          # Hub to PCI bridge
177                         chip drivers/pci/onboard                        # VGA ROM
178                         device pci 0.0 on end
179                         register "rom_address" = "_vgarom_start"
180                 end
181             end
182                     device pci 1f.0 on                                          # LPC bridge
183                                 chip superio/smsc/lpc47b272
184                                         device pnp 2e.0 off                     # Floppy
185                                 io 0x60 = 0x3f0
186                                 irq 0x70 = 6
187                             drq 0x74 = 2
188                             end
189                                         device pnp 2e.3 off                     # Parallel Port
190                                 io 0x60 = 0x378
191                         irq 0x70 = 7
192                     end
193                     device pnp 2e.4 on                          # Com1
194                         io 0x60 = 0x3f8
195                             irq 0x70 = 4
196                         end
197                         device pnp 2e.5 off                     # Com2
198                         io 0x60 = 0x2f8
199                         irq 0x70 = 3
200                     end
201                                         device pnp 2e.7 on                      # Keyboard
202                                 io 0x60 = 0x60
203                             io 0x62 = 0x64
204                             irq 0x70 = 1                                        # Keyboard interrupt
205                                 irq 0x72 = 12                                   # Mouse interrupt
206                         end
207                         device pnp 2e.a off end                 # ACPI
208                         end
209                     end
210                     device pci 1f.1 on end                                      # IDE
211                 device pci 1f.3 on end                                  # SMBus
212                 device pci 1f.5 off end                                 # AC97 Audio
213                     device pci 1f.6 off end                                     # AC97 Modem
214                 end # SB
215         end # PCI_DOMAIN
216     device apic_cluster 0 on
217         chip cpu/intel/socket_mPGA604_533Mhz
218                 device apic 0 on end
219         end
220         chip cpu/intel/socket_mPGA604_533Mhz
221                 device apic 6 on end
222         end
223     end
224 end