011ce5ad24276975d865dba70d2b9e7c7ab8115c
[coreboot.git] / src / mainboard / via / epia-m / Config.lb
1 ## CONFIG_XIP_ROM_SIZE must be a power of 2.
2 default CONFIG_XIP_ROM_SIZE = 128 * 1024
3 include /config/nofailovercalculation.lb
4 default CONFIG_XIP_ROM_BASE = 0xffffffff - CONFIG_XIP_ROM_SIZE + 1
5
6 ##
7 ## Set all of the defaults for an x86 architecture
8 ##
9
10 arch i386 end
11
12 ##
13 ## Build the objects we have code for in this directory.
14 ##
15
16 driver mainboard.o
17 if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end
18 object vgabios.o
19
20 if CONFIG_GENERATE_ACPI_TABLES
21         object fadt.o
22         object dsdt.o
23         object acpi_tables.o
24 end
25
26 ##
27 ## Romcc output
28 ##
29 makerule ./failover.E
30         depends "$(CONFIG_MAINBOARD)/failover.c ../romcc" 
31         action "../romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/failover.c -o $@"
32 end
33
34 makerule ./failover.inc
35         depends "$(CONFIG_MAINBOARD)/failover.c ../romcc"
36         action "../romcc    -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/failover.c -o $@"
37 end
38
39 makerule ./auto.E 
40         depends "$(CONFIG_MAINBOARD)/auto.c option_table.h ../romcc" 
41         action  "../romcc -E -mcpu=c3 -O -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/auto.c -o $@"
42 end
43 makerule ./auto.inc 
44         depends "$(CONFIG_MAINBOARD)/auto.c option_table.h ../romcc"
45         action  "../romcc    -mcpu=c3 -O -I$(TOP)/src -I. $(CPPFLAGS) $(CONFIG_MAINBOARD)/auto.c -o $@"
46 end
47
48 ##
49 ## Build our 16 bit and 32 bit coreboot entry code
50 ##
51 mainboardinit cpu/x86/16bit/entry16.inc
52 mainboardinit cpu/x86/32bit/entry32.inc
53 ldscript /cpu/x86/16bit/entry16.lds
54 ldscript /cpu/x86/32bit/entry32.lds
55
56 ##
57 ## Build our reset vector (This is where coreboot is entered)
58 ##
59 if CONFIG_USE_FALLBACK_IMAGE 
60         mainboardinit cpu/x86/16bit/reset16.inc 
61         ldscript /cpu/x86/16bit/reset16.lds 
62 else
63         mainboardinit cpu/x86/32bit/reset32.inc 
64         ldscript /cpu/x86/32bit/reset32.lds 
65 end
66
67 ### Should this be in the northbridge code?
68 mainboardinit arch/i386/lib/cpu_reset.inc
69
70 ##
71 ## Include an id string (For safe flashing)
72 ##
73 mainboardinit arch/i386/lib/id.inc
74 ldscript /arch/i386/lib/id.lds
75
76 ###
77 ### This is the early phase of coreboot startup 
78 ### Things are delicate and we test to see if we should
79 ### failover to another image.
80 ###
81 if CONFIG_USE_FALLBACK_IMAGE
82         ldscript /arch/i386/lib/failover.lds 
83         mainboardinit ./failover.inc
84 end
85
86 ###
87 ### O.k. We aren't just an intermediary anymore!
88 ###
89
90 ##
91 ## Setup RAM
92 ##
93 mainboardinit cpu/x86/fpu_enable.inc
94 mainboardinit ./auto.inc
95 mainboardinit cpu/x86/mmx_disable.inc
96
97 ##
98 ## Include the secondary Configuration files 
99 ##
100 dir /pc80
101 config chip.h
102
103 chip northbridge/via/vt8623
104
105         device apic_cluster 0 on
106                 chip cpu/via/model_c3
107                         device apic 0 on  end 
108                 end
109         end
110
111         device pci_domain 0 on
112                 chip southbridge/via/vt8235
113
114                         device pci 10.0 on end # USB 1.1
115                         device pci 10.1 on end # USB 1.1
116                         device pci 10.2 on end # USB 1.1
117                         device pci 10.3 on end # USB 2
118
119                         device pci 11.0 on      # Southbridge
120                                 chip superio/via/vt1211
121                                         device pnp 2e.0 on      # Floppy
122                                                 io 0x60 = 0x3f0
123                                                 irq 0x70 = 6
124                                                 drq 0x74 = 2
125                                         end
126                                         device pnp 2e.1 on      # Parallel Port
127                                                 io 0x60 = 0x378
128                                                 irq 0x70 = 7
129                                                 drq 0x74 = 3
130                                         end
131                                         device pnp 2e.2 on      # COM1
132                                                 io 0x60 = 0x3f8
133                                                 irq 0x70 = 4
134                                         end
135                                         device pnp 2e.3 on      # COM2
136                                                 io 0x60 = 0x2f8
137                                                 irq 0x70 = 3
138                                         end
139                                         device pnp 2e.b on      # HWM
140                                                 io 0x60 = 0xec00
141                                         end
142
143                                 end
144                         end
145                         
146                         device pci 11.1 on  end # IDE
147                         # 2-4 non existant?
148                         device pci 11.5 on  end # AC97 Audio
149                         device pci 11.6 off end # AC97 Modem
150                         device pci 12.0 on end  # Ethernet
151                 end
152 #               This is on the EPIA MII, not the M.
153                 chip southbridge/ricoh/rl5c476
154                         register "enable_cf" = "1"
155                         device pci 0a.0 on end
156                         device pci 0a.1 on end  
157                 end
158         end
159 end