Apply linuxbios-rename-other-payload-options.patch
[coreboot.git] / src / mainboard / via / epia-m / Config.lb
1 ##
2 ## Compute the location and size of where this firmware image
3 ## (linuxBIOS 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 linuxBIOS 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 linuxBIOS 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 linuxBIOS,
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_PIRQ_TABLE object irq_tables.o end
47 #object reset.o
48 object vgabios.o
49
50 if HAVE_ACPI_TABLES
51         object fadt.o
52         object dsdt.o
53         object acpi_tables.o
54 end
55
56 ##
57 ## Romcc output
58 ##
59 makerule ./failover.E
60         depends "$(MAINBOARD)/failover.c ./romcc" 
61         action "./romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
62 end
63
64 makerule ./failover.inc
65         depends "$(MAINBOARD)/failover.c ./romcc"
66         action "./romcc    -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
67 end
68
69 makerule ./auto.E 
70         depends "$(MAINBOARD)/auto.c option_table.h ./romcc" 
71         action  "./romcc -E -mcpu=c3 -O -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
72 end
73 makerule ./auto.inc 
74         depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
75         action  "./romcc    -mcpu=c3 -O -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
76 end
77
78 ##
79 ## Build our 16 bit and 32 bit linuxBIOS entry code
80 ##
81 mainboardinit cpu/x86/16bit/entry16.inc
82 mainboardinit cpu/x86/32bit/entry32.inc
83 ldscript /cpu/x86/16bit/entry16.lds
84 ldscript /cpu/x86/32bit/entry32.lds
85
86 ##
87 ## Build our reset vector (This is where linuxBIOS 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 ### Should this be in the northbridge code?
98 mainboardinit arch/i386/lib/cpu_reset.inc
99
100 ##
101 ## Include an id string (For safe flashing)
102 ##
103 mainboardinit arch/i386/lib/id.inc
104 ldscript /arch/i386/lib/id.lds
105
106 ###
107 ### This is the early phase of linuxBIOS startup 
108 ### Things are delicate and we test to see if we should
109 ### failover to another image.
110 ###
111 if USE_FALLBACK_IMAGE
112         ldscript /arch/i386/lib/failover.lds 
113         mainboardinit ./failover.inc
114 end
115
116 ###
117 ### O.k. We aren't just an intermediary anymore!
118 ###
119
120 ##
121 ## Setup RAM
122 ##
123 mainboardinit cpu/x86/fpu/enable_fpu.inc
124 mainboardinit cpu/x86/mmx/enable_mmx.inc
125 mainboardinit ./auto.inc
126 mainboardinit cpu/x86/mmx/disable_mmx.inc
127
128 ##
129 ## Include the secondary Configuration files 
130 ##
131 dir /pc80
132 config chip.h
133
134 chip northbridge/via/vt8623
135
136         device apic_cluster 0 on
137                 chip cpu/via/model_centaur
138                         device apic 0 on  end 
139                 end
140         end
141
142         device pci_domain 0 on
143                 chip southbridge/via/vt8235
144
145                         device pci 10.0 on end # USB 1.1
146                         device pci 10.1 on end # USB 1.1
147                         device pci 10.2 on end # USB 1.1
148                         device pci 10.3 on end # USB 2
149
150                         device pci 11.0 on      # Southbridge
151                                 chip superio/via/vt1211
152                                         device pnp 2e.0 on      # Floppy
153                                                 io 0x60 = 0x3f0
154                                                 irq 0x70 = 6
155                                                 drq 0x74 = 2
156                                         end
157                                         device pnp 2e.1 on      # Parallel Port
158                                                 io 0x60 = 0x378
159                                                 irq 0x70 = 7
160                                                 drq 0x74 = 3
161                                         end
162                                         device pnp 2e.2 on      # COM1
163                                                 io 0x60 = 0x3f8
164                                                 irq 0x70 = 4
165                                         end
166                                         device pnp 2e.3 on      # COM2
167                                                 io 0x60 = 0x2f8
168                                                 irq 0x70 = 3
169                                         end
170                                         device pnp 2e.b on      # HWM
171                                                 io 0x60 = 0xec00
172                                         end
173
174                                 end
175                         end
176                         
177                         device pci 11.1 on  end # IDE
178                         # 2-4 non existant?
179                         device pci 11.5 on  end # AC97 Audio
180                         device pci 11.6 off end # AC97 Modem
181                         device pci 12.0 on end  # Ethernet
182                 end
183 #               This is on the EPIA MII, not the M.
184                 chip southbridge/ricoh/rl5c476
185                         register "enable_cf" = "1"
186                         device pci 0a.0 on end
187                         device pci 0a.1 on end  
188                 end
189         end
190 end