MIPS: Pistachio: Enable KASLR
[linux-2.6-block.git] / arch / mips / Kconfig
index a65eacf59918e649382d2f4b35e246948820385c..7ce55623b5227f949d047fb1c2f4624c4f0737a0 100644 (file)
@@ -62,6 +62,7 @@ config MIPS
        select HAVE_IRQ_TIME_ACCOUNTING
        select GENERIC_TIME_VSYSCALL
        select ARCH_CLOCKSOURCE_DATA
+       select HANDLE_DOMAIN_IRQ
 
 menu "Machine selection"
 
@@ -137,7 +138,7 @@ config ATH79
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
        select SYS_SUPPORTS_MIPS16
-       select SYS_SUPPORTS_ZBOOT
+       select SYS_SUPPORTS_ZBOOT_UART_PROM
        select USE_OF
        help
          Support for the Atheros AR71XX/AR724X/AR913X SoCs.
@@ -196,6 +197,7 @@ config BCM47XX
        select GPIOLIB
        select LEDS_GPIO_REGISTER
        select BCM47XX_NVRAM
+       select BCM47XX_SPROM
        help
         Support for BCM47XX based boards
 
@@ -328,7 +330,6 @@ config LANTIQ
        select ARCH_REQUIRE_GPIOLIB
        select SWAP_IO_SPACE
        select BOOT_RAW
-       select HAVE_MACH_CLKDEV
        select CLKDEV_LOOKUP
        select USE_OF
        select PINCTRL
@@ -398,6 +399,7 @@ config MACH_PISTACHIO
        select SYS_SUPPORTS_LITTLE_ENDIAN
        select SYS_SUPPORTS_MIPS_CPS
        select SYS_SUPPORTS_MULTITHREADING
+       select SYS_SUPPORTS_RELOCATABLE
        select SYS_SUPPORTS_ZBOOT
        select SYS_HAS_EARLY_PRINTK
        select USE_GENERIC_EARLY_PRINTK_8250
@@ -474,6 +476,7 @@ config MIPS_MALTA
        select SYS_SUPPORTS_MULTITHREADING
        select SYS_SUPPORTS_SMARTMIPS
        select SYS_SUPPORTS_ZBOOT
+       select SYS_SUPPORTS_RELOCATABLE
        select USE_OF
        select ZONE_DMA32 if 64BIT
        select BUILTIN_DTB
@@ -508,6 +511,7 @@ config MIPS_SEAD3
        select MIPS_MSC
        select SYS_HAS_CPU_MIPS32_R1
        select SYS_HAS_CPU_MIPS32_R2
+       select SYS_HAS_CPU_MIPS32_R6
        select SYS_HAS_CPU_MIPS64_R1
        select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
@@ -517,6 +521,7 @@ config MIPS_SEAD3
        select SYS_SUPPORTS_SMARTMIPS
        select SYS_SUPPORTS_MICROMIPS
        select SYS_SUPPORTS_MIPS16
+       select SYS_SUPPORTS_RELOCATABLE
        select USB_EHCI_BIG_ENDIAN_DESC
        select USB_EHCI_BIG_ENDIAN_MMIO
        select USE_OF
@@ -590,7 +595,6 @@ config RALINK
        select SYS_SUPPORTS_LITTLE_ENDIAN
        select SYS_SUPPORTS_MIPS16
        select SYS_HAS_EARLY_PRINTK
-       select HAVE_MACH_CLKDEV
        select CLKDEV_LOOKUP
        select ARCH_HAS_RESET_CONTROLLER
        select RESET_CONTROLLER
@@ -1157,6 +1161,13 @@ config ISA_DMA_API
 config HOLES_IN_ZONE
        bool
 
+config SYS_SUPPORTS_RELOCATABLE
+       bool
+       help
+        Selected if the platform supports relocating the kernel.
+        The platform must provide plat_get_fdt() if it selects CONFIG_USE_OF
+        to allow access to command line and entropy sources.
+
 #
 # Endianness selection.  Sufficiently obscure so many users don't know what to
 # answer,so we try hard to limit the available choices.  Also the use of a
@@ -1344,11 +1355,30 @@ config CPU_LOONGSON3
        select CPU_SUPPORTS_HUGEPAGES
        select WEAK_ORDERING
        select WEAK_REORDERING_BEYOND_LLSC
+       select MIPS_PGD_C0_CONTEXT
        select ARCH_REQUIRE_GPIOLIB
        help
                The Loongson 3 processor implements the MIPS64R2 instruction
                set with many extensions.
 
+config LOONGSON3_ENHANCEMENT
+       bool "New Loongson 3 CPU Enhancements"
+       default n
+       select CPU_MIPSR2
+       select CPU_HAS_PREFETCH
+       depends on CPU_LOONGSON3
+       help
+         New Loongson 3 CPU (since Loongson-3A R2, as opposed to Loongson-3A
+         R1, Loongson-3B R1 and Loongson-3B R2) has many enhancements, such as
+         FTLB, L1-VCache, EI/DI/Wait/Prefetch instruction, DSP/DSPv2 ASE, User
+         Local register, Read-Inhibit/Execute-Inhibit, SFB (Store Fill Buffer),
+         Fast TLB refill support, etc.
+
+         This option enable those enhancements which are not probed at run
+         time. If you want a generic kernel to run on all Loongson 3 machines,
+         please say 'N' here. If you want a high-performance kernel to run on
+         new Loongson 3 machines only, please say 'Y' here.
+
 config CPU_LOONGSON2E
        bool "Loongson 2E"
        depends on SYS_HAS_CPU_LOONGSON2E
@@ -1377,6 +1407,8 @@ config CPU_LOONGSON1B
        bool "Loongson 1B"
        depends on SYS_HAS_CPU_LOONGSON1B
        select CPU_LOONGSON1
+       select ARCH_WANT_OPTIONAL_GPIOLIB
+       select LEDS_GPIO_REGISTER
        help
          The Loongson 1B is a 32-bit SoC, which implements the MIPS32
          release 2 instruction set.
@@ -1675,6 +1707,7 @@ config CPU_XLP
        select CPU_HAS_PREFETCH
        select CPU_MIPSR2
        select CPU_SUPPORTS_HUGEPAGES
+       select MIPS_ASID_BITS_VARIABLE
        help
          Netlogic Microsystems XLP processors.
 endchoice
@@ -1800,6 +1833,7 @@ config CPU_BMIPS4380
        select MIPS_L1_CACHE_SHIFT_6
        select SYS_SUPPORTS_SMP
        select SYS_SUPPORTS_HOTPLUG_CPU
+       select CPU_HAS_RIXI
 
 config CPU_BMIPS5000
        bool
@@ -1807,10 +1841,12 @@ config CPU_BMIPS5000
        select MIPS_L1_CACHE_SHIFT_7
        select SYS_SUPPORTS_SMP
        select SYS_SUPPORTS_HOTPLUG_CPU
+       select CPU_HAS_RIXI
 
 config SYS_HAS_CPU_LOONGSON3
        bool
        select CPU_SUPPORTS_CPUFREQ
+       select CPU_HAS_RIXI
 
 config SYS_HAS_CPU_LOONGSON2E
        bool
@@ -1963,11 +1999,15 @@ config CPU_MIPSR1
 config CPU_MIPSR2
        bool
        default y if CPU_MIPS32_R2 || CPU_MIPS64_R2 || CPU_CAVIUM_OCTEON
+       select CPU_HAS_RIXI
        select MIPS_SPRAM
 
 config CPU_MIPSR6
        bool
        default y if CPU_MIPS32_R6 || CPU_MIPS64_R6
+       select CPU_HAS_RIXI
+       select HAVE_ARCH_BITREVERSE
+       select MIPS_ASID_BITS_VARIABLE
        select MIPS_SPRAM
 
 config EVA
@@ -2001,7 +2041,7 @@ config MIPS_PGD_C0_CONTEXT
 #
 config HARDWARE_WATCHPOINTS
        bool
-       default y if CPU_MIPSR1 || CPU_MIPSR2
+       default y if CPU_MIPSR1 || CPU_MIPSR2 || CPU_MIPSR6
 
 menu "Kernel type"
 
@@ -2044,6 +2084,16 @@ config KVM_GUEST_TIMER_FREQ
          emulation when determining guest CPU Frequency. Instead, the guest's
          timer frequency is specified directly.
 
+config MIPS_VA_BITS_48
+       bool "48 bits virtual memory"
+       depends on 64BIT
+       help
+         Support a maximum at least 48 bits of application virtual memory.
+         Default is 40 bits or less, depending on the CPU.
+         This option result in a small memory overhead for page tables.
+         This option is only supported with 16k and 64k page sizes.
+         If unsure, say N.
+
 choice
        prompt "Kernel page size"
        default PAGE_SIZE_4KB
@@ -2051,6 +2101,7 @@ choice
 config PAGE_SIZE_4KB
        bool "4kB"
        depends on !CPU_LOONGSON2 && !CPU_LOONGSON3
+       depends on !MIPS_VA_BITS_48
        help
         This option select the standard 4kB Linux page size.  On some
         R3000-family processors this is the only available page size.  Using
@@ -2060,6 +2111,7 @@ config PAGE_SIZE_4KB
 config PAGE_SIZE_8KB
        bool "8kB"
        depends on CPU_R8000 || CPU_CAVIUM_OCTEON
+       depends on !MIPS_VA_BITS_48
        help
          Using 8kB page size will result in higher performance kernel at
          the price of higher memory consumption.  This option is available
@@ -2078,6 +2130,7 @@ config PAGE_SIZE_16KB
 config PAGE_SIZE_32KB
        bool "32kB"
        depends on CPU_CAVIUM_OCTEON
+       depends on !MIPS_VA_BITS_48
        help
          Using 32kB page size will result in higher performance kernel at
          the price of higher memory consumption.  This option is available
@@ -2282,7 +2335,7 @@ config MIPS_CMP
 
 config MIPS_CPS
        bool "MIPS Coherent Processing System support"
-       depends on SYS_SUPPORTS_MIPS_CPS && !CPU_MIPSR6
+       depends on SYS_SUPPORTS_MIPS_CPS
        select MIPS_CM
        select MIPS_CPC
        select MIPS_CPS_PM if HOTPLUG_CPU
@@ -2373,6 +2426,9 @@ config CPU_HAS_WB
 config XKS01
        bool
 
+config CPU_HAS_RIXI
+       bool
+
 #
 # Vectored interrupt mode is an R2 feature
 #
@@ -2403,6 +2459,21 @@ config CPU_R4000_WORKAROUNDS
 config CPU_R4400_WORKAROUNDS
        bool
 
+config MIPS_ASID_SHIFT
+       int
+       default 6 if CPU_R3000 || CPU_TX39XX
+       default 4 if CPU_R8000
+       default 0
+
+config MIPS_ASID_BITS
+       int
+       default 0 if MIPS_ASID_BITS_VARIABLE
+       default 6 if CPU_R3000 || CPU_TX39XX
+       default 8
+
+config MIPS_ASID_BITS_VARIABLE
+       bool
+
 #
 # - Highmem only makes sense for the 32-bit kernel.
 # - The current highmem code will only work properly on physically indexed
@@ -2472,6 +2543,61 @@ config NUMA
 config SYS_SUPPORTS_NUMA
        bool
 
+config RELOCATABLE
+       bool "Relocatable kernel"
+       depends on SYS_SUPPORTS_RELOCATABLE && (CPU_MIPS32_R2 || CPU_MIPS64_R2 || CPU_MIPS32_R6 || CPU_MIPS64_R6)
+       help
+         This builds a kernel image that retains relocation information
+         so it can be loaded someplace besides the default 1MB.
+         The relocations make the kernel binary about 15% larger,
+         but are discarded at runtime
+
+config RELOCATION_TABLE_SIZE
+       hex "Relocation table size"
+       depends on RELOCATABLE
+       range 0x0 0x01000000
+       default "0x00100000"
+       ---help---
+         A table of relocation data will be appended to the kernel binary
+         and parsed at boot to fix up the relocated kernel.
+
+         This option allows the amount of space reserved for the table to be
+         adjusted, although the default of 1Mb should be ok in most cases.
+
+         The build will fail and a valid size suggested if this is too small.
+
+         If unsure, leave at the default value.
+
+config RANDOMIZE_BASE
+       bool "Randomize the address of the kernel image"
+       depends on RELOCATABLE
+       ---help---
+          Randomizes the physical and virtual address at which the
+          kernel image is loaded, as a security feature that
+          deters exploit attempts relying on knowledge of the location
+          of kernel internals.
+
+          Entropy is generated using any coprocessor 0 registers available.
+
+          The kernel will be offset by up to RANDOMIZE_BASE_MAX_OFFSET.
+
+          If unsure, say N.
+
+config RANDOMIZE_BASE_MAX_OFFSET
+       hex "Maximum kASLR offset" if EXPERT
+       depends on RANDOMIZE_BASE
+       range 0x0 0x40000000 if EVA || 64BIT
+       range 0x0 0x08000000
+       default "0x01000000"
+       ---help---
+         When kASLR is active, this provides the maximum offset that will
+         be applied to the kernel image. It should be set according to the
+         amount of physical RAM available in the target system minus
+         PHYSICAL_START and must be a power of 2.
+
+         This is limited by the size of KSEG0, 256Mb on 32-bit or 1Gb with
+         EVA or 64-bit. The default is 16Mb.
+
 config NODES_SHIFT
        int
        default "6"
@@ -2479,7 +2605,7 @@ config NODES_SHIFT
 
 config HW_PERF_EVENTS
        bool "Enable hardware performance counter support for perf events"
-       depends on PERF_EVENTS && OPROFILE=n && (CPU_MIPS32 || CPU_MIPS64 || CPU_R10000 || CPU_SB1 || CPU_CAVIUM_OCTEON || CPU_XLP || CPU_LOONGSON3)
+       depends on PERF_EVENTS && !OPROFILE && (CPU_MIPS32 || CPU_MIPS64 || CPU_R10000 || CPU_SB1 || CPU_CAVIUM_OCTEON || CPU_XLP || CPU_LOONGSON3)
        default y
        help
          Enable hardware performance counter support for perf events. If
@@ -2812,6 +2938,10 @@ choice
 
        config MIPS_CMDLINE_FROM_BOOTLOADER
                bool "Bootloader kernel arguments if available"
+
+       config MIPS_CMDLINE_BUILTIN_EXTEND
+               depends on CMDLINE_BOOL
+               bool "Extend builtin kernel arguments with bootloader arguments"
 endchoice
 
 endmenu
@@ -2871,8 +3001,6 @@ config PCI_DOMAINS
 
 source "drivers/pci/Kconfig"
 
-source "drivers/pci/pcie/Kconfig"
-
 #
 # ISA support is now enabled via select.  Too many systems still have the one
 # or other ISA chip on the board that users don't know about so don't expect
@@ -2932,8 +3060,6 @@ config ZONE_DMA32
 
 source "drivers/pcmcia/Kconfig"
 
-source "drivers/pci/hotplug/Kconfig"
-
 config RAPIDIO
        tristate "RapidIO support"
        depends on PCI