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