ce6f762985ad9d986594dc47f15b73b2a9e54650
[coreboot.git] / src / mainboard / via / epia / 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_STREAM_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
19 default CONFIG_ROM_STREAM     = 1
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 ##
33 default XIP_ROM_SIZE=65536
34 default XIP_ROM_BASE = ( _ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE )
35
36 ##
37 ## Set all of the defaults for an x86 architecture
38 ##
39
40 arch i386 end
41
42 ##
43 ## Build the objects we have code for in this directory.
44 ##
45
46
47 driver mainboard.o
48 #object reset.o
49
50 ##
51 ## Romcc output
52 ##
53 makerule ./failover.E
54         depends "$(MAINBOARD)/failover.c" 
55         action "$(CPP) -I$(TOP)/src $(ROMCCPPFLAGS) $(CPPFLAGS) $(MAINBOARD)/failover.c > ./failover.E"
56 end
57
58 makerule ./failover.inc
59         depends "./failover.E ./romcc"
60         action "./romcc -O -mcpu=c3 -o failover.inc --label-prefix=failover ./failover.E"
61 end
62
63 makerule ./auto.E 
64         depends "$(MAINBOARD)/auto.c" 
65         action  "$(CPP) -I$(TOP)/src $(ROMCCPPFLAGS) $(CPPFLAGS) $(MAINBOARD)/auto.c > ./auto.E"
66 end
67 makerule ./auto.inc 
68         depends "./auto.E ./romcc"
69         action  "./romcc   -O -mcpu=c3 ./auto.E "
70 end
71
72 ##
73 ## Build our 16 bit and 32 bit linuxBIOS entry code
74 ##
75 mainboardinit cpu/x86/16bit/entry16.inc
76 mainboardinit cpu/x86/32bit/entry32.inc
77 ldscript /cpu/x86/16bit/entry16.lds
78 ldscript /cpu/x86/32bit/entry32.lds
79
80 ##
81 ## Build our reset vector (This is where linuxBIOS is entered)
82 ##
83 if USE_FALLBACK_IMAGE 
84         mainboardinit cpu/x86/16bit/reset16.inc 
85         ldscript /cpu/x86/16bit/reset16.lds 
86 else
87         mainboardinit cpu/x86/32bit/reset32.inc 
88         ldscript /cpu/x86/32bit/reset32.lds 
89 end
90
91 ### Should this be in the northbridge code?
92 mainboardinit arch/i386/lib/cpu_reset.inc
93
94 ##
95 ## Include an id string (For safe flashing)
96 ##
97 mainboardinit arch/i386/lib/id.inc
98 ldscript /arch/i386/lib/id.lds
99
100 ##
101 ## Setup our mtrrs
102 ##
103 # mainboardinit cpu/p6/earlymtrr.inc
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 ./auto.inc
123
124 ##
125 ## Include the secondary Configuration files 
126 ##
127 dir /pc80
128 config chip.h
129
130 chip northbridge/via/vt8601
131 #       pci 0:0.0
132 #       pci 0:1.0
133         chip southbridge/via/vt8231
134 #               pci 0:11.0
135 #               pci 0:11.1
136 #               pci 0:11.2
137 #               pci 0:11.3
138 #               pci 0:11.4
139 #               pci 0:11.5
140 #               pci 0:11.6
141 #               pci 0:12.0
142                 register "enable_usb" = "0"
143                 register "enable_native_ide" = "0"
144                 register "enable_com_ports" = "1"
145                 register "enable_keyboard" = "0"
146                 register "enable_nvram" = "1"
147                 chip superio/winbond/w83627hf
148                         device pnp 2e.0 on #  Floppy
149                                  io 0x60 = 0x3f0
150                                 irq 0x70 = 6
151                                 drq 0x74 = 2
152                         end
153                         device pnp 2e.1 off #  Parallel Port
154                                  io 0x60 = 0x378
155                                 irq 0x70 = 7
156                         end
157                         device pnp 2e.2 on #  Com1
158                                  io 0x60 = 0x3f8
159                                 irq 0x70 = 4
160                         end
161                         device pnp 2e.3 off #  Com2
162                                 io 0x60 = 0x2f8
163                                 irq 0x70 = 3
164                         end
165                         device pnp 2e.5 on #  Keyboard
166                                  io 0x60 = 0x60
167                                  io 0x62 = 0x64
168                                irq 0x70 = 1
169                                 irq 0x72 = 12
170                         end
171                         device pnp 2e.6 off end #  CIR
172                         device pnp 2e.7 off end #  GAME_MIDI_GIPO1
173                         device pnp 2e.8 off end #  GPIO2
174                         device pnp 2e.9 off end #  GPIO3
175                         device pnp 2e.a off end #  ACPI
176                         device pnp 2e.b on  #  HW Monitor
177                                  io 0x60 = 0x290
178                         end
179                         register "com1" = "{1}"
180                 #       register "com1" = "{1, 0, 0x3f8, 4}"
181                 #       register "lpt" = "{1}"
182                 end
183         end
184 end
185
186 ##
187 ## Include the old serial code for those few places that still need it.
188 ##
189 mainboardinit pc80/serial.inc
190 mainboardinit arch/i386/lib/console.inc