2015-05-21 00:40:39 +08:00
|
|
|
# Kconfig - general architecture configuration options
|
|
|
|
|
|
|
|
#
|
|
|
|
# Copyright (c) 2014-2015 Wind River Systems, Inc.
|
|
|
|
# Copyright (c) 2015 Intel Corporation
|
2017-01-13 19:14:33 +08:00
|
|
|
# Copyright (c) 2016 Cadence Design Systems, Inc.
|
2015-05-21 00:40:39 +08:00
|
|
|
#
|
2017-01-19 09:01:01 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2015-05-21 00:40:39 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2015-10-09 18:20:52 +08:00
|
|
|
choice
|
|
|
|
prompt "Architecture"
|
|
|
|
default X86
|
|
|
|
|
|
|
|
config ARC
|
|
|
|
bool "ARC architecture"
|
|
|
|
|
|
|
|
config ARM
|
|
|
|
bool "ARM architecture"
|
|
|
|
|
|
|
|
config X86
|
|
|
|
bool "x86 architecture"
|
2016-07-16 04:15:00 +08:00
|
|
|
select ATOMIC_OPERATIONS_BUILTIN
|
2015-10-09 18:20:52 +08:00
|
|
|
|
2016-04-22 05:47:09 +08:00
|
|
|
config NIOS2
|
|
|
|
bool "Nios II Gen 2 architecture"
|
2016-07-16 04:15:00 +08:00
|
|
|
select ATOMIC_OPERATIONS_C
|
2016-04-22 05:47:09 +08:00
|
|
|
|
arch: added support for the riscv32 architecture
RISC-V is an open-source instruction set architecture.
Added support for the 32bit version of RISC-V to Zephyr.
1) exceptions/interrupts/faults are handled at the architecture
level via the __irq_wrapper handler. Context saving/restoring
of registers can be handled at both architecture and SOC levels.
If SOC-specific registers need to be saved, SOC level needs to
provide __soc_save_context and __soc_restore_context functions
that shall be accounted by the architecture level, when
corresponding config variable RISCV_SOC_CONTEXT_SAVE is set.
2) As RISC-V architecture does not provide a clear ISA specification
about interrupt handling, each RISC-V SOC handles it in its own
way. Hence, at the architecture level, the __irq_wrapper handler
expects the following functions to be provided by the SOC level:
__soc_is_irq: to check if the exception is the result of an
interrupt or not.
__soc_handle_irq: handle pending IRQ at SOC level (ex: clear
pending IRQ in SOC-specific IRQ register)
3) Thread/task scheduling, as well as IRQ offloading are handled via
the RISC-V system call ("ecall"), which is also handled via the
__irq_wrapper handler. The _Swap asm function just calls "ecall"
to generate an exception.
4) As there is no conventional way of handling CPU power save in
RISC-V, the default nano_cpu_idle and nano_cpu_atomic_idle
functions just unlock interrupts and return to the caller, without
issuing any CPU power saving instruction. Nonetheless, to allow
SOC-level to implement proper CPU power save, nano_cpu_idle and
nano_cpu_atomic_idle functions are defined as __weak
at the architecture level.
Change-Id: I980a161d0009f3f404ad22b226a6229fbb492389
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
2017-01-11 07:24:30 +08:00
|
|
|
config RISCV32
|
|
|
|
bool "RISCV32 architecture"
|
|
|
|
|
2017-01-13 19:14:33 +08:00
|
|
|
config XTENSA
|
|
|
|
bool "Xtensa architecture"
|
|
|
|
|
2015-10-09 18:20:52 +08:00
|
|
|
endchoice
|
|
|
|
|
2017-09-09 09:14:06 +08:00
|
|
|
|
|
|
|
menu "General Architecture Options"
|
|
|
|
|
|
|
|
config HW_STACK_PROTECTION
|
|
|
|
bool "Hardware Stack Protection"
|
|
|
|
depends on ARCH_HAS_STACK_PROTECTION
|
|
|
|
help
|
|
|
|
Select this option to enable hardware stack protection.
|
|
|
|
|
2017-09-12 01:34:49 +08:00
|
|
|
config USERSPACE
|
2017-10-14 04:03:32 +08:00
|
|
|
bool "User mode threads (EXPERIMENTAL)"
|
2017-09-12 01:34:49 +08:00
|
|
|
depends on ARCH_HAS_USERSPACE
|
2017-10-12 06:46:42 +08:00
|
|
|
select HW_STACK_PROTECTION
|
2017-09-12 01:34:49 +08:00
|
|
|
help
|
|
|
|
When enabled, threads may be created or dropped down to user mode,
|
|
|
|
which has significantly restricted permissions and must interact
|
|
|
|
with the kernel via system calls. See Zephyr documentation for more
|
|
|
|
details about this feature.
|
|
|
|
|
2017-10-14 04:03:32 +08:00
|
|
|
This feature is under heavy development and APIs related to it are
|
|
|
|
subject to change, even if declared non-private.
|
|
|
|
|
2017-09-12 01:34:49 +08:00
|
|
|
config MAX_THREAD_BYTES
|
|
|
|
int "Bytes to use when tracking object thread permissions"
|
|
|
|
default 2
|
|
|
|
depends on USERSPACE
|
|
|
|
help
|
|
|
|
Every kernel object will have an associated bitfield to store
|
|
|
|
thread permissions for that object. This controls the size of the
|
|
|
|
bitfield (in bytes) and imposes a limit on how many threads can
|
|
|
|
be created in the system.
|
|
|
|
|
2017-09-09 20:40:43 +08:00
|
|
|
config SIMPLE_FATAL_ERROR_HANDLER
|
|
|
|
prompt "Simple system fatal error handler"
|
|
|
|
bool
|
|
|
|
default n
|
|
|
|
default y if !MULTITHREADING
|
|
|
|
help
|
|
|
|
Provides an implementation of _SysFatalErrorHandler() that hard hangs
|
|
|
|
instead of aborting the faulting thread, and does not print anything,
|
|
|
|
for footprint-concerned systems. Only enable this option if you do not
|
|
|
|
want debug capabilities in case of system fatal error.
|
|
|
|
|
2017-09-09 20:39:38 +08:00
|
|
|
menu "Interrupt Configuration"
|
|
|
|
#
|
|
|
|
# Interrupt related configs
|
|
|
|
#
|
|
|
|
config GEN_ISR_TABLES
|
|
|
|
bool
|
|
|
|
prompt "Use generated IRQ tables"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
This option controls whether a platform uses the gen_isr_tables
|
|
|
|
script to generate its interrupt tables. This mechanism will create
|
|
|
|
an appropriate hardware vector table and/or software IRQ table.
|
|
|
|
|
|
|
|
config GEN_IRQ_VECTOR_TABLE
|
|
|
|
bool
|
|
|
|
prompt "Generate an interrupt vector table"
|
|
|
|
default y
|
|
|
|
depends on GEN_ISR_TABLES
|
|
|
|
help
|
|
|
|
This option controls whether a platform using gen_isr_tables
|
|
|
|
needs an interrupt vector table created. Only disable this if the
|
|
|
|
platform does not use a vector table at all, or requires the vector
|
|
|
|
table to be in a format that is not an array of function pointers
|
|
|
|
indexed by IRQ line. In the latter case, the vector table must be
|
|
|
|
supplied by the application or architecture code.
|
|
|
|
|
|
|
|
config GEN_SW_ISR_TABLE
|
|
|
|
bool
|
|
|
|
prompt "Generate a software ISR table"
|
|
|
|
default y
|
|
|
|
depends on GEN_ISR_TABLES
|
|
|
|
help
|
|
|
|
This option controls whether a platform using gen_isr_tables
|
|
|
|
needs a software ISR table table created. This is an array of struct
|
|
|
|
_isr_table_entry containing the interrupt service routine and supplied
|
|
|
|
parameter.
|
|
|
|
|
|
|
|
config GEN_IRQ_START_VECTOR
|
|
|
|
int
|
|
|
|
default 0
|
|
|
|
depends on GEN_ISR_TABLES
|
|
|
|
help
|
|
|
|
On some architectures, part of the vector table may be reserved for
|
|
|
|
system exceptions and is declared separately from the tables
|
|
|
|
created by gen_isr_tables.py. When creating these tables, this value
|
|
|
|
will be subtracted from CONFIG_NUM_IRQS to properly size them.
|
|
|
|
This is a hidden option which needs to be set per architecture and
|
|
|
|
left alone.
|
|
|
|
|
|
|
|
endmenu # Interrupt configuration
|
|
|
|
|
2017-09-09 09:14:06 +08:00
|
|
|
endmenu
|
|
|
|
|
2017-09-09 20:39:38 +08:00
|
|
|
#
|
|
|
|
# Architecture Capabilities
|
|
|
|
#
|
2017-09-09 09:14:06 +08:00
|
|
|
config ARCH_HAS_STACK_PROTECTION
|
|
|
|
bool
|
|
|
|
|
2017-09-12 01:34:49 +08:00
|
|
|
config ARCH_HAS_USERSPACE
|
|
|
|
bool
|
|
|
|
|
2016-03-19 07:43:40 +08:00
|
|
|
#
|
|
|
|
# Hidden PM feature configs which are to be selected by
|
|
|
|
# individual SoC.
|
|
|
|
#
|
|
|
|
config SYS_POWER_LOW_POWER_STATE_SUPPORTED
|
|
|
|
# Hidden
|
2016-05-25 07:17:13 +08:00
|
|
|
bool
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
This option signifies that the target supports the SYS_POWER_LOW_POWER_STATE
|
|
|
|
configuration option.
|
2016-03-19 07:43:40 +08:00
|
|
|
|
|
|
|
config SYS_POWER_DEEP_SLEEP_SUPPORTED
|
|
|
|
# Hidden
|
2016-05-25 07:17:13 +08:00
|
|
|
bool
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
This option signifies that the target supports the SYS_POWER_DEEP_SLEEP
|
|
|
|
configuration option.
|
2016-11-10 15:16:27 +08:00
|
|
|
|
|
|
|
config BOOTLOADER_CONTEXT_RESTORE_SUPPORTED
|
|
|
|
# Hidden
|
|
|
|
bool
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
This option signifies that the target has options of bootloaders
|
|
|
|
that support context restore upon resume from deep sleep
|
|
|
|
|
2016-03-19 07:43:40 +08:00
|
|
|
#
|
|
|
|
# End hidden PM feature configs
|
|
|
|
#
|
|
|
|
|
2015-10-09 18:20:52 +08:00
|
|
|
config ARCH
|
|
|
|
string
|
|
|
|
help
|
|
|
|
System architecture string.
|
|
|
|
|
|
|
|
config SOC
|
2016-03-31 20:07:42 +08:00
|
|
|
string
|
|
|
|
help
|
|
|
|
SoC name which can be found under arch/<arch>/soc/<soc name>.
|
|
|
|
This option holds the directory name used by the build system to locate
|
|
|
|
the correct linker and header files for the SoC. This option will go away
|
|
|
|
once all SoCs are using family/series structure.
|
|
|
|
|
|
|
|
config SOC_SERIES
|
|
|
|
string
|
|
|
|
help
|
|
|
|
SoC series name which can be found under arch/<arch>/soc/<family>/<series>.
|
|
|
|
This option holds the directory name used by the build system to locate
|
|
|
|
the correct linker and header files.
|
|
|
|
|
|
|
|
config SOC_FAMILY
|
|
|
|
string
|
|
|
|
help
|
|
|
|
SoC family name which can be found under arch/<arch>/soc/<family>.
|
|
|
|
This option holds the directory name used by the build system to locate
|
|
|
|
the correct linker and header files.
|
2015-11-30 08:47:21 +08:00
|
|
|
|
2015-12-08 09:20:25 +08:00
|
|
|
config BOARD
|
|
|
|
string
|
|
|
|
help
|
2017-04-25 02:30:10 +08:00
|
|
|
This option holds the name of the board and is used to locate the files
|
2016-03-31 20:07:42 +08:00
|
|
|
related to the board in the source tree (under boards/).
|
2016-05-05 04:13:56 +08:00
|
|
|
The Board is the first location where we search for a linker.ld file,
|
2016-03-31 20:07:42 +08:00
|
|
|
if not found we look for the linker file in
|
|
|
|
arch/<arch>/soc/<family>/<series>
|
2015-12-08 09:20:25 +08:00
|
|
|
|
2017-02-09 09:16:29 +08:00
|
|
|
|
2015-10-09 18:20:52 +08:00
|
|
|
source "arch/*/Kconfig"
|
2015-12-13 18:54:28 +08:00
|
|
|
|
|
|
|
source "boards/Kconfig"
|