- Updates to config.g so that it works more reliably and has initial support
[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.1"
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         default 0
182         export always
183         comment "Set if fallback booting required"
184 end
185 define USE_FALLBACK_IMAGE
186         default 1
187         export used
188         comment "Set to build a fallback image"
189 end
190 define FALLBACK_SIZE
191         default 65536
192         format "0x%x"
193         export used
194         comment "Default fallback image size"
195 end
196 define ROM_SIZE
197         default 262144
198         format "0x%x"
199         export used
200         comment "Size of your ROM"
201 end
202 define ROM_IMAGE_SIZE
203         default 65535
204         format "0x%x"
205         export always
206         comment "Default image size"
207 end
208 define ROM_SECTION_SIZE
209         default {FALLBACK_SIZE}
210         format "0x%x"
211         export used
212         comment "Default rom section size"
213 end
214 define ROM_SECTION_OFFSET
215         default {ROM_SIZE - FALLBACK_SIZE}
216         format "0x%x"
217         export used
218         comment "Default rom section offset"
219 end
220 define PAYLOAD_SIZE
221         default {ROM_SECTION_SIZE - ROM_IMAGE_SIZE}
222         format "0x%x"
223         export always
224         comment "Default payload size"
225 end
226 define _ROMBASE
227         default {PAYLOAD_SIZE}
228         format "0x%x"
229         export always
230         comment "Base address of LinuxBIOS in ROM"
231 end
232 define _RESET
233         default {_ROMBASE}
234         format "0x%x"
235         export always
236         comment "Hardware reset vector address"
237 end
238 define STACK_SIZE
239         default 0x2000
240         format "0x%x"
241         export always
242         comment "Default stack size"
243 end
244 define HEAP_SIZE
245         default 0x2000
246         format "0x%x"
247         export used
248         comment "Default heap size"
249 end
250 define _RAMBASE
251         default none
252         format "0x%x"
253         export always
254         comment "Base address of LinuxBIOS in RAM"
255 end
256 define USE_CACHE_RAM
257         default 0
258         export used
259         comment "Use cache as temporary RAM if possible"
260 end
261 define CACHE_RAM_BASE
262         default 0x00200000
263         format "0x%x"
264         export always
265         comment "Base address of cache when using it for temporary RAM"
266 end
267 define CACHE_RAM_SIZE
268         default 0x00004000
269         format "0x%x"
270         export always
271         comment "Size of cache when using it for temporary RAM"
272 end
273 define XIP_ROM_BASE
274         default 0
275         format "0x%x"
276         export used
277         comment "Start address of area to cache during LinuxBIOS execution directly from ROM"
278 end
279 define XIP_ROM_SIZE
280         default 0
281         format "0x%x"
282         export used
283         comment "Size of area to cache during LinuxBIOS execution directly from ROM"
284 end
285 define CONFIG_COMPRESS
286         default 1
287         export always
288         comment "Set for compressed image"
289 end
290 define CONFIG_UNCOMPRESSED
291         format "%d"
292         default {!CONFIG_COMPRESS}
293         export always
294         comment "Set for uncompressed image"
295 end
296 define HAVE_OPTION_TABLE
297         default 0
298         export always
299         comment "Export CMOS option table"
300 end
301 define USE_OPTION_TABLE
302         format "%d"
303         default {HAVE_OPTION_TABLE && !USE_FALLBACK_IMAGE}
304         export always
305         comment "Use option table"
306 end
307
308 ###############################################
309 # Build targets
310 ###############################################
311
312 define CRT0
313         default "$(TOP)/src/arch/$(ARCH)/config/crt0.base"
314         export always
315         comment "Main initialization target"
316 end
317
318 ###############################################
319 # Debugging/Logging options
320 ###############################################
321
322 define DEBUG
323         default 1
324         export always
325         comment "Enable debugging code"
326 end
327 define CONFIG_CONSOLE_VGA
328         default 0
329         export always
330         comment "Log messages to VGA"
331 end
332 define CONFIG_CONSOLE_LOGBUF
333         default 0
334         export always
335         comment "Log messages to buffer"
336 end
337 define CONFIG_CONSOLE_SROM
338         default 0
339         export always
340         comment "Log messages to SROM console"
341 end
342 define CONFIG_CONSOLE_SERIAL8250
343         default 0
344         export always
345         comment "Log messages to 8250 uart based serial console"
346 end
347 define DEFAULT_CONSOLE_LOGLEVEL
348         default 7
349         export always
350         comment "Console will log at this level unless changed"
351 end
352
353 define MAXIMUM_CONSOLE_LOGLEVEL
354         default 8
355         export always
356         comment "Error messages up to this level can be printed"
357 end
358
359 define NO_POST
360         default none
361         export always
362         comment "Disable POST codes"
363 end
364
365 define TTYS0_BASE
366         default 0x3f8
367         export always
368         comment "Base address for 8250 uart for the serial console"
369 end
370
371 define TTYS0_BAUD
372         default 115200
373         export always
374         comment "Default baud rate for serial console"
375 end
376
377 define TTYS0_LCS
378         default 0x3
379         export always
380         comment "Default flow control settings for the 8250 serial console uart"
381 end
382         
383 ###############################################
384 # Mainboard options
385 ###############################################
386
387 define MAINBOARD
388         default "Mainboard_not_set"
389         export always
390         comment "Mainboard name"
391 end
392 define MAINBOARD_PART_NUMBER
393         default "Part_number_not_set"
394         export always
395         comment "Part number of mainboard"
396 end
397 define MAINBOARD_VENDOR
398         default "Vendor_not_set"
399         export always
400         comment "Vendor of mainboard"
401 end
402 define CONFIG_SYS_CLK_FREQ
403         default none
404         export used
405         comment "System clock frequency in MHz"
406 end
407
408 ###############################################
409 # SMP options
410 ###############################################
411
412 define CONFIG_SMP
413         default 0
414         export always
415         comment "Define if we support SMP"
416 end
417 define CONFIG_MAX_CPUS
418         default 1
419         export always
420         comment "Maximum CPU count for this machine"
421 end
422 define CONFIG_MAX_PHYSICAL_CPUS
423         default {CONFIG_MAX_CPUS}
424         export always
425         comment "Physical CPU count for this machine"
426 end
427 define CONFIG_LOGICAL_CPUS
428         default 0
429         export always
430         comment "Should multiple cpus per die be enabled?"
431 end
432 define HAVE_MP_TABLE
433         default none
434         export always
435         comment "Define to build an MP table"
436 end
437
438 ###############################################
439 # Boot options
440 ###############################################
441
442 define CONFIG_IDE_STREAM
443         default 0
444         export always
445         comment "Boot from IDE device"
446 end
447 define CONFIG_ROM_STREAM
448         default 0
449         export always
450         comment "Boot image is located in ROM" 
451 end
452 define CONFIG_ROM_STREAM_START
453         default {0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1}
454         format "0x%x"
455         export always
456         comment "ROM stream start location"
457 end
458
459 ###############################################
460 # IRQ options
461 ###############################################
462
463 define HAVE_PIRQ_TABLE
464         default none
465         export always
466         comment "Define if we have a PIRQ table"
467 end
468 define IRQ_SLOT_COUNT
469         default none
470         export always
471         comment "Number of IRQ slots"
472 end
473 define CONFIG_PCIBIOS_IRQ
474         default none
475         export always
476         comment "PCIBIOS IRQ support"
477 end
478 define CONFIG_IOAPIC
479         default none
480         export always
481         comment "IOAPIC support"
482 end
483
484 ###############################################
485 # IDE specific options
486 ###############################################
487
488 define IDE_BOOT_DRIVE
489         default 0
490         export always
491         comment "Disk number of boot drive"
492 end
493 define IDE_SWAB
494         default none
495         export always
496         comment "Swap bytes when reading from IDE device"
497 end
498 define IDE_OFFSET
499         default 0
500         export always
501         comment "Sector at which to start searching for boot image"
502 end
503
504 ###############################################
505 # SMBUS options
506 ###############################################
507
508 define SMBUS_MEM_DEVICE_START
509         default (0xa << 3)
510         export always
511         comment "Start address of SMBUS device"
512 end
513 define SMBUS_MEM_DEVICE_END
514         default {SMBUS_MEM_DEVICE_START +1}
515         export always
516         comment "End address of SMBUS device"
517 end
518 define SMBUS_MEM_DEVICE_INC
519         default 1
520         export always
521         comment "Increment value SMBUS"
522 end
523
524 ###############################################
525 # Misc options
526 ###############################################
527
528 define HAVE_HARD_RESET
529         default none
530         export used
531         comment "Have hard reset"
532 end
533 define MEMORY_HOLE
534         default none
535         export used
536         comment "Set to deal with memory hole"
537 end
538 define MAX_REBOOT_CNT
539         default 3
540         export always
541         comment "Set maximum reboots"
542 end
543
544 ###############################################
545 # Misc device options
546 ###############################################
547
548 define CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
549         default 0
550         export used
551         comment "Use timer2 to callibrate the x86 time stamp counter"
552 end
553 define INTEL_PPRO_MTRR
554         default none
555         export always
556         comment ""
557 end
558 define CONFIG_UDELAY_TSC
559         default 0
560         export used
561         comment "Implement udelay with the x86 time stamp counter"
562 end
563
564 ###############################################
565 # Board specifig options
566 ###############################################
567
568 ###############################################
569 # Options for motorola/sandpoint
570 ###############################################
571 define CONFIG_SANDPOINT_ALTIMUS
572         default 0
573         export never
574         comment "Configure Sandpoint with Altimus PMC"
575 end
576 define CONFIG_SANDPOINT_TALUS
577         default 0
578         export never
579         comment "Configure Sandpoint with Talus PMC"
580 end
581 define CONFIG_SANDPOINT_UNITY
582         default 0
583         export never
584         comment "Configure Sandpoint with Unity PMC"
585 end
586 define CONFIG_SANDPOINT_VALIS
587         default 0
588         export never
589         comment "Configure Sandpoint with Valis PMC"
590 end
591 define CONFIG_SANDPOINT_GYRUS
592         default 0
593         export never
594         comment "Configure Sandpoint with Gyrus PMC"
595 end