1# SPDX-License-Identifier: GPL-2.0 2config NIOS2 3 def_bool y 4 select ARCH_32BIT_OFF_T 5 select ARCH_HAS_SYNC_DMA_FOR_CPU 6 select ARCH_HAS_SYNC_DMA_FOR_DEVICE 7 select ARCH_NO_SWAP 8 select TIMER_OF 9 select GENERIC_ATOMIC64 10 select GENERIC_CLOCKEVENTS 11 select GENERIC_CPU_DEVICES 12 select GENERIC_IRQ_PROBE 13 select GENERIC_IRQ_SHOW 14 select GENERIC_STRNCPY_FROM_USER 15 select GENERIC_STRNLEN_USER 16 select HAVE_ARCH_TRACEHOOK 17 select HAVE_ARCH_KGDB 18 select IRQ_DOMAIN 19 select MODULES_USE_ELF_RELA 20 select OF 21 select OF_EARLY_FLATTREE 22 select SOC_BUS 23 select SPARSE_IRQ 24 select USB_ARCH_HAS_HCD if USB_SUPPORT 25 select CPU_NO_EFFICIENT_FFS 26 select ARCH_DISCARD_MEMBLOCK 27 28config GENERIC_CSUM 29 def_bool y 30 31config GENERIC_HWEIGHT 32 def_bool y 33 34config GENERIC_CALIBRATE_DELAY 35 def_bool y 36 37config NO_IOPORT_MAP 38 def_bool y 39 40config FPU 41 def_bool n 42 43config RWSEM_GENERIC_SPINLOCK 44 def_bool y 45 46config TRACE_IRQFLAGS_SUPPORT 47 def_bool n 48 49menu "Kernel features" 50 51source "kernel/Kconfig.hz" 52 53config FORCE_MAX_ZONEORDER 54 int "Maximum zone order" 55 range 9 20 56 default "11" 57 help 58 The kernel memory allocator divides physically contiguous memory 59 blocks into "zones", where each zone is a power of two number of 60 pages. This option selects the largest power of two that the kernel 61 keeps in the memory allocator. If you need to allocate very large 62 blocks of physically contiguous memory, then you may need to 63 increase this value. 64 65 This config option is actually maximum order plus one. For example, 66 a value of 11 means that the largest free memory block is 2^10 pages. 67 68endmenu 69 70source "arch/nios2/platform/Kconfig.platform" 71 72menu "Processor type and features" 73 74config MMU 75 def_bool y 76 77config NR_CPUS 78 int 79 default "1" 80 81config NIOS2_ALIGNMENT_TRAP 82 bool "Catch alignment trap" 83 default y 84 help 85 Nios II CPUs cannot fetch/store data which is not bus aligned, 86 i.e., a 2 or 4 byte fetch must start at an address divisible by 87 2 or 4. Any non-aligned load/store instructions will be trapped and 88 emulated in software if you say Y here, which has a performance 89 impact. 90 91comment "Boot options" 92 93config CMDLINE_BOOL 94 bool "Default bootloader kernel arguments" 95 default y 96 97config CMDLINE 98 string "Default kernel command string" 99 default "" 100 depends on CMDLINE_BOOL 101 help 102 On some platforms, there is currently no way for the boot loader to 103 pass arguments to the kernel. For these platforms, you can supply 104 some command-line options at build time by entering them here. In 105 other cases you can specify kernel args so that you don't have 106 to set them up in board prom initialization routines. 107 108config CMDLINE_FORCE 109 bool "Force default kernel command string" 110 depends on CMDLINE_BOOL 111 help 112 Set this to have arguments from the default kernel command string 113 override those passed by the boot loader. 114 115config NIOS2_CMDLINE_IGNORE_DTB 116 bool "Ignore kernel command string from DTB" 117 depends on CMDLINE_BOOL 118 depends on !CMDLINE_FORCE 119 default y 120 help 121 Set this to ignore the bootargs property from the devicetree's 122 chosen node and fall back to CMDLINE if nothing is passed. 123 124config NIOS2_PASS_CMDLINE 125 bool "Passed kernel command line from u-boot" 126 default n 127 help 128 Use bootargs env variable from u-boot for kernel command line. 129 will override "Default kernel command string". 130 Say N if you are unsure. 131 132config NIOS2_BOOT_LINK_OFFSET 133 hex "Link address offset for booting" 134 default "0x00500000" 135 help 136 This option allows you to set the link address offset of the zImage. 137 This can be useful if you are on a board which has a small amount of 138 memory. 139 140endmenu 141 142menu "Advanced setup" 143 144config ADVANCED_OPTIONS 145 bool "Prompt for advanced kernel configuration options" 146 147comment "Default settings for advanced configuration options are used" 148 depends on !ADVANCED_OPTIONS 149 150config NIOS2_KERNEL_MMU_REGION_BASE_BOOL 151 bool "Set custom kernel MMU region base address" 152 depends on ADVANCED_OPTIONS 153 help 154 This option allows you to set the virtual address of the kernel MMU region. 155 156 Say N here unless you know what you are doing. 157 158config NIOS2_KERNEL_MMU_REGION_BASE 159 hex "Virtual base address of the kernel MMU region " if NIOS2_KERNEL_MMU_REGION_BASE_BOOL 160 default "0x80000000" 161 help 162 This option allows you to set the virtual base address of the kernel MMU region. 163 164config NIOS2_KERNEL_REGION_BASE_BOOL 165 bool "Set custom kernel region base address" 166 depends on ADVANCED_OPTIONS 167 help 168 This option allows you to set the virtual address of the kernel region. 169 170 Say N here unless you know what you are doing. 171 172config NIOS2_KERNEL_REGION_BASE 173 hex "Virtual base address of the kernel region " if NIOS2_KERNEL_REGION_BASE_BOOL 174 default "0xc0000000" 175 176config NIOS2_IO_REGION_BASE_BOOL 177 bool "Set custom I/O region base address" 178 depends on ADVANCED_OPTIONS 179 help 180 This option allows you to set the virtual address of the I/O region. 181 182 Say N here unless you know what you are doing. 183 184config NIOS2_IO_REGION_BASE 185 hex "Virtual base address of the I/O region" if NIOS2_IO_REGION_BASE_BOOL 186 default "0xe0000000" 187 188endmenu 189