2015-06-20 21:23:14 +08:00
|
|
|
# ARC EM4 options
|
|
|
|
|
|
|
|
#
|
|
|
|
# Copyright (c) 2014 Wind River Systems, Inc.
|
|
|
|
#
|
2017-01-19 09:01:01 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2015-06-20 21:23:14 +08:00
|
|
|
#
|
2016-03-16 01:24:36 +08:00
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "ARC SoC Selection"
|
|
|
|
depends on ARC
|
|
|
|
|
2018-08-14 13:20:30 +08:00
|
|
|
source "arch/arc/soc/*/Kconfig.soc"
|
2016-03-16 01:24:36 +08:00
|
|
|
endchoice
|
|
|
|
|
2016-03-19 07:43:40 +08:00
|
|
|
|
2016-03-16 01:24:36 +08:00
|
|
|
menu "ARC Options"
|
2015-10-09 18:20:52 +08:00
|
|
|
depends on ARC
|
2015-08-24 01:08:06 +08:00
|
|
|
|
Kconfig: Use the first default with a satisfied condition
Up until now, Zephyr has patched Kconfig to use the last 'default' with
a satisfied condition, instead of the first one. I'm not sure why the
patch was added (it predates Kconfiglib), but I suspect it's related to
Kconfig.defconfig files.
There are at least three problems with the patch:
1. It's inconsistent with how Kconfig works in other projects, which
might confuse newcomers.
2. Due to oversights, earlier 'range' properties are still preferred,
as well as earlier 'default' properties on choices.
In addition to being inconsistent, this makes it impossible to
override 'range' properties and choice 'default' properties if the
base definition of the symbol/choice already has 'range'/'default'
properties.
I've seen errors caused by the inconsistency, and I suspect there
are more.
3. A fork of Kconfiglib that adds the patch needs to be maintained.
Get rid of the patch and go back to standard Kconfig behavior, as
follows:
1. Include the Kconfig.defconfig files first instead of last in
Kconfig.zephyr.
2. Include boards/Kconfig and arch/<arch>/Kconfig first instead of
last in arch/Kconfig.
3. Include arch/<arch>/soc/*/Kconfig first instead of last in
arch/<arch>/Kconfig.
4. Swap a few other 'source's to preserve behavior for some scattered
symbols with multiple definitions.
Swap 'source's in some no-op cases too, where it might match the
intent.
5. Reverse the defaults on symbol definitions that have more than one
default.
Skip defaults that are mutually exclusive, e.g. where each default
has an 'if <some board>' condition. They are already safe.
6. Remove the prefer-later-defaults patch from Kconfiglib.
Testing was done with a Python script that lists all Kconfig
symbols/choices with multiple defaults, along with a whitelist of fixed
symbols. The script also verifies that there are no "unreachable"
defaults hidden by defaults without conditions
As an additional test, zephyr/.config was generated before and after the
change for several samples and checked to be identical (after sorting).
This commit includes some default-related cleanups as well:
- Simplify some symbol definitions, e.g. where a default has 'if FOO'
when the symbol already has 'depends on FOO'.
- Remove some redundant 'default ""' for string symbols. This is the
implicit default.
Piggyback fixes for swapped ranges on BT_L2CAP_RX_MTU and
BT_L2CAP_TX_MTU (caused by confusing inconsistency).
Piggyback some fixes for style nits too, e.g. unindented help texts.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-30 16:57:47 +08:00
|
|
|
# Include these first so that any properties (e.g. defaults) below can be
|
|
|
|
# overriden (by defining symbols in multiple locations)
|
2018-08-14 13:20:30 +08:00
|
|
|
source "arch/arc/soc/*/Kconfig"
|
Kconfig: Use the first default with a satisfied condition
Up until now, Zephyr has patched Kconfig to use the last 'default' with
a satisfied condition, instead of the first one. I'm not sure why the
patch was added (it predates Kconfiglib), but I suspect it's related to
Kconfig.defconfig files.
There are at least three problems with the patch:
1. It's inconsistent with how Kconfig works in other projects, which
might confuse newcomers.
2. Due to oversights, earlier 'range' properties are still preferred,
as well as earlier 'default' properties on choices.
In addition to being inconsistent, this makes it impossible to
override 'range' properties and choice 'default' properties if the
base definition of the symbol/choice already has 'range'/'default'
properties.
I've seen errors caused by the inconsistency, and I suspect there
are more.
3. A fork of Kconfiglib that adds the patch needs to be maintained.
Get rid of the patch and go back to standard Kconfig behavior, as
follows:
1. Include the Kconfig.defconfig files first instead of last in
Kconfig.zephyr.
2. Include boards/Kconfig and arch/<arch>/Kconfig first instead of
last in arch/Kconfig.
3. Include arch/<arch>/soc/*/Kconfig first instead of last in
arch/<arch>/Kconfig.
4. Swap a few other 'source's to preserve behavior for some scattered
symbols with multiple definitions.
Swap 'source's in some no-op cases too, where it might match the
intent.
5. Reverse the defaults on symbol definitions that have more than one
default.
Skip defaults that are mutually exclusive, e.g. where each default
has an 'if <some board>' condition. They are already safe.
6. Remove the prefer-later-defaults patch from Kconfiglib.
Testing was done with a Python script that lists all Kconfig
symbols/choices with multiple defaults, along with a whitelist of fixed
symbols. The script also verifies that there are no "unreachable"
defaults hidden by defaults without conditions
As an additional test, zephyr/.config was generated before and after the
change for several samples and checked to be identical (after sorting).
This commit includes some default-related cleanups as well:
- Simplify some symbol definitions, e.g. where a default has 'if FOO'
when the symbol already has 'depends on FOO'.
- Remove some redundant 'default ""' for string symbols. This is the
implicit default.
Piggyback fixes for swapped ranges on BT_L2CAP_RX_MTU and
BT_L2CAP_TX_MTU (caused by confusing inconsistency).
Piggyback some fixes for style nits too, e.g. unindented help texts.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-30 16:57:47 +08:00
|
|
|
|
2015-10-09 18:20:52 +08:00
|
|
|
config ARCH
|
|
|
|
default "arc"
|
2015-06-20 21:23:14 +08:00
|
|
|
|
2015-10-09 18:20:52 +08:00
|
|
|
config ARCH_DEFCONFIG
|
|
|
|
string
|
|
|
|
default "arch/arc/defconfig"
|
2015-09-11 01:54:09 +08:00
|
|
|
|
2015-06-20 21:23:14 +08:00
|
|
|
menu "ARC EM4 processor options"
|
|
|
|
|
|
|
|
config CPU_ARCEM4
|
|
|
|
bool
|
|
|
|
default y
|
|
|
|
select CPU_ARCV2
|
2016-04-27 00:59:44 +08:00
|
|
|
select ATOMIC_OPERATIONS_C
|
2015-06-20 21:23:14 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
This option signifies the use of an ARC EM4 CPU
|
2015-06-20 21:23:14 +08:00
|
|
|
|
|
|
|
endmenu
|
|
|
|
|
|
|
|
menu "ARCv2 Family Options"
|
|
|
|
|
|
|
|
config CPU_ARCV2
|
|
|
|
bool
|
2018-06-07 16:36:37 +08:00
|
|
|
select ARCH_HAS_STACK_PROTECTION
|
arch: arc: add user space support for arc
* add the implementation of syscall
* based on 'trap_s' intruction, id = 3
* add the privilege stack
* the privilege stack is allocted with thread stack
* for the kernel thread, the privilege stack is also a
part of thread stack, the start of stack can be configured
as stack guard
* for the user thread, no stack guard, when the user stack is
overflow, it will fall into kernel memory area which requires
kernel privilege, privilege violation will be raised
* modify the linker template and add MPU_ADDR_ALIGN
* add user space corresponding codes in mpu
* the user sp aux reg will be part of thread context
* When user thread is interruptted for the 1st time, the context is
saved in user stack (U bit of IRQ_CTLR is set to 1). When nest
interrupt comes, the context is saved in thread's privilege stack
* the arc_mpu_regions.c is moved to board folder, as it's board
specific
* the above codes have been tested through tests/kernel/mem_protect/
userspace for MPU version 2
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-01-23 17:13:09 +08:00
|
|
|
select ARCH_HAS_USERSPACE if ARC_CORE_MPU
|
2015-06-20 21:23:14 +08:00
|
|
|
default y
|
|
|
|
help
|
|
|
|
This option signifies the use of a CPU of the ARCv2 family.
|
|
|
|
|
|
|
|
config DATA_ENDIANNESS_LITTLE
|
|
|
|
bool
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
This is driven by the processor implementation, since it is fixed in
|
|
|
|
hardware. The BSP should set this value to 'n' if the data is
|
|
|
|
implemented as big endian.
|
|
|
|
|
|
|
|
config NUM_IRQ_PRIO_LEVELS
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Number of supported interrupt priority levels"
|
2015-06-20 21:23:14 +08:00
|
|
|
range 1 16
|
|
|
|
help
|
|
|
|
Interrupt priorities available will be 0 to NUM_IRQ_PRIO_LEVELS-1.
|
|
|
|
The minimum value is 1.
|
|
|
|
|
|
|
|
The BSP must provide a valid default for proper operation.
|
|
|
|
|
|
|
|
config NUM_IRQS
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Upper limit of interrupt numbers/IDs used"
|
2016-01-05 05:54:14 +08:00
|
|
|
range 17 256
|
2015-06-20 21:23:14 +08:00
|
|
|
help
|
|
|
|
Interrupts available will be 0 to NUM_IRQS-1.
|
2016-01-05 05:54:14 +08:00
|
|
|
The minimum value is 17 as the first 16 entries in the vector
|
|
|
|
table are for CPU exceptions.
|
2015-06-20 21:23:14 +08:00
|
|
|
|
|
|
|
The BSP must provide a valid default. This drives the size of the
|
|
|
|
vector table.
|
|
|
|
|
2016-10-08 01:29:11 +08:00
|
|
|
config RGF_NUM_BANKS
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Number of General Purpose Register Banks"
|
2016-10-08 01:29:11 +08:00
|
|
|
depends on CPU_ARCV2
|
|
|
|
range 1 2
|
|
|
|
default 2
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
The ARC CPU can be configured to have more than one register
|
|
|
|
bank. If fast interrupts are supported (FIRQ), the 2nd
|
|
|
|
register bank, in the set, will be used by FIRQ interrupts.
|
|
|
|
If fast interrupts are supported but there is only 1
|
|
|
|
register bank, the fast interrupt handler must save
|
|
|
|
and restore general purpose registers.
|
2016-10-08 01:29:11 +08:00
|
|
|
|
2017-11-29 16:55:18 +08:00
|
|
|
config ARC_FIRQ
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "FIRQ enable"
|
2017-11-29 16:55:18 +08:00
|
|
|
default y
|
|
|
|
help
|
2018-01-06 20:41:34 +08:00
|
|
|
Fast interrupts are supported (FIRQ). If FIRQ enabled, for interrupts
|
|
|
|
with highest priority, status32 and pc will be saved in aux regs,
|
|
|
|
other regs will be saved according to the number of register bank;
|
|
|
|
If FIRQ is disabled, the handle of interrupts with highest priority
|
|
|
|
will be same with other interrupts.
|
2017-11-29 16:55:18 +08:00
|
|
|
|
2016-03-12 01:29:14 +08:00
|
|
|
config ARC_STACK_CHECKING
|
2017-09-09 09:14:06 +08:00
|
|
|
bool
|
|
|
|
default y if HW_STACK_PROTECTION
|
2017-05-12 06:33:16 +08:00
|
|
|
select THREAD_STACK_INFO
|
2016-03-12 01:29:14 +08:00
|
|
|
help
|
|
|
|
ARCV2 has a special feature allowing to check stack overflows. This
|
|
|
|
enables code that allows using this debug feature
|
|
|
|
|
2015-06-20 21:23:14 +08:00
|
|
|
config FAULT_DUMP
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Fault dump level"
|
2015-06-20 21:23:14 +08:00
|
|
|
default 2
|
2015-11-02 06:21:26 +08:00
|
|
|
range 0 2
|
2015-06-20 21:23:14 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Different levels for display information when a fault occurs.
|
2015-06-20 21:23:14 +08:00
|
|
|
|
2017-12-13 23:08:21 +08:00
|
|
|
2: The default. Display specific and verbose information. Consumes
|
2016-06-22 03:34:38 +08:00
|
|
|
the most memory (long strings).
|
|
|
|
|
2017-12-13 23:08:21 +08:00
|
|
|
1: Display general and short information. Consumes less memory
|
2016-06-22 03:34:38 +08:00
|
|
|
(short strings).
|
|
|
|
|
2017-12-13 23:08:21 +08:00
|
|
|
0: Off.
|
2015-06-20 21:23:14 +08:00
|
|
|
|
|
|
|
config XIP
|
2018-06-22 06:37:17 +08:00
|
|
|
default y if !UART_NSIM
|
2015-06-20 21:23:14 +08:00
|
|
|
|
2017-02-14 01:36:32 +08:00
|
|
|
config GEN_ISR_TABLES
|
|
|
|
default y
|
|
|
|
|
|
|
|
config GEN_IRQ_START_VECTOR
|
|
|
|
default 16
|
|
|
|
|
2016-05-07 08:23:05 +08:00
|
|
|
config HARVARD
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Harvard Architecture"
|
2016-05-07 08:23:05 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
The ARC CPU can be configured to have two busses;
|
|
|
|
one for instruction fetching and another that serves as a data bus.
|
boards: Update arc em_starterkit support from 2.2 to 2.3
Here are the main changes:
* board: Update EMSK onboard resources such as Button, Switch and LEDs
+ update soc.h for em7d, em9d, em11d
+ update board.h for em_starterkit board
* arc: Add floating point support and code density support
+ add kconfig configuration
+ add compiler options
+ add register definitions, marcos, assembly codes
+ fixes in existing codes and configurations.
* arc: Update detailed board configurations for cores of emsk 2.3
* script: Provide arc_debugger.sh for debugging em_starterkit board
+ make BOARD=em_starterkit debug
This will start openocd server for emsk, and arc gdb will connect
to this debug server, user can run `continue` command if user just
want to run the application, or other commands if debugging needed.
+ make BOARD=em_starterkit debugserver
This will start an openocd debugger server for emsk, and user can
connect to this debugserver using arc gdb and do what they want to.
+ make BOARD=em_starterkit flash
This will download the zephyr application elf file to emsk,
and run it.
Signed-off-by: Huaqi Fang <huaqi.fang@synopsys.com>
2017-05-17 15:18:51 +08:00
|
|
|
|
|
|
|
config CODE_DENSITY
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Code Density Option"
|
boards: Update arc em_starterkit support from 2.2 to 2.3
Here are the main changes:
* board: Update EMSK onboard resources such as Button, Switch and LEDs
+ update soc.h for em7d, em9d, em11d
+ update board.h for em_starterkit board
* arc: Add floating point support and code density support
+ add kconfig configuration
+ add compiler options
+ add register definitions, marcos, assembly codes
+ fixes in existing codes and configurations.
* arc: Update detailed board configurations for cores of emsk 2.3
* script: Provide arc_debugger.sh for debugging em_starterkit board
+ make BOARD=em_starterkit debug
This will start openocd server for emsk, and arc gdb will connect
to this debug server, user can run `continue` command if user just
want to run the application, or other commands if debugging needed.
+ make BOARD=em_starterkit debugserver
This will start an openocd debugger server for emsk, and user can
connect to this debugserver using arc gdb and do what they want to.
+ make BOARD=em_starterkit flash
This will download the zephyr application elf file to emsk,
and run it.
Signed-off-by: Huaqi Fang <huaqi.fang@synopsys.com>
2017-05-17 15:18:51 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Enable code density option to get better code density
|
boards: Update arc em_starterkit support from 2.2 to 2.3
Here are the main changes:
* board: Update EMSK onboard resources such as Button, Switch and LEDs
+ update soc.h for em7d, em9d, em11d
+ update board.h for em_starterkit board
* arc: Add floating point support and code density support
+ add kconfig configuration
+ add compiler options
+ add register definitions, marcos, assembly codes
+ fixes in existing codes and configurations.
* arc: Update detailed board configurations for cores of emsk 2.3
* script: Provide arc_debugger.sh for debugging em_starterkit board
+ make BOARD=em_starterkit debug
This will start openocd server for emsk, and arc gdb will connect
to this debug server, user can run `continue` command if user just
want to run the application, or other commands if debugging needed.
+ make BOARD=em_starterkit debugserver
This will start an openocd debugger server for emsk, and user can
connect to this debugserver using arc gdb and do what they want to.
+ make BOARD=em_starterkit flash
This will download the zephyr application elf file to emsk,
and run it.
Signed-off-by: Huaqi Fang <huaqi.fang@synopsys.com>
2017-05-17 15:18:51 +08:00
|
|
|
|
2017-11-29 17:24:09 +08:00
|
|
|
config ARC_HAS_SECURE
|
|
|
|
bool
|
|
|
|
# a hidden option
|
|
|
|
help
|
2018-01-13 07:07:53 +08:00
|
|
|
This option is enabled when ARC core supports secure mode
|
2017-11-29 17:24:09 +08:00
|
|
|
|
2017-08-15 12:20:42 +08:00
|
|
|
menu "ARC MPU Options"
|
|
|
|
depends on CPU_HAS_MPU
|
|
|
|
|
|
|
|
config ARC_MPU_ENABLE
|
|
|
|
bool "Enable MPU"
|
|
|
|
depends on CPU_HAS_MPU
|
|
|
|
select ARC_MPU
|
|
|
|
help
|
|
|
|
Enable MPU
|
|
|
|
|
|
|
|
source "arch/arc/core/mpu/Kconfig"
|
|
|
|
|
|
|
|
endmenu
|
|
|
|
|
2016-11-05 05:48:23 +08:00
|
|
|
config CACHE_LINE_SIZE_DETECT
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Detect d-cache line size at runtime"
|
2016-11-05 05:48:23 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
This option enables querying the d-cache build register for finding
|
|
|
|
the d-cache line size at the expense of taking more memory and code
|
|
|
|
and a slightly increased boot time.
|
2016-11-05 05:48:23 +08:00
|
|
|
|
2017-12-13 23:08:21 +08:00
|
|
|
If the CPU's d-cache line size is known in advance, disable this
|
|
|
|
option and manually enter the value for CACHE_LINE_SIZE.
|
2016-11-05 05:48:23 +08:00
|
|
|
|
|
|
|
config CACHE_LINE_SIZE
|
2018-08-14 22:19:20 +08:00
|
|
|
int "Cache line size" if !CACHE_LINE_SIZE_DETECT
|
2016-11-05 05:48:23 +08:00
|
|
|
default 32
|
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
Size in bytes of a CPU d-cache line.
|
2016-11-05 05:48:23 +08:00
|
|
|
|
2017-12-13 23:08:21 +08:00
|
|
|
Detect automatically at runtime by selecting CACHE_LINE_SIZE_DETECT.
|
2015-06-20 21:23:14 +08:00
|
|
|
|
2016-11-05 05:48:23 +08:00
|
|
|
config ARCH_CACHE_FLUSH_DETECT
|
|
|
|
bool
|
|
|
|
|
|
|
|
config CACHE_FLUSHING
|
2018-08-14 22:19:20 +08:00
|
|
|
bool "Enable d-cache flushing mechanism"
|
2016-11-05 05:48:23 +08:00
|
|
|
help
|
2017-12-13 23:08:21 +08:00
|
|
|
This links in the sys_cache_flush() function, which provides a
|
|
|
|
way to flush multiple lines of the d-cache.
|
|
|
|
If the d-cache is present, set this to y.
|
|
|
|
If the d-cache is NOT present, set this to n.
|
2016-11-05 05:48:23 +08:00
|
|
|
|
|
|
|
endmenu
|
2015-06-20 21:23:14 +08:00
|
|
|
|
2015-10-09 18:20:52 +08:00
|
|
|
endmenu
|