]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/Kconfig
Some minor fixes.
[l4.git] / kernel / fiasco / src / Kconfig
1
2
3 mainmenu "Fiasco configuration"
4
5 config KERNELVERSION
6         string
7         option env="KERNELVERSION"
8
9 config INCLUDE_PPC32
10         bool
11         option env="INCLUDE_PPC32"
12         help
13           Use "INCLUDE_PPC32=y make config" to include ppc32 options.
14
15 config INCLUDE_SPARC
16         bool
17         option env="INCLUDE_SPARC"
18         help
19           Use "INCLUDE_SPARC=y make config" to include sparc options.
20
21 # generic options that might be selected by platforms etc.
22 config HAS_FPU_OPTION
23         bool
24
25 config HAS_VIRT_OBJ_SPACE_OPTION
26         bool
27
28 config HAS_SERIAL_OPTION
29         bool
30
31 config HAS_WATCHDOG_OPTION
32         bool
33
34 config HAS_JDB_DISASM_OPTION
35         bool
36
37 config HAS_JDB_GZIP_OPTION
38         bool
39
40 config HAS_IOMMU_OPTION
41         bool
42
43 config HAS_MP_OPTION
44         bool
45
46 config HAS_CPU_VIRT
47         bool
48
49 menu "Target configuration"
50
51 choice
52         prompt "Architecture"
53         default IA32
54
55 config IA32
56         bool "Intel IA-32 processor family"
57         select BIT32
58         select HAS_VIRT_OBJ_SPACE_OPTION
59         select HAS_JDB_DISASM_OPTION
60         select HAS_JDB_GZIP_OPTION
61
62 config AMD64
63         bool "AMD64 processor family"
64         select CONTEXT_8K
65         select HAS_VIRT_OBJ_SPACE_OPTION
66         select HAS_JDB_DISASM_OPTION
67         select HAS_JDB_GZIP_OPTION
68         select BIT64
69
70 #  ARCH_CHOICE
71 endchoice
72
73 config BIG_ENDIAN
74         bool
75
76 choice
77         prompt "Platform"
78         default PF_PC         if IA32
79         default PF_PC         if AMD64
80 # ARCH_DEFAULT_PF
81
82 config PF_PC
83         bool "PC platform"
84         depends on IA32 || AMD64
85         select HAS_SERIAL_OPTION
86         select HAS_WATCHDOG_OPTION
87         select HAS_IOMMU_OPTION
88         select HAS_MP_OPTION
89         select HAS_CPU_VIRT
90
91 config PF_UX
92         bool "Linux Usermode Platform"
93         depends on IA32
94         select JDB
95
96 # PF_CHOICE
97
98 endchoice
99
100 # PF_INCLUDE
101
102 config ABI_VF
103         def_bool y
104
105 choice
106         prompt "CPU"
107         depends on IA32 || AMD64 || UX
108         default IA32_686   if IA32
109         default AMD64_K8   if AMD64
110
111 config IA32_486
112         bool "Intel 80486"
113         depends on IA32
114         help
115           Choose this if you have an Intel 80486 or equivalent CPU (i486).
116
117 config IA32_586
118         bool "Intel Pentium / AMD K5"
119         depends on IA32
120         help
121           Choose this if you have an Intel Pentium or compatible i586 CPU.
122
123 config IA32_686
124         bool "Intel Pentium Pro"
125         depends on IA32
126         help
127           Choose this if you have an Intel Pentium Pro or compatible i686 CPU.
128
129 config IA32_P2
130         bool "Intel Pentium II / Celeron II"
131         depends on IA32
132         help
133           Choose this if you have an Intel Pentium II or Pentium II based Celeron.
134
135 config IA32_P3
136         bool "Intel Pentium III / Celeron III"
137         depends on IA32
138         help
139           Choose this if you have an Intel Pentium III or Pentium III based Celeron.
140
141 config IA32_P4
142         bool "Intel Pentium 4 / Celeron 4"
143         depends on IA32
144         help
145           Choose this if you have an Intel Pentium 4 or Pentium 4 based Celeron.
146
147 config IA32_PM
148         bool "Intel Pentium M"
149         depends on IA32
150         help
151           Choose this if you have an Intel Pentium M.
152
153 config IA32_CORE2
154         bool "Intel Core 2"
155         depends on IA32
156         help
157           Choose this if you have an Intel Core 2.
158
159 config IA32_CORE_I
160         bool "Intel Core-i"
161         depends on IA32
162         help
163           Choose this if you want to optimize for Core-i class CPUs.
164
165 config IA32_ATOM
166         bool "Intel Atom"
167         depends on IA32
168         help
169           Choose this if you have an Intel Atom.
170
171 config IA32_K6
172         bool "AMD K6 / K6-II / K6-III"
173         depends on IA32
174         help
175           Choose this if you have an AMD K6 CPU.
176
177 config IA32_K7
178         bool "AMD Athlon / Duron"
179         depends on IA32
180         help
181           Choose this if you have an AMD Athlon or Duron CPU.
182
183 config IA32_K8
184         bool "AMD Opteron / Athlon64"
185         depends on IA32
186         help
187           Choose this if you have an AMD Opteron or Athlon64 CPU.
188
189 config IA32_K10
190         bool "AMD Barcelona (K10)"
191         depends on IA32
192         help
193           Choose this if you have an AMD Barcelona based CPU.
194
195
196 config AMD64_K8
197         bool "AMD Opteron / Athlon64"
198         depends on AMD64
199         help
200           Choose this if you have an AMD Opteron or Athlon64 CPU.
201
202 config AMD64_CORE2
203         bool "Intel Core 2"
204         depends on AMD64
205         help
206           Choose this if you have an Intel Core 2.
207
208 config AMD64_CORE_I
209         bool "Intel Core-i"
210         depends on AMD64
211         help
212           Choose this if you want to optimize for Core-i class CPUs.
213
214 config AMD64_ATOM
215         bool "Intel Atom"
216         depends on AMD64
217         help
218           Choose this if you have an Intel Atom.
219
220 config AMD64_K10
221         bool "AMD Barcelona (K10)"
222         depends on AMD64
223         help
224           Choose this if you have an AMD Barcelona based CPU.
225
226 endchoice
227
228 config CPU_VIRT
229         bool "Virtualization"
230         depends on HAS_CPU_VIRT
231         help
232           Support virtualization extensions provided by CPUs, including
233           nested paging. This feature allows you to run a virtual machine
234           monitor (VMM) on top of Fiasco.
235
236 choice
237         prompt "Timer tick source"
238         depends on PF_PC || PF_UX
239         default SCHED_APIC
240
241 config SCHED_PIT
242         bool "Use PIT for scheduling"
243         depends on (PF_PC || PF_UX) && !MP
244         help
245           Normally, Fiasco uses the RTC at IRQ8 for scheduling. This can be
246           disadvantageous in certain circumstances, e.g. VMWare doesn't seem
247           to emulate the RTC good enough so that not enough timer interrupts
248           are produced. The PIT mode (using IRQ0) seems to work better in
249           this case.  It is generally safe to use this option, so if you are
250           unsure, say 'Y'.
251
252           Consider that the interrupt priorities change: Using RTC, IRQ8 has
253           the highest priority. Using PIT, IRQ0 has the highest priority.
254           The only case where PIT scheduling does not work is with
255           profiling. If profiling is enabled the PIT is used for generating
256           the profiling interrupts.
257
258 config SCHED_RTC
259         bool "Use RTC for scheduling"
260         depends on PF_PC && !MP
261         help
262           'Yes' is the standard for this option. If this option is set
263           Fiasco uses the RTC on IRQ 8 for scheduling.  This can be
264           disadvantageous in certain circumstances, e.g. VMWare doesn't seem
265           to emulate the RTC good enough so that not enough timer interrupts
266           are produced.  The PIT (8254) mode (say 'no' here), seems to work
267           better in this case. It is generally safe to use the PIT, so if
268           you are unsure, say 'no'.
269           Consider that the interrupt priorities change: Using RTC, IRQ8 has
270           the highest priority. Using PIT, IRQ0 has the highest priority.
271           The only case where PIT scheduling does not work is with
272           profiling. If profiling is enabled the PIT is used for generating
273           the profiling interrupts and the RTC must be used for scheduling.
274           In the case where profiling shall be used within VMWare the
275           SLOW_RTC option must be set, so that the timer resolution of
276           Fiasco is reduced to 100Hz.
277
278 config SCHED_APIC
279         bool "Use APIC timer for scheduling"
280         depends on PF_PC
281         help
282           Use the Local APIC for scheduling.
283
284 config SCHED_HPET
285         bool "Use HPET timer for scheduling (EXPERIMENTAL)"
286         depends on PF_PC && !MP && EXPERIMENTAL
287         help
288           Use the HPET timer for scheduling.
289
290 endchoice
291
292 config WORKAROUND_AMD_FPU_LEAK
293         bool "Enables workaroud for AMD FPU security leak"
294         depends on PF_PC
295         help
296           If you use Fiasco for high assurance, high security and use AMD
297           CPUs you should enable this option. In any other case it is no
298           harm to disable it.
299
300 config REGPARM3
301         bool "Compile with regparm=3"
302         default y
303         depends on IA32 && PF_PC
304         help
305           Compile Fiasco with -mregparm=3. This uses a different ABI and
306           passes the first three arguments of a function call in registers.
307
308 config FPU
309         bool "Enable FPU co-processor" if HAS_FPU_OPTION
310         depends on HAS_FPU_OPTION
311         default y
312         help
313           Enable this if your platform has hardware floating point support.
314
315 endmenu # target
316
317 menu "Kernel options"
318
319 config MP
320         bool "Enable multi processor support"
321         depends on HAS_MP_OPTION
322         help
323           Enable support for machines with multiple processors.
324
325 config MP_MAX_CPUS
326         int "Maximal supported number of CPUs"
327         depends on MP
328         range 1 128
329         default 4
330         help
331           The maximum number of CPUs the kernel supports.
332
333 #config ASSEMBLER_IPC_SHORTCUT
334 #       bool "Assembler IPC shortcut"
335 #       default y
336 #       depends on (PF_PC || PF_UX) && !MP
337 #       help
338 #         Use the assembler IPC shortcut to get even better short IPC
339 #         performance in the common case.
340
341 config CONTEXT_8K
342         bool #"TCB size of 8k"
343         default n
344         help
345           Use this option to use 8K kernel stacks. Only disable this option
346           when you know what you're doing.
347
348 config CONTEXT_4K
349         bool #"TCB size of 4k"
350         default y if !CONTEXT_8K
351         help
352           Use this option to use 4K kernel stacks. Only disable this option
353           when you know what you're doing.
354
355 config SLOW_RTC
356         bool "Use RTC with 100 ticks per second"
357         depends on SCHED_RTC
358         help
359           This option should be enabled if you use VMWare and no PIT
360           scheduling. The timer resolution is lowered to 100 ticks per
361           second.
362
363 config ONE_SHOT
364         bool "Use scheduling timer in one-shot mode"
365         depends on SCHED_APIC && SYNC_TSC
366         help
367           More costly than periodic but more fine-granular scheduling
368           possible.  EXPERIMENTAL!
369
370 config SYNC_TSC
371         bool "Use time-stamp counter for KIP and scheduling accounting"
372         depends on PF_PC && (IA32 || AMD64)
373         help
374           Synchronize the internal kernel clock with the CPU time stamp
375           counter.
376
377 config FINE_GRAINED_CPUTIME
378         bool "Fine-grained CPU time"
379         help
380           Measure CPU time consumed by a thread from switching to the thread
381           until switching to another thread. Induces an overhead during each
382           thread switch, so only activate it for debugging.
383
384 config UX_CON
385         bool "Graphical console (requires SDL library!)"
386         depends on PF_UX
387         help
388           Fiasco-UX can supply a graphical console for the L4 program it is
389           running.  Enabling this option will build the additional program
390           but needs the SDL library including development header files
391           installed.
392
393 config UX_NET
394         bool "Network support"
395         depends on PF_UX
396         help
397           Enabling this option makes Fiasco-UX provide network support for
398           L4 programs.
399
400 choice 
401         prompt "Scheduler"
402         default FIXED_PRIO
403
404 config SCHED_FIXED_PRIO
405         bool "Fixed priority scheduler"
406         help
407           Choose this for the standard fixed priority scheduler with
408           256 priority levels.
409
410 config SCHED_WFQ
411         bool "Weighted fair queueing scheduler"
412         depends on EXPERIMENTAL
413         help
414           Choose this scheduler for a weighted fair queueing scheduler
415           running with dynamic priorities.
416
417 config SCHED_FP_WFQ
418         bool "Combined fixed priority RT and WFQ scheduler"
419         depends on EXPERIMENTAL
420         help
421           Combination of Fixed priority and weighted fair queueing
422           scheduler.
423
424 endchoice
425
426 config IOMMU
427         bool "Enable support for DMA remapping" if HAS_IOMMU_OPTION
428         depends on HAS_IOMMU_OPTION
429         help
430           This option enables support for DMA remapping (IO-MMUs).
431           When this option is enabled and the platform has a supported IO-MMU
432           the default is to block all DMA from remappable devices.
433           The user-level must use kernel DMA spaces in combination with
434           the IO-MMU kernel object to allow DMA.
435
436 config DISABLE_VIRT_OBJ_SPACE
437         bool "No virtually mapped array for cap tables" if HAS_VIRT_OBJ_SPACE_OPTION
438         depends on HAS_VIRT_OBJ_SPACE_OPTION &&  EXPERIMENTAL
439
440 config VIRT_OBJ_SPACE
441         def_bool y
442         depends on HAS_VIRT_OBJ_SPACE_OPTION
443         depends on !DISABLE_VIRT_OBJ_SPACE
444
445 endmenu # kernel options
446
447 menu "Debugging"
448
449 config INLINE
450         bool "Generate inline code"
451         default y
452         help
453           Inlining specifies that it is desirable for the compiler to
454           integrate functions declared 'inline' into the calling routine.
455           This usually leads to faster code, so unless you want to debug the
456           kernel you should say 'Y' here.
457
458 config NDEBUG
459         bool "Do not compile assertions"
460         help
461           Don't insert assertions into the code. Should be enabled for
462           kernels which are used for measurements.
463
464 config NO_FRAME_PTR
465         bool "Compile without frame pointer"
466         default y
467         help
468           Enabling this option optimizes for speed but makes debugging more
469           difficult.
470
471 config STACK_DEPTH
472         bool "Measure stack depth of threads"
473         help
474           When this option is enabled, each thread control block is marked
475           with magic numbers while creation. The function ``show thread
476           lists'' scans the TCB for these magic numbers and shows the
477           currently used depth of each thread.
478
479 config LIST_ALLOC_SANITY
480         bool "Sanity checks in low level allocator"
481         help
482           When this option is enabled the low level memory allocator does
483           extra sanity checks on its data structures before and after every
484           operation. This can halp detect  flaws like double frees or memory
485           corruption by other means.
486
487           These tests are very expensive so only enable them if a problem
488           with memory allocation is expected.
489
490 config BEFORE_IRET_SANITY
491         bool "Sanity checks at syscall entry/exit"
492         depends on PF_PC
493         help
494           Perform the following additional sanity checks before returning to
495           usermode:
496             - Does the thread hold any locks?
497             - Is the thread locked by any other thread?
498             - Does the thread have the right state:
499               * Thread_ready must be set.
500               * Thread_cancel and Thread_fpu_owner might be set.
501               * Any other state bit must not be set.
502           Don't use Fiasco compiled with this option for performance analysis!
503
504 config GSTABS
505         bool "Compile with gstabs+ debugging information"
506         depends on n
507         help
508           Enabling this option includes the debugging information using the
509           older gstabs+ format into the kernel image. This is necessary to
510           access line number information of the kernel from JDB.
511
512 config IRQ_SPINNER
513         bool "Display IRQ activity on VGA screen"
514         depends on PF_PC
515         help
516           Display IRQ activity on VGA screen.
517
518 config WATCHDOG
519         bool "Enable Watchdog support" if HAS_WATCHDOG_OPTION
520         default y if HAS_WATCHDOG_OPTION
521         depends on HAS_WATCHDOG_OPTION
522         help
523           Enable support for watchdog using the builtin Local APIC and a
524           performance counter. The watchdog can be enabled using the
525           -watchdog command line option.
526
527 config SERIAL
528         bool "Support for debugging over serial line" if HAS_SERIAL_OPTION
529         depends on HAS_SERIAL_OPTION
530         default y if HAS_SERIAL_OPTION
531         help
532           This option enables support for input/output over serial interface.
533
534 menuconfig JDB
535         bool "JDB kernel debugger"
536         default y
537         help
538           The powerful Fiasco kernel debugger.
539
540 if JDB
541
542 config JDB_LOGGING
543         bool "JDB extended logging"
544         default y if !PF_UX
545         help
546           There are two classes of logging events: Basic events don't
547           consume any time if they are disabled (ipc, ipc result,
548           pagefaults, unmap). Extended logging events add an additional
549           overhead of most probably less than 10 cycles if they are
550           disabled. These events can be activated/deactivated by the 'O'
551           command in jdb.
552
553           Should be disabled for kernels which are used for measurements.
554
555 config JDB_DISASM
556         bool "JDB disassembler" if HAS_JDB_DISASM_OPTION
557         default y if HAS_JDB_DISASM_OPTION
558         help
559           Add support for disassembly. Increases memory foot-print, only
560           enable when needed.
561
562 config JDB_GZIP
563         bool "GZIP compressed dumps" if HAS_JDB_GZIP_OPTION
564         default y if HAS_JDB_GZIP_OPTION
565         help
566           Add supprt for gzip compressed dumps of the trace buffer.
567           Increases memory foot-print, only enabled when needed.
568
569 config JDB_ACCOUNTING
570         bool "JDB accounting"
571         help
572           Enable accounting information about IPCs, context switches, page
573           faults, and other events. The counters are accessible from
574           userland through the tbuf status page.
575
576           Should be disabled for kernels which are used for measurements.
577
578 config JDB_MISC
579         bool "Miscellaneous JDB modules"
580         depends on PF_UX || PF_PC
581
582 endif # JDB
583
584
585 config POWERSAVE_GETCHAR
586         bool "Save power in getchar()"
587         default y
588         depends on PF_PC
589         help
590           This option uses a processor HALT in getchar() to save power and
591           prevent some P4 processors from being overheated. This option
592           requires a working timer IRQ to wakeup getchar periodically.
593
594 choice
595         prompt "Warn levels"
596         default WARN_WARNING
597
598 config WARN_NONE
599         bool "Do not show show any kernel warning"
600
601 config WARN_WARNING
602         bool "Show messages of warning level"
603
604 config WARN_ANY
605         bool "Show all kernel warnings"
606
607 endchoice # warn levels
608
609 endmenu # debugging
610
611 menu "Compiling"
612
613 config CC
614         string "C compiler"
615         default "gcc"
616         help
617           Use this option to override the default C compiler (gcc).
618
619 config CXX
620         string "C++ compiler"
621         default "g++"
622         help
623           Use this option to override the default C++ compiler (g++).
624
625 config HOST_CC
626         string "C host compiler"
627         default "gcc"
628         help
629           Use this option to override the default C host compiler (gcc).
630
631 config HOST_CXX
632         string "C++ host compiler"
633         default "g++"
634         help
635           Use this option to override the default C++ host compiler (g++).
636
637 config MAINTAINER_MODE
638         bool "Do additional checks at build time"
639         help
640           This enables the circular dependency and initcall checks.
641           Say 'Yes' here if you do kernel hacking.
642
643 config LABEL
644         string "Configuration label"
645         help
646           Text string with a name for this configuration. To be displayed in
647           the kernel boot-up.
648
649 endmenu
650
651 config EXPERIMENTAL
652         bool "Prompt for experimental features"
653         help
654           Experimental features are available when enabling this option.
655           Enabling these features might be less than fully secure and may
656           disrupt the stability of your kernel.
657
658           Use with caution!
659
660 config PERF_CNT
661         def_bool y if JDB && (IA32 || AMD64 || ARM)
662
663 config BIT32
664         bool
665
666 config BIT64
667         bool
668
669 config WARN_LEVEL
670         int
671         default 2 if WARN_ANY
672         default 1 if WARN_WARNING
673         default 0 if WARN_NONE
674
675 config XARCH
676         string
677         default "ux" if PF_UX
678         default "amd64" if AMD64 && PF_PC
679         default "ia32" if IA32 && PF_PC
680 # ARCH_NAME
681
682 config IA32_TARGET
683         string
684         default "Intel 80486" if IA32_486
685         default "Intel Pentium" if IA32_586
686         default "Intel Pentium Pro" if IA32_686
687         default "Intel Pentium II" if IA32_P2
688         default "Intel Pentium III" if IA32_P3
689         default "Intel Pentium 4" if IA32_P4
690         default "Pentium M" if IA32_PM
691         default "AMD K6" if IA32_K6
692         default "AMD Athlon" if IA32_K7
693         default "Intel Core2" if IA32_CORE2 || AMD64_CORE2
694         default "Intel Core-i" if IA32_CORE_I || AMD64_CORE_I
695         default "Intel Atom" if IA32_ATOM || AMD64_ATOM
696         default "AMD Opteron" if IA32_K8 || AMD64_K8 || AMD64_K10 || IA32_K10
697
698 config ABI
699         string
700         default "vf"