- O2, enums, and switch statements work in romcc
[coreboot.git] / src / config / Options.lb
1 #######################################################
2 #
3 # Main options file for LinuxBIOS
4 #
5 # Each option used by a part must be defined in
6 # this file. The format for options is:
7 #
8 #   define <name> 
9 #       default <expr> | {<expr>} | "<string>" | none
10 #       format "<string>"
11 #       export always | used | never
12 #       comment "<string>"
13 #   end
14 #
15 # where 
16 #
17 #   <name> is the name of the option
18 #   <expr> is a numeric expression
19 #   <string> is a string
20 #
21 # Either a default value or 'default none' must
22 # be specified for every option. An option
23 # specified as 'default none' will not be exported
24 # (i.e. will remain undefined) unless it has
25 # been assigned a value.
26 #
27 # Option values can be an immediate expression that 
28 # evaluates to a numeric value, a delayed expression 
29 # (surrounded by curley braces), or a string 
30 # (surrounded by double quotes.)
31 #
32 # Immediate expressions are evaluated at the time an
33 # option is defined or set and the numeric result 
34 # becomes the value of the option.
35 #
36 # Delayed expression are evaluated at the time the 
37 # option is used, either in another expression or 
38 # when being exported.
39 #
40 # String values will have the double quotes removed 
41 # automatically. 
42 #
43 # Format strings determine the print format that is 
44 # used when exporting options. The default format
45 # is "%s" for strings and "%d" for numbers.
46 #
47 # Exported options generate entries in the 
48 # Makefile.settings file. Options can be always 
49 # exported, exported only if used, or never exported.
50 #
51 # A comment string must be supplied for every option.
52 #
53 #######################################################
54
55 ###############################################
56 # Architecture options
57 ###############################################
58
59 define ARCH
60         default "i386"
61         export always
62         comment "Default architecture is i386, options are alpha and ppc"
63 end
64 define k7
65         default none
66         export always
67         comment "We're a k7"
68 end
69 define k8
70         default none
71         export always
72         comment "We're a k8"
73 end
74 define i586
75         default none
76         export always
77         comment "We're a 586"
78 end
79 define i686
80         default none
81         export always
82         comment "We're a 686"
83 end
84 define CPU_FIXUP
85         default none
86         export always
87         comment "Do CPU fixups"
88 end
89
90 ###############################################
91 # Build options
92 ###############################################
93
94 define CROSS_COMPILE
95         default ""
96         export always
97         comment "Cross compiler prefix"
98 end
99 define CC
100         default "$(CROSS_COMPILE)gcc"
101         export always
102         comment "Target C Compiler"
103 end
104 define HOSTCC
105         default "gcc"
106         export always
107         comment "Host C Compiler"
108 end
109 define CPU_OPT
110         default none
111         export used
112         comment "Additional per-cpu CFLAGS"
113 end
114 define OBJCOPY
115         default "$(CROSS_COMPILE)objcopy"
116         export always
117         comment "Objcopy command"
118 end
119 define LINUXBIOS_VERSION
120         default "1.1.5"
121         export always
122         comment "LinuxBIOS version"
123 end
124 define LINUXBIOS_EXTRA_VERSION
125         default ""
126         export used
127         comment "LinuxBIOS extra version"
128 end
129 define LINUXBIOS_BUILD
130         default "$(shell date)"
131         export always
132         comment "Build date"
133 end
134 define LINUXBIOS_COMPILE_TIME
135         default "$(shell date +%T)"
136         export always
137         comment "Build time"
138 end
139 define LINUXBIOS_COMPILE_BY
140         default "$(shell whoami)"
141         export always
142         comment "Who build this image"
143 end
144 define LINUXBIOS_COMPILE_HOST
145         default "$(shell hostname)"
146         export always
147         comment "Build host"
148 end
149
150 define LINUXBIOS_COMPILE_DOMAIN
151         default "$(shell dnsdomainname)"
152         export always
153         comment "Build domain name"
154 end
155 define LINUXBIOS_COMPILER
156         default "$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -n 1)"
157         export always
158         comment "Build compiler"
159 end
160 define LINUXBIOS_LINKER
161         default "$(shell  $(CC) -Wl,-v 2>&1 | grep version | tail -n 1)"
162         export always
163         comment "Build linker"
164 end
165 define LINUXBIOS_ASSEMBLER
166         default "$(shell  touch dummy.s ; $(CC) -c -Wa,-v dummy.s 2>&1; rm -f dummy.s dummy.o )"
167         export always
168         comment "Build assembler"
169 end
170 define CONFIG_CHIP_CONFIGURE
171         default 0
172         export used
173         comment "Use new chip_configure method for configuring (non-pci) devices"
174 end
175
176 ###############################################
177 # ROM image options
178 ###############################################
179
180 define HAVE_FALLBACK_BOOT
181         format "%d"
182         default 0
183         export always
184         comment "Set if fallback booting required"
185 end
186 define USE_FALLBACK_IMAGE
187         format "%d"
188         default 0
189         export used
190         comment "Set to build a fallback image"
191 end
192 define FALLBACK_SIZE
193         default 65536
194         format "0x%x"
195         export used
196         comment "Default fallback image size"
197 end
198 define ROM_SIZE
199         default none
200         format "0x%x"
201         export used
202         comment "Size of your ROM"
203 end
204 define ROM_IMAGE_SIZE
205         default 65535
206         format "0x%x"
207         export always
208         comment "Default image size"
209 end
210 define ROM_SECTION_SIZE
211         default {FALLBACK_SIZE}
212         format "0x%x"
213         export used
214         comment "Default rom section size"
215 end
216 define ROM_SECTION_OFFSET
217         default {ROM_SIZE - FALLBACK_SIZE}
218         format "0x%x"
219         export used
220         comment "Default rom section offset"
221 end
222 define PAYLOAD_SIZE
223         default {ROM_SECTION_SIZE - ROM_IMAGE_SIZE}
224         format "0x%x"
225         export always
226         comment "Default payload size"
227 end
228 define _ROMBASE
229         default {PAYLOAD_SIZE}
230         format "0x%x"
231         export always
232         comment "Base address of LinuxBIOS in ROM"
233 end
234 define _RESET
235         default {_ROMBASE}
236         format "0x%x"
237         export always
238         comment "Hardware reset vector address"
239 end
240 define STACK_SIZE
241         default 0x2000
242         format "0x%x"
243         export always
244         comment "Default stack size"
245 end
246 define HEAP_SIZE
247         default 0x2000
248         format "0x%x"
249         export used
250         comment "Default heap size"
251 end
252 define _RAMBASE
253         default none
254         format "0x%x"
255         export always
256         comment "Base address of LinuxBIOS in RAM"
257 end
258 define USE_CACHE_RAM
259         default 0
260         export used
261         comment "Use cache as temporary RAM if possible"
262 end
263 define CACHE_RAM_BASE
264         default 0x00200000
265         format "0x%x"
266         export always
267         comment "Base address of cache when using it for temporary RAM"
268 end
269 define CACHE_RAM_SIZE
270         default 0x00004000
271         format "0x%x"
272         export always
273         comment "Size of cache when using it for temporary RAM"
274 end
275 define XIP_ROM_BASE
276         default 0
277         format "0x%x"
278         export used
279         comment "Start address of area to cache during LinuxBIOS execution directly from ROM"
280 end
281 define XIP_ROM_SIZE
282         default 0
283         format "0x%x"
284         export used
285         comment "Size of area to cache during LinuxBIOS execution directly from ROM"
286 end
287 define CONFIG_COMPRESS
288         default 1
289         export always
290         comment "Set for compressed image"
291 end
292 define CONFIG_UNCOMPRESSED
293         format "%d"
294         default {!CONFIG_COMPRESS}
295         export always
296         comment "Set for uncompressed image"
297 end
298 define HAVE_OPTION_TABLE
299         default 0
300         export always
301         comment "Export CMOS option table"
302 end
303 define USE_OPTION_TABLE
304         format "%d"
305         default {HAVE_OPTION_TABLE && !USE_FALLBACK_IMAGE}
306         export always
307         comment "Use option table"
308 end
309
310 ###############################################
311 # Build targets
312 ###############################################
313
314 define CRT0
315         default "$(TOP)/src/arch/$(ARCH)/config/crt0.base"
316         export always
317         comment "Main initialization target"
318 end
319
320 ###############################################
321 # Debugging/Logging options
322 ###############################################
323
324 define DEBUG
325         default 1
326         export always
327         comment "Enable debugging code"
328 end
329 define CONFIG_CONSOLE_VGA
330         default 0
331         export always
332         comment "Log messages to VGA"
333 end
334 define CONFIG_CONSOLE_LOGBUF
335         default 0
336         export always
337         comment "Log messages to buffer"
338 end
339 define CONFIG_CONSOLE_SROM
340         default 0
341         export always
342         comment "Log messages to SROM console"
343 end
344 define CONFIG_CONSOLE_SERIAL8250
345         default 0
346         export always
347         comment "Log messages to 8250 uart based serial console"
348 end
349 define DEFAULT_CONSOLE_LOGLEVEL
350         default 7
351         export always
352         comment "Console will log at this level unless changed"
353 end
354
355 define MAXIMUM_CONSOLE_LOGLEVEL
356         default 8
357         export always
358         comment "Error messages up to this level can be printed"
359 end
360
361 define NO_POST
362         default none
363         export always
364         comment "Disable POST codes"
365 end
366
367 define TTYS0_BASE
368         default 0x3f8
369         export always
370         comment "Base address for 8250 uart for the serial console"
371 end
372
373 define TTYS0_BAUD
374         default 115200
375         export always
376         comment "Default baud rate for serial console"
377 end
378
379 define TTYS0_LCS
380         default 0x3
381         export always
382         comment "Default flow control settings for the 8250 serial console uart"
383 end
384         
385 ###############################################
386 # Mainboard options
387 ###############################################
388
389 define MAINBOARD
390         default "Mainboard_not_set"
391         export always
392         comment "Mainboard name"
393 end
394 define MAINBOARD_PART_NUMBER
395         default "Part_number_not_set"
396         export always
397         comment "Part number of mainboard"
398 end
399 define MAINBOARD_VENDOR
400         default "Vendor_not_set"
401         export always
402         comment "Vendor of mainboard"
403 end
404 define CONFIG_SYS_CLK_FREQ
405         default none
406         export used
407         comment "System clock frequency in MHz"
408 end
409
410 define CONFIG_KEYBOARD
411         default 0
412         export used
413         comment "Run PC keyboard enable code"
414 end
415
416 define CONFIG_LEGACY_VGABIOS
417         default 0
418         export used
419         comment "Support for legacy VGA BIOS"
420 end
421 ###############################################
422 # SMP options
423 ###############################################
424
425 define CONFIG_SMP
426         default 0
427         export always
428         comment "Define if we support SMP"
429 end
430 define CONFIG_MAX_CPUS
431         default 1
432         export always
433         comment "Maximum CPU count for this machine"
434 end
435 define CONFIG_MAX_PHYSICAL_CPUS
436         default {CONFIG_MAX_CPUS}
437         export always
438         comment "Physical CPU count for this machine"
439 end
440 define CONFIG_LOGICAL_CPUS
441         default 0
442         export always
443         comment "Should multiple cpus per die be enabled?"
444 end
445 define HAVE_MP_TABLE
446         default none
447         export always
448         comment "Define to build an MP table"
449 end
450
451 ###############################################
452 # Boot options
453 ###############################################
454
455 define CONFIG_IDE_STREAM
456         default 0
457         export always
458         comment "Boot from IDE device"
459 end
460 define CONFIG_ROM_STREAM
461         default 0
462         export always
463         comment "Boot image is located in ROM" 
464 end
465 define CONFIG_ROM_STREAM_START
466         default {0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1}
467         format "0x%x"
468         export always
469         comment "ROM stream start location"
470 end
471
472 ###############################################
473 # IRQ options
474 ###############################################
475
476 define HAVE_PIRQ_TABLE
477         default none
478         export always
479         comment "Define if we have a PIRQ table"
480 end
481 define IRQ_SLOT_COUNT
482         default none
483         export always
484         comment "Number of IRQ slots"
485 end
486 define CONFIG_PCIBIOS_IRQ
487         default none
488         export always
489         comment "PCIBIOS IRQ support"
490 end
491 define CONFIG_IOAPIC
492         default none
493         export always
494         comment "IOAPIC support"
495 end
496
497 ###############################################
498 # IDE specific options
499 ###############################################
500
501 define IDE_BOOT_DRIVE
502         default 0
503         export always
504         comment "Disk number of boot drive"
505 end
506 define IDE_SWAB
507         default none
508         export always
509         comment "Swap bytes when reading from IDE device"
510 end
511 define IDE_OFFSET
512         default 0
513         export always
514         comment "Sector at which to start searching for boot image"
515 end
516
517 ###############################################
518 # Misc options
519 ###############################################
520
521 define HAVE_HARD_RESET
522         default none
523         export used
524         comment "Have hard reset"
525 end
526 define MEMORY_HOLE
527         default none
528         export used
529         comment "Set to deal with memory hole"
530 end
531 define MAX_REBOOT_CNT
532         default 3
533         export always
534         comment "Set maximum reboots"
535 end
536
537 ###############################################
538 # Misc device options
539 ###############################################
540
541 define CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
542         default 0
543         export used
544         comment "Use timer2 to callibrate the x86 time stamp counter"
545 end
546 define INTEL_PPRO_MTRR
547         default none
548         export always
549         comment ""
550 end
551 define CONFIG_UDELAY_TSC
552         default 0
553         export used
554         comment "Implement udelay with the x86 time stamp counter"
555 end
556
557 ###############################################
558 # Board specific options
559 ###############################################
560
561 ###############################################
562 # Options for motorola/sandpoint
563 ###############################################
564 define CONFIG_SANDPOINT_ALTIMUS
565         default 0
566         export never
567         comment "Configure Sandpoint with Altimus PMC"
568 end
569 define CONFIG_SANDPOINT_TALUS
570         default 0
571         export never
572         comment "Configure Sandpoint with Talus PMC"
573 end
574 define CONFIG_SANDPOINT_UNITY
575         default 0
576         export never
577         comment "Configure Sandpoint with Unity PMC"
578 end
579 define CONFIG_SANDPOINT_VALIS
580         default 0
581         export never
582         comment "Configure Sandpoint with Valis PMC"
583 end
584 define CONFIG_SANDPOINT_GYRUS
585         default 0
586         export never
587         comment "Configure Sandpoint with Gyrus PMC"
588 end