updates for hdama and other things.
[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
328 define DEFAULT_CONSOLE_LOGLEVEL
329         default 7
330         export always
331         comment "Console will log at this level unless changed"
332 end
333
334 define MAXIMUM_CONSOLE_LOGLEVEL
335         default 7
336         export always
337         comment "Error messages up to this level can be printed"
338 end
339
340 define NO_POST
341         default none
342         export always
343         comment "Disable POST codes"
344 end
345 define TTYS0_BAUD
346         default 115200
347         export always
348         comment "Default baud rate for serial console"
349 end
350 define NO_KEYBOARD
351         default none
352         export never
353         comment "Set if we don't have a keyboard"
354 end
355
356 ###############################################
357 # Mainboard options
358 ###############################################
359
360 define MAINBOARD
361         default "Mainboard_not_set"
362         export always
363         comment "Mainboard name"
364 end
365 define MAINBOARD_PART_NUMBER
366         default "Part_number_not_set"
367         export always
368         comment "Part number of mainboard"
369 end
370 define MAINBOARD_VENDOR
371         default "Vendor_not_set"
372         export always
373         comment "Vendor of mainboard"
374 end
375 define FINAL_MAINBOARD_FIXUP
376         default 0
377         export used
378         comment "Do final mainboard fixups"
379 end
380
381
382 ###############################################
383 # SMP options
384 ###############################################
385
386 define CONFIG_SMP
387         default 0
388         export always
389         comment "Define if we support SMP"
390 end
391 define MAX_CPUS
392         default 1
393         export always
394         comment "CPU count for this machine"
395 end
396 define CONFIG_LOGICAL_CPUS
397         default 1
398         export always
399         comment "Logical CPU count for this machine"
400 end
401 define MAX_PHYSICAL_CPUS
402         default 1
403         export always
404         comment "Physical CPU count for this machine"
405 end
406 define HAVE_MP_TABLE
407         default none
408         export always
409         comment "Define to build an MP table"
410 end
411
412 ###############################################
413 # Boot options
414 ###############################################
415
416 define USE_ELF_BOOT
417         default none
418         export always
419         comment "Use ELF boot loader"
420 end
421 define CONFIG_IDE_STREAM
422         default 0
423         export always
424         comment "Boot from IDE device"
425 end
426 define CONFIG_ROM_STREAM
427         default 0
428         export always
429         comment "Boot image is located in ROM" 
430 end
431 define CONFIG_ROM_STREAM_START
432         default {0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1}
433         format "0x%x"
434         export always
435         comment "ROM stream start location"
436 end
437
438 ###############################################
439 # IRQ options
440 ###############################################
441
442 define HAVE_PIRQ_TABLE
443         default none
444         export always
445         comment "Define if we have a PIRQ table"
446 end
447 define IRQ_SLOT_COUNT
448         default none
449         export always
450         comment "Number of IRQ slots"
451 end
452 define CONFIG_PCIBIOS_IRQ
453         default none
454         export always
455         comment "PCIBIOS IRQ support"
456 end
457 define CONFIG_IOAPIC
458         default none
459         export always
460         comment "IOAPIC support"
461 end
462
463 ###############################################
464 # IDE specific options
465 ###############################################
466
467 define IDE_BOOT_DRIVE
468         default 0
469         export always
470         comment "Disk number of boot drive"
471 end
472 define IDE_SWAB
473         default none
474         export always
475         comment "Swap bytes when reading from IDE device"
476 end
477 define IDE_OFFSET
478         default 0
479         export always
480         comment "Sector at which to start searching for boot image"
481 end
482
483 ###############################################
484 # SMBUS options
485 ###############################################
486
487 define SMBUS_MEM_DEVICE_START
488         default (0xa << 3)
489         export always
490         comment "Start address of SMBUS device"
491 end
492 define SMBUS_MEM_DEVICE_END
493         default {SMBUS_MEM_DEVICE_START +1}
494         export always
495         comment "End address of SMBUS device"
496 end
497 define SMBUS_MEM_DEVICE_INC
498         default 1
499         export always
500         comment "Increment value SMBUS"
501 end
502
503 ###############################################
504 # SuperIO options
505 ###############################################
506
507 define SIO_BASE
508         default none
509         export used
510         comment "Superio base address"
511 end
512 define SIO_SYSTEM_CLK_INPUT
513         default none
514         export used
515         comment "Superio CLK input default"
516 end
517
518 ###############################################
519 # Misc options
520 ###############################################
521
522 define HAVE_HARD_RESET
523         default none
524         export used
525         comment "Have hard reset"
526 end
527 define MEMORY_HOLE
528         default none
529         export used
530         comment "Set to deal with memory hole"
531 end
532 define ENABLE_FIXED_AND_VARIABLE_MTRRS
533         default none
534         export used
535         comment "Enable fixed and variable mtrrs"
536 end
537 define START_CPU_SEG
538         default 0xf0000
539         format "0x%x"
540         export always
541         comment "Start CPU segment"
542 end
543 define MAX_REBOOT_CNT
544         default 2
545         export always
546         comment "Set maximum reboots"
547 end
548 define DISABLE_WATCHDOG
549         default {MAXIMUM_CONSOLE_LOGLEVEL >= 8}
550         export used
551         comment "Disable watchdog if we're doing lots of output"
552 end
553
554 ###############################################
555 # Misc device options
556 ###############################################
557
558 define CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
559         default none
560         export used
561         comment ""
562 end
563 define INTEL_PPRO_MTRR
564         default none
565         export always
566         comment ""
567 end
568 define AMD8111_DEV
569         default 0x3800
570         format "0x%x"
571         export used
572         comment ""
573 end
574 define CONFIG_UDELAY_TSC
575         default 0
576         export used
577         comment ""
578 end
579
580 ###############################################
581 # Board specifig options
582 ###############################################
583
584 ###############################################
585 # Options for motorola/sandpoint
586 ###############################################
587 define CONFIG_SANDPOINT_ALTIMUS
588         default 0
589         export never
590         comment "Configure Sandpoint with Altimus PMC"
591 end
592 define CONFIG_SANDPOINT_TALUS
593         default 0
594         export never
595         comment "Configure Sandpoint with Talus PMC"
596 end
597 define CONFIG_SANDPOINT_UNITY
598         default 0
599         export never
600         comment "Configure Sandpoint with Unity PMC"
601 end
602 define CONFIG_SANDPOINT_VALIS
603         default 0
604         export never
605         comment "Configure Sandpoint with Valis PMC"
606 end
607 define CONFIG_SANDPOINT_GYRUS
608         default 0
609         export never
610         comment "Configure Sandpoint with Gyrus PMC"
611 end