zephyr/arch/x86/Kconfig

283 lines
7.1 KiB
Plaintext
Raw Normal View History

# Kconfig - x86 general configuration options
#
# Copyright (c) 2014-2015 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
choice
prompt "x86 SoC Selection"
depends on X86
source "arch/x86/soc/*/Kconfig.soc"
endchoice
menu "x86 Options"
depends on X86
config ARCH
default "x86"
config ARCH_DEFCONFIG
string
default "arch/x86/defconfig"
source "arch/x86/core/Kconfig"
#
# Hidden CPU family configs which are to be selected by
# individual SoC.
#
config CPU_ATOM
# Hidden
bool
select CMOV
select CPU_HAS_FPU
help
This option signifies the use of a CPU from the Atom family.
config CPU_MINUTEIA
# Hidden
bool
help
This option signifies the use of a CPU from the Minute IA family.
#
# End hidden CPU family configs
#
config CPU_HAS_FPU
# Hidden config selected by CPU family
bool
default n
help
This option is enabled when the CPU has hardware floating point
unit.
menu "Processor Capabilities"
config X86_IAMCU
bool
default n
prompt "IAMCU calling convention"
help
The IAMCU calling convention changes the X86 C calling convention to
pass some arguments via registers allowing for code size and performance
improvements. Great care needs to be taken if you have assembly code
that will be called from C or C code called from assembly code, the
assembly code will need to be updated to conform to the new calling
convention. If in doubt say N
menu "Floating Point Options"
depends on CPU_HAS_FPU
config FLOAT
bool
prompt "Floating point registers"
default n
help
This option allows tasks and fibers to use the floating point registers.
By default, only a single task or fiber may use the registers, and only
the x87 FPU/MMX registers may be used.
Disabling this option means that any task or fiber that uses a
floating point register will get a fatal exception.
x86: remove dynamically generated IRQ and exception code We are interested in supporting some XIP x86 platforms which are unable to fetch CPU instructions from system RAM. This requires refactoring our dynamic IRQ/exc code which currently synthesizes assembly language instructions to create IRQ stubs on-the-fly. Instead, a new approach is taken. Given that the configuration at build time specifies the number of required stubs, use this to generate a build time a set of tiny stub functions which simply push a 'stub id' and then call common dynamic interrupt code. The handler function and handler argument is saved in a table keyed by this stub id. CONFIG_EOI_HANDLER_SUPPORTED removed, the code hasn't been conditionally compiled for some time and in all cases we call _loapic_eoi() when finished with an interrupt. Some other out-of-date verbiage in comments related to supporting non-APIC removed. Previously, when dynamic exceptions were created a pointer would be passed in by the caller reserving ram for the stub code. Since this is no longer feasible, two new Kconfig options have been added. CONFIG_NUM_DYNAMIC_EXC_STUBS and CONFIG_NUM_DYNAMIC_EXC_NO_ERR_STUBS control how many stubs are created for exceptions that push an error code, and no error code, respectively. SW Interrupts are no longer triggered by "int <vector>" hard-coded assembly instructions. Instead this is done by sending a self-directed inter-processor interrupt from the LOAPIC, using a new API loapic_int_vect_trigger(). In this way we get rid of dynamically generated code in irq_test_common.h. All interrupts call _loapic_eoi() when finished, since this is now the right thing to do for all IRQs, including SW interrupts. _irq_handler_set() for x86 no longer requires the old function pointer to be supplied. Change-Id: I78993d3d00dd153c9051c518b417cce8d3acee9e Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2015-10-20 05:10:53 +08:00
config FP_SHARING
bool
prompt "Floating point register sharing"
depends on FLOAT
default n
x86: remove dynamically generated IRQ and exception code We are interested in supporting some XIP x86 platforms which are unable to fetch CPU instructions from system RAM. This requires refactoring our dynamic IRQ/exc code which currently synthesizes assembly language instructions to create IRQ stubs on-the-fly. Instead, a new approach is taken. Given that the configuration at build time specifies the number of required stubs, use this to generate a build time a set of tiny stub functions which simply push a 'stub id' and then call common dynamic interrupt code. The handler function and handler argument is saved in a table keyed by this stub id. CONFIG_EOI_HANDLER_SUPPORTED removed, the code hasn't been conditionally compiled for some time and in all cases we call _loapic_eoi() when finished with an interrupt. Some other out-of-date verbiage in comments related to supporting non-APIC removed. Previously, when dynamic exceptions were created a pointer would be passed in by the caller reserving ram for the stub code. Since this is no longer feasible, two new Kconfig options have been added. CONFIG_NUM_DYNAMIC_EXC_STUBS and CONFIG_NUM_DYNAMIC_EXC_NO_ERR_STUBS control how many stubs are created for exceptions that push an error code, and no error code, respectively. SW Interrupts are no longer triggered by "int <vector>" hard-coded assembly instructions. Instead this is done by sending a self-directed inter-processor interrupt from the LOAPIC, using a new API loapic_int_vect_trigger(). In this way we get rid of dynamically generated code in irq_test_common.h. All interrupts call _loapic_eoi() when finished, since this is now the right thing to do for all IRQs, including SW interrupts. _irq_handler_set() for x86 no longer requires the old function pointer to be supplied. Change-Id: I78993d3d00dd153c9051c518b417cce8d3acee9e Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2015-10-20 05:10:53 +08:00
help
This option allows multiple tasks and fibers to use the floating point
registers. Any task that uses the floating point registers must provide
stack space where the kernel can save these registers during context
switches; a task that uses only the x87 FPU/MMX registers must provide
108 bytes of added stack space, while a task the uses the SSE registers
must provide 464 bytes of added stack space.
x86: remove dynamically generated IRQ and exception code We are interested in supporting some XIP x86 platforms which are unable to fetch CPU instructions from system RAM. This requires refactoring our dynamic IRQ/exc code which currently synthesizes assembly language instructions to create IRQ stubs on-the-fly. Instead, a new approach is taken. Given that the configuration at build time specifies the number of required stubs, use this to generate a build time a set of tiny stub functions which simply push a 'stub id' and then call common dynamic interrupt code. The handler function and handler argument is saved in a table keyed by this stub id. CONFIG_EOI_HANDLER_SUPPORTED removed, the code hasn't been conditionally compiled for some time and in all cases we call _loapic_eoi() when finished with an interrupt. Some other out-of-date verbiage in comments related to supporting non-APIC removed. Previously, when dynamic exceptions were created a pointer would be passed in by the caller reserving ram for the stub code. Since this is no longer feasible, two new Kconfig options have been added. CONFIG_NUM_DYNAMIC_EXC_STUBS and CONFIG_NUM_DYNAMIC_EXC_NO_ERR_STUBS control how many stubs are created for exceptions that push an error code, and no error code, respectively. SW Interrupts are no longer triggered by "int <vector>" hard-coded assembly instructions. Instead this is done by sending a self-directed inter-processor interrupt from the LOAPIC, using a new API loapic_int_vect_trigger(). In this way we get rid of dynamically generated code in irq_test_common.h. All interrupts call _loapic_eoi() when finished, since this is now the right thing to do for all IRQs, including SW interrupts. _irq_handler_set() for x86 no longer requires the old function pointer to be supplied. Change-Id: I78993d3d00dd153c9051c518b417cce8d3acee9e Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2015-10-20 05:10:53 +08:00
config SSE
bool
prompt "SSE registers"
depends on FLOAT
default n
help
This option enables the use of SSE registers by tasks and fibers.
config SSE_FP_MATH
bool
prompt "Compiler-generated SSEx instructions"
depends on SSE
default n
help
This option allows the compiler to generate SSEx instructions for
performing floating point math. This can greatly improve performance
when exactly the same operations are to be performed on multiple
data objects; however, it can also significantly reduce performance
when pre-emptive task switches occur because of the larger register
set that must be saved and restored.
Disabling this option means that the compiler utilizes only the
x87 instruction set for floating point operations.
endmenu
choice
prompt "Reboot implementation"
depends on REBOOT
default REBOOT_RST_CNT
config REBOOT_RST_CNT
bool
prompt "Reboot via RST_CNT register"
help
Reboot via the RST_CNT register, going back to BIOS.
endchoice
config ISA_IA32
bool
default y
help
This option signifies the use of a CPU based on the Intel IA-32
instruction set architecture.
config IA32_LEGACY_IO_PORTS
bool
prompt "Support IA32 legacy IO ports"
default n
depends on ISA_IA32
help
This option enables IA32 legacy IO ports. Note these are much slower
than memory access, so they should be used in last resort.
config CMOV
def_bool n
help
This option signifies the use of an Intel CPU that supports
the CMOV instruction.
config CACHE_LINE_SIZE_DETECT
bool
prompt "Detect cache line size at runtime"
default y
help
This option enables querying the CPUID register for finding the cache line
size at the expense of taking more memory and code and a slightly increased
boot time.
If the CPU's cache line size is known in advance, disable this option and
manually enter the value for CACHE_LINE_SIZE.
config CACHE_LINE_SIZE
int
prompt "Cache line size" if !CACHE_LINE_SIZE_DETECT
default 0 if CACHE_LINE_SIZE_DETECT
default 64 if CPU_ATOM
default 0
help
Size in bytes of a CPU cache line.
Detect automatically at runtime by selecting CACHE_LINE_SIZE_DETECT.
config CLFLUSH_INSTRUCTION_SUPPORTED
bool
prompt "CLFLUSH instruction supported"
depends on !CLFLUSH_DETECT && CACHE_FLUSHING
default n
help
An implementation of sys_cache_flush() that uses CLFLUSH is made
available, instead of the one using WBINVD.
This option should only be enabled if it is known in advance that the
CPU supports the CLFLUSH instruction. It disables runtime detection of
CLFLUSH support thereby reducing both memory footprint and boot time.
config CLFLUSH_DETECT
bool
prompt "Detect support of CLFLUSH instruction at runtime"
depends on CACHE_FLUSHING
default n
help
This option should be enabled if it is not known in advance whether the
CPU supports the CLFLUSH instruction or not.
The CPU is queried at boot time to determine which of the multiple
implementations of sys_cache_flush() linked into the image is the
correct one to use.
If the CPU's support (or lack thereof) of CLFLUSH is known in advance, then
disable this option and set CLFLUSH_INSTRUCTION_SUPPORTED as appropriate.
config ARCH_CACHE_FLUSH_DETECT
bool
default y
depends on CLFLUSH_DETECT
config CACHE_FLUSHING
bool
default n
prompt "Enable cache flushing mechanism"
help
This links in the sys_cache_flush() function. A mechanism for flushing the
cache must be selected as well. By default, that mechanism is discovered at
runtime.
endmenu
menu "Board Capabilities"
config PIC_DISABLE
bool "Disable PIC"
default n
help
This option disables all interrupts on the PIC
config IRQ_OFFLOAD
bool "Enable IRQ offload"
default n
help
Enable irq_offload() API which allows functions to be synchronously
run in interrupt context. Uses one entry in the IDT. Mainly useful
for test cases.
config IRQ_OFFLOAD_VECTOR
int "IDT vector to use for IRQ offload"
default 63 if MVIC
default 32 if !MVIC
range 32 255
depends on IRQ_OFFLOAD
help
Specify the IDT vector to use for the IRQ offload interrupt handler.
The default should be fine for most arches, but on systems like MVIC
where there is a fixed IRQ-to-vector mapping another value may be
needed to avoid collision.
config XIP
default n
x86: declare internal API for interrupt controllers Originally, x86 just supported APIC. Then later support for the Mint Valley Interrupt Controller was added. This controller is mostly similar to the APIC with some differences, but was integrated in a somewhat hacked-up fashion. Now we define irq_controller.h, which is a layer of abstraction between the core arch code and the interrupt controller implementation. Contents of the API: - Controllers with a fixed irq-to-vector mapping define _IRQ_CONTROLLER_VECTOR_MAPPING(irq) to obtain a compile-time map between the two. - _irq_controller_program() notifies the interrupt controller what vector will be used for a particular IRQ along with triggering flags - _irq_controller_isr_vector_get() reports the vector number of the IRQ currently being serviced - In assembly language domain, _irq_controller_eoi implements EOI handling. - Since triggering options can vary, some common defines for triggering IRQ_TRIGGER_EDGE, IRQ_TRIGGER_LEVEL, IRQ_POLARITY_HIGH, IRQ_POLARITY_LOW introduced. Specific changes made: - New Kconfig X86_FIXED_IRQ_MAPPING for those interrupt controllers that have a fixed relationship between IRQ lines and IDT vectors. - MVIC driver rewritten per the HAS instead of the tortuous methods used to get it to behave like LOAPIC. We are no longer writing values to reserved registers. Additional assertions added. - Some cleanup in the loapic_timer driver to make the MVIC differences clearer. - Unused APIs removed, or folded into calling code when used just once. - MVIC doesn't bother to write a -1 to the intList priority field since it gets ignored anyway Issue: ZEP-48 Change-Id: I071a477ea68c36e00c3d0653ce74b3583454154d Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-03 03:05:08 +08:00
config X86_FIXED_IRQ_MAPPING
bool
default n
help
Specify whether the current interrupt controller in use has a fixed
mapping between IDT vectors and IRQ lines.
endmenu
source "arch/x86/soc/*/Kconfig"
endmenu