Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

# SPDX-License-Identifier: GPL-2.0
#
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/kconfig-language.rst.
#

config CONFIG_OPENRISC
	def_bool y
	select CONFIG_ARCH_32BIT_OFF_T
	select CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE
	select CONFIG_OF
	select CONFIG_OF_EARLY_FLATTREE
	select CONFIG_IRQ_DOMAIN
	select CONFIG_HANDLE_DOMAIN_IRQ
	select CONFIG_GPIOLIB
        select CONFIG_HAVE_ARCH_TRACEHOOK
	select CONFIG_SPARSE_IRQ
	select CONFIG_GENERIC_IRQ_CHIP
	select CONFIG_GENERIC_IRQ_PROBE
	select CONFIG_GENERIC_IRQ_SHOW
	select CONFIG_GENERIC_IOMAP
	select CONFIG_GENERIC_CPU_DEVICES
	select CONFIG_HAVE_UID16
	select CONFIG_GENERIC_ATOMIC64
	select CONFIG_GENERIC_CLOCKEVENTS
	select CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
	select CONFIG_GENERIC_STRNCPY_FROM_USER
	select CONFIG_GENERIC_STRNLEN_USER
	select CONFIG_GENERIC_SMP_IDLE_THREAD
	select CONFIG_MODULES_USE_ELF_RELA
	select CONFIG_HAVE_DEBUG_STACKOVERFLOW
	select CONFIG_OR1K_PIC
	select CONFIG_CPU_NO_EFFICIENT_FFS if !CONFIG_OPENRISC_HAVE_INST_FF1
	select CONFIG_ARCH_USE_QUEUED_SPINLOCKS
	select CONFIG_ARCH_USE_QUEUED_RWLOCKS
	select CONFIG_OMPIC if CONFIG_SMP
	select CONFIG_ARCH_WANT_FRAME_POINTERS
	select CONFIG_GENERIC_IRQ_MULTI_HANDLER
	select MMU_GATHER_NO_RANGE if CONFIG_MMU

config CONFIG_CPU_BIG_ENDIAN
	def_bool y

config CONFIG_MMU
	def_bool y

config CONFIG_GENERIC_HWEIGHT
	def_bool y

config CONFIG_NO_IOPORT_MAP
	def_bool y

config CONFIG_TRACE_IRQFLAGS_SUPPORT
        def_bool y

# For now, use generic checksum functions
#These can be reimplemented in assembly later if so inclined
config CONFIG_GENERIC_CSUM
        def_bool y

config CONFIG_STACKTRACE_SUPPORT
	def_bool y

config CONFIG_LOCKDEP_SUPPORT
	def_bool  y

menu "Processor type and features"

choice
	prompt "Subarchitecture"
	default CONFIG_OR1K_1200

config CONFIG_OR1K_1200
	bool "OR1200"
	help
	  Generic OpenRISC 1200 architecture

endchoice

config CONFIG_DCACHE_WRITETHROUGH
	bool "Have write through data caches"
	default n
	help
	  Select this if your implementation features write through data caches.
	  Selecting 'N' here will allow the kernel to force flushing of data
	  caches at relevant times. Most OpenRISC implementations support write-
	  through data caches.

	  If unsure say N here

config CONFIG_OPENRISC_BUILTIN_DTB
        string "Builtin DTB"
        default ""

menu "Class II Instructions"

config CONFIG_OPENRISC_HAVE_INST_FF1
	bool "Have instruction l.ff1"
	default y
	help
	  Select this if your implementation has the Class II instruction l.ff1

config CONFIG_OPENRISC_HAVE_INST_FL1
	bool "Have instruction l.fl1"
	default y
	help
	  Select this if your implementation has the Class II instruction l.fl1

config CONFIG_OPENRISC_HAVE_INST_MUL
	bool "Have instruction l.mul for hardware multiply"
	default y
	help
	  Select this if your implementation has a hardware multiply instruction

config CONFIG_OPENRISC_HAVE_INST_DIV
	bool "Have instruction l.div for hardware divide"
	default y
	help
	  Select this if your implementation has a hardware divide instruction
endmenu

config CONFIG_NR_CPUS
	int "Maximum number of CPUs (2-32)"
	range 2 32
	depends on CONFIG_SMP
	default "2"

config CONFIG_SMP
	bool "Symmetric Multi-Processing support"
	help
	  This enables support for systems with more than one CPU. If you have
	  a system with only one CPU, say N. If you have a system with more
	  than one CPU, say Y.

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

source "kernel/Kconfig.hz"

config CONFIG_OPENRISC_NO_SPR_SR_DSX
	bool "use SPR_SR_DSX software emulation" if CONFIG_OR1K_1200
	default y
	help
	  SPR_SR_DSX bit is status register bit indicating whether
	  the last exception has happened in delay slot.

	  OpenRISC architecture makes it optional to have it implemented
	  in hardware and the OR1200 does not have it.

	  Say N here if you know that your OpenRISC processor has
	  SPR_SR_DSX bit implemented. Say Y if you are unsure.

config CONFIG_OPENRISC_HAVE_SHADOW_GPRS
	bool "Support for shadow gpr files" if !CONFIG_SMP
	default y if CONFIG_SMP
	help
	  Say Y here if your OpenRISC processor features shadowed
	  register files. They will in such case be used as a
	  scratch reg storage on exception entry.

	  On CONFIG_SMP systems, this feature is mandatory.
	  On a unicore system it's safe to say N here if you are unsure.

config CONFIG_CMDLINE
        string "Default kernel command string"
        default ""
        help
          On some architectures there is currently no way for the boot loader
          to pass arguments to the kernel. For these architectures, you should
          supply some command-line options at build time by entering them
          here.

menu "Debugging options"

config CONFIG_JUMP_UPON_UNHANDLED_EXCEPTION
	bool "Try to die gracefully"
	default y
	help
	  Now this puts kernel into infinite loop after first oops. Till
	  your kernel crashes this doesn't have any influence.

	  Say Y if you are unsure.

config CONFIG_OPENRISC_ESR_EXCEPTION_BUG_CHECK
	bool "Check for possible ESR exception bug"
	default n
	help
	  This option enables some checks that might expose some problems
          in kernel.

	  Say N if you are unsure.

endmenu

endmenu