Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 source "arch/powerpc/platforms/Kconfig.cputype"
0003 
0004 config 32BIT
0005         bool
0006         default y if PPC32
0007 
0008 config 64BIT
0009         bool
0010         default y if PPC64
0011 
0012 config LIVEPATCH_64
0013         def_bool PPC64
0014         depends on LIVEPATCH
0015 
0016 config MMU
0017         bool
0018         default y
0019 
0020 config ARCH_MMAP_RND_BITS_MAX
0021         # On Book3S 64, the default virtual address space for 64-bit processes
0022         # is 2^47 (128TB). As a maximum, allow randomisation to consume up to
0023         # 32T of address space (2^45), which should ensure a reasonable gap
0024         # between bottom-up and top-down allocations for applications that
0025         # consume "normal" amounts of address space. Book3S 64 only supports 64K
0026         # and 4K page sizes.
0027         default 29 if PPC_BOOK3S_64 && PPC_64K_PAGES # 29 = 45 (32T) - 16 (64K)
0028         default 33 if PPC_BOOK3S_64                  # 33 = 45 (32T) - 12 (4K)
0029         #
0030         # On all other 64-bit platforms (currently only Book3E), the virtual
0031         # address space is 2^46 (64TB). Allow randomisation to consume up to 16T
0032         # of address space (2^44). Only 4K page sizes are supported.
0033         default 32 if 64BIT     # 32 = 44 (16T) - 12 (4K)
0034         #
0035         # For 32-bit, use the compat values, as they're the same.
0036         default ARCH_MMAP_RND_COMPAT_BITS_MAX
0037 
0038 config ARCH_MMAP_RND_BITS_MIN
0039         # Allow randomisation to consume up to 1GB of address space (2^30).
0040         default 14 if 64BIT && PPC_64K_PAGES    # 14 = 30 (1GB) - 16 (64K)
0041         default 18 if 64BIT                     # 18 = 30 (1GB) - 12 (4K)
0042         #
0043         # For 32-bit, use the compat values, as they're the same.
0044         default ARCH_MMAP_RND_COMPAT_BITS_MIN
0045 
0046 config ARCH_MMAP_RND_COMPAT_BITS_MAX
0047         # Total virtual address space for 32-bit processes is 2^31 (2GB).
0048         # Allow randomisation to consume up to 512MB of address space (2^29).
0049         default 11 if PPC_256K_PAGES    # 11 = 29 (512MB) - 18 (256K)
0050         default 13 if PPC_64K_PAGES     # 13 = 29 (512MB) - 16 (64K)
0051         default 15 if PPC_16K_PAGES     # 15 = 29 (512MB) - 14 (16K)
0052         default 17                      # 17 = 29 (512MB) - 12 (4K)
0053 
0054 config ARCH_MMAP_RND_COMPAT_BITS_MIN
0055         # Total virtual address space for 32-bit processes is 2^31 (2GB).
0056         # Allow randomisation to consume up to 8MB of address space (2^23).
0057         default 5 if PPC_256K_PAGES     #  5 = 23 (8MB) - 18 (256K)
0058         default 7 if PPC_64K_PAGES      #  7 = 23 (8MB) - 16 (64K)
0059         default 9 if PPC_16K_PAGES      #  9 = 23 (8MB) - 14 (16K)
0060         default 11                      # 11 = 23 (8MB) - 12 (4K)
0061 
0062 config NR_IRQS
0063         int "Number of virtual interrupt numbers"
0064         range 32 1048576
0065         default "512"
0066         help
0067           This defines the number of virtual interrupt numbers the kernel
0068           can manage. Virtual interrupt numbers are what you see in
0069           /proc/interrupts. If you configure your system to have too few,
0070           drivers will fail to load or worse - handle with care.
0071 
0072 config NMI_IPI
0073         bool
0074         depends on SMP && (DEBUGGER || KEXEC_CORE || HARDLOCKUP_DETECTOR)
0075         default y
0076 
0077 config PPC_WATCHDOG
0078         bool
0079         depends on HARDLOCKUP_DETECTOR
0080         depends on HAVE_HARDLOCKUP_DETECTOR_ARCH
0081         default y
0082         help
0083           This is a placeholder when the powerpc hardlockup detector
0084           watchdog is selected (arch/powerpc/kernel/watchdog.c). It is
0085           selected via the generic lockup detector menu which is why we
0086           have no standalone config option for it here.
0087 
0088 config STACKTRACE_SUPPORT
0089         bool
0090         default y
0091 
0092 config LOCKDEP_SUPPORT
0093         bool
0094         default y
0095 
0096 config GENERIC_LOCKBREAK
0097         bool
0098         default y
0099         depends on SMP && PREEMPTION
0100 
0101 config GENERIC_HWEIGHT
0102         bool
0103         default y
0104 
0105 config PPC
0106         bool
0107         default y
0108         #
0109         # Please keep this list sorted alphabetically.
0110         #
0111         select ARCH_32BIT_OFF_T if PPC32
0112         select ARCH_DISABLE_KASAN_INLINE        if PPC_RADIX_MMU
0113         select ARCH_ENABLE_MEMORY_HOTPLUG
0114         select ARCH_ENABLE_MEMORY_HOTREMOVE
0115         select ARCH_HAS_COPY_MC                 if PPC64
0116         select ARCH_HAS_CURRENT_STACK_POINTER
0117         select ARCH_HAS_DEBUG_VIRTUAL
0118         select ARCH_HAS_DEBUG_VM_PGTABLE
0119         select ARCH_HAS_DEBUG_WX                if STRICT_KERNEL_RWX
0120         select ARCH_HAS_DEVMEM_IS_ALLOWED
0121         select ARCH_HAS_DMA_MAP_DIRECT          if PPC_PSERIES
0122         select ARCH_HAS_FORTIFY_SOURCE
0123         select ARCH_HAS_GCOV_PROFILE_ALL
0124         select ARCH_HAS_HUGEPD                  if HUGETLB_PAGE
0125         select ARCH_HAS_KCOV
0126         select ARCH_HAS_MEMBARRIER_CALLBACKS
0127         select ARCH_HAS_MEMBARRIER_SYNC_CORE
0128         select ARCH_HAS_MEMREMAP_COMPAT_ALIGN   if PPC_64S_HASH_MMU
0129         select ARCH_HAS_MMIOWB                  if PPC64
0130         select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
0131         select ARCH_HAS_PHYS_TO_DMA
0132         select ARCH_HAS_PMEM_API
0133         select ARCH_HAS_PTE_DEVMAP              if PPC_BOOK3S_64
0134         select ARCH_HAS_PTE_SPECIAL
0135         select ARCH_HAS_SCALED_CPUTIME          if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64
0136         select ARCH_HAS_SET_MEMORY
0137         select ARCH_HAS_STRICT_KERNEL_RWX       if (PPC_BOOK3S || PPC_8xx || 40x) && !HIBERNATION
0138         select ARCH_HAS_STRICT_KERNEL_RWX       if FSL_BOOKE && !HIBERNATION && !RANDOMIZE_BASE
0139         select ARCH_HAS_STRICT_MODULE_RWX       if ARCH_HAS_STRICT_KERNEL_RWX
0140         select ARCH_HAS_TICK_BROADCAST          if GENERIC_CLOCKEVENTS_BROADCAST
0141         select ARCH_HAS_UACCESS_FLUSHCACHE
0142         select ARCH_HAS_UBSAN_SANITIZE_ALL
0143         select ARCH_HAVE_NMI_SAFE_CMPXCHG
0144         select ARCH_KEEP_MEMBLOCK
0145         select ARCH_MIGHT_HAVE_PC_PARPORT
0146         select ARCH_MIGHT_HAVE_PC_SERIO
0147         select ARCH_OPTIONAL_KERNEL_RWX         if ARCH_HAS_STRICT_KERNEL_RWX
0148         select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
0149         select ARCH_STACKWALK
0150         select ARCH_SUPPORTS_ATOMIC_RMW
0151         select ARCH_SUPPORTS_DEBUG_PAGEALLOC    if PPC_BOOK3S || PPC_8xx || 40x
0152         select ARCH_USE_BUILTIN_BSWAP
0153         select ARCH_USE_CMPXCHG_LOCKREF         if PPC64
0154         select ARCH_USE_MEMTEST
0155         select ARCH_USE_QUEUED_RWLOCKS          if PPC_QUEUED_SPINLOCKS
0156         select ARCH_USE_QUEUED_SPINLOCKS        if PPC_QUEUED_SPINLOCKS
0157         select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
0158         select ARCH_WANT_IPC_PARSE_VERSION
0159         select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
0160         select ARCH_WANT_LD_ORPHAN_WARN
0161         select ARCH_WANTS_MODULES_DATA_IN_VMALLOC       if PPC_BOOK3S_32 || PPC_8xx
0162         select ARCH_WANTS_NO_INSTR
0163         select ARCH_WEAK_RELEASE_ACQUIRE
0164         select BINFMT_ELF
0165         select BUILDTIME_TABLE_SORT
0166         select CLONE_BACKWARDS
0167         select CPUMASK_OFFSTACK                 if NR_CPUS >= 8192
0168         select DCACHE_WORD_ACCESS               if PPC64 && CPU_LITTLE_ENDIAN
0169         select DMA_OPS_BYPASS                   if PPC64
0170         select DMA_OPS                          if PPC64
0171         select DYNAMIC_FTRACE                   if FUNCTION_TRACER
0172         select EDAC_ATOMIC_SCRUB
0173         select EDAC_SUPPORT
0174         select GENERIC_ATOMIC64                 if PPC32
0175         select GENERIC_CLOCKEVENTS_BROADCAST    if SMP
0176         select GENERIC_CMOS_UPDATE
0177         select GENERIC_CPU_AUTOPROBE
0178         select GENERIC_CPU_VULNERABILITIES      if PPC_BARRIER_NOSPEC
0179         select GENERIC_EARLY_IOREMAP
0180         select GENERIC_GETTIMEOFDAY
0181         select GENERIC_IRQ_SHOW
0182         select GENERIC_IRQ_SHOW_LEVEL
0183         select GENERIC_PCI_IOMAP                if PCI
0184         select GENERIC_PTDUMP
0185         select GENERIC_SMP_IDLE_THREAD
0186         select GENERIC_TIME_VSYSCALL
0187         select GENERIC_VDSO_TIME_NS
0188         select HAVE_ARCH_AUDITSYSCALL
0189         select HAVE_ARCH_HUGE_VMALLOC           if HAVE_ARCH_HUGE_VMAP
0190         select HAVE_ARCH_HUGE_VMAP              if PPC_RADIX_MMU || PPC_8xx
0191         select HAVE_ARCH_JUMP_LABEL
0192         select HAVE_ARCH_JUMP_LABEL_RELATIVE
0193         select HAVE_ARCH_KASAN                  if PPC32 && PPC_PAGE_SHIFT <= 14
0194         select HAVE_ARCH_KASAN                  if PPC_RADIX_MMU
0195         select HAVE_ARCH_KASAN                  if PPC_BOOK3E_64
0196         select HAVE_ARCH_KASAN_VMALLOC          if HAVE_ARCH_KASAN
0197         select HAVE_ARCH_KFENCE                 if PPC_BOOK3S_32 || PPC_8xx || 40x
0198         select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
0199         select HAVE_ARCH_KGDB
0200         select HAVE_ARCH_MMAP_RND_BITS
0201         select HAVE_ARCH_MMAP_RND_COMPAT_BITS   if COMPAT
0202         select HAVE_ARCH_NVRAM_OPS
0203         select HAVE_ARCH_SECCOMP_FILTER
0204         select HAVE_ARCH_TRACEHOOK
0205         select HAVE_ASM_MODVERSIONS
0206         select HAVE_CONTEXT_TRACKING_USER               if PPC64
0207         select HAVE_C_RECORDMCOUNT
0208         select HAVE_DEBUG_KMEMLEAK
0209         select HAVE_DEBUG_STACKOVERFLOW
0210         select HAVE_DYNAMIC_FTRACE
0211         select HAVE_DYNAMIC_FTRACE_WITH_ARGS    if MPROFILE_KERNEL || PPC32
0212         select HAVE_DYNAMIC_FTRACE_WITH_REGS    if MPROFILE_KERNEL || PPC32
0213         select HAVE_EBPF_JIT
0214         select HAVE_EFFICIENT_UNALIGNED_ACCESS  if !(CPU_LITTLE_ENDIAN && POWER7_CPU)
0215         select HAVE_FAST_GUP
0216         select HAVE_FTRACE_MCOUNT_RECORD
0217         select HAVE_FUNCTION_DESCRIPTORS        if PPC64_ELF_ABI_V1
0218         select HAVE_FUNCTION_ERROR_INJECTION
0219         select HAVE_FUNCTION_GRAPH_TRACER
0220         select HAVE_FUNCTION_TRACER
0221         select HAVE_GCC_PLUGINS                 if GCC_VERSION >= 50200   # plugin support on gcc <= 5.1 is buggy on PPC
0222         select HAVE_GENERIC_VDSO
0223         select HAVE_HARDLOCKUP_DETECTOR_ARCH    if PPC_BOOK3S_64 && SMP
0224         select HAVE_HARDLOCKUP_DETECTOR_PERF    if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
0225         select HAVE_HW_BREAKPOINT               if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
0226         select HAVE_IOREMAP_PROT
0227         select HAVE_IRQ_TIME_ACCOUNTING
0228         select HAVE_KERNEL_GZIP
0229         select HAVE_KERNEL_LZMA                 if DEFAULT_UIMAGE
0230         select HAVE_KERNEL_LZO                  if DEFAULT_UIMAGE
0231         select HAVE_KERNEL_XZ                   if PPC_BOOK3S || 44x
0232         select HAVE_KPROBES
0233         select HAVE_KPROBES_ON_FTRACE
0234         select HAVE_KRETPROBES
0235         select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
0236         select HAVE_LIVEPATCH                   if HAVE_DYNAMIC_FTRACE_WITH_REGS
0237         select HAVE_MOD_ARCH_SPECIFIC
0238         select HAVE_NMI                         if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
0239         select HAVE_OPTPROBES
0240         select HAVE_PERF_EVENTS
0241         select HAVE_PERF_EVENTS_NMI             if PPC64
0242         select HAVE_PERF_REGS
0243         select HAVE_PERF_USER_STACK_DUMP
0244         select HAVE_REGS_AND_STACK_ACCESS_API
0245         select HAVE_RELIABLE_STACKTRACE
0246         select HAVE_RSEQ
0247         select HAVE_SETUP_PER_CPU_AREA          if PPC64
0248         select HAVE_SOFTIRQ_ON_OWN_STACK
0249         select HAVE_STACKPROTECTOR              if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
0250         select HAVE_STACKPROTECTOR              if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
0251         select HAVE_STATIC_CALL                 if PPC32
0252         select HAVE_SYSCALL_TRACEPOINTS
0253         select HAVE_VIRT_CPU_ACCOUNTING
0254         select HUGETLB_PAGE_SIZE_VARIABLE       if PPC_BOOK3S_64 && HUGETLB_PAGE
0255         select IOMMU_HELPER                     if PPC64
0256         select IRQ_DOMAIN
0257         select IRQ_FORCED_THREADING
0258         select KASAN_VMALLOC                    if KASAN && MODULES
0259         select MMU_GATHER_PAGE_SIZE
0260         select MMU_GATHER_RCU_TABLE_FREE
0261         select MMU_GATHER_MERGE_VMAS
0262         select MODULES_USE_ELF_RELA
0263         select NEED_DMA_MAP_STATE               if PPC64 || NOT_COHERENT_CACHE
0264         select NEED_PER_CPU_EMBED_FIRST_CHUNK   if PPC64
0265         select NEED_PER_CPU_PAGE_FIRST_CHUNK    if PPC64
0266         select NEED_SG_DMA_LENGTH
0267         select OF
0268         select OF_DMA_DEFAULT_COHERENT          if !NOT_COHERENT_CACHE
0269         select OF_EARLY_FLATTREE
0270         select OLD_SIGACTION                    if PPC32
0271         select OLD_SIGSUSPEND
0272         select PCI_DOMAINS                      if PCI
0273         select PCI_MSI_ARCH_FALLBACKS           if PCI_MSI
0274         select PCI_SYSCALL                      if PCI
0275         select PPC_DAWR                         if PPC64
0276         select RTC_LIB
0277         select SPARSE_IRQ
0278         select STRICT_KERNEL_RWX if STRICT_MODULE_RWX
0279         select SYSCTL_EXCEPTION_TRACE
0280         select THREAD_INFO_IN_TASK
0281         select TRACE_IRQFLAGS_SUPPORT
0282         #
0283         # Please keep this list sorted alphabetically.
0284         #
0285 
0286 config PPC_LONG_DOUBLE_128
0287         depends on PPC64
0288         def_bool $(success,test "$(shell,echo __LONG_DOUBLE_128__ | $(CC) -E -P -)" = 1)
0289 
0290 config PPC_BARRIER_NOSPEC
0291         bool
0292         default y
0293         depends on PPC_BOOK3S_64 || PPC_FSL_BOOK3E
0294 
0295 config EARLY_PRINTK
0296         bool
0297         default y
0298 
0299 config PANIC_TIMEOUT
0300         int
0301         default 180
0302 
0303 config COMPAT
0304         bool "Enable support for 32bit binaries"
0305         depends on PPC64
0306         depends on !CC_IS_CLANG || CLANG_VERSION >= 120000
0307         default y if !CPU_LITTLE_ENDIAN
0308         select ARCH_WANT_OLD_COMPAT_IPC
0309         select COMPAT_OLD_SIGACTION
0310 
0311 config SCHED_OMIT_FRAME_POINTER
0312         bool
0313         default y
0314 
0315 config ARCH_MAY_HAVE_PC_FDC
0316         bool
0317         default PCI
0318 
0319 config PPC_UDBG_16550
0320         bool
0321 
0322 config GENERIC_TBSYNC
0323         bool
0324         default y if PPC32 && SMP
0325 
0326 config AUDIT_ARCH
0327         bool
0328         default y
0329 
0330 config GENERIC_BUG
0331         bool
0332         default y
0333         depends on BUG
0334 
0335 config GENERIC_BUG_RELATIVE_POINTERS
0336         def_bool y
0337         depends on GENERIC_BUG
0338 
0339 config SYS_SUPPORTS_APM_EMULATION
0340         default y if PMAC_APM_EMU
0341         bool
0342 
0343 config EPAPR_BOOT
0344         bool
0345         help
0346           Used to allow a board to specify it wants an ePAPR compliant wrapper.
0347 
0348 config DEFAULT_UIMAGE
0349         bool
0350         help
0351           Used to allow a board to specify it wants a uImage built by default
0352 
0353 config ARCH_HIBERNATION_POSSIBLE
0354         bool
0355         default y
0356 
0357 config ARCH_SUSPEND_POSSIBLE
0358         def_bool y
0359         depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \
0360                    (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \
0361                    || 44x || 40x
0362 
0363 config ARCH_SUSPEND_NONZERO_CPU
0364         def_bool y
0365         depends on PPC_POWERNV || PPC_PSERIES
0366 
0367 config ARCH_HAS_ADD_PAGES
0368         def_bool y
0369         depends on ARCH_ENABLE_MEMORY_HOTPLUG
0370 
0371 config PPC_DCR_NATIVE
0372         bool
0373 
0374 config PPC_DCR_MMIO
0375         bool
0376 
0377 config PPC_DCR
0378         bool
0379         depends on PPC_DCR_NATIVE || PPC_DCR_MMIO
0380         default y
0381 
0382 config PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT
0383         depends on PPC32
0384         depends on !PPC_PMAC && !PPC_CHRP
0385         bool "Assign PCI bus numbers from zero individually for each PCI domain"
0386         help
0387           By default on PPC32 were PCI bus numbers unique across all PCI domains.
0388           So system could have only 256 PCI buses independently of available
0389           PCI domains. When this option is enabled then PCI bus numbers are
0390           PCI domain dependent and each PCI controller on own domain can have
0391           256 PCI buses, like it is on other Linux architectures.
0392 
0393 config PPC_OF_PLATFORM_PCI
0394         bool
0395         depends on PCI
0396         depends on PPC64 # not supported on 32 bits yet
0397 
0398 config ARCH_SUPPORTS_UPROBES
0399         def_bool y
0400 
0401 config PPC_ADV_DEBUG_REGS
0402         bool
0403         depends on 40x || BOOKE
0404         default y
0405 
0406 config PPC_ADV_DEBUG_IACS
0407         int
0408         depends on PPC_ADV_DEBUG_REGS
0409         default 4 if 44x
0410         default 2
0411 
0412 config PPC_ADV_DEBUG_DACS
0413         int
0414         depends on PPC_ADV_DEBUG_REGS
0415         default 2
0416 
0417 config PPC_ADV_DEBUG_DVCS
0418         int
0419         depends on PPC_ADV_DEBUG_REGS
0420         default 2 if 44x
0421         default 0
0422 
0423 config PPC_ADV_DEBUG_DAC_RANGE
0424         bool
0425         depends on PPC_ADV_DEBUG_REGS && 44x
0426         default y
0427 
0428 config PPC_DAWR
0429         bool
0430 
0431 config PGTABLE_LEVELS
0432         int
0433         default 2 if !PPC64
0434         default 4
0435 
0436 source "arch/powerpc/sysdev/Kconfig"
0437 source "arch/powerpc/platforms/Kconfig"
0438 
0439 menu "Kernel options"
0440 
0441 config HIGHMEM
0442         bool "High memory support"
0443         depends on PPC32
0444         select KMAP_LOCAL
0445 
0446 source "kernel/Kconfig.hz"
0447 
0448 config MATH_EMULATION
0449         bool "Math emulation"
0450         depends on 4xx || PPC_8xx || PPC_MPC832x || BOOKE || PPC_MICROWATT
0451         select PPC_FPU_REGS
0452         help
0453           Some PowerPC chips designed for embedded applications do not have
0454           a floating-point unit and therefore do not implement the
0455           floating-point instructions in the PowerPC instruction set.  If you
0456           say Y here, the kernel will include code to emulate a floating-point
0457           unit, which will allow programs that use floating-point
0458           instructions to run.
0459 
0460           This is also useful to emulate missing (optional) instructions
0461           such as fsqrt on cores that do have an FPU but do not implement
0462           them (such as Freescale BookE).
0463 
0464 choice
0465         prompt "Math emulation options"
0466         default MATH_EMULATION_FULL
0467         depends on MATH_EMULATION
0468 
0469 config MATH_EMULATION_FULL
0470         bool "Emulate all the floating point instructions"
0471         help
0472           Select this option will enable the kernel to support to emulate
0473           all the floating point instructions. If your SoC doesn't have
0474           a FPU, you should select this.
0475 
0476 config MATH_EMULATION_HW_UNIMPLEMENTED
0477         bool "Just emulate the FPU unimplemented instructions"
0478         help
0479           Select this if you know there does have a hardware FPU on your
0480           SoC, but some floating point instructions are not implemented by that.
0481 
0482 endchoice
0483 
0484 config PPC_TRANSACTIONAL_MEM
0485         bool "Transactional Memory support for POWERPC"
0486         depends on PPC_BOOK3S_64
0487         depends on SMP
0488         select ALTIVEC
0489         select VSX
0490         help
0491           Support user-mode Transactional Memory on POWERPC.
0492 
0493 config PPC_UV
0494         bool "Ultravisor support"
0495         depends on KVM_BOOK3S_HV_POSSIBLE
0496         depends on DEVICE_PRIVATE
0497         default n
0498         help
0499           This option paravirtualizes the kernel to run in POWER platforms that
0500           supports the Protected Execution Facility (PEF). On such platforms,
0501           the ultravisor firmware runs at a privilege level above the
0502           hypervisor.
0503 
0504           If unsure, say "N".
0505 
0506 config LD_HEAD_STUB_CATCH
0507         bool "Reserve 256 bytes to cope with linker stubs in HEAD text" if EXPERT
0508         depends on PPC64
0509         help
0510           Very large kernels can cause linker branch stubs to be generated by
0511           code in head_64.S, which moves the head text sections out of their
0512           specified location. This option can work around the problem.
0513 
0514           If unsure, say "N".
0515 
0516 config MPROFILE_KERNEL
0517         depends on PPC64 && CPU_LITTLE_ENDIAN && FUNCTION_TRACER
0518         def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -I$(srctree)/include -D__KERNEL__)
0519 
0520 config HOTPLUG_CPU
0521         bool "Support for enabling/disabling CPUs"
0522         depends on SMP && (PPC_PSERIES || \
0523                 PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE)
0524         help
0525           Say Y here to be able to disable and re-enable individual
0526           CPUs at runtime on SMP machines.
0527 
0528           Say N if you are unsure.
0529 
0530 config PPC_QUEUED_SPINLOCKS
0531         bool "Queued spinlocks" if EXPERT
0532         depends on SMP
0533         default PPC_BOOK3S_64
0534         help
0535           Say Y here to use queued spinlocks which give better scalability and
0536           fairness on large SMP and NUMA systems without harming single threaded
0537           performance.
0538 
0539 config ARCH_CPU_PROBE_RELEASE
0540         def_bool y
0541         depends on HOTPLUG_CPU
0542 
0543 config PPC64_SUPPORTS_MEMORY_FAILURE
0544         bool "Add support for memory hwpoison"
0545         depends on PPC_BOOK3S_64
0546         default "y" if PPC_POWERNV
0547         select ARCH_SUPPORTS_MEMORY_FAILURE
0548 
0549 config KEXEC
0550         bool "kexec system call"
0551         depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) || PPC_BOOK3E
0552         select KEXEC_CORE
0553         help
0554           kexec is a system call that implements the ability to shutdown your
0555           current kernel, and to start another kernel.  It is like a reboot
0556           but it is independent of the system firmware.   And like a reboot
0557           you can start any kernel with it, not just Linux.
0558 
0559           The name comes from the similarity to the exec system call.
0560 
0561           It is an ongoing process to be certain the hardware in a machine
0562           is properly shutdown, so do not be surprised if this code does not
0563           initially work for you.  As of this writing the exact hardware
0564           interface is strongly in flux, so no good recommendation can be
0565           made.
0566 
0567 config KEXEC_FILE
0568         bool "kexec file based system call"
0569         select KEXEC_CORE
0570         select HAVE_IMA_KEXEC if IMA
0571         select KEXEC_ELF
0572         depends on PPC64
0573         depends on CRYPTO=y
0574         depends on CRYPTO_SHA256=y
0575         help
0576           This is a new version of the kexec system call. This call is
0577           file based and takes in file descriptors as system call arguments
0578           for kernel and initramfs as opposed to a list of segments as is the
0579           case for the older kexec call.
0580 
0581 config ARCH_HAS_KEXEC_PURGATORY
0582         def_bool KEXEC_FILE
0583 
0584 config RELOCATABLE
0585         bool "Build a relocatable kernel"
0586         depends on PPC64 || (FLATMEM && (44x || FSL_BOOKE))
0587         select NONSTATIC_KERNEL
0588         help
0589           This builds a kernel image that is capable of running at the
0590           location the kernel is loaded at. For ppc32, there is no any
0591           alignment restrictions, and this feature is a superset of
0592           DYNAMIC_MEMSTART and hence overrides it. For ppc64, we should use
0593           16k-aligned base address. The kernel is linked as a
0594           position-independent executable (PIE) and contains dynamic relocations
0595           which are processed early in the bootup process.
0596 
0597           One use is for the kexec on panic case where the recovery kernel
0598           must live at a different physical address than the primary
0599           kernel.
0600 
0601           Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address
0602           it has been loaded at and the compile time physical addresses
0603           CONFIG_PHYSICAL_START is ignored.  However CONFIG_PHYSICAL_START
0604           setting can still be useful to bootwrappers that need to know the
0605           load address of the kernel (eg. u-boot/mkimage).
0606 
0607 config RANDOMIZE_BASE
0608         bool "Randomize the address of the kernel image"
0609         depends on (FSL_BOOKE && FLATMEM && PPC32)
0610         depends on RELOCATABLE
0611         help
0612           Randomizes the virtual address at which the kernel image is
0613           loaded, as a security feature that deters exploit attempts
0614           relying on knowledge of the location of kernel internals.
0615 
0616           If unsure, say Y.
0617 
0618 config RELOCATABLE_TEST
0619         bool "Test relocatable kernel"
0620         depends on (PPC64 && RELOCATABLE)
0621         help
0622           This runs the relocatable kernel at the address it was initially
0623           loaded at, which tends to be non-zero and therefore test the
0624           relocation code.
0625 
0626 config CRASH_DUMP
0627         bool "Build a dump capture kernel"
0628         depends on PPC64 || PPC_BOOK3S_32 || FSL_BOOKE || (44x && !SMP)
0629         select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
0630         help
0631           Build a kernel suitable for use as a dump capture kernel.
0632           The same kernel binary can be used as production kernel and dump
0633           capture kernel.
0634 
0635 config FA_DUMP
0636         bool "Firmware-assisted dump"
0637         depends on PPC64 && (PPC_RTAS || PPC_POWERNV)
0638         select CRASH_CORE
0639         select CRASH_DUMP
0640         help
0641           A robust mechanism to get reliable kernel crash dump with
0642           assistance from firmware. This approach does not use kexec,
0643           instead firmware assists in booting the capture kernel
0644           while preserving memory contents. Firmware-assisted dump
0645           is meant to be a kdump replacement offering robustness and
0646           speed not possible without system firmware assistance.
0647 
0648           If unsure, say "y". Only special kernels like petitboot may
0649           need to say "N" here.
0650 
0651 config PRESERVE_FA_DUMP
0652         bool "Preserve Firmware-assisted dump"
0653         depends on PPC64 && PPC_POWERNV && !FA_DUMP
0654         help
0655           On a kernel with FA_DUMP disabled, this option helps to preserve
0656           crash data from a previously crash'ed kernel. Useful when the next
0657           memory preserving kernel boot would process this crash data.
0658           Petitboot kernel is the typical usecase for this option.
0659 
0660 config OPAL_CORE
0661         bool "Export OPAL memory as /sys/firmware/opal/core"
0662         depends on PPC64 && PPC_POWERNV
0663         help
0664           This option uses the MPIPL support in firmware to provide an
0665           ELF core of OPAL memory after a crash. The ELF core is exported
0666           as /sys/firmware/opal/core file which is helpful in debugging
0667           OPAL crashes using GDB.
0668 
0669 config IRQ_ALL_CPUS
0670         bool "Distribute interrupts on all CPUs by default"
0671         depends on SMP
0672         help
0673           This option gives the kernel permission to distribute IRQs across
0674           multiple CPUs.  Saying N here will route all IRQs to the first
0675           CPU.  Generally saying Y is safe, although some problems have been
0676           reported with SMP Power Macintoshes with this option enabled.
0677 
0678 config NUMA
0679         bool "NUMA Memory Allocation and Scheduler Support"
0680         depends on PPC64 && SMP
0681         default y if PPC_PSERIES || PPC_POWERNV
0682         select USE_PERCPU_NUMA_NODE_ID
0683         help
0684           Enable NUMA (Non-Uniform Memory Access) support.
0685 
0686           The kernel will try to allocate memory used by a CPU on the
0687           local memory controller of the CPU and add some more
0688           NUMA awareness to the kernel.
0689 
0690 config NODES_SHIFT
0691         int
0692         default "8" if PPC64
0693         default "4"
0694         depends on NUMA
0695 
0696 config HAVE_MEMORYLESS_NODES
0697         def_bool y
0698         depends on NUMA
0699 
0700 config ARCH_SELECT_MEMORY_MODEL
0701         def_bool y
0702         depends on PPC64
0703 
0704 config ARCH_FLATMEM_ENABLE
0705         def_bool y
0706         depends on (PPC64 && !NUMA) || PPC32
0707 
0708 config ARCH_SPARSEMEM_ENABLE
0709         def_bool y
0710         depends on PPC64
0711         select SPARSEMEM_VMEMMAP_ENABLE
0712 
0713 config ARCH_SPARSEMEM_DEFAULT
0714         def_bool y
0715         depends on PPC_BOOK3S_64
0716 
0717 config ILLEGAL_POINTER_VALUE
0718         hex
0719         # This is roughly half way between the top of user space and the bottom
0720         # of kernel space, which seems about as good as we can get.
0721         default 0x5deadbeef0000000 if PPC64
0722         default 0
0723 
0724 config ARCH_MEMORY_PROBE
0725         def_bool y
0726         depends on MEMORY_HOTPLUG
0727 
0728 choice
0729         prompt "Page size"
0730         default PPC_64K_PAGES if PPC_BOOK3S_64
0731         default PPC_4K_PAGES
0732         help
0733           Select the kernel logical page size. Increasing the page size
0734           will reduce software overhead at each page boundary, allow
0735           hardware prefetch mechanisms to be more effective, and allow
0736           larger dma transfers increasing IO efficiency and reducing
0737           overhead. However the utilization of memory will increase.
0738           For example, each cached file will using a multiple of the
0739           page size to hold its contents and the difference between the
0740           end of file and the end of page is wasted.
0741 
0742           Some dedicated systems, such as software raid serving with
0743           accelerated calculations, have shown significant increases.
0744 
0745           If you configure a 64 bit kernel for 64k pages but the
0746           processor does not support them, then the kernel will simulate
0747           them with 4k pages, loading them on demand, but with the
0748           reduced software overhead and larger internal fragmentation.
0749           For the 32 bit kernel, a large page option will not be offered
0750           unless it is supported by the configured processor.
0751 
0752           If unsure, choose 4K_PAGES.
0753 
0754 config PPC_4K_PAGES
0755         bool "4k page size"
0756         select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
0757 
0758 config PPC_16K_PAGES
0759         bool "16k page size"
0760         depends on 44x || PPC_8xx
0761 
0762 config PPC_64K_PAGES
0763         bool "64k page size"
0764         depends on 44x || PPC_BOOK3S_64
0765         select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
0766 
0767 config PPC_256K_PAGES
0768         bool "256k page size (Requires non-standard binutils settings)"
0769         depends on 44x && !PPC_47x
0770         help
0771           Make the page size 256k.
0772 
0773           The kernel will only be able to run applications that have been
0774           compiled with '-zmax-page-size' set to 256K (the default is 64K) using
0775           binutils later than 2.17.50.0.3, or by patching the ELF_MAXPAGESIZE
0776           definition from 0x10000 to 0x40000 in older versions.
0777 
0778 endchoice
0779 
0780 config PAGE_SIZE_4KB
0781         def_bool y
0782         depends on PPC_4K_PAGES
0783 
0784 config PAGE_SIZE_16KB
0785         def_bool y
0786         depends on PPC_16K_PAGES
0787 
0788 config PAGE_SIZE_64KB
0789         def_bool y
0790         depends on PPC_64K_PAGES
0791 
0792 config PAGE_SIZE_256KB
0793         def_bool y
0794         depends on PPC_256K_PAGES
0795 
0796 config PPC_PAGE_SHIFT
0797         int
0798         default 18 if PPC_256K_PAGES
0799         default 16 if PPC_64K_PAGES
0800         default 14 if PPC_16K_PAGES
0801         default 12
0802 
0803 config THREAD_SHIFT
0804         int "Thread shift" if EXPERT
0805         range 13 15
0806         default "15" if PPC_256K_PAGES
0807         default "14" if PPC64
0808         default "13"
0809         help
0810           Used to define the stack size. The default is almost always what you
0811           want. Only change this if you know what you are doing.
0812 
0813 config DATA_SHIFT_BOOL
0814         bool "Set custom data alignment"
0815         depends on ADVANCED_OPTIONS
0816         depends on STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE
0817         depends on PPC_BOOK3S_32 || (PPC_8xx && !PIN_TLB_DATA && !STRICT_KERNEL_RWX) || \
0818                    FSL_BOOKE
0819         help
0820           This option allows you to set the kernel data alignment. When
0821           RAM is mapped by blocks, the alignment needs to fit the size and
0822           number of possible blocks. The default should be OK for most configs.
0823 
0824           Say N here unless you know what you are doing.
0825 
0826 config DATA_SHIFT
0827         int "Data shift" if DATA_SHIFT_BOOL
0828         default 24 if STRICT_KERNEL_RWX && PPC64
0829         range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
0830         range 19 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
0831         range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_FSL_BOOKE
0832         default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
0833         default 18 if (DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
0834         default 23 if STRICT_KERNEL_RWX && PPC_8xx
0835         default 23 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx && PIN_TLB_DATA
0836         default 19 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
0837         default 24 if STRICT_KERNEL_RWX && FSL_BOOKE
0838         default PPC_PAGE_SHIFT
0839         help
0840           On Book3S 32 (603+), DBATs are used to map kernel text and rodata RO.
0841           Smaller is the alignment, greater is the number of necessary DBATs.
0842 
0843           On 8xx, large pages (512kb or 8M) are used to map kernel linear
0844           memory. Aligning to 8M reduces TLB misses as only 8M pages are used
0845           in that case. If PIN_TLB is selected, it must be aligned to 8M as
0846           8M pages will be pinned.
0847 
0848 config FORCE_MAX_ZONEORDER
0849         int "Maximum zone order"
0850         range 8 9 if PPC64 && PPC_64K_PAGES
0851         default "9" if PPC64 && PPC_64K_PAGES
0852         range 13 13 if PPC64 && !PPC_64K_PAGES
0853         default "13" if PPC64 && !PPC_64K_PAGES
0854         range 9 64 if PPC32 && PPC_16K_PAGES
0855         default "9" if PPC32 && PPC_16K_PAGES
0856         range 7 64 if PPC32 && PPC_64K_PAGES
0857         default "7" if PPC32 && PPC_64K_PAGES
0858         range 5 64 if PPC32 && PPC_256K_PAGES
0859         default "5" if PPC32 && PPC_256K_PAGES
0860         range 11 64
0861         default "11"
0862         help
0863           The kernel memory allocator divides physically contiguous memory
0864           blocks into "zones", where each zone is a power of two number of
0865           pages.  This option selects the largest power of two that the kernel
0866           keeps in the memory allocator.  If you need to allocate very large
0867           blocks of physically contiguous memory, then you may need to
0868           increase this value.
0869 
0870           This config option is actually maximum order plus one. For example,
0871           a value of 11 means that the largest free memory block is 2^10 pages.
0872 
0873           The page size is not necessarily 4KB.  For example, on 64-bit
0874           systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES.  Keep
0875           this in mind when choosing a value for this option.
0876 
0877 config PPC_SUBPAGE_PROT
0878         bool "Support setting protections for 4k subpages (subpage_prot syscall)"
0879         default n
0880         depends on PPC_64S_HASH_MMU && PPC_64K_PAGES
0881         help
0882           This option adds support for system call to allow user programs
0883           to set access permissions (read/write, readonly, or no access)
0884           on the 4k subpages of each 64k page.
0885 
0886           If unsure, say N here.
0887 
0888 config PPC_PROT_SAO_LPAR
0889         bool "Support PROT_SAO mappings in LPARs"
0890         depends on PPC_BOOK3S_64
0891         help
0892           This option adds support for PROT_SAO mappings from userspace
0893           inside LPARs on supported CPUs.
0894 
0895           This may cause issues when performing guest migration from
0896           a CPU that supports SAO to one that does not.
0897 
0898           If unsure, say N here.
0899 
0900 config PPC_COPRO_BASE
0901         bool
0902 
0903 config SCHED_SMT
0904         bool "SMT (Hyperthreading) scheduler support"
0905         depends on PPC64 && SMP
0906         help
0907           SMT scheduler support improves the CPU scheduler's decision making
0908           when dealing with POWER5 cpus at a cost of slightly increased
0909           overhead in some places. If unsure say N here.
0910 
0911 config PPC_DENORMALISATION
0912         bool "PowerPC denormalisation exception handling"
0913         depends on PPC_BOOK3S_64
0914         default "y" if PPC_POWERNV
0915         help
0916           Add support for handling denormalisation of single precision
0917           values.  Useful for bare metal only.  If unsure say Y here.
0918 
0919 config CMDLINE
0920         string "Initial kernel command string"
0921         default ""
0922         help
0923           On some platforms, there is currently no way for the boot loader to
0924           pass arguments to the kernel. For these platforms, you can supply
0925           some command-line options at build time by entering them here.  In
0926           most cases you will need to specify the root device here.
0927 
0928 choice
0929         prompt "Kernel command line type" if CMDLINE != ""
0930         default CMDLINE_FROM_BOOTLOADER
0931 
0932 config CMDLINE_FROM_BOOTLOADER
0933         bool "Use bootloader kernel arguments if available"
0934         help
0935           Uses the command-line options passed by the boot loader. If
0936           the boot loader doesn't provide any, the default kernel command
0937           string provided in CMDLINE will be used.
0938 
0939 config CMDLINE_EXTEND
0940         bool "Extend bootloader kernel arguments"
0941         help
0942           The command-line arguments provided by the boot loader will be
0943           appended to the default kernel command string.
0944 
0945 config CMDLINE_FORCE
0946         bool "Always use the default kernel command string"
0947         help
0948           Always use the default kernel command string, even if the boot
0949           loader passes other arguments to the kernel.
0950           This is useful if you cannot or don't want to change the
0951           command-line options your boot loader passes to the kernel.
0952 
0953 endchoice
0954 
0955 config EXTRA_TARGETS
0956         string "Additional default image types"
0957         help
0958           List additional targets to be built by the bootwrapper here (separated
0959           by spaces).  This is useful for targets that depend of device tree
0960           files in the .dts directory.
0961 
0962           Targets in this list will be build as part of the default build
0963           target, or when the user does a 'make zImage' or a
0964           'make zImage.initrd'.
0965 
0966           If unsure, leave blank
0967 
0968 config ARCH_WANTS_FREEZER_CONTROL
0969         def_bool y
0970         depends on ADB_PMU
0971 
0972 source "kernel/power/Kconfig"
0973 
0974 config PPC_MEM_KEYS
0975         prompt "PowerPC Memory Protection Keys"
0976         def_bool y
0977         depends on PPC_BOOK3S_64
0978         depends on PPC_64S_HASH_MMU
0979         select ARCH_USES_HIGH_VMA_FLAGS
0980         select ARCH_HAS_PKEYS
0981         help
0982           Memory Protection Keys provides a mechanism for enforcing
0983           page-based protections, but without requiring modification of the
0984           page tables when an application changes protection domains.
0985 
0986           For details, see Documentation/core-api/protection-keys.rst
0987 
0988           If unsure, say y.
0989 
0990 config PPC_SECURE_BOOT
0991         prompt "Enable secure boot support"
0992         bool
0993         depends on PPC_POWERNV || PPC_PSERIES
0994         depends on IMA_ARCH_POLICY
0995         imply IMA_SECURE_AND_OR_TRUSTED_BOOT
0996         help
0997           Systems with firmware secure boot enabled need to define security
0998           policies to extend secure boot to the OS. This config allows a user
0999           to enable OS secure boot on systems that have firmware support for
1000           it. If in doubt say N.
1001 
1002 config PPC_SECVAR_SYSFS
1003         bool "Enable sysfs interface for POWER secure variables"
1004         default y
1005         depends on PPC_SECURE_BOOT
1006         depends on SYSFS
1007         help
1008           POWER secure variables are managed and controlled by firmware.
1009           These variables are exposed to userspace via sysfs to enable
1010           read/write operations on these variables. Say Y if you have
1011           secure boot enabled and want to expose variables to userspace.
1012 
1013 config PPC_RTAS_FILTER
1014         bool "Enable filtering of RTAS syscalls"
1015         default y
1016         depends on PPC_RTAS
1017         help
1018           The RTAS syscall API has security issues that could be used to
1019           compromise system integrity. This option enforces restrictions on the
1020           RTAS calls and arguments passed by userspace programs to mitigate
1021           these issues.
1022 
1023           Say Y unless you know what you are doing and the filter is causing
1024           problems for you.
1025 
1026 endmenu
1027 
1028 config ISA_DMA_API
1029         bool
1030         default PCI
1031 
1032 menu "Bus options"
1033 
1034 config ISA
1035         bool "Support for ISA-bus hardware"
1036         depends on PPC_CHRP
1037         select PPC_I8259
1038         help
1039           Find out whether you have ISA slots on your motherboard.  ISA is the
1040           name of a bus system, i.e. the way the CPU talks to the other stuff
1041           inside your box.  If you have an Apple machine, say N here; if you
1042           have an IBM RS/6000 or pSeries machine, say Y.  If you have an
1043           embedded board, consult your board documentation.
1044 
1045 config GENERIC_ISA_DMA
1046         bool
1047         depends on ISA_DMA_API
1048         default y
1049 
1050 config PPC_INDIRECT_PCI
1051         bool
1052         depends on PCI
1053         default y if 40x || 44x
1054 
1055 config SBUS
1056         bool
1057 
1058 config FSL_SOC
1059         bool
1060 
1061 config FSL_PCI
1062         bool
1063         select ARCH_HAS_DMA_SET_MASK
1064         select PPC_INDIRECT_PCI
1065         select PCI_QUIRKS
1066 
1067 config FSL_PMC
1068         bool
1069         default y
1070         depends on SUSPEND && (PPC_85xx || PPC_86xx)
1071         help
1072           Freescale MPC85xx/MPC86xx power management controller support
1073           (suspend/resume). For MPC83xx see platforms/83xx/suspend.c
1074 
1075 config PPC4xx_CPM
1076         bool
1077         default y
1078         depends on SUSPEND && (44x || 40x)
1079         help
1080           PPC4xx Clock Power Management (CPM) support (suspend/resume).
1081           It also enables support for two different idle states (idle-wait
1082           and idle-doze).
1083 
1084 config 4xx_SOC
1085         bool
1086 
1087 config FSL_LBC
1088         bool "Freescale Local Bus support"
1089         help
1090           Enables reporting of errors from the Freescale local bus
1091           controller.  Also contains some common code used by
1092           drivers for specific local bus peripherals.
1093 
1094 config FSL_GTM
1095         bool
1096         depends on PPC_83xx || QUICC_ENGINE || CPM2
1097         help
1098           Freescale General-purpose Timers support
1099 
1100 config PCI_8260
1101         bool
1102         depends on PCI && 8260
1103         select PPC_INDIRECT_PCI
1104         default y
1105 
1106 config FSL_RIO
1107         bool "Freescale Embedded SRIO Controller support"
1108         depends on RAPIDIO = y && HAVE_RAPIDIO
1109         default "n"
1110         help
1111           Include support for RapidIO controller on Freescale embedded
1112           processors (MPC8548, MPC8641, etc).
1113 
1114 endmenu
1115 
1116 config NONSTATIC_KERNEL
1117         bool
1118 
1119 menu "Advanced setup"
1120         depends on PPC32
1121 
1122 config ADVANCED_OPTIONS
1123         bool "Prompt for advanced kernel configuration options"
1124         help
1125           This option will enable prompting for a variety of advanced kernel
1126           configuration options.  These options can cause the kernel to not
1127           work if they are set incorrectly, but can be used to optimize certain
1128           aspects of kernel memory management.
1129 
1130           Unless you know what you are doing, say N here.
1131 
1132 comment "Default settings for advanced configuration options are used"
1133         depends on !ADVANCED_OPTIONS
1134 
1135 config LOWMEM_SIZE_BOOL
1136         bool "Set maximum low memory"
1137         depends on ADVANCED_OPTIONS
1138         help
1139           This option allows you to set the maximum amount of memory which
1140           will be used as "low memory", that is, memory which the kernel can
1141           access directly, without having to set up a kernel virtual mapping.
1142           This can be useful in optimizing the layout of kernel virtual
1143           memory.
1144 
1145           Say N here unless you know what you are doing.
1146 
1147 config LOWMEM_SIZE
1148         hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
1149         default "0x30000000"
1150 
1151 config LOWMEM_CAM_NUM_BOOL
1152         bool "Set number of CAMs to use to map low memory"
1153         depends on ADVANCED_OPTIONS && FSL_BOOKE
1154         help
1155           This option allows you to set the maximum number of CAM slots that
1156           will be used to map low memory.  There are a limited number of slots
1157           available and even more limited number that will fit in the L1 MMU.
1158           However, using more entries will allow mapping more low memory.  This
1159           can be useful in optimizing the layout of kernel virtual memory.
1160 
1161           Say N here unless you know what you are doing.
1162 
1163 config LOWMEM_CAM_NUM
1164         depends on FSL_BOOKE
1165         int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
1166         default 3 if !STRICT_KERNEL_RWX
1167         default 9 if DATA_SHIFT >= 24
1168         default 12 if DATA_SHIFT >= 22
1169         default 15
1170 
1171 config DYNAMIC_MEMSTART
1172         bool "Enable page aligned dynamic load address for kernel"
1173         depends on ADVANCED_OPTIONS && FLATMEM && (FSL_BOOKE || 44x)
1174         select NONSTATIC_KERNEL
1175         help
1176           This option enables the kernel to be loaded at any page aligned
1177           physical address. The kernel creates a mapping from KERNELBASE to
1178           the address where the kernel is loaded. The page size here implies
1179           the TLB page size of the mapping for kernel on the particular platform.
1180           Please refer to the init code for finding the TLB page size.
1181 
1182           DYNAMIC_MEMSTART is an easy way of implementing pseudo-RELOCATABLE
1183           kernel image, where the only restriction is the page aligned kernel
1184           load address. When this option is enabled, the compile time physical
1185           address CONFIG_PHYSICAL_START is ignored.
1186 
1187           This option is overridden by CONFIG_RELOCATABLE
1188 
1189 config PAGE_OFFSET_BOOL
1190         bool "Set custom page offset address"
1191         depends on ADVANCED_OPTIONS
1192         help
1193           This option allows you to set the kernel virtual address at which
1194           the kernel will map low memory.  This can be useful in optimizing
1195           the virtual memory layout of the system.
1196 
1197           Say N here unless you know what you are doing.
1198 
1199 config PAGE_OFFSET
1200         hex "Virtual address of memory base" if PAGE_OFFSET_BOOL
1201         default "0xc0000000"
1202 
1203 config KERNEL_START_BOOL
1204         bool "Set custom kernel base address"
1205         depends on ADVANCED_OPTIONS
1206         help
1207           This option allows you to set the kernel virtual address at which
1208           the kernel will be loaded.  Normally this should match PAGE_OFFSET
1209           however there are times (like kdump) that one might not want them
1210           to be the same.
1211 
1212           Say N here unless you know what you are doing.
1213 
1214 config KERNEL_START
1215         hex "Virtual address of kernel base" if KERNEL_START_BOOL
1216         default PAGE_OFFSET if PAGE_OFFSET_BOOL
1217         default "0xc2000000" if CRASH_DUMP && !NONSTATIC_KERNEL
1218         default "0xc0000000"
1219 
1220 config PHYSICAL_START_BOOL
1221         bool "Set physical address where the kernel is loaded"
1222         depends on ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE
1223         help
1224           This gives the physical address where the kernel is loaded.
1225 
1226           Say N here unless you know what you are doing.
1227 
1228 config PHYSICAL_START
1229         hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL
1230         default "0x02000000" if PPC_BOOK3S && CRASH_DUMP && !NONSTATIC_KERNEL
1231         default "0x00000000"
1232 
1233 config PHYSICAL_ALIGN
1234         hex
1235         default "0x04000000" if FSL_BOOKE
1236         help
1237           This value puts the alignment restrictions on physical address
1238           where kernel is loaded and run from. Kernel is compiled for an
1239           address which meets above alignment restriction.
1240 
1241 config TASK_SIZE_BOOL
1242         bool "Set custom user task size"
1243         depends on ADVANCED_OPTIONS
1244         help
1245           This option allows you to set the amount of virtual address space
1246           allocated to user tasks.  This can be useful in optimizing the
1247           virtual memory layout of the system.
1248 
1249           Say N here unless you know what you are doing.
1250 
1251 config TASK_SIZE
1252         hex "Size of user task space" if TASK_SIZE_BOOL
1253         default "0x80000000" if PPC_8xx
1254         default "0xb0000000" if PPC_BOOK3S_32
1255         default "0xc0000000"
1256 endmenu
1257 
1258 if PPC64
1259 # This value must have zeroes in the bottom 60 bits otherwise lots will break
1260 config PAGE_OFFSET
1261         hex
1262         default "0xc000000000000000"
1263 config KERNEL_START
1264         hex
1265         default "0xc000000000000000"
1266 config PHYSICAL_START
1267         hex
1268         default "0x00000000"
1269 endif
1270 
1271 config PPC_LIB_RHEAP
1272         bool
1273 
1274 source "arch/powerpc/kvm/Kconfig"
1275 
1276 source "kernel/livepatch/Kconfig"