162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci# Select 32 or 64 bit
362306a36Sopenharmony_ciconfig 64BIT
462306a36Sopenharmony_ci	bool "64-bit kernel" if "$(ARCH)" = "x86"
562306a36Sopenharmony_ci	default "$(ARCH)" != "i386"
662306a36Sopenharmony_ci	help
762306a36Sopenharmony_ci	  Say yes to build a 64-bit kernel - formerly known as x86_64
862306a36Sopenharmony_ci	  Say no to build a 32-bit kernel - formerly known as i386
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ciconfig X86_32
1162306a36Sopenharmony_ci	def_bool y
1262306a36Sopenharmony_ci	depends on !64BIT
1362306a36Sopenharmony_ci	# Options that are inherently 32-bit kernel only:
1462306a36Sopenharmony_ci	select ARCH_WANT_IPC_PARSE_VERSION
1562306a36Sopenharmony_ci	select CLKSRC_I8253
1662306a36Sopenharmony_ci	select CLONE_BACKWARDS
1762306a36Sopenharmony_ci	select GENERIC_VDSO_32
1862306a36Sopenharmony_ci	select HAVE_DEBUG_STACKOVERFLOW
1962306a36Sopenharmony_ci	select KMAP_LOCAL
2062306a36Sopenharmony_ci	select MODULES_USE_ELF_REL
2162306a36Sopenharmony_ci	select OLD_SIGACTION
2262306a36Sopenharmony_ci	select ARCH_SPLIT_ARG64
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ciconfig X86_64
2562306a36Sopenharmony_ci	def_bool y
2662306a36Sopenharmony_ci	depends on 64BIT
2762306a36Sopenharmony_ci	# Options that are inherently 64-bit kernel only:
2862306a36Sopenharmony_ci	select ARCH_HAS_GIGANTIC_PAGE
2962306a36Sopenharmony_ci	select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
3062306a36Sopenharmony_ci	select ARCH_SUPPORTS_PER_VMA_LOCK
3162306a36Sopenharmony_ci	select ARCH_USE_CMPXCHG_LOCKREF
3262306a36Sopenharmony_ci	select HAVE_ARCH_SOFT_DIRTY
3362306a36Sopenharmony_ci	select MODULES_USE_ELF_RELA
3462306a36Sopenharmony_ci	select NEED_DMA_MAP_STATE
3562306a36Sopenharmony_ci	select SWIOTLB
3662306a36Sopenharmony_ci	select ARCH_HAS_ELFCORE_COMPAT
3762306a36Sopenharmony_ci	select ZONE_DMA32
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ciconfig FORCE_DYNAMIC_FTRACE
4062306a36Sopenharmony_ci	def_bool y
4162306a36Sopenharmony_ci	depends on X86_32
4262306a36Sopenharmony_ci	depends on FUNCTION_TRACER
4362306a36Sopenharmony_ci	select DYNAMIC_FTRACE
4462306a36Sopenharmony_ci	help
4562306a36Sopenharmony_ci	  We keep the static function tracing (!DYNAMIC_FTRACE) around
4662306a36Sopenharmony_ci	  in order to test the non static function tracing in the
4762306a36Sopenharmony_ci	  generic code, as other architectures still use it. But we
4862306a36Sopenharmony_ci	  only need to keep it around for x86_64. No need to keep it
4962306a36Sopenharmony_ci	  for x86_32. For x86_32, force DYNAMIC_FTRACE.
5062306a36Sopenharmony_ci#
5162306a36Sopenharmony_ci# Arch settings
5262306a36Sopenharmony_ci#
5362306a36Sopenharmony_ci# ( Note that options that are marked 'if X86_64' could in principle be
5462306a36Sopenharmony_ci#   ported to 32-bit as well. )
5562306a36Sopenharmony_ci#
5662306a36Sopenharmony_ciconfig X86
5762306a36Sopenharmony_ci	def_bool y
5862306a36Sopenharmony_ci	#
5962306a36Sopenharmony_ci	# Note: keep this list sorted alphabetically
6062306a36Sopenharmony_ci	#
6162306a36Sopenharmony_ci	select ACPI_LEGACY_TABLES_LOOKUP	if ACPI
6262306a36Sopenharmony_ci	select ACPI_SYSTEM_POWER_STATES_SUPPORT	if ACPI
6362306a36Sopenharmony_ci	select ARCH_32BIT_OFF_T			if X86_32
6462306a36Sopenharmony_ci	select ARCH_CLOCKSOURCE_INIT
6562306a36Sopenharmony_ci	select ARCH_CORRECT_STACKTRACE_ON_KRETPROBE
6662306a36Sopenharmony_ci	select ARCH_ENABLE_HUGEPAGE_MIGRATION if X86_64 && HUGETLB_PAGE && MIGRATION
6762306a36Sopenharmony_ci	select ARCH_ENABLE_MEMORY_HOTPLUG if X86_64
6862306a36Sopenharmony_ci	select ARCH_ENABLE_MEMORY_HOTREMOVE if MEMORY_HOTPLUG
6962306a36Sopenharmony_ci	select ARCH_ENABLE_SPLIT_PMD_PTLOCK if (PGTABLE_LEVELS > 2) && (X86_64 || X86_PAE)
7062306a36Sopenharmony_ci	select ARCH_ENABLE_THP_MIGRATION if X86_64 && TRANSPARENT_HUGEPAGE
7162306a36Sopenharmony_ci	select ARCH_HAS_ACPI_TABLE_UPGRADE	if ACPI
7262306a36Sopenharmony_ci	select ARCH_HAS_CACHE_LINE_SIZE
7362306a36Sopenharmony_ci	select ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION
7462306a36Sopenharmony_ci	select ARCH_HAS_CPU_FINALIZE_INIT
7562306a36Sopenharmony_ci	select ARCH_HAS_CURRENT_STACK_POINTER
7662306a36Sopenharmony_ci	select ARCH_HAS_DEBUG_VIRTUAL
7762306a36Sopenharmony_ci	select ARCH_HAS_DEBUG_VM_PGTABLE	if !X86_PAE
7862306a36Sopenharmony_ci	select ARCH_HAS_DEVMEM_IS_ALLOWED
7962306a36Sopenharmony_ci	select ARCH_HAS_EARLY_DEBUG		if KGDB
8062306a36Sopenharmony_ci	select ARCH_HAS_ELF_RANDOMIZE
8162306a36Sopenharmony_ci	select ARCH_HAS_FAST_MULTIPLIER
8262306a36Sopenharmony_ci	select ARCH_HAS_FORTIFY_SOURCE
8362306a36Sopenharmony_ci	select ARCH_HAS_GCOV_PROFILE_ALL
8462306a36Sopenharmony_ci	select ARCH_HAS_KCOV			if X86_64
8562306a36Sopenharmony_ci	select ARCH_HAS_MEM_ENCRYPT
8662306a36Sopenharmony_ci	select ARCH_HAS_MEMBARRIER_SYNC_CORE
8762306a36Sopenharmony_ci	select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
8862306a36Sopenharmony_ci	select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
8962306a36Sopenharmony_ci	select ARCH_HAS_PMEM_API		if X86_64
9062306a36Sopenharmony_ci	select ARCH_HAS_PTE_DEVMAP		if X86_64
9162306a36Sopenharmony_ci	select ARCH_HAS_PTE_SPECIAL
9262306a36Sopenharmony_ci	select ARCH_HAS_NONLEAF_PMD_YOUNG	if PGTABLE_LEVELS > 2
9362306a36Sopenharmony_ci	select ARCH_HAS_UACCESS_FLUSHCACHE	if X86_64
9462306a36Sopenharmony_ci	select ARCH_HAS_COPY_MC			if X86_64
9562306a36Sopenharmony_ci	select ARCH_HAS_SET_MEMORY
9662306a36Sopenharmony_ci	select ARCH_HAS_SET_DIRECT_MAP
9762306a36Sopenharmony_ci	select ARCH_HAS_STRICT_KERNEL_RWX
9862306a36Sopenharmony_ci	select ARCH_HAS_STRICT_MODULE_RWX
9962306a36Sopenharmony_ci	select ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
10062306a36Sopenharmony_ci	select ARCH_HAS_SYSCALL_WRAPPER
10162306a36Sopenharmony_ci	select ARCH_HAS_UBSAN_SANITIZE_ALL
10262306a36Sopenharmony_ci	select ARCH_HAS_DEBUG_WX
10362306a36Sopenharmony_ci	select ARCH_HAS_ZONE_DMA_SET if EXPERT
10462306a36Sopenharmony_ci	select ARCH_HAVE_NMI_SAFE_CMPXCHG
10562306a36Sopenharmony_ci	select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE
10662306a36Sopenharmony_ci	select ARCH_MIGHT_HAVE_ACPI_PDC		if ACPI
10762306a36Sopenharmony_ci	select ARCH_MIGHT_HAVE_PC_PARPORT
10862306a36Sopenharmony_ci	select ARCH_MIGHT_HAVE_PC_SERIO
10962306a36Sopenharmony_ci	select ARCH_STACKWALK
11062306a36Sopenharmony_ci	select ARCH_SUPPORTS_ACPI
11162306a36Sopenharmony_ci	select ARCH_SUPPORTS_ATOMIC_RMW
11262306a36Sopenharmony_ci	select ARCH_SUPPORTS_DEBUG_PAGEALLOC
11362306a36Sopenharmony_ci	select ARCH_SUPPORTS_PAGE_TABLE_CHECK	if X86_64
11462306a36Sopenharmony_ci	select ARCH_SUPPORTS_NUMA_BALANCING	if X86_64
11562306a36Sopenharmony_ci	select ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP	if NR_CPUS <= 4096
11662306a36Sopenharmony_ci	select ARCH_SUPPORTS_CFI_CLANG		if X86_64
11762306a36Sopenharmony_ci	select ARCH_USES_CFI_TRAPS		if X86_64 && CFI_CLANG
11862306a36Sopenharmony_ci	select ARCH_SUPPORTS_LTO_CLANG
11962306a36Sopenharmony_ci	select ARCH_SUPPORTS_LTO_CLANG_THIN
12062306a36Sopenharmony_ci	select ARCH_USE_BUILTIN_BSWAP
12162306a36Sopenharmony_ci	select ARCH_USE_MEMTEST
12262306a36Sopenharmony_ci	select ARCH_USE_QUEUED_RWLOCKS
12362306a36Sopenharmony_ci	select ARCH_USE_QUEUED_SPINLOCKS
12462306a36Sopenharmony_ci	select ARCH_USE_SYM_ANNOTATIONS
12562306a36Sopenharmony_ci	select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
12662306a36Sopenharmony_ci	select ARCH_WANT_DEFAULT_BPF_JIT	if X86_64
12762306a36Sopenharmony_ci	select ARCH_WANTS_DYNAMIC_TASK_STRUCT
12862306a36Sopenharmony_ci	select ARCH_WANTS_NO_INSTR
12962306a36Sopenharmony_ci	select ARCH_WANT_GENERAL_HUGETLB
13062306a36Sopenharmony_ci	select ARCH_WANT_HUGE_PMD_SHARE
13162306a36Sopenharmony_ci	select ARCH_WANT_LD_ORPHAN_WARN
13262306a36Sopenharmony_ci	select ARCH_WANT_OPTIMIZE_DAX_VMEMMAP	if X86_64
13362306a36Sopenharmony_ci	select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP	if X86_64
13462306a36Sopenharmony_ci	select ARCH_WANTS_THP_SWAP		if X86_64
13562306a36Sopenharmony_ci	select ARCH_HAS_PARANOID_L1D_FLUSH
13662306a36Sopenharmony_ci	select BUILDTIME_TABLE_SORT
13762306a36Sopenharmony_ci	select CLKEVT_I8253
13862306a36Sopenharmony_ci	select CLOCKSOURCE_VALIDATE_LAST_CYCLE
13962306a36Sopenharmony_ci	select CLOCKSOURCE_WATCHDOG
14062306a36Sopenharmony_ci	# Word-size accesses may read uninitialized data past the trailing \0
14162306a36Sopenharmony_ci	# in strings and cause false KMSAN reports.
14262306a36Sopenharmony_ci	select DCACHE_WORD_ACCESS		if !KMSAN
14362306a36Sopenharmony_ci	select DYNAMIC_SIGFRAME
14462306a36Sopenharmony_ci	select EDAC_ATOMIC_SCRUB
14562306a36Sopenharmony_ci	select EDAC_SUPPORT
14662306a36Sopenharmony_ci	select GENERIC_CLOCKEVENTS_BROADCAST	if X86_64 || (X86_32 && X86_LOCAL_APIC)
14762306a36Sopenharmony_ci	select GENERIC_CLOCKEVENTS_MIN_ADJUST
14862306a36Sopenharmony_ci	select GENERIC_CMOS_UPDATE
14962306a36Sopenharmony_ci	select GENERIC_CPU_AUTOPROBE
15062306a36Sopenharmony_ci	select GENERIC_CPU_VULNERABILITIES
15162306a36Sopenharmony_ci	select GENERIC_EARLY_IOREMAP
15262306a36Sopenharmony_ci	select GENERIC_ENTRY
15362306a36Sopenharmony_ci	select GENERIC_IOMAP
15462306a36Sopenharmony_ci	select GENERIC_IRQ_EFFECTIVE_AFF_MASK	if SMP
15562306a36Sopenharmony_ci	select GENERIC_IRQ_MATRIX_ALLOCATOR	if X86_LOCAL_APIC
15662306a36Sopenharmony_ci	select GENERIC_IRQ_MIGRATION		if SMP
15762306a36Sopenharmony_ci	select GENERIC_IRQ_PROBE
15862306a36Sopenharmony_ci	select GENERIC_IRQ_RESERVATION_MODE
15962306a36Sopenharmony_ci	select GENERIC_IRQ_SHOW
16062306a36Sopenharmony_ci	select GENERIC_PENDING_IRQ		if SMP
16162306a36Sopenharmony_ci	select GENERIC_PTDUMP
16262306a36Sopenharmony_ci	select GENERIC_SMP_IDLE_THREAD
16362306a36Sopenharmony_ci	select GENERIC_TIME_VSYSCALL
16462306a36Sopenharmony_ci	select GENERIC_GETTIMEOFDAY
16562306a36Sopenharmony_ci	select GENERIC_VDSO_TIME_NS
16662306a36Sopenharmony_ci	select GUP_GET_PXX_LOW_HIGH		if X86_PAE
16762306a36Sopenharmony_ci	select HARDIRQS_SW_RESEND
16862306a36Sopenharmony_ci	select HARDLOCKUP_CHECK_TIMESTAMP	if X86_64
16962306a36Sopenharmony_ci	select HAS_IOPORT
17062306a36Sopenharmony_ci	select HAVE_ACPI_APEI			if ACPI
17162306a36Sopenharmony_ci	select HAVE_ACPI_APEI_NMI		if ACPI
17262306a36Sopenharmony_ci	select HAVE_ALIGNED_STRUCT_PAGE		if SLUB
17362306a36Sopenharmony_ci	select HAVE_ARCH_AUDITSYSCALL
17462306a36Sopenharmony_ci	select HAVE_ARCH_HUGE_VMAP		if X86_64 || X86_PAE
17562306a36Sopenharmony_ci	select HAVE_ARCH_HUGE_VMALLOC		if X86_64
17662306a36Sopenharmony_ci	select HAVE_ARCH_JUMP_LABEL
17762306a36Sopenharmony_ci	select HAVE_ARCH_JUMP_LABEL_RELATIVE
17862306a36Sopenharmony_ci	select HAVE_ARCH_KASAN			if X86_64
17962306a36Sopenharmony_ci	select HAVE_ARCH_KASAN_VMALLOC		if X86_64
18062306a36Sopenharmony_ci	select HAVE_ARCH_KFENCE
18162306a36Sopenharmony_ci	select HAVE_ARCH_KMSAN			if X86_64
18262306a36Sopenharmony_ci	select HAVE_ARCH_KGDB
18362306a36Sopenharmony_ci	select HAVE_ARCH_MMAP_RND_BITS		if MMU
18462306a36Sopenharmony_ci	select HAVE_ARCH_MMAP_RND_COMPAT_BITS	if MMU && COMPAT
18562306a36Sopenharmony_ci	select HAVE_ARCH_COMPAT_MMAP_BASES	if MMU && COMPAT
18662306a36Sopenharmony_ci	select HAVE_ARCH_PREL32_RELOCATIONS
18762306a36Sopenharmony_ci	select HAVE_ARCH_SECCOMP_FILTER
18862306a36Sopenharmony_ci	select HAVE_ARCH_THREAD_STRUCT_WHITELIST
18962306a36Sopenharmony_ci	select HAVE_ARCH_STACKLEAK
19062306a36Sopenharmony_ci	select HAVE_ARCH_TRACEHOOK
19162306a36Sopenharmony_ci	select HAVE_ARCH_TRANSPARENT_HUGEPAGE
19262306a36Sopenharmony_ci	select HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD if X86_64
19362306a36Sopenharmony_ci	select HAVE_ARCH_USERFAULTFD_WP         if X86_64 && USERFAULTFD
19462306a36Sopenharmony_ci	select HAVE_ARCH_USERFAULTFD_MINOR	if X86_64 && USERFAULTFD
19562306a36Sopenharmony_ci	select HAVE_ARCH_VMAP_STACK		if X86_64
19662306a36Sopenharmony_ci	select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
19762306a36Sopenharmony_ci	select HAVE_ARCH_WITHIN_STACK_FRAMES
19862306a36Sopenharmony_ci	select HAVE_ASM_MODVERSIONS
19962306a36Sopenharmony_ci	select HAVE_CMPXCHG_DOUBLE
20062306a36Sopenharmony_ci	select HAVE_CMPXCHG_LOCAL
20162306a36Sopenharmony_ci	select HAVE_CONTEXT_TRACKING_USER		if X86_64
20262306a36Sopenharmony_ci	select HAVE_CONTEXT_TRACKING_USER_OFFSTACK	if HAVE_CONTEXT_TRACKING_USER
20362306a36Sopenharmony_ci	select HAVE_C_RECORDMCOUNT
20462306a36Sopenharmony_ci	select HAVE_OBJTOOL_MCOUNT		if HAVE_OBJTOOL
20562306a36Sopenharmony_ci	select HAVE_OBJTOOL_NOP_MCOUNT		if HAVE_OBJTOOL_MCOUNT
20662306a36Sopenharmony_ci	select HAVE_BUILDTIME_MCOUNT_SORT
20762306a36Sopenharmony_ci	select HAVE_DEBUG_KMEMLEAK
20862306a36Sopenharmony_ci	select HAVE_DMA_CONTIGUOUS
20962306a36Sopenharmony_ci	select HAVE_DYNAMIC_FTRACE
21062306a36Sopenharmony_ci	select HAVE_DYNAMIC_FTRACE_WITH_REGS
21162306a36Sopenharmony_ci	select HAVE_DYNAMIC_FTRACE_WITH_ARGS	if X86_64
21262306a36Sopenharmony_ci	select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
21362306a36Sopenharmony_ci	select HAVE_SAMPLE_FTRACE_DIRECT	if X86_64
21462306a36Sopenharmony_ci	select HAVE_SAMPLE_FTRACE_DIRECT_MULTI	if X86_64
21562306a36Sopenharmony_ci	select HAVE_EBPF_JIT
21662306a36Sopenharmony_ci	select HAVE_EFFICIENT_UNALIGNED_ACCESS
21762306a36Sopenharmony_ci	select HAVE_EISA
21862306a36Sopenharmony_ci	select HAVE_EXIT_THREAD
21962306a36Sopenharmony_ci	select HAVE_FAST_GUP
22062306a36Sopenharmony_ci	select HAVE_FENTRY			if X86_64 || DYNAMIC_FTRACE
22162306a36Sopenharmony_ci	select HAVE_FTRACE_MCOUNT_RECORD
22262306a36Sopenharmony_ci	select HAVE_FUNCTION_GRAPH_RETVAL	if HAVE_FUNCTION_GRAPH_TRACER
22362306a36Sopenharmony_ci	select HAVE_FUNCTION_GRAPH_TRACER	if X86_32 || (X86_64 && DYNAMIC_FTRACE)
22462306a36Sopenharmony_ci	select HAVE_FUNCTION_TRACER
22562306a36Sopenharmony_ci	select HAVE_GCC_PLUGINS
22662306a36Sopenharmony_ci	select HAVE_HW_BREAKPOINT
22762306a36Sopenharmony_ci	select HAVE_IOREMAP_PROT
22862306a36Sopenharmony_ci	select HAVE_IRQ_EXIT_ON_IRQ_STACK	if X86_64
22962306a36Sopenharmony_ci	select HAVE_IRQ_TIME_ACCOUNTING
23062306a36Sopenharmony_ci	select HAVE_JUMP_LABEL_HACK		if HAVE_OBJTOOL
23162306a36Sopenharmony_ci	select HAVE_KERNEL_BZIP2
23262306a36Sopenharmony_ci	select HAVE_KERNEL_GZIP
23362306a36Sopenharmony_ci	select HAVE_KERNEL_LZ4
23462306a36Sopenharmony_ci	select HAVE_KERNEL_LZMA
23562306a36Sopenharmony_ci	select HAVE_KERNEL_LZO
23662306a36Sopenharmony_ci	select HAVE_KERNEL_XZ
23762306a36Sopenharmony_ci	select HAVE_KERNEL_ZSTD
23862306a36Sopenharmony_ci	select HAVE_KPROBES
23962306a36Sopenharmony_ci	select HAVE_KPROBES_ON_FTRACE
24062306a36Sopenharmony_ci	select HAVE_FUNCTION_ERROR_INJECTION
24162306a36Sopenharmony_ci	select HAVE_KRETPROBES
24262306a36Sopenharmony_ci	select HAVE_RETHOOK
24362306a36Sopenharmony_ci	select HAVE_KVM
24462306a36Sopenharmony_ci	select HAVE_LIVEPATCH			if X86_64
24562306a36Sopenharmony_ci	select HAVE_MIXED_BREAKPOINTS_REGS
24662306a36Sopenharmony_ci	select HAVE_MOD_ARCH_SPECIFIC
24762306a36Sopenharmony_ci	select HAVE_MOVE_PMD
24862306a36Sopenharmony_ci	select HAVE_MOVE_PUD
24962306a36Sopenharmony_ci	select HAVE_NOINSTR_HACK		if HAVE_OBJTOOL
25062306a36Sopenharmony_ci	select HAVE_NMI
25162306a36Sopenharmony_ci	select HAVE_NOINSTR_VALIDATION		if HAVE_OBJTOOL
25262306a36Sopenharmony_ci	select HAVE_OBJTOOL			if X86_64
25362306a36Sopenharmony_ci	select HAVE_OPTPROBES
25462306a36Sopenharmony_ci	select HAVE_PCSPKR_PLATFORM
25562306a36Sopenharmony_ci	select HAVE_PERF_EVENTS
25662306a36Sopenharmony_ci	select HAVE_PERF_EVENTS_NMI
25762306a36Sopenharmony_ci	select HAVE_HARDLOCKUP_DETECTOR_PERF	if PERF_EVENTS && HAVE_PERF_EVENTS_NMI
25862306a36Sopenharmony_ci	select HAVE_PCI
25962306a36Sopenharmony_ci	select HAVE_PERF_REGS
26062306a36Sopenharmony_ci	select HAVE_PERF_USER_STACK_DUMP
26162306a36Sopenharmony_ci	select MMU_GATHER_RCU_TABLE_FREE	if PARAVIRT
26262306a36Sopenharmony_ci	select MMU_GATHER_MERGE_VMAS
26362306a36Sopenharmony_ci	select HAVE_POSIX_CPU_TIMERS_TASK_WORK
26462306a36Sopenharmony_ci	select HAVE_REGS_AND_STACK_ACCESS_API
26562306a36Sopenharmony_ci	select HAVE_RELIABLE_STACKTRACE		if UNWINDER_ORC || STACK_VALIDATION
26662306a36Sopenharmony_ci	select HAVE_FUNCTION_ARG_ACCESS_API
26762306a36Sopenharmony_ci	select HAVE_SETUP_PER_CPU_AREA
26862306a36Sopenharmony_ci	select HAVE_SOFTIRQ_ON_OWN_STACK
26962306a36Sopenharmony_ci	select HAVE_STACKPROTECTOR		if CC_HAS_SANE_STACKPROTECTOR
27062306a36Sopenharmony_ci	select HAVE_STACK_VALIDATION		if HAVE_OBJTOOL
27162306a36Sopenharmony_ci	select HAVE_STATIC_CALL
27262306a36Sopenharmony_ci	select HAVE_STATIC_CALL_INLINE		if HAVE_OBJTOOL
27362306a36Sopenharmony_ci	select HAVE_PREEMPT_DYNAMIC_CALL
27462306a36Sopenharmony_ci	select HAVE_RSEQ
27562306a36Sopenharmony_ci	select HAVE_RUST			if X86_64
27662306a36Sopenharmony_ci	select HAVE_SYSCALL_TRACEPOINTS
27762306a36Sopenharmony_ci	select HAVE_UACCESS_VALIDATION		if HAVE_OBJTOOL
27862306a36Sopenharmony_ci	select HAVE_UNSTABLE_SCHED_CLOCK
27962306a36Sopenharmony_ci	select HAVE_USER_RETURN_NOTIFIER
28062306a36Sopenharmony_ci	select HAVE_GENERIC_VDSO
28162306a36Sopenharmony_ci	select HOTPLUG_PARALLEL			if SMP && X86_64
28262306a36Sopenharmony_ci	select HOTPLUG_SMT			if SMP
28362306a36Sopenharmony_ci	select HOTPLUG_SPLIT_STARTUP		if SMP && X86_32
28462306a36Sopenharmony_ci	select IRQ_FORCED_THREADING
28562306a36Sopenharmony_ci	select LOCK_MM_AND_FIND_VMA
28662306a36Sopenharmony_ci	select NEED_PER_CPU_EMBED_FIRST_CHUNK
28762306a36Sopenharmony_ci	select NEED_PER_CPU_PAGE_FIRST_CHUNK
28862306a36Sopenharmony_ci	select NEED_SG_DMA_LENGTH
28962306a36Sopenharmony_ci	select PCI_DOMAINS			if PCI
29062306a36Sopenharmony_ci	select PCI_LOCKLESS_CONFIG		if PCI
29162306a36Sopenharmony_ci	select PERF_EVENTS
29262306a36Sopenharmony_ci	select RTC_LIB
29362306a36Sopenharmony_ci	select RTC_MC146818_LIB
29462306a36Sopenharmony_ci	select SPARSE_IRQ
29562306a36Sopenharmony_ci	select SYSCTL_EXCEPTION_TRACE
29662306a36Sopenharmony_ci	select THREAD_INFO_IN_TASK
29762306a36Sopenharmony_ci	select TRACE_IRQFLAGS_SUPPORT
29862306a36Sopenharmony_ci	select TRACE_IRQFLAGS_NMI_SUPPORT
29962306a36Sopenharmony_ci	select USER_STACKTRACE_SUPPORT
30062306a36Sopenharmony_ci	select HAVE_ARCH_KCSAN			if X86_64
30162306a36Sopenharmony_ci	select PROC_PID_ARCH_STATUS		if PROC_FS
30262306a36Sopenharmony_ci	select HAVE_ARCH_NODE_DEV_GROUP		if X86_SGX
30362306a36Sopenharmony_ci	select FUNCTION_ALIGNMENT_16B		if X86_64 || X86_ALIGNMENT_16
30462306a36Sopenharmony_ci	select FUNCTION_ALIGNMENT_4B
30562306a36Sopenharmony_ci	imply IMA_SECURE_AND_OR_TRUSTED_BOOT    if EFI
30662306a36Sopenharmony_ci	select HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
30762306a36Sopenharmony_ci
30862306a36Sopenharmony_ciconfig INSTRUCTION_DECODER
30962306a36Sopenharmony_ci	def_bool y
31062306a36Sopenharmony_ci	depends on KPROBES || PERF_EVENTS || UPROBES
31162306a36Sopenharmony_ci
31262306a36Sopenharmony_ciconfig OUTPUT_FORMAT
31362306a36Sopenharmony_ci	string
31462306a36Sopenharmony_ci	default "elf32-i386" if X86_32
31562306a36Sopenharmony_ci	default "elf64-x86-64" if X86_64
31662306a36Sopenharmony_ci
31762306a36Sopenharmony_ciconfig LOCKDEP_SUPPORT
31862306a36Sopenharmony_ci	def_bool y
31962306a36Sopenharmony_ci
32062306a36Sopenharmony_ciconfig STACKTRACE_SUPPORT
32162306a36Sopenharmony_ci	def_bool y
32262306a36Sopenharmony_ci
32362306a36Sopenharmony_ciconfig MMU
32462306a36Sopenharmony_ci	def_bool y
32562306a36Sopenharmony_ci
32662306a36Sopenharmony_ciconfig ARCH_MMAP_RND_BITS_MIN
32762306a36Sopenharmony_ci	default 28 if 64BIT
32862306a36Sopenharmony_ci	default 8
32962306a36Sopenharmony_ci
33062306a36Sopenharmony_ciconfig ARCH_MMAP_RND_BITS_MAX
33162306a36Sopenharmony_ci	default 32 if 64BIT
33262306a36Sopenharmony_ci	default 16
33362306a36Sopenharmony_ci
33462306a36Sopenharmony_ciconfig ARCH_MMAP_RND_COMPAT_BITS_MIN
33562306a36Sopenharmony_ci	default 8
33662306a36Sopenharmony_ci
33762306a36Sopenharmony_ciconfig ARCH_MMAP_RND_COMPAT_BITS_MAX
33862306a36Sopenharmony_ci	default 16
33962306a36Sopenharmony_ci
34062306a36Sopenharmony_ciconfig SBUS
34162306a36Sopenharmony_ci	bool
34262306a36Sopenharmony_ci
34362306a36Sopenharmony_ciconfig GENERIC_ISA_DMA
34462306a36Sopenharmony_ci	def_bool y
34562306a36Sopenharmony_ci	depends on ISA_DMA_API
34662306a36Sopenharmony_ci
34762306a36Sopenharmony_ciconfig GENERIC_CSUM
34862306a36Sopenharmony_ci	bool
34962306a36Sopenharmony_ci	default y if KMSAN || KASAN
35062306a36Sopenharmony_ci
35162306a36Sopenharmony_ciconfig GENERIC_BUG
35262306a36Sopenharmony_ci	def_bool y
35362306a36Sopenharmony_ci	depends on BUG
35462306a36Sopenharmony_ci	select GENERIC_BUG_RELATIVE_POINTERS if X86_64
35562306a36Sopenharmony_ci
35662306a36Sopenharmony_ciconfig GENERIC_BUG_RELATIVE_POINTERS
35762306a36Sopenharmony_ci	bool
35862306a36Sopenharmony_ci
35962306a36Sopenharmony_ciconfig ARCH_MAY_HAVE_PC_FDC
36062306a36Sopenharmony_ci	def_bool y
36162306a36Sopenharmony_ci	depends on ISA_DMA_API
36262306a36Sopenharmony_ci
36362306a36Sopenharmony_ciconfig GENERIC_CALIBRATE_DELAY
36462306a36Sopenharmony_ci	def_bool y
36562306a36Sopenharmony_ci
36662306a36Sopenharmony_ciconfig ARCH_HAS_CPU_RELAX
36762306a36Sopenharmony_ci	def_bool y
36862306a36Sopenharmony_ci
36962306a36Sopenharmony_ciconfig ARCH_HIBERNATION_POSSIBLE
37062306a36Sopenharmony_ci	def_bool y
37162306a36Sopenharmony_ci
37262306a36Sopenharmony_ciconfig ARCH_SUSPEND_POSSIBLE
37362306a36Sopenharmony_ci	def_bool y
37462306a36Sopenharmony_ci
37562306a36Sopenharmony_ciconfig AUDIT_ARCH
37662306a36Sopenharmony_ci	def_bool y if X86_64
37762306a36Sopenharmony_ci
37862306a36Sopenharmony_ciconfig KASAN_SHADOW_OFFSET
37962306a36Sopenharmony_ci	hex
38062306a36Sopenharmony_ci	depends on KASAN
38162306a36Sopenharmony_ci	default 0xdffffc0000000000
38262306a36Sopenharmony_ci
38362306a36Sopenharmony_ciconfig HAVE_INTEL_TXT
38462306a36Sopenharmony_ci	def_bool y
38562306a36Sopenharmony_ci	depends on INTEL_IOMMU && ACPI
38662306a36Sopenharmony_ci
38762306a36Sopenharmony_ciconfig X86_32_SMP
38862306a36Sopenharmony_ci	def_bool y
38962306a36Sopenharmony_ci	depends on X86_32 && SMP
39062306a36Sopenharmony_ci
39162306a36Sopenharmony_ciconfig X86_64_SMP
39262306a36Sopenharmony_ci	def_bool y
39362306a36Sopenharmony_ci	depends on X86_64 && SMP
39462306a36Sopenharmony_ci
39562306a36Sopenharmony_ciconfig ARCH_SUPPORTS_UPROBES
39662306a36Sopenharmony_ci	def_bool y
39762306a36Sopenharmony_ci
39862306a36Sopenharmony_ciconfig FIX_EARLYCON_MEM
39962306a36Sopenharmony_ci	def_bool y
40062306a36Sopenharmony_ci
40162306a36Sopenharmony_ciconfig DYNAMIC_PHYSICAL_MASK
40262306a36Sopenharmony_ci	bool
40362306a36Sopenharmony_ci
40462306a36Sopenharmony_ciconfig PGTABLE_LEVELS
40562306a36Sopenharmony_ci	int
40662306a36Sopenharmony_ci	default 5 if X86_5LEVEL
40762306a36Sopenharmony_ci	default 4 if X86_64
40862306a36Sopenharmony_ci	default 3 if X86_PAE
40962306a36Sopenharmony_ci	default 2
41062306a36Sopenharmony_ci
41162306a36Sopenharmony_ciconfig CC_HAS_SANE_STACKPROTECTOR
41262306a36Sopenharmony_ci	bool
41362306a36Sopenharmony_ci	default $(success,$(srctree)/scripts/gcc-x86_64-has-stack-protector.sh $(CC) $(CLANG_FLAGS)) if 64BIT
41462306a36Sopenharmony_ci	default $(success,$(srctree)/scripts/gcc-x86_32-has-stack-protector.sh $(CC) $(CLANG_FLAGS))
41562306a36Sopenharmony_ci	help
41662306a36Sopenharmony_ci	  We have to make sure stack protector is unconditionally disabled if
41762306a36Sopenharmony_ci	  the compiler produces broken code or if it does not let us control
41862306a36Sopenharmony_ci	  the segment on 32-bit kernels.
41962306a36Sopenharmony_ci
42062306a36Sopenharmony_cimenu "Processor type and features"
42162306a36Sopenharmony_ci
42262306a36Sopenharmony_ciconfig SMP
42362306a36Sopenharmony_ci	bool "Symmetric multi-processing support"
42462306a36Sopenharmony_ci	help
42562306a36Sopenharmony_ci	  This enables support for systems with more than one CPU. If you have
42662306a36Sopenharmony_ci	  a system with only one CPU, say N. If you have a system with more
42762306a36Sopenharmony_ci	  than one CPU, say Y.
42862306a36Sopenharmony_ci
42962306a36Sopenharmony_ci	  If you say N here, the kernel will run on uni- and multiprocessor
43062306a36Sopenharmony_ci	  machines, but will use only one CPU of a multiprocessor machine. If
43162306a36Sopenharmony_ci	  you say Y here, the kernel will run on many, but not all,
43262306a36Sopenharmony_ci	  uniprocessor machines. On a uniprocessor machine, the kernel
43362306a36Sopenharmony_ci	  will run faster if you say N here.
43462306a36Sopenharmony_ci
43562306a36Sopenharmony_ci	  Note that if you say Y here and choose architecture "586" or
43662306a36Sopenharmony_ci	  "Pentium" under "Processor family", the kernel will not work on 486
43762306a36Sopenharmony_ci	  architectures. Similarly, multiprocessor kernels for the "PPro"
43862306a36Sopenharmony_ci	  architecture may not work on all Pentium based boards.
43962306a36Sopenharmony_ci
44062306a36Sopenharmony_ci	  People using multiprocessor machines who say Y here should also say
44162306a36Sopenharmony_ci	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
44262306a36Sopenharmony_ci	  Management" code will be disabled if you say Y here.
44362306a36Sopenharmony_ci
44462306a36Sopenharmony_ci	  See also <file:Documentation/arch/x86/i386/IO-APIC.rst>,
44562306a36Sopenharmony_ci	  <file:Documentation/admin-guide/lockup-watchdogs.rst> and the SMP-HOWTO available at
44662306a36Sopenharmony_ci	  <http://www.tldp.org/docs.html#howto>.
44762306a36Sopenharmony_ci
44862306a36Sopenharmony_ci	  If you don't know what to do here, say N.
44962306a36Sopenharmony_ci
45062306a36Sopenharmony_ciconfig X86_X2APIC
45162306a36Sopenharmony_ci	bool "Support x2apic"
45262306a36Sopenharmony_ci	depends on X86_LOCAL_APIC && X86_64 && (IRQ_REMAP || HYPERVISOR_GUEST)
45362306a36Sopenharmony_ci	help
45462306a36Sopenharmony_ci	  This enables x2apic support on CPUs that have this feature.
45562306a36Sopenharmony_ci
45662306a36Sopenharmony_ci	  This allows 32-bit apic IDs (so it can support very large systems),
45762306a36Sopenharmony_ci	  and accesses the local apic via MSRs not via mmio.
45862306a36Sopenharmony_ci
45962306a36Sopenharmony_ci	  Some Intel systems circa 2022 and later are locked into x2APIC mode
46062306a36Sopenharmony_ci	  and can not fall back to the legacy APIC modes if SGX or TDX are
46162306a36Sopenharmony_ci	  enabled in the BIOS. They will boot with very reduced functionality
46262306a36Sopenharmony_ci	  without enabling this option.
46362306a36Sopenharmony_ci
46462306a36Sopenharmony_ci	  If you don't know what to do here, say N.
46562306a36Sopenharmony_ci
46662306a36Sopenharmony_ciconfig X86_MPPARSE
46762306a36Sopenharmony_ci	bool "Enable MPS table" if ACPI
46862306a36Sopenharmony_ci	default y
46962306a36Sopenharmony_ci	depends on X86_LOCAL_APIC
47062306a36Sopenharmony_ci	help
47162306a36Sopenharmony_ci	  For old smp systems that do not have proper acpi support. Newer systems
47262306a36Sopenharmony_ci	  (esp with 64bit cpus) with acpi support, MADT and DSDT will override it
47362306a36Sopenharmony_ci
47462306a36Sopenharmony_ciconfig GOLDFISH
47562306a36Sopenharmony_ci	def_bool y
47662306a36Sopenharmony_ci	depends on X86_GOLDFISH
47762306a36Sopenharmony_ci
47862306a36Sopenharmony_ciconfig X86_CPU_RESCTRL
47962306a36Sopenharmony_ci	bool "x86 CPU resource control support"
48062306a36Sopenharmony_ci	depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD)
48162306a36Sopenharmony_ci	select KERNFS
48262306a36Sopenharmony_ci	select PROC_CPU_RESCTRL		if PROC_FS
48362306a36Sopenharmony_ci	help
48462306a36Sopenharmony_ci	  Enable x86 CPU resource control support.
48562306a36Sopenharmony_ci
48662306a36Sopenharmony_ci	  Provide support for the allocation and monitoring of system resources
48762306a36Sopenharmony_ci	  usage by the CPU.
48862306a36Sopenharmony_ci
48962306a36Sopenharmony_ci	  Intel calls this Intel Resource Director Technology
49062306a36Sopenharmony_ci	  (Intel(R) RDT). More information about RDT can be found in the
49162306a36Sopenharmony_ci	  Intel x86 Architecture Software Developer Manual.
49262306a36Sopenharmony_ci
49362306a36Sopenharmony_ci	  AMD calls this AMD Platform Quality of Service (AMD QoS).
49462306a36Sopenharmony_ci	  More information about AMD QoS can be found in the AMD64 Technology
49562306a36Sopenharmony_ci	  Platform Quality of Service Extensions manual.
49662306a36Sopenharmony_ci
49762306a36Sopenharmony_ci	  Say N if unsure.
49862306a36Sopenharmony_ci
49962306a36Sopenharmony_ciif X86_32
50062306a36Sopenharmony_ciconfig X86_BIGSMP
50162306a36Sopenharmony_ci	bool "Support for big SMP systems with more than 8 CPUs"
50262306a36Sopenharmony_ci	depends on SMP
50362306a36Sopenharmony_ci	help
50462306a36Sopenharmony_ci	  This option is needed for the systems that have more than 8 CPUs.
50562306a36Sopenharmony_ci
50662306a36Sopenharmony_ciconfig X86_EXTENDED_PLATFORM
50762306a36Sopenharmony_ci	bool "Support for extended (non-PC) x86 platforms"
50862306a36Sopenharmony_ci	default y
50962306a36Sopenharmony_ci	help
51062306a36Sopenharmony_ci	  If you disable this option then the kernel will only support
51162306a36Sopenharmony_ci	  standard PC platforms. (which covers the vast majority of
51262306a36Sopenharmony_ci	  systems out there.)
51362306a36Sopenharmony_ci
51462306a36Sopenharmony_ci	  If you enable this option then you'll be able to select support
51562306a36Sopenharmony_ci	  for the following (non-PC) 32 bit x86 platforms:
51662306a36Sopenharmony_ci		Goldfish (Android emulator)
51762306a36Sopenharmony_ci		AMD Elan
51862306a36Sopenharmony_ci		RDC R-321x SoC
51962306a36Sopenharmony_ci		SGI 320/540 (Visual Workstation)
52062306a36Sopenharmony_ci		STA2X11-based (e.g. Northville)
52162306a36Sopenharmony_ci		Moorestown MID devices
52262306a36Sopenharmony_ci
52362306a36Sopenharmony_ci	  If you have one of these systems, or if you want to build a
52462306a36Sopenharmony_ci	  generic distribution kernel, say Y here - otherwise say N.
52562306a36Sopenharmony_ciendif # X86_32
52662306a36Sopenharmony_ci
52762306a36Sopenharmony_ciif X86_64
52862306a36Sopenharmony_ciconfig X86_EXTENDED_PLATFORM
52962306a36Sopenharmony_ci	bool "Support for extended (non-PC) x86 platforms"
53062306a36Sopenharmony_ci	default y
53162306a36Sopenharmony_ci	help
53262306a36Sopenharmony_ci	  If you disable this option then the kernel will only support
53362306a36Sopenharmony_ci	  standard PC platforms. (which covers the vast majority of
53462306a36Sopenharmony_ci	  systems out there.)
53562306a36Sopenharmony_ci
53662306a36Sopenharmony_ci	  If you enable this option then you'll be able to select support
53762306a36Sopenharmony_ci	  for the following (non-PC) 64 bit x86 platforms:
53862306a36Sopenharmony_ci		Numascale NumaChip
53962306a36Sopenharmony_ci		ScaleMP vSMP
54062306a36Sopenharmony_ci		SGI Ultraviolet
54162306a36Sopenharmony_ci
54262306a36Sopenharmony_ci	  If you have one of these systems, or if you want to build a
54362306a36Sopenharmony_ci	  generic distribution kernel, say Y here - otherwise say N.
54462306a36Sopenharmony_ciendif # X86_64
54562306a36Sopenharmony_ci# This is an alphabetically sorted list of 64 bit extended platforms
54662306a36Sopenharmony_ci# Please maintain the alphabetic order if and when there are additions
54762306a36Sopenharmony_ciconfig X86_NUMACHIP
54862306a36Sopenharmony_ci	bool "Numascale NumaChip"
54962306a36Sopenharmony_ci	depends on X86_64
55062306a36Sopenharmony_ci	depends on X86_EXTENDED_PLATFORM
55162306a36Sopenharmony_ci	depends on NUMA
55262306a36Sopenharmony_ci	depends on SMP
55362306a36Sopenharmony_ci	depends on X86_X2APIC
55462306a36Sopenharmony_ci	depends on PCI_MMCONFIG
55562306a36Sopenharmony_ci	help
55662306a36Sopenharmony_ci	  Adds support for Numascale NumaChip large-SMP systems. Needed to
55762306a36Sopenharmony_ci	  enable more than ~168 cores.
55862306a36Sopenharmony_ci	  If you don't have one of these, you should say N here.
55962306a36Sopenharmony_ci
56062306a36Sopenharmony_ciconfig X86_VSMP
56162306a36Sopenharmony_ci	bool "ScaleMP vSMP"
56262306a36Sopenharmony_ci	select HYPERVISOR_GUEST
56362306a36Sopenharmony_ci	select PARAVIRT
56462306a36Sopenharmony_ci	depends on X86_64 && PCI
56562306a36Sopenharmony_ci	depends on X86_EXTENDED_PLATFORM
56662306a36Sopenharmony_ci	depends on SMP
56762306a36Sopenharmony_ci	help
56862306a36Sopenharmony_ci	  Support for ScaleMP vSMP systems.  Say 'Y' here if this kernel is
56962306a36Sopenharmony_ci	  supposed to run on these EM64T-based machines.  Only choose this option
57062306a36Sopenharmony_ci	  if you have one of these machines.
57162306a36Sopenharmony_ci
57262306a36Sopenharmony_ciconfig X86_UV
57362306a36Sopenharmony_ci	bool "SGI Ultraviolet"
57462306a36Sopenharmony_ci	depends on X86_64
57562306a36Sopenharmony_ci	depends on X86_EXTENDED_PLATFORM
57662306a36Sopenharmony_ci	depends on NUMA
57762306a36Sopenharmony_ci	depends on EFI
57862306a36Sopenharmony_ci	depends on KEXEC_CORE
57962306a36Sopenharmony_ci	depends on X86_X2APIC
58062306a36Sopenharmony_ci	depends on PCI
58162306a36Sopenharmony_ci	help
58262306a36Sopenharmony_ci	  This option is needed in order to support SGI Ultraviolet systems.
58362306a36Sopenharmony_ci	  If you don't have one of these, you should say N here.
58462306a36Sopenharmony_ci
58562306a36Sopenharmony_ci# Following is an alphabetically sorted list of 32 bit extended platforms
58662306a36Sopenharmony_ci# Please maintain the alphabetic order if and when there are additions
58762306a36Sopenharmony_ci
58862306a36Sopenharmony_ciconfig X86_GOLDFISH
58962306a36Sopenharmony_ci	bool "Goldfish (Virtual Platform)"
59062306a36Sopenharmony_ci	depends on X86_EXTENDED_PLATFORM
59162306a36Sopenharmony_ci	help
59262306a36Sopenharmony_ci	  Enable support for the Goldfish virtual platform used primarily
59362306a36Sopenharmony_ci	  for Android development. Unless you are building for the Android
59462306a36Sopenharmony_ci	  Goldfish emulator say N here.
59562306a36Sopenharmony_ci
59662306a36Sopenharmony_ciconfig X86_INTEL_CE
59762306a36Sopenharmony_ci	bool "CE4100 TV platform"
59862306a36Sopenharmony_ci	depends on PCI
59962306a36Sopenharmony_ci	depends on PCI_GODIRECT
60062306a36Sopenharmony_ci	depends on X86_IO_APIC
60162306a36Sopenharmony_ci	depends on X86_32
60262306a36Sopenharmony_ci	depends on X86_EXTENDED_PLATFORM
60362306a36Sopenharmony_ci	select X86_REBOOTFIXUPS
60462306a36Sopenharmony_ci	select OF
60562306a36Sopenharmony_ci	select OF_EARLY_FLATTREE
60662306a36Sopenharmony_ci	help
60762306a36Sopenharmony_ci	  Select for the Intel CE media processor (CE4100) SOC.
60862306a36Sopenharmony_ci	  This option compiles in support for the CE4100 SOC for settop
60962306a36Sopenharmony_ci	  boxes and media devices.
61062306a36Sopenharmony_ci
61162306a36Sopenharmony_ciconfig X86_INTEL_MID
61262306a36Sopenharmony_ci	bool "Intel MID platform support"
61362306a36Sopenharmony_ci	depends on X86_EXTENDED_PLATFORM
61462306a36Sopenharmony_ci	depends on X86_PLATFORM_DEVICES
61562306a36Sopenharmony_ci	depends on PCI
61662306a36Sopenharmony_ci	depends on X86_64 || (PCI_GOANY && X86_32)
61762306a36Sopenharmony_ci	depends on X86_IO_APIC
61862306a36Sopenharmony_ci	select I2C
61962306a36Sopenharmony_ci	select DW_APB_TIMER
62062306a36Sopenharmony_ci	select INTEL_SCU_PCI
62162306a36Sopenharmony_ci	help
62262306a36Sopenharmony_ci	  Select to build a kernel capable of supporting Intel MID (Mobile
62362306a36Sopenharmony_ci	  Internet Device) platform systems which do not have the PCI legacy
62462306a36Sopenharmony_ci	  interfaces. If you are building for a PC class system say N here.
62562306a36Sopenharmony_ci
62662306a36Sopenharmony_ci	  Intel MID platforms are based on an Intel processor and chipset which
62762306a36Sopenharmony_ci	  consume less power than most of the x86 derivatives.
62862306a36Sopenharmony_ci
62962306a36Sopenharmony_ciconfig X86_INTEL_QUARK
63062306a36Sopenharmony_ci	bool "Intel Quark platform support"
63162306a36Sopenharmony_ci	depends on X86_32
63262306a36Sopenharmony_ci	depends on X86_EXTENDED_PLATFORM
63362306a36Sopenharmony_ci	depends on X86_PLATFORM_DEVICES
63462306a36Sopenharmony_ci	depends on X86_TSC
63562306a36Sopenharmony_ci	depends on PCI
63662306a36Sopenharmony_ci	depends on PCI_GOANY
63762306a36Sopenharmony_ci	depends on X86_IO_APIC
63862306a36Sopenharmony_ci	select IOSF_MBI
63962306a36Sopenharmony_ci	select INTEL_IMR
64062306a36Sopenharmony_ci	select COMMON_CLK
64162306a36Sopenharmony_ci	help
64262306a36Sopenharmony_ci	  Select to include support for Quark X1000 SoC.
64362306a36Sopenharmony_ci	  Say Y here if you have a Quark based system such as the Arduino
64462306a36Sopenharmony_ci	  compatible Intel Galileo.
64562306a36Sopenharmony_ci
64662306a36Sopenharmony_ciconfig X86_INTEL_LPSS
64762306a36Sopenharmony_ci	bool "Intel Low Power Subsystem Support"
64862306a36Sopenharmony_ci	depends on X86 && ACPI && PCI
64962306a36Sopenharmony_ci	select COMMON_CLK
65062306a36Sopenharmony_ci	select PINCTRL
65162306a36Sopenharmony_ci	select IOSF_MBI
65262306a36Sopenharmony_ci	help
65362306a36Sopenharmony_ci	  Select to build support for Intel Low Power Subsystem such as
65462306a36Sopenharmony_ci	  found on Intel Lynxpoint PCH. Selecting this option enables
65562306a36Sopenharmony_ci	  things like clock tree (common clock framework) and pincontrol
65662306a36Sopenharmony_ci	  which are needed by the LPSS peripheral drivers.
65762306a36Sopenharmony_ci
65862306a36Sopenharmony_ciconfig X86_AMD_PLATFORM_DEVICE
65962306a36Sopenharmony_ci	bool "AMD ACPI2Platform devices support"
66062306a36Sopenharmony_ci	depends on ACPI
66162306a36Sopenharmony_ci	select COMMON_CLK
66262306a36Sopenharmony_ci	select PINCTRL
66362306a36Sopenharmony_ci	help
66462306a36Sopenharmony_ci	  Select to interpret AMD specific ACPI device to platform device
66562306a36Sopenharmony_ci	  such as I2C, UART, GPIO found on AMD Carrizo and later chipsets.
66662306a36Sopenharmony_ci	  I2C and UART depend on COMMON_CLK to set clock. GPIO driver is
66762306a36Sopenharmony_ci	  implemented under PINCTRL subsystem.
66862306a36Sopenharmony_ci
66962306a36Sopenharmony_ciconfig IOSF_MBI
67062306a36Sopenharmony_ci	tristate "Intel SoC IOSF Sideband support for SoC platforms"
67162306a36Sopenharmony_ci	depends on PCI
67262306a36Sopenharmony_ci	help
67362306a36Sopenharmony_ci	  This option enables sideband register access support for Intel SoC
67462306a36Sopenharmony_ci	  platforms. On these platforms the IOSF sideband is used in lieu of
67562306a36Sopenharmony_ci	  MSR's for some register accesses, mostly but not limited to thermal
67662306a36Sopenharmony_ci	  and power. Drivers may query the availability of this device to
67762306a36Sopenharmony_ci	  determine if they need the sideband in order to work on these
67862306a36Sopenharmony_ci	  platforms. The sideband is available on the following SoC products.
67962306a36Sopenharmony_ci	  This list is not meant to be exclusive.
68062306a36Sopenharmony_ci	   - BayTrail
68162306a36Sopenharmony_ci	   - Braswell
68262306a36Sopenharmony_ci	   - Quark
68362306a36Sopenharmony_ci
68462306a36Sopenharmony_ci	  You should say Y if you are running a kernel on one of these SoC's.
68562306a36Sopenharmony_ci
68662306a36Sopenharmony_ciconfig IOSF_MBI_DEBUG
68762306a36Sopenharmony_ci	bool "Enable IOSF sideband access through debugfs"
68862306a36Sopenharmony_ci	depends on IOSF_MBI && DEBUG_FS
68962306a36Sopenharmony_ci	help
69062306a36Sopenharmony_ci	  Select this option to expose the IOSF sideband access registers (MCR,
69162306a36Sopenharmony_ci	  MDR, MCRX) through debugfs to write and read register information from
69262306a36Sopenharmony_ci	  different units on the SoC. This is most useful for obtaining device
69362306a36Sopenharmony_ci	  state information for debug and analysis. As this is a general access
69462306a36Sopenharmony_ci	  mechanism, users of this option would have specific knowledge of the
69562306a36Sopenharmony_ci	  device they want to access.
69662306a36Sopenharmony_ci
69762306a36Sopenharmony_ci	  If you don't require the option or are in doubt, say N.
69862306a36Sopenharmony_ci
69962306a36Sopenharmony_ciconfig X86_RDC321X
70062306a36Sopenharmony_ci	bool "RDC R-321x SoC"
70162306a36Sopenharmony_ci	depends on X86_32
70262306a36Sopenharmony_ci	depends on X86_EXTENDED_PLATFORM
70362306a36Sopenharmony_ci	select M486
70462306a36Sopenharmony_ci	select X86_REBOOTFIXUPS
70562306a36Sopenharmony_ci	help
70662306a36Sopenharmony_ci	  This option is needed for RDC R-321x system-on-chip, also known
70762306a36Sopenharmony_ci	  as R-8610-(G).
70862306a36Sopenharmony_ci	  If you don't have one of these chips, you should say N here.
70962306a36Sopenharmony_ci
71062306a36Sopenharmony_ciconfig X86_32_NON_STANDARD
71162306a36Sopenharmony_ci	bool "Support non-standard 32-bit SMP architectures"
71262306a36Sopenharmony_ci	depends on X86_32 && SMP
71362306a36Sopenharmony_ci	depends on X86_EXTENDED_PLATFORM
71462306a36Sopenharmony_ci	help
71562306a36Sopenharmony_ci	  This option compiles in the bigsmp and STA2X11 default
71662306a36Sopenharmony_ci	  subarchitectures.  It is intended for a generic binary
71762306a36Sopenharmony_ci	  kernel. If you select them all, kernel will probe it one by
71862306a36Sopenharmony_ci	  one and will fallback to default.
71962306a36Sopenharmony_ci
72062306a36Sopenharmony_ci# Alphabetically sorted list of Non standard 32 bit platforms
72162306a36Sopenharmony_ci
72262306a36Sopenharmony_ciconfig X86_SUPPORTS_MEMORY_FAILURE
72362306a36Sopenharmony_ci	def_bool y
72462306a36Sopenharmony_ci	# MCE code calls memory_failure():
72562306a36Sopenharmony_ci	depends on X86_MCE
72662306a36Sopenharmony_ci	# On 32-bit this adds too big of NODES_SHIFT and we run out of page flags:
72762306a36Sopenharmony_ci	# On 32-bit SPARSEMEM adds too big of SECTIONS_WIDTH:
72862306a36Sopenharmony_ci	depends on X86_64 || !SPARSEMEM
72962306a36Sopenharmony_ci	select ARCH_SUPPORTS_MEMORY_FAILURE
73062306a36Sopenharmony_ci
73162306a36Sopenharmony_ciconfig STA2X11
73262306a36Sopenharmony_ci	bool "STA2X11 Companion Chip Support"
73362306a36Sopenharmony_ci	depends on X86_32_NON_STANDARD && PCI
73462306a36Sopenharmony_ci	select SWIOTLB
73562306a36Sopenharmony_ci	select MFD_STA2X11
73662306a36Sopenharmony_ci	select GPIOLIB
73762306a36Sopenharmony_ci	help
73862306a36Sopenharmony_ci	  This adds support for boards based on the STA2X11 IO-Hub,
73962306a36Sopenharmony_ci	  a.k.a. "ConneXt". The chip is used in place of the standard
74062306a36Sopenharmony_ci	  PC chipset, so all "standard" peripherals are missing. If this
74162306a36Sopenharmony_ci	  option is selected the kernel will still be able to boot on
74262306a36Sopenharmony_ci	  standard PC machines.
74362306a36Sopenharmony_ci
74462306a36Sopenharmony_ciconfig X86_32_IRIS
74562306a36Sopenharmony_ci	tristate "Eurobraille/Iris poweroff module"
74662306a36Sopenharmony_ci	depends on X86_32
74762306a36Sopenharmony_ci	help
74862306a36Sopenharmony_ci	  The Iris machines from EuroBraille do not have APM or ACPI support
74962306a36Sopenharmony_ci	  to shut themselves down properly.  A special I/O sequence is
75062306a36Sopenharmony_ci	  needed to do so, which is what this module does at
75162306a36Sopenharmony_ci	  kernel shutdown.
75262306a36Sopenharmony_ci
75362306a36Sopenharmony_ci	  This is only for Iris machines from EuroBraille.
75462306a36Sopenharmony_ci
75562306a36Sopenharmony_ci	  If unused, say N.
75662306a36Sopenharmony_ci
75762306a36Sopenharmony_ciconfig SCHED_OMIT_FRAME_POINTER
75862306a36Sopenharmony_ci	def_bool y
75962306a36Sopenharmony_ci	prompt "Single-depth WCHAN output"
76062306a36Sopenharmony_ci	depends on X86
76162306a36Sopenharmony_ci	help
76262306a36Sopenharmony_ci	  Calculate simpler /proc/<PID>/wchan values. If this option
76362306a36Sopenharmony_ci	  is disabled then wchan values will recurse back to the
76462306a36Sopenharmony_ci	  caller function. This provides more accurate wchan values,
76562306a36Sopenharmony_ci	  at the expense of slightly more scheduling overhead.
76662306a36Sopenharmony_ci
76762306a36Sopenharmony_ci	  If in doubt, say "Y".
76862306a36Sopenharmony_ci
76962306a36Sopenharmony_cimenuconfig HYPERVISOR_GUEST
77062306a36Sopenharmony_ci	bool "Linux guest support"
77162306a36Sopenharmony_ci	help
77262306a36Sopenharmony_ci	  Say Y here to enable options for running Linux under various hyper-
77362306a36Sopenharmony_ci	  visors. This option enables basic hypervisor detection and platform
77462306a36Sopenharmony_ci	  setup.
77562306a36Sopenharmony_ci
77662306a36Sopenharmony_ci	  If you say N, all options in this submenu will be skipped and
77762306a36Sopenharmony_ci	  disabled, and Linux guest support won't be built in.
77862306a36Sopenharmony_ci
77962306a36Sopenharmony_ciif HYPERVISOR_GUEST
78062306a36Sopenharmony_ci
78162306a36Sopenharmony_ciconfig PARAVIRT
78262306a36Sopenharmony_ci	bool "Enable paravirtualization code"
78362306a36Sopenharmony_ci	depends on HAVE_STATIC_CALL
78462306a36Sopenharmony_ci	help
78562306a36Sopenharmony_ci	  This changes the kernel so it can modify itself when it is run
78662306a36Sopenharmony_ci	  under a hypervisor, potentially improving performance significantly
78762306a36Sopenharmony_ci	  over full virtualization.  However, when run without a hypervisor
78862306a36Sopenharmony_ci	  the kernel is theoretically slower and slightly larger.
78962306a36Sopenharmony_ci
79062306a36Sopenharmony_ciconfig PARAVIRT_XXL
79162306a36Sopenharmony_ci	bool
79262306a36Sopenharmony_ci
79362306a36Sopenharmony_ciconfig PARAVIRT_DEBUG
79462306a36Sopenharmony_ci	bool "paravirt-ops debugging"
79562306a36Sopenharmony_ci	depends on PARAVIRT && DEBUG_KERNEL
79662306a36Sopenharmony_ci	help
79762306a36Sopenharmony_ci	  Enable to debug paravirt_ops internals.  Specifically, BUG if
79862306a36Sopenharmony_ci	  a paravirt_op is missing when it is called.
79962306a36Sopenharmony_ci
80062306a36Sopenharmony_ciconfig PARAVIRT_SPINLOCKS
80162306a36Sopenharmony_ci	bool "Paravirtualization layer for spinlocks"
80262306a36Sopenharmony_ci	depends on PARAVIRT && SMP
80362306a36Sopenharmony_ci	help
80462306a36Sopenharmony_ci	  Paravirtualized spinlocks allow a pvops backend to replace the
80562306a36Sopenharmony_ci	  spinlock implementation with something virtualization-friendly
80662306a36Sopenharmony_ci	  (for example, block the virtual CPU rather than spinning).
80762306a36Sopenharmony_ci
80862306a36Sopenharmony_ci	  It has a minimal impact on native kernels and gives a nice performance
80962306a36Sopenharmony_ci	  benefit on paravirtualized KVM / Xen kernels.
81062306a36Sopenharmony_ci
81162306a36Sopenharmony_ci	  If you are unsure how to answer this question, answer Y.
81262306a36Sopenharmony_ci
81362306a36Sopenharmony_ciconfig X86_HV_CALLBACK_VECTOR
81462306a36Sopenharmony_ci	def_bool n
81562306a36Sopenharmony_ci
81662306a36Sopenharmony_cisource "arch/x86/xen/Kconfig"
81762306a36Sopenharmony_ci
81862306a36Sopenharmony_ciconfig KVM_GUEST
81962306a36Sopenharmony_ci	bool "KVM Guest support (including kvmclock)"
82062306a36Sopenharmony_ci	depends on PARAVIRT
82162306a36Sopenharmony_ci	select PARAVIRT_CLOCK
82262306a36Sopenharmony_ci	select ARCH_CPUIDLE_HALTPOLL
82362306a36Sopenharmony_ci	select X86_HV_CALLBACK_VECTOR
82462306a36Sopenharmony_ci	default y
82562306a36Sopenharmony_ci	help
82662306a36Sopenharmony_ci	  This option enables various optimizations for running under the KVM
82762306a36Sopenharmony_ci	  hypervisor. It includes a paravirtualized clock, so that instead
82862306a36Sopenharmony_ci	  of relying on a PIT (or probably other) emulation by the
82962306a36Sopenharmony_ci	  underlying device model, the host provides the guest with
83062306a36Sopenharmony_ci	  timing infrastructure such as time of day, and system time
83162306a36Sopenharmony_ci
83262306a36Sopenharmony_ciconfig ARCH_CPUIDLE_HALTPOLL
83362306a36Sopenharmony_ci	def_bool n
83462306a36Sopenharmony_ci	prompt "Disable host haltpoll when loading haltpoll driver"
83562306a36Sopenharmony_ci	help
83662306a36Sopenharmony_ci	  If virtualized under KVM, disable host haltpoll.
83762306a36Sopenharmony_ci
83862306a36Sopenharmony_ciconfig PVH
83962306a36Sopenharmony_ci	bool "Support for running PVH guests"
84062306a36Sopenharmony_ci	help
84162306a36Sopenharmony_ci	  This option enables the PVH entry point for guest virtual machines
84262306a36Sopenharmony_ci	  as specified in the x86/HVM direct boot ABI.
84362306a36Sopenharmony_ci
84462306a36Sopenharmony_ciconfig PARAVIRT_TIME_ACCOUNTING
84562306a36Sopenharmony_ci	bool "Paravirtual steal time accounting"
84662306a36Sopenharmony_ci	depends on PARAVIRT
84762306a36Sopenharmony_ci	help
84862306a36Sopenharmony_ci	  Select this option to enable fine granularity task steal time
84962306a36Sopenharmony_ci	  accounting. Time spent executing other tasks in parallel with
85062306a36Sopenharmony_ci	  the current vCPU is discounted from the vCPU power. To account for
85162306a36Sopenharmony_ci	  that, there can be a small performance impact.
85262306a36Sopenharmony_ci
85362306a36Sopenharmony_ci	  If in doubt, say N here.
85462306a36Sopenharmony_ci
85562306a36Sopenharmony_ciconfig PARAVIRT_CLOCK
85662306a36Sopenharmony_ci	bool
85762306a36Sopenharmony_ci
85862306a36Sopenharmony_ciconfig JAILHOUSE_GUEST
85962306a36Sopenharmony_ci	bool "Jailhouse non-root cell support"
86062306a36Sopenharmony_ci	depends on X86_64 && PCI
86162306a36Sopenharmony_ci	select X86_PM_TIMER
86262306a36Sopenharmony_ci	help
86362306a36Sopenharmony_ci	  This option allows to run Linux as guest in a Jailhouse non-root
86462306a36Sopenharmony_ci	  cell. You can leave this option disabled if you only want to start
86562306a36Sopenharmony_ci	  Jailhouse and run Linux afterwards in the root cell.
86662306a36Sopenharmony_ci
86762306a36Sopenharmony_ciconfig ACRN_GUEST
86862306a36Sopenharmony_ci	bool "ACRN Guest support"
86962306a36Sopenharmony_ci	depends on X86_64
87062306a36Sopenharmony_ci	select X86_HV_CALLBACK_VECTOR
87162306a36Sopenharmony_ci	help
87262306a36Sopenharmony_ci	  This option allows to run Linux as guest in the ACRN hypervisor. ACRN is
87362306a36Sopenharmony_ci	  a flexible, lightweight reference open-source hypervisor, built with
87462306a36Sopenharmony_ci	  real-time and safety-criticality in mind. It is built for embedded
87562306a36Sopenharmony_ci	  IOT with small footprint and real-time features. More details can be
87662306a36Sopenharmony_ci	  found in https://projectacrn.org/.
87762306a36Sopenharmony_ci
87862306a36Sopenharmony_ciconfig INTEL_TDX_GUEST
87962306a36Sopenharmony_ci	bool "Intel TDX (Trust Domain Extensions) - Guest Support"
88062306a36Sopenharmony_ci	depends on X86_64 && CPU_SUP_INTEL
88162306a36Sopenharmony_ci	depends on X86_X2APIC
88262306a36Sopenharmony_ci	depends on EFI_STUB
88362306a36Sopenharmony_ci	select ARCH_HAS_CC_PLATFORM
88462306a36Sopenharmony_ci	select X86_MEM_ENCRYPT
88562306a36Sopenharmony_ci	select X86_MCE
88662306a36Sopenharmony_ci	select UNACCEPTED_MEMORY
88762306a36Sopenharmony_ci	help
88862306a36Sopenharmony_ci	  Support running as a guest under Intel TDX.  Without this support,
88962306a36Sopenharmony_ci	  the guest kernel can not boot or run under TDX.
89062306a36Sopenharmony_ci	  TDX includes memory encryption and integrity capabilities
89162306a36Sopenharmony_ci	  which protect the confidentiality and integrity of guest
89262306a36Sopenharmony_ci	  memory contents and CPU state. TDX guests are protected from
89362306a36Sopenharmony_ci	  some attacks from the VMM.
89462306a36Sopenharmony_ci
89562306a36Sopenharmony_ciendif # HYPERVISOR_GUEST
89662306a36Sopenharmony_ci
89762306a36Sopenharmony_cisource "arch/x86/Kconfig.cpu"
89862306a36Sopenharmony_ci
89962306a36Sopenharmony_ciconfig HPET_TIMER
90062306a36Sopenharmony_ci	def_bool X86_64
90162306a36Sopenharmony_ci	prompt "HPET Timer Support" if X86_32
90262306a36Sopenharmony_ci	help
90362306a36Sopenharmony_ci	  Use the IA-PC HPET (High Precision Event Timer) to manage
90462306a36Sopenharmony_ci	  time in preference to the PIT and RTC, if a HPET is
90562306a36Sopenharmony_ci	  present.
90662306a36Sopenharmony_ci	  HPET is the next generation timer replacing legacy 8254s.
90762306a36Sopenharmony_ci	  The HPET provides a stable time base on SMP
90862306a36Sopenharmony_ci	  systems, unlike the TSC, but it is more expensive to access,
90962306a36Sopenharmony_ci	  as it is off-chip.  The interface used is documented
91062306a36Sopenharmony_ci	  in the HPET spec, revision 1.
91162306a36Sopenharmony_ci
91262306a36Sopenharmony_ci	  You can safely choose Y here.  However, HPET will only be
91362306a36Sopenharmony_ci	  activated if the platform and the BIOS support this feature.
91462306a36Sopenharmony_ci	  Otherwise the 8254 will be used for timing services.
91562306a36Sopenharmony_ci
91662306a36Sopenharmony_ci	  Choose N to continue using the legacy 8254 timer.
91762306a36Sopenharmony_ci
91862306a36Sopenharmony_ciconfig HPET_EMULATE_RTC
91962306a36Sopenharmony_ci	def_bool y
92062306a36Sopenharmony_ci	depends on HPET_TIMER && (RTC_DRV_CMOS=m || RTC_DRV_CMOS=y)
92162306a36Sopenharmony_ci
92262306a36Sopenharmony_ci# Mark as expert because too many people got it wrong.
92362306a36Sopenharmony_ci# The code disables itself when not needed.
92462306a36Sopenharmony_ciconfig DMI
92562306a36Sopenharmony_ci	default y
92662306a36Sopenharmony_ci	select DMI_SCAN_MACHINE_NON_EFI_FALLBACK
92762306a36Sopenharmony_ci	bool "Enable DMI scanning" if EXPERT
92862306a36Sopenharmony_ci	help
92962306a36Sopenharmony_ci	  Enabled scanning of DMI to identify machine quirks. Say Y
93062306a36Sopenharmony_ci	  here unless you have verified that your setup is not
93162306a36Sopenharmony_ci	  affected by entries in the DMI blacklist. Required by PNP
93262306a36Sopenharmony_ci	  BIOS code.
93362306a36Sopenharmony_ci
93462306a36Sopenharmony_ciconfig GART_IOMMU
93562306a36Sopenharmony_ci	bool "Old AMD GART IOMMU support"
93662306a36Sopenharmony_ci	select DMA_OPS
93762306a36Sopenharmony_ci	select IOMMU_HELPER
93862306a36Sopenharmony_ci	select SWIOTLB
93962306a36Sopenharmony_ci	depends on X86_64 && PCI && AMD_NB
94062306a36Sopenharmony_ci	help
94162306a36Sopenharmony_ci	  Provides a driver for older AMD Athlon64/Opteron/Turion/Sempron
94262306a36Sopenharmony_ci	  GART based hardware IOMMUs.
94362306a36Sopenharmony_ci
94462306a36Sopenharmony_ci	  The GART supports full DMA access for devices with 32-bit access
94562306a36Sopenharmony_ci	  limitations, on systems with more than 3 GB. This is usually needed
94662306a36Sopenharmony_ci	  for USB, sound, many IDE/SATA chipsets and some other devices.
94762306a36Sopenharmony_ci
94862306a36Sopenharmony_ci	  Newer systems typically have a modern AMD IOMMU, supported via
94962306a36Sopenharmony_ci	  the CONFIG_AMD_IOMMU=y config option.
95062306a36Sopenharmony_ci
95162306a36Sopenharmony_ci	  In normal configurations this driver is only active when needed:
95262306a36Sopenharmony_ci	  there's more than 3 GB of memory and the system contains a
95362306a36Sopenharmony_ci	  32-bit limited device.
95462306a36Sopenharmony_ci
95562306a36Sopenharmony_ci	  If unsure, say Y.
95662306a36Sopenharmony_ci
95762306a36Sopenharmony_ciconfig BOOT_VESA_SUPPORT
95862306a36Sopenharmony_ci	bool
95962306a36Sopenharmony_ci	help
96062306a36Sopenharmony_ci	  If true, at least one selected framebuffer driver can take advantage
96162306a36Sopenharmony_ci	  of VESA video modes set at an early boot stage via the vga= parameter.
96262306a36Sopenharmony_ci
96362306a36Sopenharmony_ciconfig MAXSMP
96462306a36Sopenharmony_ci	bool "Enable Maximum number of SMP Processors and NUMA Nodes"
96562306a36Sopenharmony_ci	depends on X86_64 && SMP && DEBUG_KERNEL
96662306a36Sopenharmony_ci	select CPUMASK_OFFSTACK
96762306a36Sopenharmony_ci	help
96862306a36Sopenharmony_ci	  Enable maximum number of CPUS and NUMA Nodes for this architecture.
96962306a36Sopenharmony_ci	  If unsure, say N.
97062306a36Sopenharmony_ci
97162306a36Sopenharmony_ci#
97262306a36Sopenharmony_ci# The maximum number of CPUs supported:
97362306a36Sopenharmony_ci#
97462306a36Sopenharmony_ci# The main config value is NR_CPUS, which defaults to NR_CPUS_DEFAULT,
97562306a36Sopenharmony_ci# and which can be configured interactively in the
97662306a36Sopenharmony_ci# [NR_CPUS_RANGE_BEGIN ... NR_CPUS_RANGE_END] range.
97762306a36Sopenharmony_ci#
97862306a36Sopenharmony_ci# The ranges are different on 32-bit and 64-bit kernels, depending on
97962306a36Sopenharmony_ci# hardware capabilities and scalability features of the kernel.
98062306a36Sopenharmony_ci#
98162306a36Sopenharmony_ci# ( If MAXSMP is enabled we just use the highest possible value and disable
98262306a36Sopenharmony_ci#   interactive configuration. )
98362306a36Sopenharmony_ci#
98462306a36Sopenharmony_ci
98562306a36Sopenharmony_ciconfig NR_CPUS_RANGE_BEGIN
98662306a36Sopenharmony_ci	int
98762306a36Sopenharmony_ci	default NR_CPUS_RANGE_END if MAXSMP
98862306a36Sopenharmony_ci	default    1 if !SMP
98962306a36Sopenharmony_ci	default    2
99062306a36Sopenharmony_ci
99162306a36Sopenharmony_ciconfig NR_CPUS_RANGE_END
99262306a36Sopenharmony_ci	int
99362306a36Sopenharmony_ci	depends on X86_32
99462306a36Sopenharmony_ci	default   64 if  SMP &&  X86_BIGSMP
99562306a36Sopenharmony_ci	default    8 if  SMP && !X86_BIGSMP
99662306a36Sopenharmony_ci	default    1 if !SMP
99762306a36Sopenharmony_ci
99862306a36Sopenharmony_ciconfig NR_CPUS_RANGE_END
99962306a36Sopenharmony_ci	int
100062306a36Sopenharmony_ci	depends on X86_64
100162306a36Sopenharmony_ci	default 8192 if  SMP && CPUMASK_OFFSTACK
100262306a36Sopenharmony_ci	default  512 if  SMP && !CPUMASK_OFFSTACK
100362306a36Sopenharmony_ci	default    1 if !SMP
100462306a36Sopenharmony_ci
100562306a36Sopenharmony_ciconfig NR_CPUS_DEFAULT
100662306a36Sopenharmony_ci	int
100762306a36Sopenharmony_ci	depends on X86_32
100862306a36Sopenharmony_ci	default   32 if  X86_BIGSMP
100962306a36Sopenharmony_ci	default    8 if  SMP
101062306a36Sopenharmony_ci	default    1 if !SMP
101162306a36Sopenharmony_ci
101262306a36Sopenharmony_ciconfig NR_CPUS_DEFAULT
101362306a36Sopenharmony_ci	int
101462306a36Sopenharmony_ci	depends on X86_64
101562306a36Sopenharmony_ci	default 8192 if  MAXSMP
101662306a36Sopenharmony_ci	default   64 if  SMP
101762306a36Sopenharmony_ci	default    1 if !SMP
101862306a36Sopenharmony_ci
101962306a36Sopenharmony_ciconfig NR_CPUS
102062306a36Sopenharmony_ci	int "Maximum number of CPUs" if SMP && !MAXSMP
102162306a36Sopenharmony_ci	range NR_CPUS_RANGE_BEGIN NR_CPUS_RANGE_END
102262306a36Sopenharmony_ci	default NR_CPUS_DEFAULT
102362306a36Sopenharmony_ci	help
102462306a36Sopenharmony_ci	  This allows you to specify the maximum number of CPUs which this
102562306a36Sopenharmony_ci	  kernel will support.  If CPUMASK_OFFSTACK is enabled, the maximum
102662306a36Sopenharmony_ci	  supported value is 8192, otherwise the maximum value is 512.  The
102762306a36Sopenharmony_ci	  minimum value which makes sense is 2.
102862306a36Sopenharmony_ci
102962306a36Sopenharmony_ci	  This is purely to save memory: each supported CPU adds about 8KB
103062306a36Sopenharmony_ci	  to the kernel image.
103162306a36Sopenharmony_ci
103262306a36Sopenharmony_ciconfig SCHED_CLUSTER
103362306a36Sopenharmony_ci	bool "Cluster scheduler support"
103462306a36Sopenharmony_ci	depends on SMP
103562306a36Sopenharmony_ci	default y
103662306a36Sopenharmony_ci	help
103762306a36Sopenharmony_ci	  Cluster scheduler support improves the CPU scheduler's decision
103862306a36Sopenharmony_ci	  making when dealing with machines that have clusters of CPUs.
103962306a36Sopenharmony_ci	  Cluster usually means a couple of CPUs which are placed closely
104062306a36Sopenharmony_ci	  by sharing mid-level caches, last-level cache tags or internal
104162306a36Sopenharmony_ci	  busses.
104262306a36Sopenharmony_ci
104362306a36Sopenharmony_ciconfig SCHED_SMT
104462306a36Sopenharmony_ci	def_bool y if SMP
104562306a36Sopenharmony_ci
104662306a36Sopenharmony_ciconfig SCHED_MC
104762306a36Sopenharmony_ci	def_bool y
104862306a36Sopenharmony_ci	prompt "Multi-core scheduler support"
104962306a36Sopenharmony_ci	depends on SMP
105062306a36Sopenharmony_ci	help
105162306a36Sopenharmony_ci	  Multi-core scheduler support improves the CPU scheduler's decision
105262306a36Sopenharmony_ci	  making when dealing with multi-core CPU chips at a cost of slightly
105362306a36Sopenharmony_ci	  increased overhead in some places. If unsure say N here.
105462306a36Sopenharmony_ci
105562306a36Sopenharmony_ciconfig SCHED_MC_PRIO
105662306a36Sopenharmony_ci	bool "CPU core priorities scheduler support"
105762306a36Sopenharmony_ci	depends on SCHED_MC && CPU_SUP_INTEL
105862306a36Sopenharmony_ci	select X86_INTEL_PSTATE
105962306a36Sopenharmony_ci	select CPU_FREQ
106062306a36Sopenharmony_ci	default y
106162306a36Sopenharmony_ci	help
106262306a36Sopenharmony_ci	  Intel Turbo Boost Max Technology 3.0 enabled CPUs have a
106362306a36Sopenharmony_ci	  core ordering determined at manufacturing time, which allows
106462306a36Sopenharmony_ci	  certain cores to reach higher turbo frequencies (when running
106562306a36Sopenharmony_ci	  single threaded workloads) than others.
106662306a36Sopenharmony_ci
106762306a36Sopenharmony_ci	  Enabling this kernel feature teaches the scheduler about
106862306a36Sopenharmony_ci	  the TBM3 (aka ITMT) priority order of the CPU cores and adjusts the
106962306a36Sopenharmony_ci	  scheduler's CPU selection logic accordingly, so that higher
107062306a36Sopenharmony_ci	  overall system performance can be achieved.
107162306a36Sopenharmony_ci
107262306a36Sopenharmony_ci	  This feature will have no effect on CPUs without this feature.
107362306a36Sopenharmony_ci
107462306a36Sopenharmony_ci	  If unsure say Y here.
107562306a36Sopenharmony_ci
107662306a36Sopenharmony_ciconfig UP_LATE_INIT
107762306a36Sopenharmony_ci	def_bool y
107862306a36Sopenharmony_ci	depends on !SMP && X86_LOCAL_APIC
107962306a36Sopenharmony_ci
108062306a36Sopenharmony_ciconfig X86_UP_APIC
108162306a36Sopenharmony_ci	bool "Local APIC support on uniprocessors" if !PCI_MSI
108262306a36Sopenharmony_ci	default PCI_MSI
108362306a36Sopenharmony_ci	depends on X86_32 && !SMP && !X86_32_NON_STANDARD
108462306a36Sopenharmony_ci	help
108562306a36Sopenharmony_ci	  A local APIC (Advanced Programmable Interrupt Controller) is an
108662306a36Sopenharmony_ci	  integrated interrupt controller in the CPU. If you have a single-CPU
108762306a36Sopenharmony_ci	  system which has a processor with a local APIC, you can say Y here to
108862306a36Sopenharmony_ci	  enable and use it. If you say Y here even though your machine doesn't
108962306a36Sopenharmony_ci	  have a local APIC, then the kernel will still run with no slowdown at
109062306a36Sopenharmony_ci	  all. The local APIC supports CPU-generated self-interrupts (timer,
109162306a36Sopenharmony_ci	  performance counters), and the NMI watchdog which detects hard
109262306a36Sopenharmony_ci	  lockups.
109362306a36Sopenharmony_ci
109462306a36Sopenharmony_ciconfig X86_UP_IOAPIC
109562306a36Sopenharmony_ci	bool "IO-APIC support on uniprocessors"
109662306a36Sopenharmony_ci	depends on X86_UP_APIC
109762306a36Sopenharmony_ci	help
109862306a36Sopenharmony_ci	  An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an
109962306a36Sopenharmony_ci	  SMP-capable replacement for PC-style interrupt controllers. Most
110062306a36Sopenharmony_ci	  SMP systems and many recent uniprocessor systems have one.
110162306a36Sopenharmony_ci
110262306a36Sopenharmony_ci	  If you have a single-CPU system with an IO-APIC, you can say Y here
110362306a36Sopenharmony_ci	  to use it. If you say Y here even though your machine doesn't have
110462306a36Sopenharmony_ci	  an IO-APIC, then the kernel will still run with no slowdown at all.
110562306a36Sopenharmony_ci
110662306a36Sopenharmony_ciconfig X86_LOCAL_APIC
110762306a36Sopenharmony_ci	def_bool y
110862306a36Sopenharmony_ci	depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC || PCI_MSI
110962306a36Sopenharmony_ci	select IRQ_DOMAIN_HIERARCHY
111062306a36Sopenharmony_ci
111162306a36Sopenharmony_ciconfig X86_IO_APIC
111262306a36Sopenharmony_ci	def_bool y
111362306a36Sopenharmony_ci	depends on X86_LOCAL_APIC || X86_UP_IOAPIC
111462306a36Sopenharmony_ci
111562306a36Sopenharmony_ciconfig X86_REROUTE_FOR_BROKEN_BOOT_IRQS
111662306a36Sopenharmony_ci	bool "Reroute for broken boot IRQs"
111762306a36Sopenharmony_ci	depends on X86_IO_APIC
111862306a36Sopenharmony_ci	help
111962306a36Sopenharmony_ci	  This option enables a workaround that fixes a source of
112062306a36Sopenharmony_ci	  spurious interrupts. This is recommended when threaded
112162306a36Sopenharmony_ci	  interrupt handling is used on systems where the generation of
112262306a36Sopenharmony_ci	  superfluous "boot interrupts" cannot be disabled.
112362306a36Sopenharmony_ci
112462306a36Sopenharmony_ci	  Some chipsets generate a legacy INTx "boot IRQ" when the IRQ
112562306a36Sopenharmony_ci	  entry in the chipset's IO-APIC is masked (as, e.g. the RT
112662306a36Sopenharmony_ci	  kernel does during interrupt handling). On chipsets where this
112762306a36Sopenharmony_ci	  boot IRQ generation cannot be disabled, this workaround keeps
112862306a36Sopenharmony_ci	  the original IRQ line masked so that only the equivalent "boot
112962306a36Sopenharmony_ci	  IRQ" is delivered to the CPUs. The workaround also tells the
113062306a36Sopenharmony_ci	  kernel to set up the IRQ handler on the boot IRQ line. In this
113162306a36Sopenharmony_ci	  way only one interrupt is delivered to the kernel. Otherwise
113262306a36Sopenharmony_ci	  the spurious second interrupt may cause the kernel to bring
113362306a36Sopenharmony_ci	  down (vital) interrupt lines.
113462306a36Sopenharmony_ci
113562306a36Sopenharmony_ci	  Only affects "broken" chipsets. Interrupt sharing may be
113662306a36Sopenharmony_ci	  increased on these systems.
113762306a36Sopenharmony_ci
113862306a36Sopenharmony_ciconfig X86_MCE
113962306a36Sopenharmony_ci	bool "Machine Check / overheating reporting"
114062306a36Sopenharmony_ci	select GENERIC_ALLOCATOR
114162306a36Sopenharmony_ci	default y
114262306a36Sopenharmony_ci	help
114362306a36Sopenharmony_ci	  Machine Check support allows the processor to notify the
114462306a36Sopenharmony_ci	  kernel if it detects a problem (e.g. overheating, data corruption).
114562306a36Sopenharmony_ci	  The action the kernel takes depends on the severity of the problem,
114662306a36Sopenharmony_ci	  ranging from warning messages to halting the machine.
114762306a36Sopenharmony_ci
114862306a36Sopenharmony_ciconfig X86_MCELOG_LEGACY
114962306a36Sopenharmony_ci	bool "Support for deprecated /dev/mcelog character device"
115062306a36Sopenharmony_ci	depends on X86_MCE
115162306a36Sopenharmony_ci	help
115262306a36Sopenharmony_ci	  Enable support for /dev/mcelog which is needed by the old mcelog
115362306a36Sopenharmony_ci	  userspace logging daemon. Consider switching to the new generation
115462306a36Sopenharmony_ci	  rasdaemon solution.
115562306a36Sopenharmony_ci
115662306a36Sopenharmony_ciconfig X86_MCE_INTEL
115762306a36Sopenharmony_ci	def_bool y
115862306a36Sopenharmony_ci	prompt "Intel MCE features"
115962306a36Sopenharmony_ci	depends on X86_MCE && X86_LOCAL_APIC
116062306a36Sopenharmony_ci	help
116162306a36Sopenharmony_ci	  Additional support for intel specific MCE features such as
116262306a36Sopenharmony_ci	  the thermal monitor.
116362306a36Sopenharmony_ci
116462306a36Sopenharmony_ciconfig X86_MCE_AMD
116562306a36Sopenharmony_ci	def_bool y
116662306a36Sopenharmony_ci	prompt "AMD MCE features"
116762306a36Sopenharmony_ci	depends on X86_MCE && X86_LOCAL_APIC && AMD_NB
116862306a36Sopenharmony_ci	help
116962306a36Sopenharmony_ci	  Additional support for AMD specific MCE features such as
117062306a36Sopenharmony_ci	  the DRAM Error Threshold.
117162306a36Sopenharmony_ci
117262306a36Sopenharmony_ciconfig X86_ANCIENT_MCE
117362306a36Sopenharmony_ci	bool "Support for old Pentium 5 / WinChip machine checks"
117462306a36Sopenharmony_ci	depends on X86_32 && X86_MCE
117562306a36Sopenharmony_ci	help
117662306a36Sopenharmony_ci	  Include support for machine check handling on old Pentium 5 or WinChip
117762306a36Sopenharmony_ci	  systems. These typically need to be enabled explicitly on the command
117862306a36Sopenharmony_ci	  line.
117962306a36Sopenharmony_ci
118062306a36Sopenharmony_ciconfig X86_MCE_THRESHOLD
118162306a36Sopenharmony_ci	depends on X86_MCE_AMD || X86_MCE_INTEL
118262306a36Sopenharmony_ci	def_bool y
118362306a36Sopenharmony_ci
118462306a36Sopenharmony_ciconfig X86_MCE_INJECT
118562306a36Sopenharmony_ci	depends on X86_MCE && X86_LOCAL_APIC && DEBUG_FS
118662306a36Sopenharmony_ci	tristate "Machine check injector support"
118762306a36Sopenharmony_ci	help
118862306a36Sopenharmony_ci	  Provide support for injecting machine checks for testing purposes.
118962306a36Sopenharmony_ci	  If you don't know what a machine check is and you don't do kernel
119062306a36Sopenharmony_ci	  QA it is safe to say n.
119162306a36Sopenharmony_ci
119262306a36Sopenharmony_cisource "arch/x86/events/Kconfig"
119362306a36Sopenharmony_ci
119462306a36Sopenharmony_ciconfig X86_LEGACY_VM86
119562306a36Sopenharmony_ci	bool "Legacy VM86 support"
119662306a36Sopenharmony_ci	depends on X86_32
119762306a36Sopenharmony_ci	help
119862306a36Sopenharmony_ci	  This option allows user programs to put the CPU into V8086
119962306a36Sopenharmony_ci	  mode, which is an 80286-era approximation of 16-bit real mode.
120062306a36Sopenharmony_ci
120162306a36Sopenharmony_ci	  Some very old versions of X and/or vbetool require this option
120262306a36Sopenharmony_ci	  for user mode setting.  Similarly, DOSEMU will use it if
120362306a36Sopenharmony_ci	  available to accelerate real mode DOS programs.  However, any
120462306a36Sopenharmony_ci	  recent version of DOSEMU, X, or vbetool should be fully
120562306a36Sopenharmony_ci	  functional even without kernel VM86 support, as they will all
120662306a36Sopenharmony_ci	  fall back to software emulation. Nevertheless, if you are using
120762306a36Sopenharmony_ci	  a 16-bit DOS program where 16-bit performance matters, vm86
120862306a36Sopenharmony_ci	  mode might be faster than emulation and you might want to
120962306a36Sopenharmony_ci	  enable this option.
121062306a36Sopenharmony_ci
121162306a36Sopenharmony_ci	  Note that any app that works on a 64-bit kernel is unlikely to
121262306a36Sopenharmony_ci	  need this option, as 64-bit kernels don't, and can't, support
121362306a36Sopenharmony_ci	  V8086 mode. This option is also unrelated to 16-bit protected
121462306a36Sopenharmony_ci	  mode and is not needed to run most 16-bit programs under Wine.
121562306a36Sopenharmony_ci
121662306a36Sopenharmony_ci	  Enabling this option increases the complexity of the kernel
121762306a36Sopenharmony_ci	  and slows down exception handling a tiny bit.
121862306a36Sopenharmony_ci
121962306a36Sopenharmony_ci	  If unsure, say N here.
122062306a36Sopenharmony_ci
122162306a36Sopenharmony_ciconfig VM86
122262306a36Sopenharmony_ci	bool
122362306a36Sopenharmony_ci	default X86_LEGACY_VM86
122462306a36Sopenharmony_ci
122562306a36Sopenharmony_ciconfig X86_16BIT
122662306a36Sopenharmony_ci	bool "Enable support for 16-bit segments" if EXPERT
122762306a36Sopenharmony_ci	default y
122862306a36Sopenharmony_ci	depends on MODIFY_LDT_SYSCALL
122962306a36Sopenharmony_ci	help
123062306a36Sopenharmony_ci	  This option is required by programs like Wine to run 16-bit
123162306a36Sopenharmony_ci	  protected mode legacy code on x86 processors.  Disabling
123262306a36Sopenharmony_ci	  this option saves about 300 bytes on i386, or around 6K text
123362306a36Sopenharmony_ci	  plus 16K runtime memory on x86-64,
123462306a36Sopenharmony_ci
123562306a36Sopenharmony_ciconfig X86_ESPFIX32
123662306a36Sopenharmony_ci	def_bool y
123762306a36Sopenharmony_ci	depends on X86_16BIT && X86_32
123862306a36Sopenharmony_ci
123962306a36Sopenharmony_ciconfig X86_ESPFIX64
124062306a36Sopenharmony_ci	def_bool y
124162306a36Sopenharmony_ci	depends on X86_16BIT && X86_64
124262306a36Sopenharmony_ci
124362306a36Sopenharmony_ciconfig X86_VSYSCALL_EMULATION
124462306a36Sopenharmony_ci	bool "Enable vsyscall emulation" if EXPERT
124562306a36Sopenharmony_ci	default y
124662306a36Sopenharmony_ci	depends on X86_64
124762306a36Sopenharmony_ci	help
124862306a36Sopenharmony_ci	  This enables emulation of the legacy vsyscall page.  Disabling
124962306a36Sopenharmony_ci	  it is roughly equivalent to booting with vsyscall=none, except
125062306a36Sopenharmony_ci	  that it will also disable the helpful warning if a program
125162306a36Sopenharmony_ci	  tries to use a vsyscall.  With this option set to N, offending
125262306a36Sopenharmony_ci	  programs will just segfault, citing addresses of the form
125362306a36Sopenharmony_ci	  0xffffffffff600?00.
125462306a36Sopenharmony_ci
125562306a36Sopenharmony_ci	  This option is required by many programs built before 2013, and
125662306a36Sopenharmony_ci	  care should be used even with newer programs if set to N.
125762306a36Sopenharmony_ci
125862306a36Sopenharmony_ci	  Disabling this option saves about 7K of kernel size and
125962306a36Sopenharmony_ci	  possibly 4K of additional runtime pagetable memory.
126062306a36Sopenharmony_ci
126162306a36Sopenharmony_ciconfig X86_IOPL_IOPERM
126262306a36Sopenharmony_ci	bool "IOPERM and IOPL Emulation"
126362306a36Sopenharmony_ci	default y
126462306a36Sopenharmony_ci	help
126562306a36Sopenharmony_ci	  This enables the ioperm() and iopl() syscalls which are necessary
126662306a36Sopenharmony_ci	  for legacy applications.
126762306a36Sopenharmony_ci
126862306a36Sopenharmony_ci	  Legacy IOPL support is an overbroad mechanism which allows user
126962306a36Sopenharmony_ci	  space aside of accessing all 65536 I/O ports also to disable
127062306a36Sopenharmony_ci	  interrupts. To gain this access the caller needs CAP_SYS_RAWIO
127162306a36Sopenharmony_ci	  capabilities and permission from potentially active security
127262306a36Sopenharmony_ci	  modules.
127362306a36Sopenharmony_ci
127462306a36Sopenharmony_ci	  The emulation restricts the functionality of the syscall to
127562306a36Sopenharmony_ci	  only allowing the full range I/O port access, but prevents the
127662306a36Sopenharmony_ci	  ability to disable interrupts from user space which would be
127762306a36Sopenharmony_ci	  granted if the hardware IOPL mechanism would be used.
127862306a36Sopenharmony_ci
127962306a36Sopenharmony_ciconfig TOSHIBA
128062306a36Sopenharmony_ci	tristate "Toshiba Laptop support"
128162306a36Sopenharmony_ci	depends on X86_32
128262306a36Sopenharmony_ci	help
128362306a36Sopenharmony_ci	  This adds a driver to safely access the System Management Mode of
128462306a36Sopenharmony_ci	  the CPU on Toshiba portables with a genuine Toshiba BIOS. It does
128562306a36Sopenharmony_ci	  not work on models with a Phoenix BIOS. The System Management Mode
128662306a36Sopenharmony_ci	  is used to set the BIOS and power saving options on Toshiba portables.
128762306a36Sopenharmony_ci
128862306a36Sopenharmony_ci	  For information on utilities to make use of this driver see the
128962306a36Sopenharmony_ci	  Toshiba Linux utilities web site at:
129062306a36Sopenharmony_ci	  <http://www.buzzard.org.uk/toshiba/>.
129162306a36Sopenharmony_ci
129262306a36Sopenharmony_ci	  Say Y if you intend to run this kernel on a Toshiba portable.
129362306a36Sopenharmony_ci	  Say N otherwise.
129462306a36Sopenharmony_ci
129562306a36Sopenharmony_ciconfig X86_REBOOTFIXUPS
129662306a36Sopenharmony_ci	bool "Enable X86 board specific fixups for reboot"
129762306a36Sopenharmony_ci	depends on X86_32
129862306a36Sopenharmony_ci	help
129962306a36Sopenharmony_ci	  This enables chipset and/or board specific fixups to be done
130062306a36Sopenharmony_ci	  in order to get reboot to work correctly. This is only needed on
130162306a36Sopenharmony_ci	  some combinations of hardware and BIOS. The symptom, for which
130262306a36Sopenharmony_ci	  this config is intended, is when reboot ends with a stalled/hung
130362306a36Sopenharmony_ci	  system.
130462306a36Sopenharmony_ci
130562306a36Sopenharmony_ci	  Currently, the only fixup is for the Geode machines using
130662306a36Sopenharmony_ci	  CS5530A and CS5536 chipsets and the RDC R-321x SoC.
130762306a36Sopenharmony_ci
130862306a36Sopenharmony_ci	  Say Y if you want to enable the fixup. Currently, it's safe to
130962306a36Sopenharmony_ci	  enable this option even if you don't need it.
131062306a36Sopenharmony_ci	  Say N otherwise.
131162306a36Sopenharmony_ci
131262306a36Sopenharmony_ciconfig MICROCODE
131362306a36Sopenharmony_ci	def_bool y
131462306a36Sopenharmony_ci	depends on CPU_SUP_AMD || CPU_SUP_INTEL
131562306a36Sopenharmony_ci
131662306a36Sopenharmony_ciconfig MICROCODE_LATE_LOADING
131762306a36Sopenharmony_ci	bool "Late microcode loading (DANGEROUS)"
131862306a36Sopenharmony_ci	default n
131962306a36Sopenharmony_ci	depends on MICROCODE
132062306a36Sopenharmony_ci	help
132162306a36Sopenharmony_ci	  Loading microcode late, when the system is up and executing instructions
132262306a36Sopenharmony_ci	  is a tricky business and should be avoided if possible. Just the sequence
132362306a36Sopenharmony_ci	  of synchronizing all cores and SMT threads is one fragile dance which does
132462306a36Sopenharmony_ci	  not guarantee that cores might not softlock after the loading. Therefore,
132562306a36Sopenharmony_ci	  use this at your own risk. Late loading taints the kernel too.
132662306a36Sopenharmony_ci
132762306a36Sopenharmony_ciconfig X86_MSR
132862306a36Sopenharmony_ci	tristate "/dev/cpu/*/msr - Model-specific register support"
132962306a36Sopenharmony_ci	help
133062306a36Sopenharmony_ci	  This device gives privileged processes access to the x86
133162306a36Sopenharmony_ci	  Model-Specific Registers (MSRs).  It is a character device with
133262306a36Sopenharmony_ci	  major 202 and minors 0 to 31 for /dev/cpu/0/msr to /dev/cpu/31/msr.
133362306a36Sopenharmony_ci	  MSR accesses are directed to a specific CPU on multi-processor
133462306a36Sopenharmony_ci	  systems.
133562306a36Sopenharmony_ci
133662306a36Sopenharmony_ciconfig X86_CPUID
133762306a36Sopenharmony_ci	tristate "/dev/cpu/*/cpuid - CPU information support"
133862306a36Sopenharmony_ci	help
133962306a36Sopenharmony_ci	  This device gives processes access to the x86 CPUID instruction to
134062306a36Sopenharmony_ci	  be executed on a specific processor.  It is a character device
134162306a36Sopenharmony_ci	  with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
134262306a36Sopenharmony_ci	  /dev/cpu/31/cpuid.
134362306a36Sopenharmony_ci
134462306a36Sopenharmony_cichoice
134562306a36Sopenharmony_ci	prompt "High Memory Support"
134662306a36Sopenharmony_ci	default HIGHMEM4G
134762306a36Sopenharmony_ci	depends on X86_32
134862306a36Sopenharmony_ci
134962306a36Sopenharmony_ciconfig NOHIGHMEM
135062306a36Sopenharmony_ci	bool "off"
135162306a36Sopenharmony_ci	help
135262306a36Sopenharmony_ci	  Linux can use up to 64 Gigabytes of physical memory on x86 systems.
135362306a36Sopenharmony_ci	  However, the address space of 32-bit x86 processors is only 4
135462306a36Sopenharmony_ci	  Gigabytes large. That means that, if you have a large amount of
135562306a36Sopenharmony_ci	  physical memory, not all of it can be "permanently mapped" by the
135662306a36Sopenharmony_ci	  kernel. The physical memory that's not permanently mapped is called
135762306a36Sopenharmony_ci	  "high memory".
135862306a36Sopenharmony_ci
135962306a36Sopenharmony_ci	  If you are compiling a kernel which will never run on a machine with
136062306a36Sopenharmony_ci	  more than 1 Gigabyte total physical RAM, answer "off" here (default
136162306a36Sopenharmony_ci	  choice and suitable for most users). This will result in a "3GB/1GB"
136262306a36Sopenharmony_ci	  split: 3GB are mapped so that each process sees a 3GB virtual memory
136362306a36Sopenharmony_ci	  space and the remaining part of the 4GB virtual memory space is used
136462306a36Sopenharmony_ci	  by the kernel to permanently map as much physical memory as
136562306a36Sopenharmony_ci	  possible.
136662306a36Sopenharmony_ci
136762306a36Sopenharmony_ci	  If the machine has between 1 and 4 Gigabytes physical RAM, then
136862306a36Sopenharmony_ci	  answer "4GB" here.
136962306a36Sopenharmony_ci
137062306a36Sopenharmony_ci	  If more than 4 Gigabytes is used then answer "64GB" here. This
137162306a36Sopenharmony_ci	  selection turns Intel PAE (Physical Address Extension) mode on.
137262306a36Sopenharmony_ci	  PAE implements 3-level paging on IA32 processors. PAE is fully
137362306a36Sopenharmony_ci	  supported by Linux, PAE mode is implemented on all recent Intel
137462306a36Sopenharmony_ci	  processors (Pentium Pro and better). NOTE: If you say "64GB" here,
137562306a36Sopenharmony_ci	  then the kernel will not boot on CPUs that don't support PAE!
137662306a36Sopenharmony_ci
137762306a36Sopenharmony_ci	  The actual amount of total physical memory will either be
137862306a36Sopenharmony_ci	  auto detected or can be forced by using a kernel command line option
137962306a36Sopenharmony_ci	  such as "mem=256M". (Try "man bootparam" or see the documentation of
138062306a36Sopenharmony_ci	  your boot loader (lilo or loadlin) about how to pass options to the
138162306a36Sopenharmony_ci	  kernel at boot time.)
138262306a36Sopenharmony_ci
138362306a36Sopenharmony_ci	  If unsure, say "off".
138462306a36Sopenharmony_ci
138562306a36Sopenharmony_ciconfig HIGHMEM4G
138662306a36Sopenharmony_ci	bool "4GB"
138762306a36Sopenharmony_ci	help
138862306a36Sopenharmony_ci	  Select this if you have a 32-bit processor and between 1 and 4
138962306a36Sopenharmony_ci	  gigabytes of physical RAM.
139062306a36Sopenharmony_ci
139162306a36Sopenharmony_ciconfig HIGHMEM64G
139262306a36Sopenharmony_ci	bool "64GB"
139362306a36Sopenharmony_ci	depends on !M486SX && !M486 && !M586 && !M586TSC && !M586MMX && !MGEODE_LX && !MGEODEGX1 && !MCYRIXIII && !MELAN && !MWINCHIPC6 && !MWINCHIP3D && !MK6
139462306a36Sopenharmony_ci	select X86_PAE
139562306a36Sopenharmony_ci	help
139662306a36Sopenharmony_ci	  Select this if you have a 32-bit processor and more than 4
139762306a36Sopenharmony_ci	  gigabytes of physical RAM.
139862306a36Sopenharmony_ci
139962306a36Sopenharmony_ciendchoice
140062306a36Sopenharmony_ci
140162306a36Sopenharmony_cichoice
140262306a36Sopenharmony_ci	prompt "Memory split" if EXPERT
140362306a36Sopenharmony_ci	default VMSPLIT_3G
140462306a36Sopenharmony_ci	depends on X86_32
140562306a36Sopenharmony_ci	help
140662306a36Sopenharmony_ci	  Select the desired split between kernel and user memory.
140762306a36Sopenharmony_ci
140862306a36Sopenharmony_ci	  If the address range available to the kernel is less than the
140962306a36Sopenharmony_ci	  physical memory installed, the remaining memory will be available
141062306a36Sopenharmony_ci	  as "high memory". Accessing high memory is a little more costly
141162306a36Sopenharmony_ci	  than low memory, as it needs to be mapped into the kernel first.
141262306a36Sopenharmony_ci	  Note that increasing the kernel address space limits the range
141362306a36Sopenharmony_ci	  available to user programs, making the address space there
141462306a36Sopenharmony_ci	  tighter.  Selecting anything other than the default 3G/1G split
141562306a36Sopenharmony_ci	  will also likely make your kernel incompatible with binary-only
141662306a36Sopenharmony_ci	  kernel modules.
141762306a36Sopenharmony_ci
141862306a36Sopenharmony_ci	  If you are not absolutely sure what you are doing, leave this
141962306a36Sopenharmony_ci	  option alone!
142062306a36Sopenharmony_ci
142162306a36Sopenharmony_ci	config VMSPLIT_3G
142262306a36Sopenharmony_ci		bool "3G/1G user/kernel split"
142362306a36Sopenharmony_ci	config VMSPLIT_3G_OPT
142462306a36Sopenharmony_ci		depends on !X86_PAE
142562306a36Sopenharmony_ci		bool "3G/1G user/kernel split (for full 1G low memory)"
142662306a36Sopenharmony_ci	config VMSPLIT_2G
142762306a36Sopenharmony_ci		bool "2G/2G user/kernel split"
142862306a36Sopenharmony_ci	config VMSPLIT_2G_OPT
142962306a36Sopenharmony_ci		depends on !X86_PAE
143062306a36Sopenharmony_ci		bool "2G/2G user/kernel split (for full 2G low memory)"
143162306a36Sopenharmony_ci	config VMSPLIT_1G
143262306a36Sopenharmony_ci		bool "1G/3G user/kernel split"
143362306a36Sopenharmony_ciendchoice
143462306a36Sopenharmony_ci
143562306a36Sopenharmony_ciconfig PAGE_OFFSET
143662306a36Sopenharmony_ci	hex
143762306a36Sopenharmony_ci	default 0xB0000000 if VMSPLIT_3G_OPT
143862306a36Sopenharmony_ci	default 0x80000000 if VMSPLIT_2G
143962306a36Sopenharmony_ci	default 0x78000000 if VMSPLIT_2G_OPT
144062306a36Sopenharmony_ci	default 0x40000000 if VMSPLIT_1G
144162306a36Sopenharmony_ci	default 0xC0000000
144262306a36Sopenharmony_ci	depends on X86_32
144362306a36Sopenharmony_ci
144462306a36Sopenharmony_ciconfig HIGHMEM
144562306a36Sopenharmony_ci	def_bool y
144662306a36Sopenharmony_ci	depends on X86_32 && (HIGHMEM64G || HIGHMEM4G)
144762306a36Sopenharmony_ci
144862306a36Sopenharmony_ciconfig X86_PAE
144962306a36Sopenharmony_ci	bool "PAE (Physical Address Extension) Support"
145062306a36Sopenharmony_ci	depends on X86_32 && !HIGHMEM4G
145162306a36Sopenharmony_ci	select PHYS_ADDR_T_64BIT
145262306a36Sopenharmony_ci	select SWIOTLB
145362306a36Sopenharmony_ci	help
145462306a36Sopenharmony_ci	  PAE is required for NX support, and furthermore enables
145562306a36Sopenharmony_ci	  larger swapspace support for non-overcommit purposes. It
145662306a36Sopenharmony_ci	  has the cost of more pagetable lookup overhead, and also
145762306a36Sopenharmony_ci	  consumes more pagetable space per process.
145862306a36Sopenharmony_ci
145962306a36Sopenharmony_ciconfig X86_5LEVEL
146062306a36Sopenharmony_ci	bool "Enable 5-level page tables support"
146162306a36Sopenharmony_ci	default y
146262306a36Sopenharmony_ci	select DYNAMIC_MEMORY_LAYOUT
146362306a36Sopenharmony_ci	select SPARSEMEM_VMEMMAP
146462306a36Sopenharmony_ci	depends on X86_64
146562306a36Sopenharmony_ci	help
146662306a36Sopenharmony_ci	  5-level paging enables access to larger address space:
146762306a36Sopenharmony_ci	  up to 128 PiB of virtual address space and 4 PiB of
146862306a36Sopenharmony_ci	  physical address space.
146962306a36Sopenharmony_ci
147062306a36Sopenharmony_ci	  It will be supported by future Intel CPUs.
147162306a36Sopenharmony_ci
147262306a36Sopenharmony_ci	  A kernel with the option enabled can be booted on machines that
147362306a36Sopenharmony_ci	  support 4- or 5-level paging.
147462306a36Sopenharmony_ci
147562306a36Sopenharmony_ci	  See Documentation/arch/x86/x86_64/5level-paging.rst for more
147662306a36Sopenharmony_ci	  information.
147762306a36Sopenharmony_ci
147862306a36Sopenharmony_ci	  Say N if unsure.
147962306a36Sopenharmony_ci
148062306a36Sopenharmony_ciconfig X86_DIRECT_GBPAGES
148162306a36Sopenharmony_ci	def_bool y
148262306a36Sopenharmony_ci	depends on X86_64
148362306a36Sopenharmony_ci	help
148462306a36Sopenharmony_ci	  Certain kernel features effectively disable kernel
148562306a36Sopenharmony_ci	  linear 1 GB mappings (even if the CPU otherwise
148662306a36Sopenharmony_ci	  supports them), so don't confuse the user by printing
148762306a36Sopenharmony_ci	  that we have them enabled.
148862306a36Sopenharmony_ci
148962306a36Sopenharmony_ciconfig X86_CPA_STATISTICS
149062306a36Sopenharmony_ci	bool "Enable statistic for Change Page Attribute"
149162306a36Sopenharmony_ci	depends on DEBUG_FS
149262306a36Sopenharmony_ci	help
149362306a36Sopenharmony_ci	  Expose statistics about the Change Page Attribute mechanism, which
149462306a36Sopenharmony_ci	  helps to determine the effectiveness of preserving large and huge
149562306a36Sopenharmony_ci	  page mappings when mapping protections are changed.
149662306a36Sopenharmony_ci
149762306a36Sopenharmony_ciconfig X86_MEM_ENCRYPT
149862306a36Sopenharmony_ci	select ARCH_HAS_FORCE_DMA_UNENCRYPTED
149962306a36Sopenharmony_ci	select DYNAMIC_PHYSICAL_MASK
150062306a36Sopenharmony_ci	def_bool n
150162306a36Sopenharmony_ci
150262306a36Sopenharmony_ciconfig AMD_MEM_ENCRYPT
150362306a36Sopenharmony_ci	bool "AMD Secure Memory Encryption (SME) support"
150462306a36Sopenharmony_ci	depends on X86_64 && CPU_SUP_AMD
150562306a36Sopenharmony_ci	depends on EFI_STUB
150662306a36Sopenharmony_ci	select DMA_COHERENT_POOL
150762306a36Sopenharmony_ci	select ARCH_USE_MEMREMAP_PROT
150862306a36Sopenharmony_ci	select INSTRUCTION_DECODER
150962306a36Sopenharmony_ci	select ARCH_HAS_CC_PLATFORM
151062306a36Sopenharmony_ci	select X86_MEM_ENCRYPT
151162306a36Sopenharmony_ci	select UNACCEPTED_MEMORY
151262306a36Sopenharmony_ci	help
151362306a36Sopenharmony_ci	  Say yes to enable support for the encryption of system memory.
151462306a36Sopenharmony_ci	  This requires an AMD processor that supports Secure Memory
151562306a36Sopenharmony_ci	  Encryption (SME).
151662306a36Sopenharmony_ci
151762306a36Sopenharmony_ciconfig AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT
151862306a36Sopenharmony_ci	bool "Activate AMD Secure Memory Encryption (SME) by default"
151962306a36Sopenharmony_ci	depends on AMD_MEM_ENCRYPT
152062306a36Sopenharmony_ci	help
152162306a36Sopenharmony_ci	  Say yes to have system memory encrypted by default if running on
152262306a36Sopenharmony_ci	  an AMD processor that supports Secure Memory Encryption (SME).
152362306a36Sopenharmony_ci
152462306a36Sopenharmony_ci	  If set to Y, then the encryption of system memory can be
152562306a36Sopenharmony_ci	  deactivated with the mem_encrypt=off command line option.
152662306a36Sopenharmony_ci
152762306a36Sopenharmony_ci	  If set to N, then the encryption of system memory can be
152862306a36Sopenharmony_ci	  activated with the mem_encrypt=on command line option.
152962306a36Sopenharmony_ci
153062306a36Sopenharmony_ci# Common NUMA Features
153162306a36Sopenharmony_ciconfig NUMA
153262306a36Sopenharmony_ci	bool "NUMA Memory Allocation and Scheduler Support"
153362306a36Sopenharmony_ci	depends on SMP
153462306a36Sopenharmony_ci	depends on X86_64 || (X86_32 && HIGHMEM64G && X86_BIGSMP)
153562306a36Sopenharmony_ci	default y if X86_BIGSMP
153662306a36Sopenharmony_ci	select USE_PERCPU_NUMA_NODE_ID
153762306a36Sopenharmony_ci	help
153862306a36Sopenharmony_ci	  Enable NUMA (Non-Uniform Memory Access) support.
153962306a36Sopenharmony_ci
154062306a36Sopenharmony_ci	  The kernel will try to allocate memory used by a CPU on the
154162306a36Sopenharmony_ci	  local memory controller of the CPU and add some more
154262306a36Sopenharmony_ci	  NUMA awareness to the kernel.
154362306a36Sopenharmony_ci
154462306a36Sopenharmony_ci	  For 64-bit this is recommended if the system is Intel Core i7
154562306a36Sopenharmony_ci	  (or later), AMD Opteron, or EM64T NUMA.
154662306a36Sopenharmony_ci
154762306a36Sopenharmony_ci	  For 32-bit this is only needed if you boot a 32-bit
154862306a36Sopenharmony_ci	  kernel on a 64-bit NUMA platform.
154962306a36Sopenharmony_ci
155062306a36Sopenharmony_ci	  Otherwise, you should say N.
155162306a36Sopenharmony_ci
155262306a36Sopenharmony_ciconfig AMD_NUMA
155362306a36Sopenharmony_ci	def_bool y
155462306a36Sopenharmony_ci	prompt "Old style AMD Opteron NUMA detection"
155562306a36Sopenharmony_ci	depends on X86_64 && NUMA && PCI
155662306a36Sopenharmony_ci	help
155762306a36Sopenharmony_ci	  Enable AMD NUMA node topology detection.  You should say Y here if
155862306a36Sopenharmony_ci	  you have a multi processor AMD system. This uses an old method to
155962306a36Sopenharmony_ci	  read the NUMA configuration directly from the builtin Northbridge
156062306a36Sopenharmony_ci	  of Opteron. It is recommended to use X86_64_ACPI_NUMA instead,
156162306a36Sopenharmony_ci	  which also takes priority if both are compiled in.
156262306a36Sopenharmony_ci
156362306a36Sopenharmony_ciconfig X86_64_ACPI_NUMA
156462306a36Sopenharmony_ci	def_bool y
156562306a36Sopenharmony_ci	prompt "ACPI NUMA detection"
156662306a36Sopenharmony_ci	depends on X86_64 && NUMA && ACPI && PCI
156762306a36Sopenharmony_ci	select ACPI_NUMA
156862306a36Sopenharmony_ci	help
156962306a36Sopenharmony_ci	  Enable ACPI SRAT based node topology detection.
157062306a36Sopenharmony_ci
157162306a36Sopenharmony_ciconfig NUMA_EMU
157262306a36Sopenharmony_ci	bool "NUMA emulation"
157362306a36Sopenharmony_ci	depends on NUMA
157462306a36Sopenharmony_ci	help
157562306a36Sopenharmony_ci	  Enable NUMA emulation. A flat machine will be split
157662306a36Sopenharmony_ci	  into virtual nodes when booted with "numa=fake=N", where N is the
157762306a36Sopenharmony_ci	  number of nodes. This is only useful for debugging.
157862306a36Sopenharmony_ci
157962306a36Sopenharmony_ciconfig NODES_SHIFT
158062306a36Sopenharmony_ci	int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP
158162306a36Sopenharmony_ci	range 1 10
158262306a36Sopenharmony_ci	default "10" if MAXSMP
158362306a36Sopenharmony_ci	default "6" if X86_64
158462306a36Sopenharmony_ci	default "3"
158562306a36Sopenharmony_ci	depends on NUMA
158662306a36Sopenharmony_ci	help
158762306a36Sopenharmony_ci	  Specify the maximum number of NUMA Nodes available on the target
158862306a36Sopenharmony_ci	  system.  Increases memory reserved to accommodate various tables.
158962306a36Sopenharmony_ci
159062306a36Sopenharmony_ciconfig ARCH_FLATMEM_ENABLE
159162306a36Sopenharmony_ci	def_bool y
159262306a36Sopenharmony_ci	depends on X86_32 && !NUMA
159362306a36Sopenharmony_ci
159462306a36Sopenharmony_ciconfig ARCH_SPARSEMEM_ENABLE
159562306a36Sopenharmony_ci	def_bool y
159662306a36Sopenharmony_ci	depends on X86_64 || NUMA || X86_32 || X86_32_NON_STANDARD
159762306a36Sopenharmony_ci	select SPARSEMEM_STATIC if X86_32
159862306a36Sopenharmony_ci	select SPARSEMEM_VMEMMAP_ENABLE if X86_64
159962306a36Sopenharmony_ci
160062306a36Sopenharmony_ciconfig ARCH_SPARSEMEM_DEFAULT
160162306a36Sopenharmony_ci	def_bool X86_64 || (NUMA && X86_32)
160262306a36Sopenharmony_ci
160362306a36Sopenharmony_ciconfig ARCH_SELECT_MEMORY_MODEL
160462306a36Sopenharmony_ci	def_bool y
160562306a36Sopenharmony_ci	depends on ARCH_SPARSEMEM_ENABLE && ARCH_FLATMEM_ENABLE
160662306a36Sopenharmony_ci
160762306a36Sopenharmony_ciconfig ARCH_MEMORY_PROBE
160862306a36Sopenharmony_ci	bool "Enable sysfs memory/probe interface"
160962306a36Sopenharmony_ci	depends on MEMORY_HOTPLUG
161062306a36Sopenharmony_ci	help
161162306a36Sopenharmony_ci	  This option enables a sysfs memory/probe interface for testing.
161262306a36Sopenharmony_ci	  See Documentation/admin-guide/mm/memory-hotplug.rst for more information.
161362306a36Sopenharmony_ci	  If you are unsure how to answer this question, answer N.
161462306a36Sopenharmony_ci
161562306a36Sopenharmony_ciconfig ARCH_PROC_KCORE_TEXT
161662306a36Sopenharmony_ci	def_bool y
161762306a36Sopenharmony_ci	depends on X86_64 && PROC_KCORE
161862306a36Sopenharmony_ci
161962306a36Sopenharmony_ciconfig ILLEGAL_POINTER_VALUE
162062306a36Sopenharmony_ci	hex
162162306a36Sopenharmony_ci	default 0 if X86_32
162262306a36Sopenharmony_ci	default 0xdead000000000000 if X86_64
162362306a36Sopenharmony_ci
162462306a36Sopenharmony_ciconfig X86_PMEM_LEGACY_DEVICE
162562306a36Sopenharmony_ci	bool
162662306a36Sopenharmony_ci
162762306a36Sopenharmony_ciconfig X86_PMEM_LEGACY
162862306a36Sopenharmony_ci	tristate "Support non-standard NVDIMMs and ADR protected memory"
162962306a36Sopenharmony_ci	depends on PHYS_ADDR_T_64BIT
163062306a36Sopenharmony_ci	depends on BLK_DEV
163162306a36Sopenharmony_ci	select X86_PMEM_LEGACY_DEVICE
163262306a36Sopenharmony_ci	select NUMA_KEEP_MEMINFO if NUMA
163362306a36Sopenharmony_ci	select LIBNVDIMM
163462306a36Sopenharmony_ci	help
163562306a36Sopenharmony_ci	  Treat memory marked using the non-standard e820 type of 12 as used
163662306a36Sopenharmony_ci	  by the Intel Sandy Bridge-EP reference BIOS as protected memory.
163762306a36Sopenharmony_ci	  The kernel will offer these regions to the 'pmem' driver so
163862306a36Sopenharmony_ci	  they can be used for persistent storage.
163962306a36Sopenharmony_ci
164062306a36Sopenharmony_ci	  Say Y if unsure.
164162306a36Sopenharmony_ci
164262306a36Sopenharmony_ciconfig HIGHPTE
164362306a36Sopenharmony_ci	bool "Allocate 3rd-level pagetables from highmem"
164462306a36Sopenharmony_ci	depends on HIGHMEM
164562306a36Sopenharmony_ci	help
164662306a36Sopenharmony_ci	  The VM uses one page table entry for each page of physical memory.
164762306a36Sopenharmony_ci	  For systems with a lot of RAM, this can be wasteful of precious
164862306a36Sopenharmony_ci	  low memory.  Setting this option will put user-space page table
164962306a36Sopenharmony_ci	  entries in high memory.
165062306a36Sopenharmony_ci
165162306a36Sopenharmony_ciconfig X86_CHECK_BIOS_CORRUPTION
165262306a36Sopenharmony_ci	bool "Check for low memory corruption"
165362306a36Sopenharmony_ci	help
165462306a36Sopenharmony_ci	  Periodically check for memory corruption in low memory, which
165562306a36Sopenharmony_ci	  is suspected to be caused by BIOS.  Even when enabled in the
165662306a36Sopenharmony_ci	  configuration, it is disabled at runtime.  Enable it by
165762306a36Sopenharmony_ci	  setting "memory_corruption_check=1" on the kernel command
165862306a36Sopenharmony_ci	  line.  By default it scans the low 64k of memory every 60
165962306a36Sopenharmony_ci	  seconds; see the memory_corruption_check_size and
166062306a36Sopenharmony_ci	  memory_corruption_check_period parameters in
166162306a36Sopenharmony_ci	  Documentation/admin-guide/kernel-parameters.rst to adjust this.
166262306a36Sopenharmony_ci
166362306a36Sopenharmony_ci	  When enabled with the default parameters, this option has
166462306a36Sopenharmony_ci	  almost no overhead, as it reserves a relatively small amount
166562306a36Sopenharmony_ci	  of memory and scans it infrequently.  It both detects corruption
166662306a36Sopenharmony_ci	  and prevents it from affecting the running system.
166762306a36Sopenharmony_ci
166862306a36Sopenharmony_ci	  It is, however, intended as a diagnostic tool; if repeatable
166962306a36Sopenharmony_ci	  BIOS-originated corruption always affects the same memory,
167062306a36Sopenharmony_ci	  you can use memmap= to prevent the kernel from using that
167162306a36Sopenharmony_ci	  memory.
167262306a36Sopenharmony_ci
167362306a36Sopenharmony_ciconfig X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
167462306a36Sopenharmony_ci	bool "Set the default setting of memory_corruption_check"
167562306a36Sopenharmony_ci	depends on X86_CHECK_BIOS_CORRUPTION
167662306a36Sopenharmony_ci	default y
167762306a36Sopenharmony_ci	help
167862306a36Sopenharmony_ci	  Set whether the default state of memory_corruption_check is
167962306a36Sopenharmony_ci	  on or off.
168062306a36Sopenharmony_ci
168162306a36Sopenharmony_ciconfig MATH_EMULATION
168262306a36Sopenharmony_ci	bool
168362306a36Sopenharmony_ci	depends on MODIFY_LDT_SYSCALL
168462306a36Sopenharmony_ci	prompt "Math emulation" if X86_32 && (M486SX || MELAN)
168562306a36Sopenharmony_ci	help
168662306a36Sopenharmony_ci	  Linux can emulate a math coprocessor (used for floating point
168762306a36Sopenharmony_ci	  operations) if you don't have one. 486DX and Pentium processors have
168862306a36Sopenharmony_ci	  a math coprocessor built in, 486SX and 386 do not, unless you added
168962306a36Sopenharmony_ci	  a 487DX or 387, respectively. (The messages during boot time can
169062306a36Sopenharmony_ci	  give you some hints here ["man dmesg"].) Everyone needs either a
169162306a36Sopenharmony_ci	  coprocessor or this emulation.
169262306a36Sopenharmony_ci
169362306a36Sopenharmony_ci	  If you don't have a math coprocessor, you need to say Y here; if you
169462306a36Sopenharmony_ci	  say Y here even though you have a coprocessor, the coprocessor will
169562306a36Sopenharmony_ci	  be used nevertheless. (This behavior can be changed with the kernel
169662306a36Sopenharmony_ci	  command line option "no387", which comes handy if your coprocessor
169762306a36Sopenharmony_ci	  is broken. Try "man bootparam" or see the documentation of your boot
169862306a36Sopenharmony_ci	  loader (lilo or loadlin) about how to pass options to the kernel at
169962306a36Sopenharmony_ci	  boot time.) This means that it is a good idea to say Y here if you
170062306a36Sopenharmony_ci	  intend to use this kernel on different machines.
170162306a36Sopenharmony_ci
170262306a36Sopenharmony_ci	  More information about the internals of the Linux math coprocessor
170362306a36Sopenharmony_ci	  emulation can be found in <file:arch/x86/math-emu/README>.
170462306a36Sopenharmony_ci
170562306a36Sopenharmony_ci	  If you are not sure, say Y; apart from resulting in a 66 KB bigger
170662306a36Sopenharmony_ci	  kernel, it won't hurt.
170762306a36Sopenharmony_ci
170862306a36Sopenharmony_ciconfig MTRR
170962306a36Sopenharmony_ci	def_bool y
171062306a36Sopenharmony_ci	prompt "MTRR (Memory Type Range Register) support" if EXPERT
171162306a36Sopenharmony_ci	help
171262306a36Sopenharmony_ci	  On Intel P6 family processors (Pentium Pro, Pentium II and later)
171362306a36Sopenharmony_ci	  the Memory Type Range Registers (MTRRs) may be used to control
171462306a36Sopenharmony_ci	  processor access to memory ranges. This is most useful if you have
171562306a36Sopenharmony_ci	  a video (VGA) card on a PCI or AGP bus. Enabling write-combining
171662306a36Sopenharmony_ci	  allows bus write transfers to be combined into a larger transfer
171762306a36Sopenharmony_ci	  before bursting over the PCI/AGP bus. This can increase performance
171862306a36Sopenharmony_ci	  of image write operations 2.5 times or more. Saying Y here creates a
171962306a36Sopenharmony_ci	  /proc/mtrr file which may be used to manipulate your processor's
172062306a36Sopenharmony_ci	  MTRRs. Typically the X server should use this.
172162306a36Sopenharmony_ci
172262306a36Sopenharmony_ci	  This code has a reasonably generic interface so that similar
172362306a36Sopenharmony_ci	  control registers on other processors can be easily supported
172462306a36Sopenharmony_ci	  as well:
172562306a36Sopenharmony_ci
172662306a36Sopenharmony_ci	  The Cyrix 6x86, 6x86MX and M II processors have Address Range
172762306a36Sopenharmony_ci	  Registers (ARRs) which provide a similar functionality to MTRRs. For
172862306a36Sopenharmony_ci	  these, the ARRs are used to emulate the MTRRs.
172962306a36Sopenharmony_ci	  The AMD K6-2 (stepping 8 and above) and K6-3 processors have two
173062306a36Sopenharmony_ci	  MTRRs. The Centaur C6 (WinChip) has 8 MCRs, allowing
173162306a36Sopenharmony_ci	  write-combining. All of these processors are supported by this code
173262306a36Sopenharmony_ci	  and it makes sense to say Y here if you have one of them.
173362306a36Sopenharmony_ci
173462306a36Sopenharmony_ci	  Saying Y here also fixes a problem with buggy SMP BIOSes which only
173562306a36Sopenharmony_ci	  set the MTRRs for the boot CPU and not for the secondary CPUs. This
173662306a36Sopenharmony_ci	  can lead to all sorts of problems, so it's good to say Y here.
173762306a36Sopenharmony_ci
173862306a36Sopenharmony_ci	  You can safely say Y even if your machine doesn't have MTRRs, you'll
173962306a36Sopenharmony_ci	  just add about 9 KB to your kernel.
174062306a36Sopenharmony_ci
174162306a36Sopenharmony_ci	  See <file:Documentation/arch/x86/mtrr.rst> for more information.
174262306a36Sopenharmony_ci
174362306a36Sopenharmony_ciconfig MTRR_SANITIZER
174462306a36Sopenharmony_ci	def_bool y
174562306a36Sopenharmony_ci	prompt "MTRR cleanup support"
174662306a36Sopenharmony_ci	depends on MTRR
174762306a36Sopenharmony_ci	help
174862306a36Sopenharmony_ci	  Convert MTRR layout from continuous to discrete, so X drivers can
174962306a36Sopenharmony_ci	  add writeback entries.
175062306a36Sopenharmony_ci
175162306a36Sopenharmony_ci	  Can be disabled with disable_mtrr_cleanup on the kernel command line.
175262306a36Sopenharmony_ci	  The largest mtrr entry size for a continuous block can be set with
175362306a36Sopenharmony_ci	  mtrr_chunk_size.
175462306a36Sopenharmony_ci
175562306a36Sopenharmony_ci	  If unsure, say Y.
175662306a36Sopenharmony_ci
175762306a36Sopenharmony_ciconfig MTRR_SANITIZER_ENABLE_DEFAULT
175862306a36Sopenharmony_ci	int "MTRR cleanup enable value (0-1)"
175962306a36Sopenharmony_ci	range 0 1
176062306a36Sopenharmony_ci	default "0"
176162306a36Sopenharmony_ci	depends on MTRR_SANITIZER
176262306a36Sopenharmony_ci	help
176362306a36Sopenharmony_ci	  Enable mtrr cleanup default value
176462306a36Sopenharmony_ci
176562306a36Sopenharmony_ciconfig MTRR_SANITIZER_SPARE_REG_NR_DEFAULT
176662306a36Sopenharmony_ci	int "MTRR cleanup spare reg num (0-7)"
176762306a36Sopenharmony_ci	range 0 7
176862306a36Sopenharmony_ci	default "1"
176962306a36Sopenharmony_ci	depends on MTRR_SANITIZER
177062306a36Sopenharmony_ci	help
177162306a36Sopenharmony_ci	  mtrr cleanup spare entries default, it can be changed via
177262306a36Sopenharmony_ci	  mtrr_spare_reg_nr=N on the kernel command line.
177362306a36Sopenharmony_ci
177462306a36Sopenharmony_ciconfig X86_PAT
177562306a36Sopenharmony_ci	def_bool y
177662306a36Sopenharmony_ci	prompt "x86 PAT support" if EXPERT
177762306a36Sopenharmony_ci	depends on MTRR
177862306a36Sopenharmony_ci	help
177962306a36Sopenharmony_ci	  Use PAT attributes to setup page level cache control.
178062306a36Sopenharmony_ci
178162306a36Sopenharmony_ci	  PATs are the modern equivalents of MTRRs and are much more
178262306a36Sopenharmony_ci	  flexible than MTRRs.
178362306a36Sopenharmony_ci
178462306a36Sopenharmony_ci	  Say N here if you see bootup problems (boot crash, boot hang,
178562306a36Sopenharmony_ci	  spontaneous reboots) or a non-working video driver.
178662306a36Sopenharmony_ci
178762306a36Sopenharmony_ci	  If unsure, say Y.
178862306a36Sopenharmony_ci
178962306a36Sopenharmony_ciconfig ARCH_USES_PG_UNCACHED
179062306a36Sopenharmony_ci	def_bool y
179162306a36Sopenharmony_ci	depends on X86_PAT
179262306a36Sopenharmony_ci
179362306a36Sopenharmony_ciconfig X86_UMIP
179462306a36Sopenharmony_ci	def_bool y
179562306a36Sopenharmony_ci	prompt "User Mode Instruction Prevention" if EXPERT
179662306a36Sopenharmony_ci	help
179762306a36Sopenharmony_ci	  User Mode Instruction Prevention (UMIP) is a security feature in
179862306a36Sopenharmony_ci	  some x86 processors. If enabled, a general protection fault is
179962306a36Sopenharmony_ci	  issued if the SGDT, SLDT, SIDT, SMSW or STR instructions are
180062306a36Sopenharmony_ci	  executed in user mode. These instructions unnecessarily expose
180162306a36Sopenharmony_ci	  information about the hardware state.
180262306a36Sopenharmony_ci
180362306a36Sopenharmony_ci	  The vast majority of applications do not use these instructions.
180462306a36Sopenharmony_ci	  For the very few that do, software emulation is provided in
180562306a36Sopenharmony_ci	  specific cases in protected and virtual-8086 modes. Emulated
180662306a36Sopenharmony_ci	  results are dummy.
180762306a36Sopenharmony_ci
180862306a36Sopenharmony_ciconfig CC_HAS_IBT
180962306a36Sopenharmony_ci	# GCC >= 9 and binutils >= 2.29
181062306a36Sopenharmony_ci	# Retpoline check to work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93654
181162306a36Sopenharmony_ci	# Clang/LLVM >= 14
181262306a36Sopenharmony_ci	# https://github.com/llvm/llvm-project/commit/e0b89df2e0f0130881bf6c39bf31d7f6aac00e0f
181362306a36Sopenharmony_ci	# https://github.com/llvm/llvm-project/commit/dfcf69770bc522b9e411c66454934a37c1f35332
181462306a36Sopenharmony_ci	def_bool ((CC_IS_GCC && $(cc-option, -fcf-protection=branch -mindirect-branch-register)) || \
181562306a36Sopenharmony_ci		  (CC_IS_CLANG && CLANG_VERSION >= 140000)) && \
181662306a36Sopenharmony_ci		  $(as-instr,endbr64)
181762306a36Sopenharmony_ci
181862306a36Sopenharmony_ciconfig X86_CET
181962306a36Sopenharmony_ci	def_bool n
182062306a36Sopenharmony_ci	help
182162306a36Sopenharmony_ci	  CET features configured (Shadow stack or IBT)
182262306a36Sopenharmony_ci
182362306a36Sopenharmony_ciconfig X86_KERNEL_IBT
182462306a36Sopenharmony_ci	prompt "Indirect Branch Tracking"
182562306a36Sopenharmony_ci	def_bool y
182662306a36Sopenharmony_ci	depends on X86_64 && CC_HAS_IBT && HAVE_OBJTOOL
182762306a36Sopenharmony_ci	# https://github.com/llvm/llvm-project/commit/9d7001eba9c4cb311e03cd8cdc231f9e579f2d0f
182862306a36Sopenharmony_ci	depends on !LD_IS_LLD || LLD_VERSION >= 140000
182962306a36Sopenharmony_ci	select OBJTOOL
183062306a36Sopenharmony_ci	select X86_CET
183162306a36Sopenharmony_ci	help
183262306a36Sopenharmony_ci	  Build the kernel with support for Indirect Branch Tracking, a
183362306a36Sopenharmony_ci	  hardware support course-grain forward-edge Control Flow Integrity
183462306a36Sopenharmony_ci	  protection. It enforces that all indirect calls must land on
183562306a36Sopenharmony_ci	  an ENDBR instruction, as such, the compiler will instrument the
183662306a36Sopenharmony_ci	  code with them to make this happen.
183762306a36Sopenharmony_ci
183862306a36Sopenharmony_ci	  In addition to building the kernel with IBT, seal all functions that
183962306a36Sopenharmony_ci	  are not indirect call targets, avoiding them ever becoming one.
184062306a36Sopenharmony_ci
184162306a36Sopenharmony_ci	  This requires LTO like objtool runs and will slow down the build. It
184262306a36Sopenharmony_ci	  does significantly reduce the number of ENDBR instructions in the
184362306a36Sopenharmony_ci	  kernel image.
184462306a36Sopenharmony_ci
184562306a36Sopenharmony_ciconfig X86_INTEL_MEMORY_PROTECTION_KEYS
184662306a36Sopenharmony_ci	prompt "Memory Protection Keys"
184762306a36Sopenharmony_ci	def_bool y
184862306a36Sopenharmony_ci	# Note: only available in 64-bit mode
184962306a36Sopenharmony_ci	depends on X86_64 && (CPU_SUP_INTEL || CPU_SUP_AMD)
185062306a36Sopenharmony_ci	select ARCH_USES_HIGH_VMA_FLAGS
185162306a36Sopenharmony_ci	select ARCH_HAS_PKEYS
185262306a36Sopenharmony_ci	help
185362306a36Sopenharmony_ci	  Memory Protection Keys provides a mechanism for enforcing
185462306a36Sopenharmony_ci	  page-based protections, but without requiring modification of the
185562306a36Sopenharmony_ci	  page tables when an application changes protection domains.
185662306a36Sopenharmony_ci
185762306a36Sopenharmony_ci	  For details, see Documentation/core-api/protection-keys.rst
185862306a36Sopenharmony_ci
185962306a36Sopenharmony_ci	  If unsure, say y.
186062306a36Sopenharmony_ci
186162306a36Sopenharmony_cichoice
186262306a36Sopenharmony_ci	prompt "TSX enable mode"
186362306a36Sopenharmony_ci	depends on CPU_SUP_INTEL
186462306a36Sopenharmony_ci	default X86_INTEL_TSX_MODE_OFF
186562306a36Sopenharmony_ci	help
186662306a36Sopenharmony_ci	  Intel's TSX (Transactional Synchronization Extensions) feature
186762306a36Sopenharmony_ci	  allows to optimize locking protocols through lock elision which
186862306a36Sopenharmony_ci	  can lead to a noticeable performance boost.
186962306a36Sopenharmony_ci
187062306a36Sopenharmony_ci	  On the other hand it has been shown that TSX can be exploited
187162306a36Sopenharmony_ci	  to form side channel attacks (e.g. TAA) and chances are there
187262306a36Sopenharmony_ci	  will be more of those attacks discovered in the future.
187362306a36Sopenharmony_ci
187462306a36Sopenharmony_ci	  Therefore TSX is not enabled by default (aka tsx=off). An admin
187562306a36Sopenharmony_ci	  might override this decision by tsx=on the command line parameter.
187662306a36Sopenharmony_ci	  Even with TSX enabled, the kernel will attempt to enable the best
187762306a36Sopenharmony_ci	  possible TAA mitigation setting depending on the microcode available
187862306a36Sopenharmony_ci	  for the particular machine.
187962306a36Sopenharmony_ci
188062306a36Sopenharmony_ci	  This option allows to set the default tsx mode between tsx=on, =off
188162306a36Sopenharmony_ci	  and =auto. See Documentation/admin-guide/kernel-parameters.txt for more
188262306a36Sopenharmony_ci	  details.
188362306a36Sopenharmony_ci
188462306a36Sopenharmony_ci	  Say off if not sure, auto if TSX is in use but it should be used on safe
188562306a36Sopenharmony_ci	  platforms or on if TSX is in use and the security aspect of tsx is not
188662306a36Sopenharmony_ci	  relevant.
188762306a36Sopenharmony_ci
188862306a36Sopenharmony_ciconfig X86_INTEL_TSX_MODE_OFF
188962306a36Sopenharmony_ci	bool "off"
189062306a36Sopenharmony_ci	help
189162306a36Sopenharmony_ci	  TSX is disabled if possible - equals to tsx=off command line parameter.
189262306a36Sopenharmony_ci
189362306a36Sopenharmony_ciconfig X86_INTEL_TSX_MODE_ON
189462306a36Sopenharmony_ci	bool "on"
189562306a36Sopenharmony_ci	help
189662306a36Sopenharmony_ci	  TSX is always enabled on TSX capable HW - equals the tsx=on command
189762306a36Sopenharmony_ci	  line parameter.
189862306a36Sopenharmony_ci
189962306a36Sopenharmony_ciconfig X86_INTEL_TSX_MODE_AUTO
190062306a36Sopenharmony_ci	bool "auto"
190162306a36Sopenharmony_ci	help
190262306a36Sopenharmony_ci	  TSX is enabled on TSX capable HW that is believed to be safe against
190362306a36Sopenharmony_ci	  side channel attacks- equals the tsx=auto command line parameter.
190462306a36Sopenharmony_ciendchoice
190562306a36Sopenharmony_ci
190662306a36Sopenharmony_ciconfig X86_SGX
190762306a36Sopenharmony_ci	bool "Software Guard eXtensions (SGX)"
190862306a36Sopenharmony_ci	depends on X86_64 && CPU_SUP_INTEL && X86_X2APIC
190962306a36Sopenharmony_ci	depends on CRYPTO=y
191062306a36Sopenharmony_ci	depends on CRYPTO_SHA256=y
191162306a36Sopenharmony_ci	select MMU_NOTIFIER
191262306a36Sopenharmony_ci	select NUMA_KEEP_MEMINFO if NUMA
191362306a36Sopenharmony_ci	select XARRAY_MULTI
191462306a36Sopenharmony_ci	help
191562306a36Sopenharmony_ci	  Intel(R) Software Guard eXtensions (SGX) is a set of CPU instructions
191662306a36Sopenharmony_ci	  that can be used by applications to set aside private regions of code
191762306a36Sopenharmony_ci	  and data, referred to as enclaves. An enclave's private memory can
191862306a36Sopenharmony_ci	  only be accessed by code running within the enclave. Accesses from
191962306a36Sopenharmony_ci	  outside the enclave, including other enclaves, are disallowed by
192062306a36Sopenharmony_ci	  hardware.
192162306a36Sopenharmony_ci
192262306a36Sopenharmony_ci	  If unsure, say N.
192362306a36Sopenharmony_ci
192462306a36Sopenharmony_ciconfig X86_USER_SHADOW_STACK
192562306a36Sopenharmony_ci	bool "X86 userspace shadow stack"
192662306a36Sopenharmony_ci	depends on AS_WRUSS
192762306a36Sopenharmony_ci	depends on X86_64
192862306a36Sopenharmony_ci	select ARCH_USES_HIGH_VMA_FLAGS
192962306a36Sopenharmony_ci	select X86_CET
193062306a36Sopenharmony_ci	help
193162306a36Sopenharmony_ci	  Shadow stack protection is a hardware feature that detects function
193262306a36Sopenharmony_ci	  return address corruption.  This helps mitigate ROP attacks.
193362306a36Sopenharmony_ci	  Applications must be enabled to use it, and old userspace does not
193462306a36Sopenharmony_ci	  get protection "for free".
193562306a36Sopenharmony_ci
193662306a36Sopenharmony_ci	  CPUs supporting shadow stacks were first released in 2020.
193762306a36Sopenharmony_ci
193862306a36Sopenharmony_ci	  See Documentation/arch/x86/shstk.rst for more information.
193962306a36Sopenharmony_ci
194062306a36Sopenharmony_ci	  If unsure, say N.
194162306a36Sopenharmony_ci
194262306a36Sopenharmony_ciconfig EFI
194362306a36Sopenharmony_ci	bool "EFI runtime service support"
194462306a36Sopenharmony_ci	depends on ACPI
194562306a36Sopenharmony_ci	select UCS2_STRING
194662306a36Sopenharmony_ci	select EFI_RUNTIME_WRAPPERS
194762306a36Sopenharmony_ci	select ARCH_USE_MEMREMAP_PROT
194862306a36Sopenharmony_ci	select EFI_RUNTIME_MAP if KEXEC_CORE
194962306a36Sopenharmony_ci	help
195062306a36Sopenharmony_ci	  This enables the kernel to use EFI runtime services that are
195162306a36Sopenharmony_ci	  available (such as the EFI variable services).
195262306a36Sopenharmony_ci
195362306a36Sopenharmony_ci	  This option is only useful on systems that have EFI firmware.
195462306a36Sopenharmony_ci	  In addition, you should use the latest ELILO loader available
195562306a36Sopenharmony_ci	  at <http://elilo.sourceforge.net> in order to take advantage
195662306a36Sopenharmony_ci	  of EFI runtime services. However, even with this option, the
195762306a36Sopenharmony_ci	  resultant kernel should continue to boot on existing non-EFI
195862306a36Sopenharmony_ci	  platforms.
195962306a36Sopenharmony_ci
196062306a36Sopenharmony_ciconfig EFI_STUB
196162306a36Sopenharmony_ci	bool "EFI stub support"
196262306a36Sopenharmony_ci	depends on EFI
196362306a36Sopenharmony_ci	select RELOCATABLE
196462306a36Sopenharmony_ci	help
196562306a36Sopenharmony_ci	  This kernel feature allows a bzImage to be loaded directly
196662306a36Sopenharmony_ci	  by EFI firmware without the use of a bootloader.
196762306a36Sopenharmony_ci
196862306a36Sopenharmony_ci	  See Documentation/admin-guide/efi-stub.rst for more information.
196962306a36Sopenharmony_ci
197062306a36Sopenharmony_ciconfig EFI_HANDOVER_PROTOCOL
197162306a36Sopenharmony_ci	bool "EFI handover protocol (DEPRECATED)"
197262306a36Sopenharmony_ci	depends on EFI_STUB
197362306a36Sopenharmony_ci	default y
197462306a36Sopenharmony_ci	help
197562306a36Sopenharmony_ci	  Select this in order to include support for the deprecated EFI
197662306a36Sopenharmony_ci	  handover protocol, which defines alternative entry points into the
197762306a36Sopenharmony_ci	  EFI stub.  This is a practice that has no basis in the UEFI
197862306a36Sopenharmony_ci	  specification, and requires a priori knowledge on the part of the
197962306a36Sopenharmony_ci	  bootloader about Linux/x86 specific ways of passing the command line
198062306a36Sopenharmony_ci	  and initrd, and where in memory those assets may be loaded.
198162306a36Sopenharmony_ci
198262306a36Sopenharmony_ci	  If in doubt, say Y. Even though the corresponding support is not
198362306a36Sopenharmony_ci	  present in upstream GRUB or other bootloaders, most distros build
198462306a36Sopenharmony_ci	  GRUB with numerous downstream patches applied, and may rely on the
198562306a36Sopenharmony_ci	  handover protocol as as result.
198662306a36Sopenharmony_ci
198762306a36Sopenharmony_ciconfig EFI_MIXED
198862306a36Sopenharmony_ci	bool "EFI mixed-mode support"
198962306a36Sopenharmony_ci	depends on EFI_STUB && X86_64
199062306a36Sopenharmony_ci	help
199162306a36Sopenharmony_ci	  Enabling this feature allows a 64-bit kernel to be booted
199262306a36Sopenharmony_ci	  on a 32-bit firmware, provided that your CPU supports 64-bit
199362306a36Sopenharmony_ci	  mode.
199462306a36Sopenharmony_ci
199562306a36Sopenharmony_ci	  Note that it is not possible to boot a mixed-mode enabled
199662306a36Sopenharmony_ci	  kernel via the EFI boot stub - a bootloader that supports
199762306a36Sopenharmony_ci	  the EFI handover protocol must be used.
199862306a36Sopenharmony_ci
199962306a36Sopenharmony_ci	  If unsure, say N.
200062306a36Sopenharmony_ci
200162306a36Sopenharmony_ciconfig EFI_FAKE_MEMMAP
200262306a36Sopenharmony_ci	bool "Enable EFI fake memory map"
200362306a36Sopenharmony_ci	depends on EFI
200462306a36Sopenharmony_ci	help
200562306a36Sopenharmony_ci	  Saying Y here will enable "efi_fake_mem" boot option.  By specifying
200662306a36Sopenharmony_ci	  this parameter, you can add arbitrary attribute to specific memory
200762306a36Sopenharmony_ci	  range by updating original (firmware provided) EFI memmap.  This is
200862306a36Sopenharmony_ci	  useful for debugging of EFI memmap related feature, e.g., Address
200962306a36Sopenharmony_ci	  Range Mirroring feature.
201062306a36Sopenharmony_ci
201162306a36Sopenharmony_ciconfig EFI_MAX_FAKE_MEM
201262306a36Sopenharmony_ci	int "maximum allowable number of ranges in efi_fake_mem boot option"
201362306a36Sopenharmony_ci	depends on EFI_FAKE_MEMMAP
201462306a36Sopenharmony_ci	range 1 128
201562306a36Sopenharmony_ci	default 8
201662306a36Sopenharmony_ci	help
201762306a36Sopenharmony_ci	  Maximum allowable number of ranges in efi_fake_mem boot option.
201862306a36Sopenharmony_ci	  Ranges can be set up to this value using comma-separated list.
201962306a36Sopenharmony_ci	  The default value is 8.
202062306a36Sopenharmony_ci
202162306a36Sopenharmony_ciconfig EFI_RUNTIME_MAP
202262306a36Sopenharmony_ci	bool "Export EFI runtime maps to sysfs" if EXPERT
202362306a36Sopenharmony_ci	depends on EFI
202462306a36Sopenharmony_ci	help
202562306a36Sopenharmony_ci	  Export EFI runtime memory regions to /sys/firmware/efi/runtime-map.
202662306a36Sopenharmony_ci	  That memory map is required by the 2nd kernel to set up EFI virtual
202762306a36Sopenharmony_ci	  mappings after kexec, but can also be used for debugging purposes.
202862306a36Sopenharmony_ci
202962306a36Sopenharmony_ci	  See also Documentation/ABI/testing/sysfs-firmware-efi-runtime-map.
203062306a36Sopenharmony_ci
203162306a36Sopenharmony_cisource "kernel/Kconfig.hz"
203262306a36Sopenharmony_ci
203362306a36Sopenharmony_ciconfig ARCH_SUPPORTS_KEXEC
203462306a36Sopenharmony_ci	def_bool y
203562306a36Sopenharmony_ci
203662306a36Sopenharmony_ciconfig ARCH_SUPPORTS_KEXEC_FILE
203762306a36Sopenharmony_ci	def_bool X86_64
203862306a36Sopenharmony_ci
203962306a36Sopenharmony_ciconfig ARCH_SELECTS_KEXEC_FILE
204062306a36Sopenharmony_ci	def_bool y
204162306a36Sopenharmony_ci	depends on KEXEC_FILE
204262306a36Sopenharmony_ci	select HAVE_IMA_KEXEC if IMA
204362306a36Sopenharmony_ci
204462306a36Sopenharmony_ciconfig ARCH_SUPPORTS_KEXEC_PURGATORY
204562306a36Sopenharmony_ci	def_bool y
204662306a36Sopenharmony_ci
204762306a36Sopenharmony_ciconfig ARCH_SUPPORTS_KEXEC_SIG
204862306a36Sopenharmony_ci	def_bool y
204962306a36Sopenharmony_ci
205062306a36Sopenharmony_ciconfig ARCH_SUPPORTS_KEXEC_SIG_FORCE
205162306a36Sopenharmony_ci	def_bool y
205262306a36Sopenharmony_ci
205362306a36Sopenharmony_ciconfig ARCH_SUPPORTS_KEXEC_BZIMAGE_VERIFY_SIG
205462306a36Sopenharmony_ci	def_bool y
205562306a36Sopenharmony_ci
205662306a36Sopenharmony_ciconfig ARCH_SUPPORTS_KEXEC_JUMP
205762306a36Sopenharmony_ci	def_bool y
205862306a36Sopenharmony_ci
205962306a36Sopenharmony_ciconfig ARCH_SUPPORTS_CRASH_DUMP
206062306a36Sopenharmony_ci	def_bool X86_64 || (X86_32 && HIGHMEM)
206162306a36Sopenharmony_ci
206262306a36Sopenharmony_ciconfig ARCH_SUPPORTS_CRASH_HOTPLUG
206362306a36Sopenharmony_ci	def_bool y
206462306a36Sopenharmony_ci
206562306a36Sopenharmony_ciconfig PHYSICAL_START
206662306a36Sopenharmony_ci	hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP)
206762306a36Sopenharmony_ci	default "0x1000000"
206862306a36Sopenharmony_ci	help
206962306a36Sopenharmony_ci	  This gives the physical address where the kernel is loaded.
207062306a36Sopenharmony_ci
207162306a36Sopenharmony_ci	  If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then
207262306a36Sopenharmony_ci	  bzImage will decompress itself to above physical address and
207362306a36Sopenharmony_ci	  run from there. Otherwise, bzImage will run from the address where
207462306a36Sopenharmony_ci	  it has been loaded by the boot loader and will ignore above physical
207562306a36Sopenharmony_ci	  address.
207662306a36Sopenharmony_ci
207762306a36Sopenharmony_ci	  In normal kdump cases one does not have to set/change this option
207862306a36Sopenharmony_ci	  as now bzImage can be compiled as a completely relocatable image
207962306a36Sopenharmony_ci	  (CONFIG_RELOCATABLE=y) and be used to load and run from a different
208062306a36Sopenharmony_ci	  address. This option is mainly useful for the folks who don't want
208162306a36Sopenharmony_ci	  to use a bzImage for capturing the crash dump and want to use a
208262306a36Sopenharmony_ci	  vmlinux instead. vmlinux is not relocatable hence a kernel needs
208362306a36Sopenharmony_ci	  to be specifically compiled to run from a specific memory area
208462306a36Sopenharmony_ci	  (normally a reserved region) and this option comes handy.
208562306a36Sopenharmony_ci
208662306a36Sopenharmony_ci	  So if you are using bzImage for capturing the crash dump,
208762306a36Sopenharmony_ci	  leave the value here unchanged to 0x1000000 and set
208862306a36Sopenharmony_ci	  CONFIG_RELOCATABLE=y.  Otherwise if you plan to use vmlinux
208962306a36Sopenharmony_ci	  for capturing the crash dump change this value to start of
209062306a36Sopenharmony_ci	  the reserved region.  In other words, it can be set based on
209162306a36Sopenharmony_ci	  the "X" value as specified in the "crashkernel=YM@XM"
209262306a36Sopenharmony_ci	  command line boot parameter passed to the panic-ed
209362306a36Sopenharmony_ci	  kernel. Please take a look at Documentation/admin-guide/kdump/kdump.rst
209462306a36Sopenharmony_ci	  for more details about crash dumps.
209562306a36Sopenharmony_ci
209662306a36Sopenharmony_ci	  Usage of bzImage for capturing the crash dump is recommended as
209762306a36Sopenharmony_ci	  one does not have to build two kernels. Same kernel can be used
209862306a36Sopenharmony_ci	  as production kernel and capture kernel. Above option should have
209962306a36Sopenharmony_ci	  gone away after relocatable bzImage support is introduced. But it
210062306a36Sopenharmony_ci	  is present because there are users out there who continue to use
210162306a36Sopenharmony_ci	  vmlinux for dump capture. This option should go away down the
210262306a36Sopenharmony_ci	  line.
210362306a36Sopenharmony_ci
210462306a36Sopenharmony_ci	  Don't change this unless you know what you are doing.
210562306a36Sopenharmony_ci
210662306a36Sopenharmony_ciconfig RELOCATABLE
210762306a36Sopenharmony_ci	bool "Build a relocatable kernel"
210862306a36Sopenharmony_ci	default y
210962306a36Sopenharmony_ci	help
211062306a36Sopenharmony_ci	  This builds a kernel image that retains relocation information
211162306a36Sopenharmony_ci	  so it can be loaded someplace besides the default 1MB.
211262306a36Sopenharmony_ci	  The relocations tend to make the kernel binary about 10% larger,
211362306a36Sopenharmony_ci	  but are discarded at runtime.
211462306a36Sopenharmony_ci
211562306a36Sopenharmony_ci	  One use is for the kexec on panic case where the recovery kernel
211662306a36Sopenharmony_ci	  must live at a different physical address than the primary
211762306a36Sopenharmony_ci	  kernel.
211862306a36Sopenharmony_ci
211962306a36Sopenharmony_ci	  Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address
212062306a36Sopenharmony_ci	  it has been loaded at and the compile time physical address
212162306a36Sopenharmony_ci	  (CONFIG_PHYSICAL_START) is used as the minimum location.
212262306a36Sopenharmony_ci
212362306a36Sopenharmony_ciconfig RANDOMIZE_BASE
212462306a36Sopenharmony_ci	bool "Randomize the address of the kernel image (KASLR)"
212562306a36Sopenharmony_ci	depends on RELOCATABLE
212662306a36Sopenharmony_ci	default y
212762306a36Sopenharmony_ci	help
212862306a36Sopenharmony_ci	  In support of Kernel Address Space Layout Randomization (KASLR),
212962306a36Sopenharmony_ci	  this randomizes the physical address at which the kernel image
213062306a36Sopenharmony_ci	  is decompressed and the virtual address where the kernel
213162306a36Sopenharmony_ci	  image is mapped, as a security feature that deters exploit
213262306a36Sopenharmony_ci	  attempts relying on knowledge of the location of kernel
213362306a36Sopenharmony_ci	  code internals.
213462306a36Sopenharmony_ci
213562306a36Sopenharmony_ci	  On 64-bit, the kernel physical and virtual addresses are
213662306a36Sopenharmony_ci	  randomized separately. The physical address will be anywhere
213762306a36Sopenharmony_ci	  between 16MB and the top of physical memory (up to 64TB). The
213862306a36Sopenharmony_ci	  virtual address will be randomized from 16MB up to 1GB (9 bits
213962306a36Sopenharmony_ci	  of entropy). Note that this also reduces the memory space
214062306a36Sopenharmony_ci	  available to kernel modules from 1.5GB to 1GB.
214162306a36Sopenharmony_ci
214262306a36Sopenharmony_ci	  On 32-bit, the kernel physical and virtual addresses are
214362306a36Sopenharmony_ci	  randomized together. They will be randomized from 16MB up to
214462306a36Sopenharmony_ci	  512MB (8 bits of entropy).
214562306a36Sopenharmony_ci
214662306a36Sopenharmony_ci	  Entropy is generated using the RDRAND instruction if it is
214762306a36Sopenharmony_ci	  supported. If RDTSC is supported, its value is mixed into
214862306a36Sopenharmony_ci	  the entropy pool as well. If neither RDRAND nor RDTSC are
214962306a36Sopenharmony_ci	  supported, then entropy is read from the i8254 timer. The
215062306a36Sopenharmony_ci	  usable entropy is limited by the kernel being built using
215162306a36Sopenharmony_ci	  2GB addressing, and that PHYSICAL_ALIGN must be at a
215262306a36Sopenharmony_ci	  minimum of 2MB. As a result, only 10 bits of entropy are
215362306a36Sopenharmony_ci	  theoretically possible, but the implementations are further
215462306a36Sopenharmony_ci	  limited due to memory layouts.
215562306a36Sopenharmony_ci
215662306a36Sopenharmony_ci	  If unsure, say Y.
215762306a36Sopenharmony_ci
215862306a36Sopenharmony_ci# Relocation on x86 needs some additional build support
215962306a36Sopenharmony_ciconfig X86_NEED_RELOCS
216062306a36Sopenharmony_ci	def_bool y
216162306a36Sopenharmony_ci	depends on RANDOMIZE_BASE || (X86_32 && RELOCATABLE)
216262306a36Sopenharmony_ci
216362306a36Sopenharmony_ciconfig PHYSICAL_ALIGN
216462306a36Sopenharmony_ci	hex "Alignment value to which kernel should be aligned"
216562306a36Sopenharmony_ci	default "0x200000"
216662306a36Sopenharmony_ci	range 0x2000 0x1000000 if X86_32
216762306a36Sopenharmony_ci	range 0x200000 0x1000000 if X86_64
216862306a36Sopenharmony_ci	help
216962306a36Sopenharmony_ci	  This value puts the alignment restrictions on physical address
217062306a36Sopenharmony_ci	  where kernel is loaded and run from. Kernel is compiled for an
217162306a36Sopenharmony_ci	  address which meets above alignment restriction.
217262306a36Sopenharmony_ci
217362306a36Sopenharmony_ci	  If bootloader loads the kernel at a non-aligned address and
217462306a36Sopenharmony_ci	  CONFIG_RELOCATABLE is set, kernel will move itself to nearest
217562306a36Sopenharmony_ci	  address aligned to above value and run from there.
217662306a36Sopenharmony_ci
217762306a36Sopenharmony_ci	  If bootloader loads the kernel at a non-aligned address and
217862306a36Sopenharmony_ci	  CONFIG_RELOCATABLE is not set, kernel will ignore the run time
217962306a36Sopenharmony_ci	  load address and decompress itself to the address it has been
218062306a36Sopenharmony_ci	  compiled for and run from there. The address for which kernel is
218162306a36Sopenharmony_ci	  compiled already meets above alignment restrictions. Hence the
218262306a36Sopenharmony_ci	  end result is that kernel runs from a physical address meeting
218362306a36Sopenharmony_ci	  above alignment restrictions.
218462306a36Sopenharmony_ci
218562306a36Sopenharmony_ci	  On 32-bit this value must be a multiple of 0x2000. On 64-bit
218662306a36Sopenharmony_ci	  this value must be a multiple of 0x200000.
218762306a36Sopenharmony_ci
218862306a36Sopenharmony_ci	  Don't change this unless you know what you are doing.
218962306a36Sopenharmony_ci
219062306a36Sopenharmony_ciconfig DYNAMIC_MEMORY_LAYOUT
219162306a36Sopenharmony_ci	bool
219262306a36Sopenharmony_ci	help
219362306a36Sopenharmony_ci	  This option makes base addresses of vmalloc and vmemmap as well as
219462306a36Sopenharmony_ci	  __PAGE_OFFSET movable during boot.
219562306a36Sopenharmony_ci
219662306a36Sopenharmony_ciconfig RANDOMIZE_MEMORY
219762306a36Sopenharmony_ci	bool "Randomize the kernel memory sections"
219862306a36Sopenharmony_ci	depends on X86_64
219962306a36Sopenharmony_ci	depends on RANDOMIZE_BASE
220062306a36Sopenharmony_ci	select DYNAMIC_MEMORY_LAYOUT
220162306a36Sopenharmony_ci	default RANDOMIZE_BASE
220262306a36Sopenharmony_ci	help
220362306a36Sopenharmony_ci	  Randomizes the base virtual address of kernel memory sections
220462306a36Sopenharmony_ci	  (physical memory mapping, vmalloc & vmemmap). This security feature
220562306a36Sopenharmony_ci	  makes exploits relying on predictable memory locations less reliable.
220662306a36Sopenharmony_ci
220762306a36Sopenharmony_ci	  The order of allocations remains unchanged. Entropy is generated in
220862306a36Sopenharmony_ci	  the same way as RANDOMIZE_BASE. Current implementation in the optimal
220962306a36Sopenharmony_ci	  configuration have in average 30,000 different possible virtual
221062306a36Sopenharmony_ci	  addresses for each memory section.
221162306a36Sopenharmony_ci
221262306a36Sopenharmony_ci	  If unsure, say Y.
221362306a36Sopenharmony_ci
221462306a36Sopenharmony_ciconfig RANDOMIZE_MEMORY_PHYSICAL_PADDING
221562306a36Sopenharmony_ci	hex "Physical memory mapping padding" if EXPERT
221662306a36Sopenharmony_ci	depends on RANDOMIZE_MEMORY
221762306a36Sopenharmony_ci	default "0xa" if MEMORY_HOTPLUG
221862306a36Sopenharmony_ci	default "0x0"
221962306a36Sopenharmony_ci	range 0x1 0x40 if MEMORY_HOTPLUG
222062306a36Sopenharmony_ci	range 0x0 0x40
222162306a36Sopenharmony_ci	help
222262306a36Sopenharmony_ci	  Define the padding in terabytes added to the existing physical
222362306a36Sopenharmony_ci	  memory size during kernel memory randomization. It is useful
222462306a36Sopenharmony_ci	  for memory hotplug support but reduces the entropy available for
222562306a36Sopenharmony_ci	  address randomization.
222662306a36Sopenharmony_ci
222762306a36Sopenharmony_ci	  If unsure, leave at the default value.
222862306a36Sopenharmony_ci
222962306a36Sopenharmony_ciconfig ADDRESS_MASKING
223062306a36Sopenharmony_ci	bool "Linear Address Masking support"
223162306a36Sopenharmony_ci	depends on X86_64
223262306a36Sopenharmony_ci	help
223362306a36Sopenharmony_ci	  Linear Address Masking (LAM) modifies the checking that is applied
223462306a36Sopenharmony_ci	  to 64-bit linear addresses, allowing software to use of the
223562306a36Sopenharmony_ci	  untranslated address bits for metadata.
223662306a36Sopenharmony_ci
223762306a36Sopenharmony_ci	  The capability can be used for efficient address sanitizers (ASAN)
223862306a36Sopenharmony_ci	  implementation and for optimizations in JITs.
223962306a36Sopenharmony_ci
224062306a36Sopenharmony_ciconfig HOTPLUG_CPU
224162306a36Sopenharmony_ci	def_bool y
224262306a36Sopenharmony_ci	depends on SMP
224362306a36Sopenharmony_ci
224462306a36Sopenharmony_ciconfig COMPAT_VDSO
224562306a36Sopenharmony_ci	def_bool n
224662306a36Sopenharmony_ci	prompt "Disable the 32-bit vDSO (needed for glibc 2.3.3)"
224762306a36Sopenharmony_ci	depends on COMPAT_32
224862306a36Sopenharmony_ci	help
224962306a36Sopenharmony_ci	  Certain buggy versions of glibc will crash if they are
225062306a36Sopenharmony_ci	  presented with a 32-bit vDSO that is not mapped at the address
225162306a36Sopenharmony_ci	  indicated in its segment table.
225262306a36Sopenharmony_ci
225362306a36Sopenharmony_ci	  The bug was introduced by f866314b89d56845f55e6f365e18b31ec978ec3a
225462306a36Sopenharmony_ci	  and fixed by 3b3ddb4f7db98ec9e912ccdf54d35df4aa30e04a and
225562306a36Sopenharmony_ci	  49ad572a70b8aeb91e57483a11dd1b77e31c4468.  Glibc 2.3.3 is
225662306a36Sopenharmony_ci	  the only released version with the bug, but OpenSUSE 9
225762306a36Sopenharmony_ci	  contains a buggy "glibc 2.3.2".
225862306a36Sopenharmony_ci
225962306a36Sopenharmony_ci	  The symptom of the bug is that everything crashes on startup, saying:
226062306a36Sopenharmony_ci	  dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!
226162306a36Sopenharmony_ci
226262306a36Sopenharmony_ci	  Saying Y here changes the default value of the vdso32 boot
226362306a36Sopenharmony_ci	  option from 1 to 0, which turns off the 32-bit vDSO entirely.
226462306a36Sopenharmony_ci	  This works around the glibc bug but hurts performance.
226562306a36Sopenharmony_ci
226662306a36Sopenharmony_ci	  If unsure, say N: if you are compiling your own kernel, you
226762306a36Sopenharmony_ci	  are unlikely to be using a buggy version of glibc.
226862306a36Sopenharmony_ci
226962306a36Sopenharmony_cichoice
227062306a36Sopenharmony_ci	prompt "vsyscall table for legacy applications"
227162306a36Sopenharmony_ci	depends on X86_64
227262306a36Sopenharmony_ci	default LEGACY_VSYSCALL_XONLY
227362306a36Sopenharmony_ci	help
227462306a36Sopenharmony_ci	  Legacy user code that does not know how to find the vDSO expects
227562306a36Sopenharmony_ci	  to be able to issue three syscalls by calling fixed addresses in
227662306a36Sopenharmony_ci	  kernel space. Since this location is not randomized with ASLR,
227762306a36Sopenharmony_ci	  it can be used to assist security vulnerability exploitation.
227862306a36Sopenharmony_ci
227962306a36Sopenharmony_ci	  This setting can be changed at boot time via the kernel command
228062306a36Sopenharmony_ci	  line parameter vsyscall=[emulate|xonly|none].  Emulate mode
228162306a36Sopenharmony_ci	  is deprecated and can only be enabled using the kernel command
228262306a36Sopenharmony_ci	  line.
228362306a36Sopenharmony_ci
228462306a36Sopenharmony_ci	  On a system with recent enough glibc (2.14 or newer) and no
228562306a36Sopenharmony_ci	  static binaries, you can say None without a performance penalty
228662306a36Sopenharmony_ci	  to improve security.
228762306a36Sopenharmony_ci
228862306a36Sopenharmony_ci	  If unsure, select "Emulate execution only".
228962306a36Sopenharmony_ci
229062306a36Sopenharmony_ci	config LEGACY_VSYSCALL_XONLY
229162306a36Sopenharmony_ci		bool "Emulate execution only"
229262306a36Sopenharmony_ci		help
229362306a36Sopenharmony_ci		  The kernel traps and emulates calls into the fixed vsyscall
229462306a36Sopenharmony_ci		  address mapping and does not allow reads.  This
229562306a36Sopenharmony_ci		  configuration is recommended when userspace might use the
229662306a36Sopenharmony_ci		  legacy vsyscall area but support for legacy binary
229762306a36Sopenharmony_ci		  instrumentation of legacy code is not needed.  It mitigates
229862306a36Sopenharmony_ci		  certain uses of the vsyscall area as an ASLR-bypassing
229962306a36Sopenharmony_ci		  buffer.
230062306a36Sopenharmony_ci
230162306a36Sopenharmony_ci	config LEGACY_VSYSCALL_NONE
230262306a36Sopenharmony_ci		bool "None"
230362306a36Sopenharmony_ci		help
230462306a36Sopenharmony_ci		  There will be no vsyscall mapping at all. This will
230562306a36Sopenharmony_ci		  eliminate any risk of ASLR bypass due to the vsyscall
230662306a36Sopenharmony_ci		  fixed address mapping. Attempts to use the vsyscalls
230762306a36Sopenharmony_ci		  will be reported to dmesg, so that either old or
230862306a36Sopenharmony_ci		  malicious userspace programs can be identified.
230962306a36Sopenharmony_ci
231062306a36Sopenharmony_ciendchoice
231162306a36Sopenharmony_ci
231262306a36Sopenharmony_ciconfig CMDLINE_BOOL
231362306a36Sopenharmony_ci	bool "Built-in kernel command line"
231462306a36Sopenharmony_ci	help
231562306a36Sopenharmony_ci	  Allow for specifying boot arguments to the kernel at
231662306a36Sopenharmony_ci	  build time.  On some systems (e.g. embedded ones), it is
231762306a36Sopenharmony_ci	  necessary or convenient to provide some or all of the
231862306a36Sopenharmony_ci	  kernel boot arguments with the kernel itself (that is,
231962306a36Sopenharmony_ci	  to not rely on the boot loader to provide them.)
232062306a36Sopenharmony_ci
232162306a36Sopenharmony_ci	  To compile command line arguments into the kernel,
232262306a36Sopenharmony_ci	  set this option to 'Y', then fill in the
232362306a36Sopenharmony_ci	  boot arguments in CONFIG_CMDLINE.
232462306a36Sopenharmony_ci
232562306a36Sopenharmony_ci	  Systems with fully functional boot loaders (i.e. non-embedded)
232662306a36Sopenharmony_ci	  should leave this option set to 'N'.
232762306a36Sopenharmony_ci
232862306a36Sopenharmony_ciconfig CMDLINE
232962306a36Sopenharmony_ci	string "Built-in kernel command string"
233062306a36Sopenharmony_ci	depends on CMDLINE_BOOL
233162306a36Sopenharmony_ci	default ""
233262306a36Sopenharmony_ci	help
233362306a36Sopenharmony_ci	  Enter arguments here that should be compiled into the kernel
233462306a36Sopenharmony_ci	  image and used at boot time.  If the boot loader provides a
233562306a36Sopenharmony_ci	  command line at boot time, it is appended to this string to
233662306a36Sopenharmony_ci	  form the full kernel command line, when the system boots.
233762306a36Sopenharmony_ci
233862306a36Sopenharmony_ci	  However, you can use the CONFIG_CMDLINE_OVERRIDE option to
233962306a36Sopenharmony_ci	  change this behavior.
234062306a36Sopenharmony_ci
234162306a36Sopenharmony_ci	  In most cases, the command line (whether built-in or provided
234262306a36Sopenharmony_ci	  by the boot loader) should specify the device for the root
234362306a36Sopenharmony_ci	  file system.
234462306a36Sopenharmony_ci
234562306a36Sopenharmony_ciconfig CMDLINE_OVERRIDE
234662306a36Sopenharmony_ci	bool "Built-in command line overrides boot loader arguments"
234762306a36Sopenharmony_ci	depends on CMDLINE_BOOL && CMDLINE != ""
234862306a36Sopenharmony_ci	help
234962306a36Sopenharmony_ci	  Set this option to 'Y' to have the kernel ignore the boot loader
235062306a36Sopenharmony_ci	  command line, and use ONLY the built-in command line.
235162306a36Sopenharmony_ci
235262306a36Sopenharmony_ci	  This is used to work around broken boot loaders.  This should
235362306a36Sopenharmony_ci	  be set to 'N' under normal conditions.
235462306a36Sopenharmony_ci
235562306a36Sopenharmony_ciconfig MODIFY_LDT_SYSCALL
235662306a36Sopenharmony_ci	bool "Enable the LDT (local descriptor table)" if EXPERT
235762306a36Sopenharmony_ci	default y
235862306a36Sopenharmony_ci	help
235962306a36Sopenharmony_ci	  Linux can allow user programs to install a per-process x86
236062306a36Sopenharmony_ci	  Local Descriptor Table (LDT) using the modify_ldt(2) system
236162306a36Sopenharmony_ci	  call.  This is required to run 16-bit or segmented code such as
236262306a36Sopenharmony_ci	  DOSEMU or some Wine programs.  It is also used by some very old
236362306a36Sopenharmony_ci	  threading libraries.
236462306a36Sopenharmony_ci
236562306a36Sopenharmony_ci	  Enabling this feature adds a small amount of overhead to
236662306a36Sopenharmony_ci	  context switches and increases the low-level kernel attack
236762306a36Sopenharmony_ci	  surface.  Disabling it removes the modify_ldt(2) system call.
236862306a36Sopenharmony_ci
236962306a36Sopenharmony_ci	  Saying 'N' here may make sense for embedded or server kernels.
237062306a36Sopenharmony_ci
237162306a36Sopenharmony_ciconfig STRICT_SIGALTSTACK_SIZE
237262306a36Sopenharmony_ci	bool "Enforce strict size checking for sigaltstack"
237362306a36Sopenharmony_ci	depends on DYNAMIC_SIGFRAME
237462306a36Sopenharmony_ci	help
237562306a36Sopenharmony_ci	  For historical reasons MINSIGSTKSZ is a constant which became
237662306a36Sopenharmony_ci	  already too small with AVX512 support. Add a mechanism to
237762306a36Sopenharmony_ci	  enforce strict checking of the sigaltstack size against the
237862306a36Sopenharmony_ci	  real size of the FPU frame. This option enables the check
237962306a36Sopenharmony_ci	  by default. It can also be controlled via the kernel command
238062306a36Sopenharmony_ci	  line option 'strict_sas_size' independent of this config
238162306a36Sopenharmony_ci	  switch. Enabling it might break existing applications which
238262306a36Sopenharmony_ci	  allocate a too small sigaltstack but 'work' because they
238362306a36Sopenharmony_ci	  never get a signal delivered.
238462306a36Sopenharmony_ci
238562306a36Sopenharmony_ci	  Say 'N' unless you want to really enforce this check.
238662306a36Sopenharmony_ci
238762306a36Sopenharmony_cisource "kernel/livepatch/Kconfig"
238862306a36Sopenharmony_ci
238962306a36Sopenharmony_ciendmenu
239062306a36Sopenharmony_ci
239162306a36Sopenharmony_ciconfig CC_HAS_SLS
239262306a36Sopenharmony_ci	def_bool $(cc-option,-mharden-sls=all)
239362306a36Sopenharmony_ci
239462306a36Sopenharmony_ciconfig CC_HAS_RETURN_THUNK
239562306a36Sopenharmony_ci	def_bool $(cc-option,-mfunction-return=thunk-extern)
239662306a36Sopenharmony_ci
239762306a36Sopenharmony_ciconfig CC_HAS_ENTRY_PADDING
239862306a36Sopenharmony_ci	def_bool $(cc-option,-fpatchable-function-entry=16,16)
239962306a36Sopenharmony_ci
240062306a36Sopenharmony_ciconfig FUNCTION_PADDING_CFI
240162306a36Sopenharmony_ci	int
240262306a36Sopenharmony_ci	default 59 if FUNCTION_ALIGNMENT_64B
240362306a36Sopenharmony_ci	default 27 if FUNCTION_ALIGNMENT_32B
240462306a36Sopenharmony_ci	default 11 if FUNCTION_ALIGNMENT_16B
240562306a36Sopenharmony_ci	default  3 if FUNCTION_ALIGNMENT_8B
240662306a36Sopenharmony_ci	default  0
240762306a36Sopenharmony_ci
240862306a36Sopenharmony_ci# Basically: FUNCTION_ALIGNMENT - 5*CFI_CLANG
240962306a36Sopenharmony_ci# except Kconfig can't do arithmetic :/
241062306a36Sopenharmony_ciconfig FUNCTION_PADDING_BYTES
241162306a36Sopenharmony_ci	int
241262306a36Sopenharmony_ci	default FUNCTION_PADDING_CFI if CFI_CLANG
241362306a36Sopenharmony_ci	default FUNCTION_ALIGNMENT
241462306a36Sopenharmony_ci
241562306a36Sopenharmony_ciconfig CALL_PADDING
241662306a36Sopenharmony_ci	def_bool n
241762306a36Sopenharmony_ci	depends on CC_HAS_ENTRY_PADDING && OBJTOOL
241862306a36Sopenharmony_ci	select FUNCTION_ALIGNMENT_16B
241962306a36Sopenharmony_ci
242062306a36Sopenharmony_ciconfig FINEIBT
242162306a36Sopenharmony_ci	def_bool y
242262306a36Sopenharmony_ci	depends on X86_KERNEL_IBT && CFI_CLANG && RETPOLINE
242362306a36Sopenharmony_ci	select CALL_PADDING
242462306a36Sopenharmony_ci
242562306a36Sopenharmony_ciconfig HAVE_CALL_THUNKS
242662306a36Sopenharmony_ci	def_bool y
242762306a36Sopenharmony_ci	depends on CC_HAS_ENTRY_PADDING && RETHUNK && OBJTOOL
242862306a36Sopenharmony_ci
242962306a36Sopenharmony_ciconfig CALL_THUNKS
243062306a36Sopenharmony_ci	def_bool n
243162306a36Sopenharmony_ci	select CALL_PADDING
243262306a36Sopenharmony_ci
243362306a36Sopenharmony_ciconfig PREFIX_SYMBOLS
243462306a36Sopenharmony_ci	def_bool y
243562306a36Sopenharmony_ci	depends on CALL_PADDING && !CFI_CLANG
243662306a36Sopenharmony_ci
243762306a36Sopenharmony_cimenuconfig SPECULATION_MITIGATIONS
243862306a36Sopenharmony_ci	bool "Mitigations for speculative execution vulnerabilities"
243962306a36Sopenharmony_ci	default y
244062306a36Sopenharmony_ci	help
244162306a36Sopenharmony_ci	  Say Y here to enable options which enable mitigations for
244262306a36Sopenharmony_ci	  speculative execution hardware vulnerabilities.
244362306a36Sopenharmony_ci
244462306a36Sopenharmony_ci	  If you say N, all mitigations will be disabled. You really
244562306a36Sopenharmony_ci	  should know what you are doing to say so.
244662306a36Sopenharmony_ci
244762306a36Sopenharmony_ciif SPECULATION_MITIGATIONS
244862306a36Sopenharmony_ci
244962306a36Sopenharmony_ciconfig PAGE_TABLE_ISOLATION
245062306a36Sopenharmony_ci	bool "Remove the kernel mapping in user mode"
245162306a36Sopenharmony_ci	default y
245262306a36Sopenharmony_ci	depends on (X86_64 || X86_PAE)
245362306a36Sopenharmony_ci	help
245462306a36Sopenharmony_ci	  This feature reduces the number of hardware side channels by
245562306a36Sopenharmony_ci	  ensuring that the majority of kernel addresses are not mapped
245662306a36Sopenharmony_ci	  into userspace.
245762306a36Sopenharmony_ci
245862306a36Sopenharmony_ci	  See Documentation/arch/x86/pti.rst for more details.
245962306a36Sopenharmony_ci
246062306a36Sopenharmony_ciconfig RETPOLINE
246162306a36Sopenharmony_ci	bool "Avoid speculative indirect branches in kernel"
246262306a36Sopenharmony_ci	select OBJTOOL if HAVE_OBJTOOL
246362306a36Sopenharmony_ci	default y
246462306a36Sopenharmony_ci	help
246562306a36Sopenharmony_ci	  Compile kernel with the retpoline compiler options to guard against
246662306a36Sopenharmony_ci	  kernel-to-user data leaks by avoiding speculative indirect
246762306a36Sopenharmony_ci	  branches. Requires a compiler with -mindirect-branch=thunk-extern
246862306a36Sopenharmony_ci	  support for full protection. The kernel may run slower.
246962306a36Sopenharmony_ci
247062306a36Sopenharmony_ciconfig RETHUNK
247162306a36Sopenharmony_ci	bool "Enable return-thunks"
247262306a36Sopenharmony_ci	depends on RETPOLINE && CC_HAS_RETURN_THUNK
247362306a36Sopenharmony_ci	select OBJTOOL if HAVE_OBJTOOL
247462306a36Sopenharmony_ci	default y if X86_64
247562306a36Sopenharmony_ci	help
247662306a36Sopenharmony_ci	  Compile the kernel with the return-thunks compiler option to guard
247762306a36Sopenharmony_ci	  against kernel-to-user data leaks by avoiding return speculation.
247862306a36Sopenharmony_ci	  Requires a compiler with -mfunction-return=thunk-extern
247962306a36Sopenharmony_ci	  support for full protection. The kernel may run slower.
248062306a36Sopenharmony_ci
248162306a36Sopenharmony_ciconfig CPU_UNRET_ENTRY
248262306a36Sopenharmony_ci	bool "Enable UNRET on kernel entry"
248362306a36Sopenharmony_ci	depends on CPU_SUP_AMD && RETHUNK && X86_64
248462306a36Sopenharmony_ci	default y
248562306a36Sopenharmony_ci	help
248662306a36Sopenharmony_ci	  Compile the kernel with support for the retbleed=unret mitigation.
248762306a36Sopenharmony_ci
248862306a36Sopenharmony_ciconfig CALL_DEPTH_TRACKING
248962306a36Sopenharmony_ci	bool "Mitigate RSB underflow with call depth tracking"
249062306a36Sopenharmony_ci	depends on CPU_SUP_INTEL && HAVE_CALL_THUNKS
249162306a36Sopenharmony_ci	select HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
249262306a36Sopenharmony_ci	select CALL_THUNKS
249362306a36Sopenharmony_ci	default y
249462306a36Sopenharmony_ci	help
249562306a36Sopenharmony_ci	  Compile the kernel with call depth tracking to mitigate the Intel
249662306a36Sopenharmony_ci	  SKL Return-Speculation-Buffer (RSB) underflow issue. The
249762306a36Sopenharmony_ci	  mitigation is off by default and needs to be enabled on the
249862306a36Sopenharmony_ci	  kernel command line via the retbleed=stuff option. For
249962306a36Sopenharmony_ci	  non-affected systems the overhead of this option is marginal as
250062306a36Sopenharmony_ci	  the call depth tracking is using run-time generated call thunks
250162306a36Sopenharmony_ci	  in a compiler generated padding area and call patching. This
250262306a36Sopenharmony_ci	  increases text size by ~5%. For non affected systems this space
250362306a36Sopenharmony_ci	  is unused. On affected SKL systems this results in a significant
250462306a36Sopenharmony_ci	  performance gain over the IBRS mitigation.
250562306a36Sopenharmony_ci
250662306a36Sopenharmony_ciconfig CALL_THUNKS_DEBUG
250762306a36Sopenharmony_ci	bool "Enable call thunks and call depth tracking debugging"
250862306a36Sopenharmony_ci	depends on CALL_DEPTH_TRACKING
250962306a36Sopenharmony_ci	select FUNCTION_ALIGNMENT_32B
251062306a36Sopenharmony_ci	default n
251162306a36Sopenharmony_ci	help
251262306a36Sopenharmony_ci	  Enable call/ret counters for imbalance detection and build in
251362306a36Sopenharmony_ci	  a noisy dmesg about callthunks generation and call patching for
251462306a36Sopenharmony_ci	  trouble shooting. The debug prints need to be enabled on the
251562306a36Sopenharmony_ci	  kernel command line with 'debug-callthunks'.
251662306a36Sopenharmony_ci	  Only enable this when you are debugging call thunks as this
251762306a36Sopenharmony_ci	  creates a noticeable runtime overhead. If unsure say N.
251862306a36Sopenharmony_ci
251962306a36Sopenharmony_ciconfig CPU_IBPB_ENTRY
252062306a36Sopenharmony_ci	bool "Enable IBPB on kernel entry"
252162306a36Sopenharmony_ci	depends on CPU_SUP_AMD && X86_64
252262306a36Sopenharmony_ci	default y
252362306a36Sopenharmony_ci	help
252462306a36Sopenharmony_ci	  Compile the kernel with support for the retbleed=ibpb mitigation.
252562306a36Sopenharmony_ci
252662306a36Sopenharmony_ciconfig CPU_IBRS_ENTRY
252762306a36Sopenharmony_ci	bool "Enable IBRS on kernel entry"
252862306a36Sopenharmony_ci	depends on CPU_SUP_INTEL && X86_64
252962306a36Sopenharmony_ci	default y
253062306a36Sopenharmony_ci	help
253162306a36Sopenharmony_ci	  Compile the kernel with support for the spectre_v2=ibrs mitigation.
253262306a36Sopenharmony_ci	  This mitigates both spectre_v2 and retbleed at great cost to
253362306a36Sopenharmony_ci	  performance.
253462306a36Sopenharmony_ci
253562306a36Sopenharmony_ciconfig CPU_SRSO
253662306a36Sopenharmony_ci	bool "Mitigate speculative RAS overflow on AMD"
253762306a36Sopenharmony_ci	depends on CPU_SUP_AMD && X86_64 && RETHUNK
253862306a36Sopenharmony_ci	default y
253962306a36Sopenharmony_ci	help
254062306a36Sopenharmony_ci	  Enable the SRSO mitigation needed on AMD Zen1-4 machines.
254162306a36Sopenharmony_ci
254262306a36Sopenharmony_ciconfig SLS
254362306a36Sopenharmony_ci	bool "Mitigate Straight-Line-Speculation"
254462306a36Sopenharmony_ci	depends on CC_HAS_SLS && X86_64
254562306a36Sopenharmony_ci	select OBJTOOL if HAVE_OBJTOOL
254662306a36Sopenharmony_ci	default n
254762306a36Sopenharmony_ci	help
254862306a36Sopenharmony_ci	  Compile the kernel with straight-line-speculation options to guard
254962306a36Sopenharmony_ci	  against straight line speculation. The kernel image might be slightly
255062306a36Sopenharmony_ci	  larger.
255162306a36Sopenharmony_ci
255262306a36Sopenharmony_ciconfig GDS_FORCE_MITIGATION
255362306a36Sopenharmony_ci	bool "Force GDS Mitigation"
255462306a36Sopenharmony_ci	depends on CPU_SUP_INTEL
255562306a36Sopenharmony_ci	default n
255662306a36Sopenharmony_ci	help
255762306a36Sopenharmony_ci	  Gather Data Sampling (GDS) is a hardware vulnerability which allows
255862306a36Sopenharmony_ci	  unprivileged speculative access to data which was previously stored in
255962306a36Sopenharmony_ci	  vector registers.
256062306a36Sopenharmony_ci
256162306a36Sopenharmony_ci	  This option is equivalent to setting gather_data_sampling=force on the
256262306a36Sopenharmony_ci	  command line. The microcode mitigation is used if present, otherwise
256362306a36Sopenharmony_ci	  AVX is disabled as a mitigation. On affected systems that are missing
256462306a36Sopenharmony_ci	  the microcode any userspace code that unconditionally uses AVX will
256562306a36Sopenharmony_ci	  break with this option set.
256662306a36Sopenharmony_ci
256762306a36Sopenharmony_ci	  Setting this option on systems not vulnerable to GDS has no effect.
256862306a36Sopenharmony_ci
256962306a36Sopenharmony_ci	  If in doubt, say N.
257062306a36Sopenharmony_ci
257162306a36Sopenharmony_ciconfig MITIGATION_RFDS
257262306a36Sopenharmony_ci	bool "RFDS Mitigation"
257362306a36Sopenharmony_ci	depends on CPU_SUP_INTEL
257462306a36Sopenharmony_ci	default y
257562306a36Sopenharmony_ci	help
257662306a36Sopenharmony_ci	  Enable mitigation for Register File Data Sampling (RFDS) by default.
257762306a36Sopenharmony_ci	  RFDS is a hardware vulnerability which affects Intel Atom CPUs. It
257862306a36Sopenharmony_ci	  allows unprivileged speculative access to stale data previously
257962306a36Sopenharmony_ci	  stored in floating point, vector and integer registers.
258062306a36Sopenharmony_ci	  See also <file:Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst>
258162306a36Sopenharmony_ci
258262306a36Sopenharmony_ciendif
258362306a36Sopenharmony_ci
258462306a36Sopenharmony_ciconfig ARCH_HAS_ADD_PAGES
258562306a36Sopenharmony_ci	def_bool y
258662306a36Sopenharmony_ci	depends on ARCH_ENABLE_MEMORY_HOTPLUG
258762306a36Sopenharmony_ci
258862306a36Sopenharmony_cimenu "Power management and ACPI options"
258962306a36Sopenharmony_ci
259062306a36Sopenharmony_ciconfig ARCH_HIBERNATION_HEADER
259162306a36Sopenharmony_ci	def_bool y
259262306a36Sopenharmony_ci	depends on HIBERNATION
259362306a36Sopenharmony_ci
259462306a36Sopenharmony_cisource "kernel/power/Kconfig"
259562306a36Sopenharmony_ci
259662306a36Sopenharmony_cisource "drivers/acpi/Kconfig"
259762306a36Sopenharmony_ci
259862306a36Sopenharmony_ciconfig X86_APM_BOOT
259962306a36Sopenharmony_ci	def_bool y
260062306a36Sopenharmony_ci	depends on APM
260162306a36Sopenharmony_ci
260262306a36Sopenharmony_cimenuconfig APM
260362306a36Sopenharmony_ci	tristate "APM (Advanced Power Management) BIOS support"
260462306a36Sopenharmony_ci	depends on X86_32 && PM_SLEEP
260562306a36Sopenharmony_ci	help
260662306a36Sopenharmony_ci	  APM is a BIOS specification for saving power using several different
260762306a36Sopenharmony_ci	  techniques. This is mostly useful for battery powered laptops with
260862306a36Sopenharmony_ci	  APM compliant BIOSes. If you say Y here, the system time will be
260962306a36Sopenharmony_ci	  reset after a RESUME operation, the /proc/apm device will provide
261062306a36Sopenharmony_ci	  battery status information, and user-space programs will receive
261162306a36Sopenharmony_ci	  notification of APM "events" (e.g. battery status change).
261262306a36Sopenharmony_ci
261362306a36Sopenharmony_ci	  If you select "Y" here, you can disable actual use of the APM
261462306a36Sopenharmony_ci	  BIOS by passing the "apm=off" option to the kernel at boot time.
261562306a36Sopenharmony_ci
261662306a36Sopenharmony_ci	  Note that the APM support is almost completely disabled for
261762306a36Sopenharmony_ci	  machines with more than one CPU.
261862306a36Sopenharmony_ci
261962306a36Sopenharmony_ci	  In order to use APM, you will need supporting software. For location
262062306a36Sopenharmony_ci	  and more information, read <file:Documentation/power/apm-acpi.rst>
262162306a36Sopenharmony_ci	  and the Battery Powered Linux mini-HOWTO, available from
262262306a36Sopenharmony_ci	  <http://www.tldp.org/docs.html#howto>.
262362306a36Sopenharmony_ci
262462306a36Sopenharmony_ci	  This driver does not spin down disk drives (see the hdparm(8)
262562306a36Sopenharmony_ci	  manpage ("man 8 hdparm") for that), and it doesn't turn off
262662306a36Sopenharmony_ci	  VESA-compliant "green" monitors.
262762306a36Sopenharmony_ci
262862306a36Sopenharmony_ci	  This driver does not support the TI 4000M TravelMate and the ACER
262962306a36Sopenharmony_ci	  486/DX4/75 because they don't have compliant BIOSes. Many "green"
263062306a36Sopenharmony_ci	  desktop machines also don't have compliant BIOSes, and this driver
263162306a36Sopenharmony_ci	  may cause those machines to panic during the boot phase.
263262306a36Sopenharmony_ci
263362306a36Sopenharmony_ci	  Generally, if you don't have a battery in your machine, there isn't
263462306a36Sopenharmony_ci	  much point in using this driver and you should say N. If you get
263562306a36Sopenharmony_ci	  random kernel OOPSes or reboots that don't seem to be related to
263662306a36Sopenharmony_ci	  anything, try disabling/enabling this option (or disabling/enabling
263762306a36Sopenharmony_ci	  APM in your BIOS).
263862306a36Sopenharmony_ci
263962306a36Sopenharmony_ci	  Some other things you should try when experiencing seemingly random,
264062306a36Sopenharmony_ci	  "weird" problems:
264162306a36Sopenharmony_ci
264262306a36Sopenharmony_ci	  1) make sure that you have enough swap space and that it is
264362306a36Sopenharmony_ci	  enabled.
264462306a36Sopenharmony_ci	  2) pass the "idle=poll" option to the kernel
264562306a36Sopenharmony_ci	  3) switch on floating point emulation in the kernel and pass
264662306a36Sopenharmony_ci	  the "no387" option to the kernel
264762306a36Sopenharmony_ci	  4) pass the "floppy=nodma" option to the kernel
264862306a36Sopenharmony_ci	  5) pass the "mem=4M" option to the kernel (thereby disabling
264962306a36Sopenharmony_ci	  all but the first 4 MB of RAM)
265062306a36Sopenharmony_ci	  6) make sure that the CPU is not over clocked.
265162306a36Sopenharmony_ci	  7) read the sig11 FAQ at <http://www.bitwizard.nl/sig11/>
265262306a36Sopenharmony_ci	  8) disable the cache from your BIOS settings
265362306a36Sopenharmony_ci	  9) install a fan for the video card or exchange video RAM
265462306a36Sopenharmony_ci	  10) install a better fan for the CPU
265562306a36Sopenharmony_ci	  11) exchange RAM chips
265662306a36Sopenharmony_ci	  12) exchange the motherboard.
265762306a36Sopenharmony_ci
265862306a36Sopenharmony_ci	  To compile this driver as a module, choose M here: the
265962306a36Sopenharmony_ci	  module will be called apm.
266062306a36Sopenharmony_ci
266162306a36Sopenharmony_ciif APM
266262306a36Sopenharmony_ci
266362306a36Sopenharmony_ciconfig APM_IGNORE_USER_SUSPEND
266462306a36Sopenharmony_ci	bool "Ignore USER SUSPEND"
266562306a36Sopenharmony_ci	help
266662306a36Sopenharmony_ci	  This option will ignore USER SUSPEND requests. On machines with a
266762306a36Sopenharmony_ci	  compliant APM BIOS, you want to say N. However, on the NEC Versa M
266862306a36Sopenharmony_ci	  series notebooks, it is necessary to say Y because of a BIOS bug.
266962306a36Sopenharmony_ci
267062306a36Sopenharmony_ciconfig APM_DO_ENABLE
267162306a36Sopenharmony_ci	bool "Enable PM at boot time"
267262306a36Sopenharmony_ci	help
267362306a36Sopenharmony_ci	  Enable APM features at boot time. From page 36 of the APM BIOS
267462306a36Sopenharmony_ci	  specification: "When disabled, the APM BIOS does not automatically
267562306a36Sopenharmony_ci	  power manage devices, enter the Standby State, enter the Suspend
267662306a36Sopenharmony_ci	  State, or take power saving steps in response to CPU Idle calls."
267762306a36Sopenharmony_ci	  This driver will make CPU Idle calls when Linux is idle (unless this
267862306a36Sopenharmony_ci	  feature is turned off -- see "Do CPU IDLE calls", below). This
267962306a36Sopenharmony_ci	  should always save battery power, but more complicated APM features
268062306a36Sopenharmony_ci	  will be dependent on your BIOS implementation. You may need to turn
268162306a36Sopenharmony_ci	  this option off if your computer hangs at boot time when using APM
268262306a36Sopenharmony_ci	  support, or if it beeps continuously instead of suspending. Turn
268362306a36Sopenharmony_ci	  this off if you have a NEC UltraLite Versa 33/C or a Toshiba
268462306a36Sopenharmony_ci	  T400CDT. This is off by default since most machines do fine without
268562306a36Sopenharmony_ci	  this feature.
268662306a36Sopenharmony_ci
268762306a36Sopenharmony_ciconfig APM_CPU_IDLE
268862306a36Sopenharmony_ci	depends on CPU_IDLE
268962306a36Sopenharmony_ci	bool "Make CPU Idle calls when idle"
269062306a36Sopenharmony_ci	help
269162306a36Sopenharmony_ci	  Enable calls to APM CPU Idle/CPU Busy inside the kernel's idle loop.
269262306a36Sopenharmony_ci	  On some machines, this can activate improved power savings, such as
269362306a36Sopenharmony_ci	  a slowed CPU clock rate, when the machine is idle. These idle calls
269462306a36Sopenharmony_ci	  are made after the idle loop has run for some length of time (e.g.,
269562306a36Sopenharmony_ci	  333 mS). On some machines, this will cause a hang at boot time or
269662306a36Sopenharmony_ci	  whenever the CPU becomes idle. (On machines with more than one CPU,
269762306a36Sopenharmony_ci	  this option does nothing.)
269862306a36Sopenharmony_ci
269962306a36Sopenharmony_ciconfig APM_DISPLAY_BLANK
270062306a36Sopenharmony_ci	bool "Enable console blanking using APM"
270162306a36Sopenharmony_ci	help
270262306a36Sopenharmony_ci	  Enable console blanking using the APM. Some laptops can use this to
270362306a36Sopenharmony_ci	  turn off the LCD backlight when the screen blanker of the Linux
270462306a36Sopenharmony_ci	  virtual console blanks the screen. Note that this is only used by
270562306a36Sopenharmony_ci	  the virtual console screen blanker, and won't turn off the backlight
270662306a36Sopenharmony_ci	  when using the X Window system. This also doesn't have anything to
270762306a36Sopenharmony_ci	  do with your VESA-compliant power-saving monitor. Further, this
270862306a36Sopenharmony_ci	  option doesn't work for all laptops -- it might not turn off your
270962306a36Sopenharmony_ci	  backlight at all, or it might print a lot of errors to the console,
271062306a36Sopenharmony_ci	  especially if you are using gpm.
271162306a36Sopenharmony_ci
271262306a36Sopenharmony_ciconfig APM_ALLOW_INTS
271362306a36Sopenharmony_ci	bool "Allow interrupts during APM BIOS calls"
271462306a36Sopenharmony_ci	help
271562306a36Sopenharmony_ci	  Normally we disable external interrupts while we are making calls to
271662306a36Sopenharmony_ci	  the APM BIOS as a measure to lessen the effects of a badly behaving
271762306a36Sopenharmony_ci	  BIOS implementation.  The BIOS should reenable interrupts if it
271862306a36Sopenharmony_ci	  needs to.  Unfortunately, some BIOSes do not -- especially those in
271962306a36Sopenharmony_ci	  many of the newer IBM Thinkpads.  If you experience hangs when you
272062306a36Sopenharmony_ci	  suspend, try setting this to Y.  Otherwise, say N.
272162306a36Sopenharmony_ci
272262306a36Sopenharmony_ciendif # APM
272362306a36Sopenharmony_ci
272462306a36Sopenharmony_cisource "drivers/cpufreq/Kconfig"
272562306a36Sopenharmony_ci
272662306a36Sopenharmony_cisource "drivers/cpuidle/Kconfig"
272762306a36Sopenharmony_ci
272862306a36Sopenharmony_cisource "drivers/idle/Kconfig"
272962306a36Sopenharmony_ci
273062306a36Sopenharmony_ciendmenu
273162306a36Sopenharmony_ci
273262306a36Sopenharmony_cimenu "Bus options (PCI etc.)"
273362306a36Sopenharmony_ci
273462306a36Sopenharmony_cichoice
273562306a36Sopenharmony_ci	prompt "PCI access mode"
273662306a36Sopenharmony_ci	depends on X86_32 && PCI
273762306a36Sopenharmony_ci	default PCI_GOANY
273862306a36Sopenharmony_ci	help
273962306a36Sopenharmony_ci	  On PCI systems, the BIOS can be used to detect the PCI devices and
274062306a36Sopenharmony_ci	  determine their configuration. However, some old PCI motherboards
274162306a36Sopenharmony_ci	  have BIOS bugs and may crash if this is done. Also, some embedded
274262306a36Sopenharmony_ci	  PCI-based systems don't have any BIOS at all. Linux can also try to
274362306a36Sopenharmony_ci	  detect the PCI hardware directly without using the BIOS.
274462306a36Sopenharmony_ci
274562306a36Sopenharmony_ci	  With this option, you can specify how Linux should detect the
274662306a36Sopenharmony_ci	  PCI devices. If you choose "BIOS", the BIOS will be used,
274762306a36Sopenharmony_ci	  if you choose "Direct", the BIOS won't be used, and if you
274862306a36Sopenharmony_ci	  choose "MMConfig", then PCI Express MMCONFIG will be used.
274962306a36Sopenharmony_ci	  If you choose "Any", the kernel will try MMCONFIG, then the
275062306a36Sopenharmony_ci	  direct access method and falls back to the BIOS if that doesn't
275162306a36Sopenharmony_ci	  work. If unsure, go with the default, which is "Any".
275262306a36Sopenharmony_ci
275362306a36Sopenharmony_ciconfig PCI_GOBIOS
275462306a36Sopenharmony_ci	bool "BIOS"
275562306a36Sopenharmony_ci
275662306a36Sopenharmony_ciconfig PCI_GOMMCONFIG
275762306a36Sopenharmony_ci	bool "MMConfig"
275862306a36Sopenharmony_ci
275962306a36Sopenharmony_ciconfig PCI_GODIRECT
276062306a36Sopenharmony_ci	bool "Direct"
276162306a36Sopenharmony_ci
276262306a36Sopenharmony_ciconfig PCI_GOOLPC
276362306a36Sopenharmony_ci	bool "OLPC XO-1"
276462306a36Sopenharmony_ci	depends on OLPC
276562306a36Sopenharmony_ci
276662306a36Sopenharmony_ciconfig PCI_GOANY
276762306a36Sopenharmony_ci	bool "Any"
276862306a36Sopenharmony_ci
276962306a36Sopenharmony_ciendchoice
277062306a36Sopenharmony_ci
277162306a36Sopenharmony_ciconfig PCI_BIOS
277262306a36Sopenharmony_ci	def_bool y
277362306a36Sopenharmony_ci	depends on X86_32 && PCI && (PCI_GOBIOS || PCI_GOANY)
277462306a36Sopenharmony_ci
277562306a36Sopenharmony_ci# x86-64 doesn't support PCI BIOS access from long mode so always go direct.
277662306a36Sopenharmony_ciconfig PCI_DIRECT
277762306a36Sopenharmony_ci	def_bool y
277862306a36Sopenharmony_ci	depends on PCI && (X86_64 || (PCI_GODIRECT || PCI_GOANY || PCI_GOOLPC || PCI_GOMMCONFIG))
277962306a36Sopenharmony_ci
278062306a36Sopenharmony_ciconfig PCI_MMCONFIG
278162306a36Sopenharmony_ci	bool "Support mmconfig PCI config space access" if X86_64
278262306a36Sopenharmony_ci	default y
278362306a36Sopenharmony_ci	depends on PCI && (ACPI || JAILHOUSE_GUEST)
278462306a36Sopenharmony_ci	depends on X86_64 || (PCI_GOANY || PCI_GOMMCONFIG)
278562306a36Sopenharmony_ci
278662306a36Sopenharmony_ciconfig PCI_OLPC
278762306a36Sopenharmony_ci	def_bool y
278862306a36Sopenharmony_ci	depends on PCI && OLPC && (PCI_GOOLPC || PCI_GOANY)
278962306a36Sopenharmony_ci
279062306a36Sopenharmony_ciconfig PCI_XEN
279162306a36Sopenharmony_ci	def_bool y
279262306a36Sopenharmony_ci	depends on PCI && XEN
279362306a36Sopenharmony_ci
279462306a36Sopenharmony_ciconfig MMCONF_FAM10H
279562306a36Sopenharmony_ci	def_bool y
279662306a36Sopenharmony_ci	depends on X86_64 && PCI_MMCONFIG && ACPI
279762306a36Sopenharmony_ci
279862306a36Sopenharmony_ciconfig PCI_CNB20LE_QUIRK
279962306a36Sopenharmony_ci	bool "Read CNB20LE Host Bridge Windows" if EXPERT
280062306a36Sopenharmony_ci	depends on PCI
280162306a36Sopenharmony_ci	help
280262306a36Sopenharmony_ci	  Read the PCI windows out of the CNB20LE host bridge. This allows
280362306a36Sopenharmony_ci	  PCI hotplug to work on systems with the CNB20LE chipset which do
280462306a36Sopenharmony_ci	  not have ACPI.
280562306a36Sopenharmony_ci
280662306a36Sopenharmony_ci	  There's no public spec for this chipset, and this functionality
280762306a36Sopenharmony_ci	  is known to be incomplete.
280862306a36Sopenharmony_ci
280962306a36Sopenharmony_ci	  You should say N unless you know you need this.
281062306a36Sopenharmony_ci
281162306a36Sopenharmony_ciconfig ISA_BUS
281262306a36Sopenharmony_ci	bool "ISA bus support on modern systems" if EXPERT
281362306a36Sopenharmony_ci	help
281462306a36Sopenharmony_ci	  Expose ISA bus device drivers and options available for selection and
281562306a36Sopenharmony_ci	  configuration. Enable this option if your target machine has an ISA
281662306a36Sopenharmony_ci	  bus. ISA is an older system, displaced by PCI and newer bus
281762306a36Sopenharmony_ci	  architectures -- if your target machine is modern, it probably does
281862306a36Sopenharmony_ci	  not have an ISA bus.
281962306a36Sopenharmony_ci
282062306a36Sopenharmony_ci	  If unsure, say N.
282162306a36Sopenharmony_ci
282262306a36Sopenharmony_ci# x86_64 have no ISA slots, but can have ISA-style DMA.
282362306a36Sopenharmony_ciconfig ISA_DMA_API
282462306a36Sopenharmony_ci	bool "ISA-style DMA support" if (X86_64 && EXPERT)
282562306a36Sopenharmony_ci	default y
282662306a36Sopenharmony_ci	help
282762306a36Sopenharmony_ci	  Enables ISA-style DMA support for devices requiring such controllers.
282862306a36Sopenharmony_ci	  If unsure, say Y.
282962306a36Sopenharmony_ci
283062306a36Sopenharmony_ciif X86_32
283162306a36Sopenharmony_ci
283262306a36Sopenharmony_ciconfig ISA
283362306a36Sopenharmony_ci	bool "ISA support"
283462306a36Sopenharmony_ci	help
283562306a36Sopenharmony_ci	  Find out whether you have ISA slots on your motherboard.  ISA is the
283662306a36Sopenharmony_ci	  name of a bus system, i.e. the way the CPU talks to the other stuff
283762306a36Sopenharmony_ci	  inside your box.  Other bus systems are PCI, EISA, MicroChannel
283862306a36Sopenharmony_ci	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
283962306a36Sopenharmony_ci	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
284062306a36Sopenharmony_ci
284162306a36Sopenharmony_ciconfig SCx200
284262306a36Sopenharmony_ci	tristate "NatSemi SCx200 support"
284362306a36Sopenharmony_ci	help
284462306a36Sopenharmony_ci	  This provides basic support for National Semiconductor's
284562306a36Sopenharmony_ci	  (now AMD's) Geode processors.  The driver probes for the
284662306a36Sopenharmony_ci	  PCI-IDs of several on-chip devices, so its a good dependency
284762306a36Sopenharmony_ci	  for other scx200_* drivers.
284862306a36Sopenharmony_ci
284962306a36Sopenharmony_ci	  If compiled as a module, the driver is named scx200.
285062306a36Sopenharmony_ci
285162306a36Sopenharmony_ciconfig SCx200HR_TIMER
285262306a36Sopenharmony_ci	tristate "NatSemi SCx200 27MHz High-Resolution Timer Support"
285362306a36Sopenharmony_ci	depends on SCx200
285462306a36Sopenharmony_ci	default y
285562306a36Sopenharmony_ci	help
285662306a36Sopenharmony_ci	  This driver provides a clocksource built upon the on-chip
285762306a36Sopenharmony_ci	  27MHz high-resolution timer.  Its also a workaround for
285862306a36Sopenharmony_ci	  NSC Geode SC-1100's buggy TSC, which loses time when the
285962306a36Sopenharmony_ci	  processor goes idle (as is done by the scheduler).  The
286062306a36Sopenharmony_ci	  other workaround is idle=poll boot option.
286162306a36Sopenharmony_ci
286262306a36Sopenharmony_ciconfig OLPC
286362306a36Sopenharmony_ci	bool "One Laptop Per Child support"
286462306a36Sopenharmony_ci	depends on !X86_PAE
286562306a36Sopenharmony_ci	select GPIOLIB
286662306a36Sopenharmony_ci	select OF
286762306a36Sopenharmony_ci	select OF_PROMTREE
286862306a36Sopenharmony_ci	select IRQ_DOMAIN
286962306a36Sopenharmony_ci	select OLPC_EC
287062306a36Sopenharmony_ci	help
287162306a36Sopenharmony_ci	  Add support for detecting the unique features of the OLPC
287262306a36Sopenharmony_ci	  XO hardware.
287362306a36Sopenharmony_ci
287462306a36Sopenharmony_ciconfig OLPC_XO1_PM
287562306a36Sopenharmony_ci	bool "OLPC XO-1 Power Management"
287662306a36Sopenharmony_ci	depends on OLPC && MFD_CS5535=y && PM_SLEEP
287762306a36Sopenharmony_ci	help
287862306a36Sopenharmony_ci	  Add support for poweroff and suspend of the OLPC XO-1 laptop.
287962306a36Sopenharmony_ci
288062306a36Sopenharmony_ciconfig OLPC_XO1_RTC
288162306a36Sopenharmony_ci	bool "OLPC XO-1 Real Time Clock"
288262306a36Sopenharmony_ci	depends on OLPC_XO1_PM && RTC_DRV_CMOS
288362306a36Sopenharmony_ci	help
288462306a36Sopenharmony_ci	  Add support for the XO-1 real time clock, which can be used as a
288562306a36Sopenharmony_ci	  programmable wakeup source.
288662306a36Sopenharmony_ci
288762306a36Sopenharmony_ciconfig OLPC_XO1_SCI
288862306a36Sopenharmony_ci	bool "OLPC XO-1 SCI extras"
288962306a36Sopenharmony_ci	depends on OLPC && OLPC_XO1_PM && GPIO_CS5535=y
289062306a36Sopenharmony_ci	depends on INPUT=y
289162306a36Sopenharmony_ci	select POWER_SUPPLY
289262306a36Sopenharmony_ci	help
289362306a36Sopenharmony_ci	  Add support for SCI-based features of the OLPC XO-1 laptop:
289462306a36Sopenharmony_ci	   - EC-driven system wakeups
289562306a36Sopenharmony_ci	   - Power button
289662306a36Sopenharmony_ci	   - Ebook switch
289762306a36Sopenharmony_ci	   - Lid switch
289862306a36Sopenharmony_ci	   - AC adapter status updates
289962306a36Sopenharmony_ci	   - Battery status updates
290062306a36Sopenharmony_ci
290162306a36Sopenharmony_ciconfig OLPC_XO15_SCI
290262306a36Sopenharmony_ci	bool "OLPC XO-1.5 SCI extras"
290362306a36Sopenharmony_ci	depends on OLPC && ACPI
290462306a36Sopenharmony_ci	select POWER_SUPPLY
290562306a36Sopenharmony_ci	help
290662306a36Sopenharmony_ci	  Add support for SCI-based features of the OLPC XO-1.5 laptop:
290762306a36Sopenharmony_ci	   - EC-driven system wakeups
290862306a36Sopenharmony_ci	   - AC adapter status updates
290962306a36Sopenharmony_ci	   - Battery status updates
291062306a36Sopenharmony_ci
291162306a36Sopenharmony_ciconfig ALIX
291262306a36Sopenharmony_ci	bool "PCEngines ALIX System Support (LED setup)"
291362306a36Sopenharmony_ci	select GPIOLIB
291462306a36Sopenharmony_ci	help
291562306a36Sopenharmony_ci	  This option enables system support for the PCEngines ALIX.
291662306a36Sopenharmony_ci	  At present this just sets up LEDs for GPIO control on
291762306a36Sopenharmony_ci	  ALIX2/3/6 boards.  However, other system specific setup should
291862306a36Sopenharmony_ci	  get added here.
291962306a36Sopenharmony_ci
292062306a36Sopenharmony_ci	  Note: You must still enable the drivers for GPIO and LED support
292162306a36Sopenharmony_ci	  (GPIO_CS5535 & LEDS_GPIO) to actually use the LEDs
292262306a36Sopenharmony_ci
292362306a36Sopenharmony_ci	  Note: You have to set alix.force=1 for boards with Award BIOS.
292462306a36Sopenharmony_ci
292562306a36Sopenharmony_ciconfig NET5501
292662306a36Sopenharmony_ci	bool "Soekris Engineering net5501 System Support (LEDS, GPIO, etc)"
292762306a36Sopenharmony_ci	select GPIOLIB
292862306a36Sopenharmony_ci	help
292962306a36Sopenharmony_ci	  This option enables system support for the Soekris Engineering net5501.
293062306a36Sopenharmony_ci
293162306a36Sopenharmony_ciconfig GEOS
293262306a36Sopenharmony_ci	bool "Traverse Technologies GEOS System Support (LEDS, GPIO, etc)"
293362306a36Sopenharmony_ci	select GPIOLIB
293462306a36Sopenharmony_ci	depends on DMI
293562306a36Sopenharmony_ci	help
293662306a36Sopenharmony_ci	  This option enables system support for the Traverse Technologies GEOS.
293762306a36Sopenharmony_ci
293862306a36Sopenharmony_ciconfig TS5500
293962306a36Sopenharmony_ci	bool "Technologic Systems TS-5500 platform support"
294062306a36Sopenharmony_ci	depends on MELAN
294162306a36Sopenharmony_ci	select CHECK_SIGNATURE
294262306a36Sopenharmony_ci	select NEW_LEDS
294362306a36Sopenharmony_ci	select LEDS_CLASS
294462306a36Sopenharmony_ci	help
294562306a36Sopenharmony_ci	  This option enables system support for the Technologic Systems TS-5500.
294662306a36Sopenharmony_ci
294762306a36Sopenharmony_ciendif # X86_32
294862306a36Sopenharmony_ci
294962306a36Sopenharmony_ciconfig AMD_NB
295062306a36Sopenharmony_ci	def_bool y
295162306a36Sopenharmony_ci	depends on CPU_SUP_AMD && PCI
295262306a36Sopenharmony_ci
295362306a36Sopenharmony_ciendmenu
295462306a36Sopenharmony_ci
295562306a36Sopenharmony_cimenu "Binary Emulations"
295662306a36Sopenharmony_ci
295762306a36Sopenharmony_ciconfig IA32_EMULATION
295862306a36Sopenharmony_ci	bool "IA32 Emulation"
295962306a36Sopenharmony_ci	depends on X86_64
296062306a36Sopenharmony_ci	select ARCH_WANT_OLD_COMPAT_IPC
296162306a36Sopenharmony_ci	select BINFMT_ELF
296262306a36Sopenharmony_ci	select COMPAT_OLD_SIGACTION
296362306a36Sopenharmony_ci	help
296462306a36Sopenharmony_ci	  Include code to run legacy 32-bit programs under a
296562306a36Sopenharmony_ci	  64-bit kernel. You should likely turn this on, unless you're
296662306a36Sopenharmony_ci	  100% sure that you don't have any 32-bit programs left.
296762306a36Sopenharmony_ci
296862306a36Sopenharmony_ciconfig X86_X32_ABI
296962306a36Sopenharmony_ci	bool "x32 ABI for 64-bit mode"
297062306a36Sopenharmony_ci	depends on X86_64
297162306a36Sopenharmony_ci	# llvm-objcopy does not convert x86_64 .note.gnu.property or
297262306a36Sopenharmony_ci	# compressed debug sections to x86_x32 properly:
297362306a36Sopenharmony_ci	# https://github.com/ClangBuiltLinux/linux/issues/514
297462306a36Sopenharmony_ci	# https://github.com/ClangBuiltLinux/linux/issues/1141
297562306a36Sopenharmony_ci	depends on $(success,$(OBJCOPY) --version | head -n1 | grep -qv llvm)
297662306a36Sopenharmony_ci	help
297762306a36Sopenharmony_ci	  Include code to run binaries for the x32 native 32-bit ABI
297862306a36Sopenharmony_ci	  for 64-bit processors.  An x32 process gets access to the
297962306a36Sopenharmony_ci	  full 64-bit register file and wide data path while leaving
298062306a36Sopenharmony_ci	  pointers at 32 bits for smaller memory footprint.
298162306a36Sopenharmony_ci
298262306a36Sopenharmony_ciconfig COMPAT_32
298362306a36Sopenharmony_ci	def_bool y
298462306a36Sopenharmony_ci	depends on IA32_EMULATION || X86_32
298562306a36Sopenharmony_ci	select HAVE_UID16
298662306a36Sopenharmony_ci	select OLD_SIGSUSPEND3
298762306a36Sopenharmony_ci
298862306a36Sopenharmony_ciconfig COMPAT
298962306a36Sopenharmony_ci	def_bool y
299062306a36Sopenharmony_ci	depends on IA32_EMULATION || X86_X32_ABI
299162306a36Sopenharmony_ci
299262306a36Sopenharmony_ciconfig COMPAT_FOR_U64_ALIGNMENT
299362306a36Sopenharmony_ci	def_bool y
299462306a36Sopenharmony_ci	depends on COMPAT
299562306a36Sopenharmony_ci
299662306a36Sopenharmony_ciendmenu
299762306a36Sopenharmony_ci
299862306a36Sopenharmony_ciconfig HAVE_ATOMIC_IOMAP
299962306a36Sopenharmony_ci	def_bool y
300062306a36Sopenharmony_ci	depends on X86_32
300162306a36Sopenharmony_ci
300262306a36Sopenharmony_cisource "arch/x86/kvm/Kconfig"
300362306a36Sopenharmony_ci
300462306a36Sopenharmony_cisource "arch/x86/Kconfig.assembler"
3005