new chip configure
[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 OBJCOPY
110         default "$(CROSS_COMPILE)objcopy"
111         export always
112         comment "Objcopy command"
113 end
114 define LINUXBIOS_VERSION
115         default "1.1.0"
116         export always
117         comment "LinuxBIOS version"
118 end
119 define LINUXBIOS_BUILD
120         default "$(shell date)"
121         export always
122         comment "Build date"
123 end
124 define LINUXBIOS_COMPILE_TIME
125         default "$(shell date +%T)"
126         export always
127         comment "Build time"
128 end
129 define LINUXBIOS_COMPILE_BY
130         default "$(shell whoami)"
131         export always
132         comment "Who build this image"
133 end
134 define LINUXBIOS_COMPILE_HOST
135         default "$(shell hostname)"
136         export always
137         comment "Build host"
138 end
139
140 define LINUXBIOS_COMPILE_DOMAIN
141         default ""
142         export always
143         comment "Build domain name"
144 end
145 define LINUXBIOS_COMPILER
146         default "$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -n 1)"
147         export always
148         comment "Build compiler"
149 end
150 define LINUXBIOS_LINKER
151         default "$(shell  $(CC) -Wl,-v 2>&1 | grep version | tail -n 1)"
152         export always
153         comment "Build linker"
154 end
155 define LINUXBIOS_ASSEMBLER
156         default "$(shell  touch dummy.s ; $(CC) -c -Wa,-v dummy.s 2>&1; rm -f dummy.s dummy.o )"
157         export always
158         comment "Build assembler"
159 end
160 define CONFIG_CHIP_CONFIGURE
161         default 0
162         export used
163         comment "Use new chip_configure method for configuring (non-pci) devices"
164 end
165
166 ###############################################
167 # ROM image options
168 ###############################################
169
170 define HAVE_FALLBACK_BOOT
171         default 0
172         export always
173         comment "Set if fallback booting required"
174 end
175 define USE_FALLBACK_IMAGE
176         default 0
177         export used
178         comment "Set to build a fallback image"
179 end
180 define USE_NORMAL_IMAGE
181         default {!USE_FALLBACK_IMAGE}
182         export used
183         comment "Set to build a normal image"
184 end
185 define FALLBACK_SIZE
186         default 65536
187         format "0x%x"
188         export used
189         comment "Default fallback image size"
190 end
191 define ROM_SIZE
192         default 262144
193         format "0x%x"
194         export used
195         comment "Size of your ROM"
196 end
197 define ROM_IMAGE_SIZE
198         default 65535
199         format "0x%x"
200         export always
201         comment "Default image size"
202 end
203 define ROM_SECTION_SIZE
204         default {FALLBACK_SIZE}
205         format "0x%x"
206         export used
207         comment "Default rom section size"
208 end
209 define ROM_SECTION_OFFSET
210         default {ROM_SIZE - FALLBACK_SIZE}
211         format "0x%x"
212         export used
213         comment "Default rom section offset"
214 end
215 define PAYLOAD_SIZE
216         default {ROM_SECTION_SIZE - ROM_IMAGE_SIZE}
217         format "0x%x"
218         export always
219         comment "Default payload size"
220 end
221 define _ROMBASE
222         default {PAYLOAD_SIZE}
223         format "0x%x"
224         export always
225         comment "Base of ROM"
226 end
227 define STACK_SIZE
228         default 0x2000
229         format "0x%x"
230         export always
231         comment "Default stack size"
232 end
233 define HEAP_SIZE
234         default 0x2000
235         format "0x%x"
236         export used
237         comment "Default heap size"
238 end
239 define _RAMBASE
240         default 0x00100000
241         format "0x%x"
242         export always
243         comment "Base address of RAM"
244 end
245 define USE_CACHE_RAM
246         default 0
247         export used
248         comment "Use cache as temporary RAM if possible"
249 end
250 define CACHE_RAM_BASE
251         default 0x00200000
252         format "0x%x"
253         export always
254         comment "Base address of cache when using it for temporary RAM"
255 end
256 define CACHE_RAM_SIZE
257         default 0x00004000
258         format "0x%x"
259         export always
260         comment "Size of cache when using it for temporary RAM"
261 end
262 define CONFIG_COMPRESS
263         default 1
264         export always
265         comment "Set for compressed image"
266 end
267 define CONFIG_UNCOMPRESSED
268         default {!CONFIG_COMPRESS}
269         export always
270         comment "Set for uncompressed image"
271 end
272 define HAVE_OPTION_TABLE
273         default 0
274         export always
275         comment "Export CMOS option table"
276 end
277 define USE_OPTION_TABLE
278         default {HAVE_OPTION_TABLE && !USE_FALLBACK_IMAGE}
279         export always
280         comment "Use option table"
281 end
282
283 ###############################################
284 # Build targets
285 ###############################################
286
287 define CRT0
288         default "$(TOP)/src/arch/$(ARCH)/config/crt0.base"
289         export always
290         comment "Main initialization target"
291 end
292
293 ###############################################
294 # Debugging/Logging options
295 ###############################################
296
297 define DEBUG
298         default 1
299         export always
300         comment "Enable debugging code"
301 end
302 define CONFIG_CONSOLE_VGA
303         default 0
304         export always
305         comment "Log messages to VGA"
306 end
307 define CONFIG_CONSOLE_LOGBUF
308         default 0
309         export always
310         comment "Log messages to buffer"
311 end
312 define CONFIG_CONSOLE_SROM
313         default 0
314         export always
315         comment "Log messages to SROM console"
316 end
317 define CONFIG_CONSOLE_SERIAL8250
318         default 0
319         export always
320         comment "Log messages to serial 8250 console"
321 end
322 define SERIAL_CONSOLE
323         default none
324         export used
325         comment "Log messages to serial console"
326 end
327 define MAXIMUM_CONSOLE_LOGLEVEL
328         default 7
329         export always
330         comment "Console will log at this level"
331 end
332 define NO_POST
333         default none
334         export always
335         comment "Disable POST codes"
336 end
337 define TTYS0_BAUD
338         default 115200
339         export always
340         comment "Default baud rate for serial console"
341 end
342 define NO_KEYBOARD
343         default none
344         export never
345         comment "Set if we don't have a keyboard"
346 end
347
348 ###############################################
349 # Mainboard options
350 ###############################################
351
352 define MAINBOARD
353         default "Mainboard_not_set"
354         export always
355         comment "Mainboard name"
356 end
357 define MAINBOARD_PART_NUMBER
358         default "Part_number_not_set"
359         export always
360         comment "Part number of mainboard"
361 end
362 define MAINBOARD_VENDOR
363         default "Vendor_not_set"
364         export always
365         comment "Vendor of mainboard"
366 end
367 define FINAL_MAINBOARD_FIXUP
368         default 0
369         export used
370         comment "Do final mainboard fixups"
371 end
372
373
374 ###############################################
375 # SMP options
376 ###############################################
377
378 define CONFIG_SMP
379         default 0
380         export always
381         comment "Define if we support SMP"
382 end
383 define SMP
384         default none
385         export always
386         comment "Define if we support SMP"
387 end
388 define MAX_CPUS
389         default 1
390         export always
391         comment "CPU count for this machine"
392 end
393 define CONFIG_LOGICAL_CPUS
394         default 1
395         export always
396         comment "Logical CPU count for this machine"
397 end
398 define MAX_PHYSICAL_CPUS
399         default 1
400         export always
401         comment "Physical CPU count for this machine"
402 end
403 define HAVE_MP_TABLE
404         default none
405         export always
406         comment "Define to build an MP table"
407 end
408
409 ###############################################
410 # Boot options
411 ###############################################
412
413 define USE_ELF_BOOT
414         default none
415         export always
416         comment "Use ELF boot loader"
417 end
418 define CONFIG_IDE_STREAM
419         default 0
420         export always
421         comment "Boot from IDE device"
422 end
423 define CONFIG_ROM_STREAM
424         default 0
425         export always
426         comment "Boot image is located in ROM" 
427 end
428 define CONFIG_ROM_STREAM_START
429         default {0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1}
430         format "0x%x"
431         export always
432         comment "ROM stream start location"
433 end
434
435 ###############################################
436 # IRQ options
437 ###############################################
438
439 define HAVE_PIRQ_TABLE
440         default none
441         export always
442         comment "Define if we have a PIRQ table"
443 end
444 define IRQ_SLOT_COUNT
445         default none
446         export always
447         comment "Number of IRQ slots"
448 end
449 define CONFIG_PCIBIOS_IRQ
450         default none
451         export always
452         comment "PCIBIOS IRQ support"
453 end
454 define CONFIG_IOAPIC
455         default none
456         export always
457         comment "IOAPIC support"
458 end
459
460 ###############################################
461 # IDE specific options
462 ###############################################
463
464 define IDE_BOOT_DRIVE
465         default 0
466         export always
467         comment "Disk number of boot drive"
468 end
469 define IDE_SWAB
470         default none
471         export always
472         comment "Swap bytes when reading from IDE device"
473 end
474 define IDE_OFFSET
475         default 0
476         export always
477         comment "Sector at which to start searching for boot image"
478 end
479
480 ###############################################
481 # SMBUS options
482 ###############################################
483
484 define SMBUS_MEM_DEVICE_START
485         default (0xa << 3)
486         export always
487         comment "Start address of SMBUS device"
488 end
489 define SMBUS_MEM_DEVICE_END
490         default {SMBUS_MEM_DEVICE_START +1}
491         export always
492         comment "End address of SMBUS device"
493 end
494 define SMBUS_MEM_DEVICE_INC
495         default 1
496         export always
497         comment "Increment value SMBUS"
498 end
499
500 ###############################################
501 # SuperIO options
502 ###############################################
503
504 define SIO_BASE
505         default none
506         export used
507         comment "Superio base address"
508 end
509 define SIO_SYSTEM_CLK_INPUT
510         default none
511         export used
512         comment "Superio CLK input default"
513 end
514
515 ###############################################
516 # Misc options
517 ###############################################
518
519 define HAVE_HARD_RESET
520         default none
521         export used
522         comment "Have hard reset"
523 end
524 define MEMORY_HOLE
525         default none
526         export used
527         comment "Set to deal with memory hole"
528 end
529 define ENABLE_FIXED_AND_VARIABLE_MTRRS
530         default none
531         export used
532         comment "Enable fixed and variable mtrrs"
533 end
534 define START_CPU_SEG
535         default 0xf0000
536         format "0x%x"
537         export always
538         comment "Start CPU segment"
539 end
540 define MAX_REBOOT_CNT
541         default 2
542         export always
543         comment "Set maximum reboots"
544 end
545 define DISABLE_WATCHDOG
546         default {MAXIMUM_CONSOLE_LOGLEVEL >= 8}
547         export used
548         comment "Disable watchdog if we're doing lots of output"
549 end
550
551 ###############################################
552 # Misc device options
553 ###############################################
554
555 define CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
556         default none
557         export used
558         comment ""
559 end
560 define INTEL_PPRO_MTRR
561         default none
562         export always
563         comment ""
564 end
565 define AMD8111_DEV
566         default 0x3800
567         format "0x%x"
568         export used
569         comment ""
570 end
571 define CONFIG_UDELAY_TSC
572         default 0
573         export used
574         comment ""
575 end
576
577 ###############################################
578 # Board specifig options
579 ###############################################
580
581 ###############################################
582 # Options for motorola/sandpoint
583 ###############################################
584 define CONFIG_SANDPOINT_ALTIMUS
585         default 0
586         export never
587         comment "Configure Sandpoint with Altimus PMC"
588 end
589 define CONFIG_SANDPOINT_TALUS
590         default 0
591         export never
592         comment "Configure Sandpoint with Talus PMC"
593 end
594 define CONFIG_SANDPOINT_UNITY
595         default 0
596         export never
597         comment "Configure Sandpoint with Unity PMC"
598 end
599 define CONFIG_SANDPOINT_VALIS
600         default 0
601         export never
602         comment "Configure Sandpoint with Valis PMC"
603 end
604 define CONFIG_SANDPOINT_GYRUS
605         default 0
606         export never
607         comment "Configure Sandpoint with Gyrus PMC"
608 end