#
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/kconfig-language.txt.
#
# Note: ISA is disabled and will hopefully never be enabled.
# If you managed to buy an ISA x86-64 box you'll have to fix all the
# ISA drivers you need yourself. 
#

mainmenu "Linux Kernel Configuration"

config X86_64
	bool
	default y
	help
	  Port to the x86-64 architecture. x86-64 is a 64-bit extension to the
	  classical 32-bit x86 architecture. For details see
	  <http://www.x86-64.org/>.

config 64BIT
	def_bool y

config X86
	bool
	default y

config MMU
	bool
	default y

config ISA
	bool

config SBUS
	bool

config RWSEM_GENERIC_SPINLOCK
	bool
	default y

config RWSEM_XCHGADD_ALGORITHM
	bool

config X86_CMPXCHG
	bool
	default y

config EARLY_PRINTK
	bool
	default y
	help
	  Write kernel log output directly into the VGA buffer or to a serial
	  port.

	  This is useful for kernel debugging when your machine crashes very
	  early before the console code is initialized. For normal operation
	  it is not recommended because it looks ugly and doesn't cooperate
	  with klogd/syslogd or the X server. You should normally N here,
	  unless you want to debug such a crash.
	  
config HPET_TIMER
	bool
	default y
	help
	  Use the IA-PC HPET (High Precision Event Timer) to manage
	  time in preference to the PIT and RTC, if a HPET is
	  present.  The HPET provides a stable time base on SMP
	  systems, unlike the RTC, but it is more expensive to access,
	  as it is off-chip.  You can find the HPET spec at
	  <http://www.intel.com/labs/platcomp/hpet/hpetspec.htm>.

	  If unsure, say Y.

config X86_PM_TIMER
	bool
	default y if SMP
	help
	  Support the ACPI PM timer for time keeping. This is slow,
	  but is useful on some chipsets without HPET on systems with more
	  than one CPU. On a single processor or single socket multi core
	  system it is normally not required. 
	  When the PM timer is active 64bit vsyscalls are disabled
	  and should not be enabled (/proc/sys/kernel/vsyscall64 should
	  not be changed).
	  The kernel selects the PM timer only as a last resort, so it is
	  useful to enable just in case.

config HPET_EMULATE_RTC
	def_bool HPET_TIMER && RTC=y

config GENERIC_ISA_DMA
	bool
	default y

config GENERIC_IOMAP
	bool
	default y

source "init/Kconfig"


menu "Processor type and features"

choice
	prompt "Processor family"
	default MK8

config MK8
	bool "AMD-Opteron/Athlon64"
	help
	  Optimize for AMD Opteron/Athlon64/Hammer/K8 CPUs. 

config MPSC
       bool "Intel x86-64" 
       help
	  Optimize for Intel IA32 with 64bit extension CPUs
	  (Prescott/Nocona/Potomac)
       
config GENERIC_CPU
	bool "Generic-x86-64"
	help
	  Generic x86-64 CPU.

endchoice

#
# Define implied options from the CPU selection here
#
config X86_L1_CACHE_BYTES
	int
	default "128" if GENERIC_CPU || MPSC
	default "64" if MK8

config X86_L1_CACHE_SHIFT
	int
	default "7" if GENERIC_CPU || MPSC
	default "6" if MK8

config X86_TSC
	bool
	default y

config X86_GOOD_APIC
	bool
	default y

config MICROCODE
	tristate "/dev/cpu/microcode - Intel CPU microcode support"
	---help---
	  If you say Y here the 'File systems' section, you will be
	  able to update the microcode on Intel processors. You will 
	  obviously need the actual microcode binary data itself which is 
	  not shipped with the Linux kernel.

	  For latest news and information on obtaining all the required
	  ingredients for this driver, check:
	  <http://www.urbanmyth.org/microcode/>.

	  To compile this driver as a module, choose M here: the
	  module will be called microcode.
	  If you use modprobe or kmod you may also want to add the line
	  'alias char-major-10-184 microcode' to your /etc/modules.conf file.

config X86_MSR
	tristate "/dev/cpu/*/msr - Model-specific register support"
	help
	  This device gives privileged processes access to the x86
	  Model-Specific Registers (MSRs).  It is a character device with
	  major 202 and minors 0 to 31 for /dev/cpu/0/msr to /dev/cpu/31/msr.
	  MSR accesses are directed to a specific CPU on multi-processor
	  systems.

config X86_CPUID
	tristate "/dev/cpu/*/cpuid - CPU information support"
	help
	  This device gives processes access to the x86 CPUID instruction to
	  be executed on a specific processor.  It is a character device
	  with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
	  /dev/cpu/31/cpuid.

source "drivers/firmware/Kconfig"

# disable it for opteron optimized builds because it pulls in ACPI_BOOT
config X86_HT
	bool
	depends on SMP && !MK8
	default y
       
config MATH_EMULATION
	bool

config MCA
	bool

config EISA
	bool

config X86_IO_APIC
	bool
	default y

config X86_LOCAL_APIC
	bool
	default y

config MTRR
	bool "MTRR (Memory Type Range Register) support"
	---help---
	  On Intel P6 family processors (Pentium Pro, Pentium II and later)
	  the Memory Type Range Registers (MTRRs) may be used to control
	  processor access to memory ranges. This is most useful if you have
	  a video (VGA) card on a PCI or AGP bus. Enabling write-combining
	  allows bus write transfers to be combined into a larger transfer
	  before bursting over the PCI/AGP bus. This can increase performance
	  of image write operations 2.5 times or more. Saying Y here creates a
	  /proc/mtrr file which may be used to manipulate your processor's
	  MTRRs. Typically the X server should use this.

	  This code has a reasonably generic interface so that similar
	  control registers on other processors can be easily supported
	  as well.

	  Saying Y here also fixes a problem with buggy SMP BIOSes which only
	  set the MTRRs for the boot CPU and not for the secondary CPUs. This
	  can lead to all sorts of problems, so it's good to say Y here.

	  Just say Y here, all x86-64 machines support MTRRs.

	  See <file:Documentation/mtrr.txt> for more information.

config SMP
	bool "Symmetric multi-processing support"
	---help---
	  This enables support for systems with more than one CPU. If you have
	  a system with only one CPU, like most personal computers, say N. If
	  you have a system with more than one CPU, say Y.

	  If you say N here, the kernel will run on single and multiprocessor
	  machines, but will use only one CPU of a multiprocessor machine. If
	  you say Y here, the kernel will run on many, but not all,
	  singleprocessor machines. On a singleprocessor machine, the kernel
	  will run faster if you say N here.

	  If you don't know what to do here, say N.

config PREEMPT
	bool "Preemptible Kernel"
	---help---
	  This option reduces the latency of the kernel when reacting to
	  real-time or interactive events by allowing a low priority process to
	  be preempted even if it is in kernel mode executing a system call.
	  This allows applications to run more reliably even when the system is
	  under load. On contrary it may also break your drivers and add
	  priority inheritance problems to your system. Don't select it if 
	  you rely on a stable system or have slightly obscure hardware.
	  It's also not very well tested on x86-64 currently.
	  You have been warned.

	  Say Y here if you are feeling brave and building a kernel for a 
	  desktop, embedded or real-time system.  Say N if you are unsure. 

config SCHED_SMT
	bool "SMT (Hyperthreading) scheduler support"
	depends on SMP
	default off
	help
	  SMT scheduler support improves the CPU scheduler's decision making
	  when dealing with Intel Pentium 4 chips with HyperThreading at a
	  cost of slightly increased overhead in some places. If unsure say
	  N here.

# someone write a better help text please.
config K8_NUMA
       bool "K8 NUMA support"
       depends on SMP
       help
	  Enable NUMA (Non Unified Memory Architecture) support for
	  AMD Opteron Multiprocessor systems. The kernel will try to allocate
	  memory used by a CPU on the local memory controller of the CPU
	  and in the future do more optimizations. This may improve performance 
	  or it may not. Code is still experimental.
	  Say N if unsure.

config DISCONTIGMEM
       bool
       depends on K8_NUMA
       default y

config NUMA
       bool
       depends on K8_NUMA
       default y

config HAVE_DEC_LOCK
	bool
	depends on SMP
	default y

config NR_CPUS
	int "Maximum number of CPUs (2-255)"
	range 2 255
	depends on SMP
	default "64"
	help
	  This allows you to specify the maximum number of CPUs which this
	  kernel will support.  

	  This is purely to save memory - each supported CPU requires
	  memory in the static kernel configuration.

config GART_IOMMU
	bool "IOMMU support"
	help
	  Support the K8 IOMMU. Needed to run systems with more than 4GB of memory
	  properly with 32-bit PCI devices that do not support DAC (Double Address
	  Cycle). The IOMMU can be turned off at runtime with the iommu=off parameter.
	  Normally the kernel will take the right choice by itself.
	  If unsure say Y 

# need this always enabled with GART_IOMMU for the VIA workaround
config SWIOTLB
       bool
       depends on GART_IOMMU
       default y

config DUMMY_IOMMU
	bool
	depends on !GART_IOMMU && !SWIOTLB
	default y
	help
	  Don't use IOMMU code. This will cause problems when you have more than 4GB 
	  of memory and any 32-bit devices. Don't turn on unless you know what you
	  are doing.

config X86_MCE
	bool
	default y

endmenu


menu "Power management options"

source kernel/power/Kconfig

source "drivers/acpi/Kconfig"

source "arch/x86_64/kernel/cpufreq/Kconfig"

endmenu

menu "Bus options (PCI etc.)"

config PCI
	bool "PCI support"

# x86-64 doesn't support PCI BIOS access from long mode so always go direct. 
config PCI_DIRECT
	bool
	depends on PCI
	default y

config PCI_MMCONFIG 
	bool "Support mmconfig PCI config space access" 
	depends on PCI
	select ACPI_BOOT

# the drivers/pci/msi.c code needs to be fixed first before enabling
config PCI_USE_VECTOR
	bool "Vector-based interrupt indexing"
	depends on X86_LOCAL_APIC && NOTWORKING
	default n
	help
	   This replaces the current existing IRQ-based index interrupt scheme
	   with the vector-base index scheme. The advantages of vector base
	   over IRQ base are listed below:
	   1) Support MSI implementation.
	   2) Support future IOxAPIC hotplug

	   Note that this enables MSI, Message Signaled Interrupt, on all
	   MSI capable device functions detected if users also install the
	   MSI patch. Message Signal Interrupt enables an MSI-capable
	   hardware device to send an inbound Memory Write on its PCI bus
	   instead of asserting IRQ signal on device IRQ pin.

	   If you don't know what to do here, say N.

source "drivers/pci/Kconfig"

source "drivers/pcmcia/Kconfig"

source "drivers/pci/hotplug/Kconfig"

endmenu


menu "Executable file formats / Emulations"

source "fs/Kconfig.binfmt"

config IA32_EMULATION
	bool "IA32 Emulation"
	help
	  Include code to run 32-bit programs under a 64-bit kernel. You should likely
	  turn this on, unless you're 100% sure that you don't have any 32-bit programs
	  left.

config IA32_AOUT
       bool "IA32 a.out support"
       depends on IA32_EMULATION
       help
         Support old a.out binaries in the 32bit emulation.

config COMPAT
	bool
	depends on IA32_EMULATION
	default y

config SYSVIPC_COMPAT
	bool
	depends on COMPAT && SYSVIPC
	default y

config UID16
	bool
	depends on IA32_EMULATION
	default y

endmenu

source drivers/Kconfig

source fs/Kconfig

source "arch/x86_64/oprofile/Kconfig"

menu "Kernel hacking"

config CRASH_DUMP
       tristate "Crash dump support (EXPERIMENTAL)"
       depends on EXPERIMENTAL
       default n
       ---help---
         Say Y here to enable saving an image of system memory when a panic
         or other error occurs. Dumps can also be forced with the SysRq+d
         key if MAGIC_SYSRQ is enabled.

config KERNTYPES
	bool
	depends on CRASH_DUMP
	default y

config CRASH_DUMP_BLOCKDEV
       tristate "Crash dump block device driver"
       depends on CRASH_DUMP
       help
         Say Y to allow saving crash dumps directly to a disk device.

config CRASH_DUMP_NETDEV
       tristate "Crash dump network device driver"
       depends on CRASH_DUMP
       help
         Say Y to allow saving crash dumps over a network device.

config CRASH_DUMP_MEMDEV
       bool "Crash dump staged memory driver"
       depends on CRASH_DUMP
       help
         Say Y to allow intermediate saving crash dumps in spare
         memory pages which would then be written out to disk
         later.

config CRASH_DUMP_SOFTBOOT
       bool "Save crash dump across a soft reboot"
       depends on CRASH_DUMP_MEMDEV
       help
         Say Y to allow a crash dump to be preserved in memory
	 lkcd-kernpages across a soft reboot and written out to disk
         thereafter. For this to work, CRASH_DUMP must be
         configured as part of the kernel (not as a module).

config CRASH_DUMP_COMPRESS_RLE
       tristate "Crash dump RLE compression"
       depends on CRASH_DUMP
       help
         Say Y to allow saving dumps with Run Length Encoding compression.


config CRASH_DUMP_COMPRESS_GZIP
       tristate "Crash dump GZIP compression"
       select ZLIB_INFLATE
       select ZLIB_DEFLATE
       depends on CRASH_DUMP
       help
         Say Y to allow saving dumps with Gnu Zip compression.

config DEBUG_KERNEL
	bool "Kernel debugging"
	help
	  Say Y here if you are developing drivers or trying to debug and
	  identify kernel problems.

config DEBUG_SLAB
	bool "Debug memory allocations"
	depends on DEBUG_KERNEL
	help
	  Say Y here to have the kernel do limited verification on memory
	  allocation as well as poisoning memory on free to catch use of freed
	  memory.

config MAGIC_SYSRQ
	bool "Magic SysRq key"
	help
	  If you say Y here, you will have some control over the system even
	  if the system crashes for example during kernel debugging (e.g., you
	  will be able to flush the buffer cache to disk, reboot the system
	  immediately or dump some status information). This is accomplished
	  by pressing various keys while holding SysRq (Alt+PrintScreen). It
	  also works on a serial console (on PC hardware at least), if you
	  send a BREAK and then within 5 seconds a command keypress. The
	  keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
	  unless you really know what this hack does.

config DEBUG_SPINLOCK
	bool "Spinlock debugging"
	depends on DEBUG_KERNEL
	help
	  Say Y here and build SMP to catch missing spinlock initialization
	  and certain other kinds of spinlock errors commonly made.  This is
	  best used in conjunction with the NMI watchdog so that spinlock
	  deadlocks are also debuggable.

# !SMP for now because the context switch early causes GPF in segment reloading
# and the GS base checking does the wrong thing then, causing a hang.
config CHECKING
	bool "Additional run-time checks"
	depends on DEBUG_KERNEL && !SMP
	help
	  Enables some internal consistency checks for kernel debugging.
	  You should normally say N.

config INIT_DEBUG
	bool "Debug __init statements"
	depends on DEBUG_KERNEL
	help
	  Fill __init and __initdata at the end of boot. This helps debugging
	  illegal uses of __init and __initdata after initialization.	  

config DEBUG_INFO
	bool "Compile the kernel with debug info"
	depends on DEBUG_KERNEL
	help
          If you say Y here the resulting kernel image will include
	  debugging info resulting in a larger kernel image.
	  Say Y here only if you plan to use gdb to debug the kernel.
	  Please note that this option requires new binutils.
	  If you don't debug the kernel, you can say N.
	  
config FRAME_POINTER
       bool "Compile the kernel with frame pointers"
       help
	 Compile the kernel with frame pointers. This may help for some 
	 debugging with external debuggers. Note the standard oops backtracer 
	 doesn't make use of this  and the x86-64 kernel doesn't ensure an consistent
	 frame pointer through inline assembly (semaphores etc.)
	 Normally you should say N.

config KDB
	tristate "Built-in Kernel Debugger support"
	depends on DEBUG_KERNEL
	help
	  This option provides a built-in kernel debugger.  The built-in
	  kernel debugger contains commands which allow memory to be examined,
	  instructions to be disassembled and breakpoints to be set.  For details,
	  see Documentation/kdb/kdb.mm and the manual pages kdb_bt, kdb_ss, etc.
	  Kdb can also be used via the serial port.  Set up the system to
	  have a serial console (see Documentation/serial-console.txt).
	  The key sequence <escape>KDB on the serial port will cause the
	  kernel debugger to be entered with input from the serial port and
	  output to the serial console.  If unsure, say N.

	  There is now an option to use the Kernel Debugger as
	  a loadable module. This will allow booting up and only
	  adding the debugger into memory at a later time when
	  needed. This option is only available for x86_64
	  architecture at present. Also note that you should NOT
	  use the KDB_MODULES option concurrently with this. Also
	  note that once the kdb module is loaded it cannot be unloaded.

config KDB_MODULES
	tristate "KDB modules"
	depends on KDB
	help
	  KDB can be extended by adding your own modules, in directory
	  kdb/modules.  This option selects the way that these modules should
	  be compiled, as free standing modules (select M) or built into the
	  kernel (select Y).  If unsure say M.

config KDB_OFF
	bool "KDB off by default"
	depends on KDB
	help
	  Normally kdb is activated by default, as long as CONFIG_KDB is set.
	  If you want to ship a kernel with kdb support but only have kdb
	  turned on when the user requests it then select this option.  When
	  compiled with CONFIG_KDB_OFF, kdb ignores all events unless you boot
	  with kdb=on or you echo "1" > /proc/sys/kernel/kdb.  This option also
	  works in reverse, if kdb is normally activated, you can boot with
	  kdb=off or echo "0" > /proc/sys/kernel/kdb to deactivate kdb. If
	  unsure, say N.

	  Note that when you select a KDB Modular build this feature is
	  disabled, the rational being that you load the module when you
	  want the support.

config KDB_CONTINUE_CATASTROPHIC
	int "KDB continues after catastrophic errors"
	depends on KDB
	default "0"
	help
	  This integer controls the behaviour of kdb when the kernel gets a
	  catastrophic error, i.e. for a panic, oops, NMI or other watchdog
	  tripping.  CONFIG_KDB_CONTINUE_CATASTROPHIC interacts with
	  /proc/sys/kernel/kdb and CONFIG_DUMP (if your kernel has the LKCD
	  patch).
	  When KDB is active (/proc/sys/kernel/kdb == 1) and a catastrophic
	  error occurs, nothing extra happens until you type 'go'.
	  CONFIG_KDB_CONTINUE_CATASTROPHIC == 0 (default).  The first time
	  you type 'go', kdb warns you.  The second time you type 'go', KDB
	  tries to continue - no guarantees that the kernel is still usable.
	  CONFIG_KDB_CONTINUE_CATASTROPHIC == 1.  KDB tries to continue - no
	  guarantees that the kernel is still usable.
	  CONFIG_KDB_CONTINUE_CATASTROPHIC == 2.  If your kernel has the LKCD
	  patch and LKCD is configured to take a dump then KDB forces a dump.
	  Whether or not a dump is taken, KDB forces a reboot.
	  When KDB is not active (/proc/sys/kernel/kdb == 0) and a catastrophic
	  error occurs, the following steps are automatic, no human
	  intervention is required.
	  CONFIG_KDB_CONTINUE_CATASTROPHIC == 0 (default) or 1.  KDB attempts
	  to continue - no guarantees that the kernel is still usable.
	  CONFIG_KDB_CONTINUE_CATASTROPHIC == 2.  If your kernel has the LKCD
	  patch and LKCD is configured to take a dump then KDB automatically
	  forces a dump.  Whether or not a dump is taken, KDB forces a
	  reboot.
	  If you are not sure, say 0.  Read Documentation/kdb/dump.txt before
	  setting to 2.

config IOMMU_DEBUG
       depends on GART_IOMMU && DEBUG_KERNEL
       bool "Enable IOMMU debugging"
       help
         Force the IOMMU to on even when you have less than 4GB of
	 memory and add debugging code. On overflow always panic. And
	 allow to enable IOMMU leak tracing. Can be disabled at boot
	 time with iommu=noforce. This will also enable scatter gather
	 list merging.  Currently not recommended for production
	 code. When you use it make sure you have a big enough
	 IOMMU/AGP aperture.  Most of the options enabled by this can
	 be set more finegrained using the iommu= command line
	 options. See Documentation/x86_64/boot-options.txt for more
	 details.

config IOMMU_LEAK
       bool "IOMMU leak tracing"
       depends on DEBUG_KERNEL
       depends on IOMMU_DEBUG
       help
         Add a simple leak tracer to the IOMMU code. This is useful when you
	 are debugging a buggy device driver that leaks IOMMU mappings.
       
#config X86_REMOTE_DEBUG
#       bool "kgdb debugging stub"

endmenu

source "security/Kconfig"

source "crypto/Kconfig"

source "lib/Kconfig"

source "rpmify/Kconfig"

