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