zephyr/arch/Kconfig

613 lines
18 KiB
Plaintext
Raw Permalink Normal View History

# General architecture configuration options
# Copyright (c) 2014-2015 Wind River Systems, Inc.
# Copyright (c) 2015 Intel Corporation
# Copyright (c) 2016 Cadence Design Systems, Inc.
# SPDX-License-Identifier: Apache-2.0
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 10:57:47 +02:00
# Include these first so that any properties (e.g. defaults) below can be
# overridden (by defining symbols in multiple locations)
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 10:57:47 +02:00
# Note: $ARCH might be a glob pattern
source "$(ARCH_DIR)/$(ARCH)/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 10:57:47 +02:00
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
# Architecture symbols
#
# Should be 'select'ed by low-level symbols like SOC_SERIES_* or, lacking that,
# by SOC_*.
config ARC
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
bool
select ARCH_IS_SET
select HAS_DTS
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
help
ARC architecture
config ARM
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
bool
select ARCH_IS_SET
select HAS_DTS
# FIXME: current state of the code for all ARM requires this, but
# is really only necessary for Cortex-M with ARM MPU!
select GEN_PRIV_STACKS
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
help
ARM architecture
config X86
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
bool
select ARCH_IS_SET
select ATOMIC_OPERATIONS_BUILTIN
select HAS_DTS
select ARCH_HAS_CUSTOM_SWAP_TO_MAIN if !X86_64
select CPU_HAS_MMU
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
help
x86 architecture
config NIOS2
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
bool
select ARCH_IS_SET
select ATOMIC_OPERATIONS_C
select HAS_DTS
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
help
Nios II Gen 2 architecture
config RISCV
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
bool
select ARCH_IS_SET
select HAS_DTS
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
help
RISCV architecture
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 00:24:30 +01:00
config XTENSA
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
bool
select ARCH_IS_SET
select HAS_DTS
select USE_SWITCH
select USE_SWITCH_SUPPORTED
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
help
Xtensa architecture
config ARCH_POSIX
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
bool
select ARCH_IS_SET
select HAS_DTS
select ATOMIC_OPERATIONS_BUILTIN
select ARCH_HAS_CUSTOM_SWAP_TO_MAIN
select ARCH_HAS_CUSTOM_BUSY_WAIT
select ARCH_HAS_THREAD_ABORT
select NATIVE_APPLICATION
select HAS_COVERAGE_SUPPORT
kconfig: Remove assignments to CONFIG_<arch> syms and hide them All board defconfig files currently set the architecture in addition to the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up defconfig files. CONFIG_<arch> symbols currently being set in configuration files also means that they are configurable (can be changed in menuconfig and in configuration files), even though changing the architecture won't work, since other things get set from -DBOARD=<board>. Many boards also allow changing the architecture symbols independently from the SoC symbols, which doesn't make sense. Get rid of all assignments to CONFIG_<arch> symbols and clean up the relationships between symbols and the configuration interface, like this: 1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and turn the CONFIG_<arch> symbols into invisible (promptless/nonconfigurable) symbols instead. Getting rid of the choice allows the symbols to be 'select'ed (choice symbols don't support 'select'). 2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols. This makes sense since you know the architecture if you know the SoC. Put the select on the SOC_* symbol instead for boards that don't have a SOC_SERIES_*. 3. Remove all assignments to CONFIG_<arch> symbols. The assignments would generate errors now, since the symbols are promptless. The change was done by grepping for assignments to CONFIG_<arch> symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the same defconfig file, and putting a 'select' on it instead. See https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed for a split-up version of this commit, which will make it easier to see how stuff was done. This needs to go in as one commit though. This change is safer than it might seem re. outstanding PRs, because any assignment to CONFIG_<arch> symbols generates an error now, making outdated stuff easy to catch. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-06 18:26:14 +01:00
help
POSIX (native) architecture
config ARCH_IS_SET
bool
help
Helper symbol to detect SoCs forgetting to select one of the arch
symbols above. See the top-level CMakeLists.txt.
menu "General Architecture Options"
module = ARCH
module-str = arch
source "subsys/logging/Kconfig.template.log_config"
module = MPU
module-str = mpu
source "subsys/logging/Kconfig.template.log_config"
config BIG_ENDIAN
bool
help
This option tells the build system that the target system is big-endian.
Little-endian architecture is the default and should leave this option
unselected. This option is selected by arch/$ARCH/Kconfig,
soc/**/Kconfig, or boards/**/Kconfig and the user should generally avoid
modifying it. The option is used to select linker script OUTPUT_FORMAT
and command line option for gen_isr_tables.py.
config 64BIT
bool
help
This option tells the build system that the target system is
using a 64-bit address space, meaning that pointer and long types
are 64 bits wide. This option is selected by arch/$ARCH/Kconfig,
soc/**/Kconfig, or boards/**/Kconfig and the user should generally
avoid modifying it.
# Workaround for not being able to have commas in macro arguments
DT_CHOSEN_Z_SRAM := zephyr,sram
config SRAM_SIZE
int "SRAM Size in kB"
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_SRAM),0,K)
help
The SRAM size in kB. The default value comes from /chosen/zephyr,sram in
devicetree. The user should generally avoid changing it via menuconfig or
in configuration files.
config SRAM_BASE_ADDRESS
hex "SRAM Base Address"
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_SRAM))
help
The SRAM base address. The default value comes from from
/chosen/zephyr,sram in devicetree. The user should generally avoid
changing it via menuconfig or in configuration files.
if ARC || ARM || NIOS2 || X86
# Workaround for not being able to have commas in macro arguments
DT_CHOSEN_Z_FLASH := zephyr,flash
config FLASH_SIZE
int "Flash Size in kB"
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_FLASH),0,K) if (XIP && ARM) || !ARM
help
This option specifies the size of the flash in kB. It is normally set by
the board's defconfig file and the user should generally avoid modifying
it via the menu configuration.
config FLASH_BASE_ADDRESS
hex "Flash Base Address"
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH)) if (XIP && ARM) || !ARM
help
This option specifies the base address of the flash on the board. It is
normally set by the board's defconfig file and the user should generally
avoid modifying it via the menu configuration.
endif # ARM || ARC || NIOS2 || X86
if ARCH_HAS_TRUSTED_EXECUTION
config TRUSTED_EXECUTION_SECURE
bool "Trusted Execution: Secure firmware image"
help
Select this option to enable building a Secure firmware
image for a platform that supports Trusted Execution. A
Secure firmware image will execute in Secure state. It may
allow the CPU to execute in Non-Secure (Normal) state.
Therefore, a Secure firmware image shall be able to
configure security attributions of CPU resources (memory
areas, peripherals, interrupts, etc.) as well as to handle
faults, related to security violations. It may optionally
allow certain functions to be called from the Non-Secure
(Normal) domain.
config TRUSTED_EXECUTION_NONSECURE
depends on !TRUSTED_EXECUTION_SECURE
bool "Trusted Execution: Non-Secure firmware image"
help
Select this option to enable building a Non-Secure
firmware image for a platform that supports Trusted
Execution. A Non-Secure firmware image will execute
in Non-Secure (Normal) state. Therefore, it shall not
access CPU resources (memory areas, peripherals,
interrupts etc.) belonging to the Secure domain.
endif # ARCH_HAS_TRUSTED_EXECUTION
config HW_STACK_PROTECTION
bool "Hardware Stack Protection"
depends on ARCH_HAS_STACK_PROTECTION
help
Select this option to enable hardware-based platform features to
catch stack overflows when the system is running in privileged
mode. If CONFIG_USERSPACE is not enabled, the system is always
running in privileged mode.
Note that this does not necessarily prevent corruption and assertions
about the overall system state when a fault is triggered cannot be
made.
config USERSPACE
bool "User mode threads"
depends on ARCH_HAS_USERSPACE
depends on RUNTIME_ERROR_CHECKS
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.
If a user thread overflows its stack, this will be caught and the
kernel itself will be shielded from harm. Enabling this option
may or may not catch stack overflows when the system is in
privileged mode or handling a system call; to ensure these are always
caught, enable CONFIG_HW_STACK_PROTECTION.
config PRIVILEGED_STACK_SIZE
int "Size of privileged stack"
default 1024
depends on ARCH_HAS_USERSPACE
help
This option sets the privileged stack region size that will be used
in addition to the user mode thread stack. During normal execution,
this region will be inaccessible from user mode. During system calls,
this region will be utilized by the system call. This value must be
a multiple of the minimum stack alignment.
config KOBJECT_TEXT_AREA
int "Size if kobject text area"
default 512 if COVERAGE_GCOV
default 512 if NO_OPTIMIZATIONS
default 256
depends on ARCH_HAS_USERSPACE
help
Size of kernel object text area. Used in linker script.
config GEN_PRIV_STACKS
bool
help
Selected if the architecture requires that privilege elevation stacks
be allocated in a separate memory area. This is typical of arches
whose MPUs require regions to be power-of-two aligned/sized.
FIXME: This should be removed and replaced with checks against
CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT, but both ARM and ARC
changes will be necessary for this.
config STACK_GROWS_UP
bool "Stack grows towards higher memory addresses"
help
Select this option if the architecture has upward growing thread
stacks. This is not common.
config NO_UNUSED_STACK_INSPECTION
bool
help
Selected if the architecture will generate a fault if unused stack
memory is examined, which is the region between the current stack
pointer and the deepest available address in the current stack
region.
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.
config DYNAMIC_OBJECTS
bool "Allow kernel objects to be allocated at runtime"
depends on USERSPACE
help
Enabling this option allows for kernel objects to be requested from
the calling thread's resource pool, at a slight cost in performance
due to the supplemental run-time tables required to validate such
objects.
Objects allocated in this way can be freed with a supervisor-only
API call, or when the number of references to that object drops to
zero.
config NOCACHE_MEMORY
bool "Support for uncached memory"
depends on ARCH_HAS_NOCACHE_MEMORY_SUPPORT
help
Add a "nocache" read-write memory section that is configured to
not be cached. This memory section can be used to perform DMA
transfers when cache coherence issues are not optimal or can not
be solved using cache maintenance operations.
menu "Interrupt Configuration"
config DYNAMIC_INTERRUPTS
bool "Enable installation of IRQs at runtime"
help
Enable installation of interrupts at runtime, which will move some
interrupt-related data structures to RAM instead of ROM, and
on some architectures increase code size.
config GEN_ISR_TABLES
bool "Use generated IRQ tables"
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 "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 "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 ARCH_SW_ISR_TABLE_ALIGN
int "Alignment size of a software ISR table"
default 0
depends on GEN_SW_ISR_TABLE
help
This option controls alignment size of generated
_sw_isr_table. Some architecture needs a software ISR table
to be aligned to architecture specific size. The default
size is 0 for no alignment.
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.
config IRQ_OFFLOAD
bool "Enable IRQ offload"
depends on TEST
help
Enable irq_offload() API which allows functions to be synchronously
run in interrupt context. Only useful for test cases that need
to validate the correctness of kernel objects in IRQ context.
endmenu # Interrupt configuration
endmenu
#
# Architecture Capabilities
#
config ARCH_HAS_TRUSTED_EXECUTION
bool
config ARCH_HAS_STACK_PROTECTION
bool
config ARCH_HAS_USERSPACE
bool
config ARCH_HAS_EXECUTABLE_PAGE_BIT
bool
config ARCH_HAS_NOCACHE_MEMORY_SUPPORT
bool
config ARCH_HAS_RAMFUNC_SUPPORT
bool
config ARCH_HAS_NESTED_EXCEPTION_DETECTION
bool
#
# Other architecture related options
#
config ARCH_HAS_THREAD_ABORT
bool
#
# Hidden PM feature configs which are to be selected by
# individual SoC.
#
config HAS_SYS_POWER_STATE_SLEEP_1
bool
help
This option signifies that the target supports the SYS_POWER_STATE_SLEEP_1
configuration option.
config HAS_SYS_POWER_STATE_SLEEP_2
bool
help
This option signifies that the target supports the SYS_POWER_STATE_SLEEP_2
configuration option.
config HAS_SYS_POWER_STATE_SLEEP_3
bool
help
This option signifies that the target supports the SYS_POWER_STATE_SLEEP_3
configuration option.
config HAS_SYS_POWER_STATE_DEEP_SLEEP_1
bool
help
This option signifies that the target supports the SYS_POWER_STATE_DEEP_SLEEP_1
configuration option.
config HAS_SYS_POWER_STATE_DEEP_SLEEP_2
bool
help
This option signifies that the target supports the SYS_POWER_STATE_DEEP_SLEEP_2
configuration option.
config HAS_SYS_POWER_STATE_DEEP_SLEEP_3
bool
help
This option signifies that the target supports the SYS_POWER_STATE_DEEP_SLEEP_3
configuration option.
config BOOTLOADER_CONTEXT_RESTORE_SUPPORTED
bool
help
This option signifies that the target has options of bootloaders
that support context restore upon resume from deep sleep
#
# Hidden CPU family configs
#
config CPU_HAS_TEE
bool
help
This option is enabled when the CPU has support for Trusted
Execution Environment (e.g. when it has a security attribution
unit).
arch: arm: Rewrite Cortex-R reset vector function. This commit addresses the following issues: 1. Add a new Kconfig configuration for specifying Dual-redundant Core Lock-step (DCLS) processor topology. 2. Register initialisation is only required when Dual-redundant Core Lock-step (DCLS) is implemented in hardware. This initialisation is required on DCLS only because the architectural registers are in an indeterminate state after reset and therefore the initial register state of the two parallel executing cores are not guaranteed to be identical, which can lead to DCCM detecting it as a hardware fault. A conditional compilation check for this hardware configuration using the newly added CONFIG_CPU_HAS_DCLS flag has been added. 3. The existing CPU register initialisation code did not take into account the banked registers for every execution mode. The new implementation ensures that all architectural registers of every mode are initialised. 4. Add VFP register initialisation for when floating-point support is enabled and the core is configured in DCLS topology. This initialisation sequence is required for the same reason given in the first issue. 5. Add provision for platform-specific initialisation on Cortex-R using PLATFORM_SPECIFIC_INIT config and z_platform_init function. 6. Remove seemingly pointless and inadequately defined STACK_MARGIN. Not only does it violate the 8-byte stack alignment rule, it does not provide any form of real stack protection. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2019-10-08 17:52:18 +02:00
config CPU_HAS_DCLS
bool
help
This option is enabled when the processor hardware is configured in
Dual-redundant Core Lock-step (DCLS) topology.
config CPU_HAS_FPU
bool
help
This option is enabled when the CPU has hardware floating point
unit.
config CPU_HAS_FPU_DOUBLE_PRECISION
bool
select CPU_HAS_FPU
help
When enabled, this indicates that the CPU has a double floating point
precision unit.
config CPU_HAS_MPU
bool
help
This option is enabled when the CPU has a Memory Protection Unit (MPU).
config CPU_HAS_MMU
bool
help
This hidden option is selected when the CPU has a Memory Management Unit
(MMU).
config MMU
bool
depends on CPU_HAS_MMU
help
This option is enabled when the CPU's memory management unit is active
and the arch_mem_map() API is available.
config MMU_PAGE_SIZE
hex "Size of smallest granularity MMU page"
depends on MMU
default 0x1000
help
Size of memory pages. Varies per MMU but 4K is common. For MMUs that
support multiple page sizes, put the smallest one here.
config MEMORY_PROTECTION
bool
help
This option is enabled when Memory Protection features are supported.
Memory protection support is currently available on ARC, ARM, and x86
architectures.
config MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT
bool
help
This option is enabled when the MPU requires a power of two alignment
and size for MPU regions.
config MPU_REQUIRES_NON_OVERLAPPING_REGIONS
bool
help
This option is enabled when the MPU requires the active (i.e. enabled)
MPU regions to be non-overlapping with each other.
config MPU_GAP_FILLING
bool "Force MPU to be filling in background memory regions"
depends on MPU_REQUIRES_NON_OVERLAPPING_REGIONS
default y if !USERSPACE
help
This Kconfig option instructs the MPU driver to enforce
a full kernel SRAM partitioning, when it programs the
dynamic MPU regions (user thread stack, PRIV stack guard
and application memory domains) during context-switch. We
allow this to be a configurable option, in order to be able
to switch the option off and have an increased number of MPU
regions available for application memory domain programming.
Notes:
An increased number of MPU regions should only be required,
when building with USERSPACE support. As a result, when we
build without USERSPACE support, gap filling should always
be required.
When the option is switched off, access to memory areas not
covered by explicit MPU regions is restricted to privileged
code on an ARCH-specific basis. Refer to ARCH-specific
documentation for more information on how this option is
used.
menu "Floating Point Options"
config FPU
bool "Enable floating point unit (FPU)"
depends on CPU_HAS_FPU
depends on ARC || ARM || RISCV || X86
help
This option enables the hardware Floating Point Unit (FPU), in order to
support using the floating point registers and instructions.
When this option is enabled, by default, threads may use the floating
point registers only in an exclusive manner, and this usually means that
only one thread may perform floating point operations.
If it is necessary for multiple threads to perform concurrent floating
point operations, the "FPU register sharing" option must be enabled to
preserve the floating point registers across context switches.
Note that this option cannot be selected for the platforms that do not
include a hardware floating point unit; the floating point support for
those platforms is dependent on the availability of the toolchain-
provided software floating point library.
config FPU_SHARING
bool "FPU register sharing"
depends on FPU
help
This option enables preservation of the hardware floating point registers
across context switches to allow multiple threads to perform concurrent
floating point operations.
endmenu
config ARCH
string
help
System architecture string.
config SOC
string
help
SoC name which can be found under soc/<arch>/<soc name>.
This option holds the directory name used by the build system to locate
the correct linker and header files for the SoC.
config SOC_SERIES
string
help
SoC series name which can be found under soc/<arch>/<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 soc/<arch>/<family>.
This option holds the directory name used by the build system to locate
the correct linker and header files.
config BOARD
string
help
This option holds the name of the board and is used to locate the files
related to the board in the source tree (under boards/).
The Board is the first location where we search for a linker.ld file,
if not found we look for the linker file in
soc/<arch>/<family>/<series>