Originally building the kernel was largely considered to be done in one of two ways 1. Release build with no assertions, no debug symbols and no printing. This was generally considered to be a 'verified' build 2. Debug build with assertions, debug symbols and printing Since then various options were added, such as the 'code injection' option, which we wanted on builds that did not have assertions or other options that affected performance. As such it did not depend upon a debug build and had large warning signs saying that enabling this in a release build would not give you a verified or trusted kernel. Most recently the ability to print from the kernel in release mode was added. For the same reason that tying the ability to print with the performance reduction of various debugging was not always desireable. This change attempts to unify the current state and have a single top level option to enable a 'verification friendly' build. All other options (assertions, printing, code injection) then depend upon this configuration not being set.
498 lines
15 KiB
Text
498 lines
15 KiB
Text
#
|
|
# Copyright 2014, General Dynamics C4 Systems
|
|
#
|
|
# This software may be distributed and modified according to the terms of
|
|
# the GNU General Public License version 2. Note that NO WARRANTY is provided.
|
|
# See "LICENSE_GPLv2.txt" for details.
|
|
#
|
|
# @TAG(GD_GPL)
|
|
#
|
|
|
|
config KERNEL_PATH
|
|
string
|
|
option env="KERNEL_ROOT_PATH"
|
|
|
|
config ARCH_ARM_V6
|
|
bool
|
|
default n
|
|
|
|
config ARCH_ARM_V7A
|
|
bool
|
|
default n
|
|
|
|
config KERNEL_MASTER
|
|
bool
|
|
default y
|
|
|
|
# Native word size of the current platform. This is primarily intended for use
|
|
# in code generators that need to know, at generation-time, the word size of
|
|
# the target platform.
|
|
config WORD_SIZE
|
|
int
|
|
default 32 if ARCH_IA32 || ARCH_AARCH32
|
|
|
|
menu "seL4 System"
|
|
|
|
choice
|
|
prompt "Architecture Type"
|
|
default ARCH_X86
|
|
help
|
|
Select the architecture seL4 will be running on.
|
|
|
|
config ARCH_X86
|
|
bool "x86"
|
|
|
|
config ARCH_ARM
|
|
bool "ARM"
|
|
endchoice
|
|
|
|
config ARCH_IA32
|
|
bool
|
|
default y if ARCH_X86
|
|
|
|
config ARCH_AARCH32
|
|
bool
|
|
default y if ARCH_ARM
|
|
|
|
choice
|
|
prompt "ARM CPU selection"
|
|
depends on ARCH_ARM
|
|
help
|
|
Select the ARM CPU version
|
|
|
|
config ARM1136JF_S
|
|
bool "ARM1136JF-S"
|
|
depends on ARCH_ARM
|
|
select ARCH_ARM_V6
|
|
help
|
|
Support for ARM1136JF-S
|
|
|
|
config ARM_CORTEX_A7
|
|
bool "Cortex A7"
|
|
depends on ARCH_ARM
|
|
select ARCH_ARM_V7A
|
|
help
|
|
Support for Cortex A7 processor
|
|
|
|
config ARM_CORTEX_A8
|
|
bool "Cortex A8"
|
|
depends on ARCH_ARM
|
|
select ARCH_ARM_V7A
|
|
help
|
|
Support for Cortex A8 processor
|
|
|
|
config ARM_CORTEX_A9
|
|
bool "Cortex A9"
|
|
depends on ARCH_ARM
|
|
select ARCH_ARM_V7A
|
|
help
|
|
Support for Cortex A9 processor
|
|
|
|
config ARM_CORTEX_A15
|
|
bool "Cortex A15"
|
|
depends on ARCH_ARM
|
|
select ARCH_ARM_V7A
|
|
help
|
|
Support for Cortex A15 processor
|
|
|
|
endchoice
|
|
|
|
config PLAT_EXYNOS54XX
|
|
bool
|
|
default n
|
|
help
|
|
Common flag for Exynos 5410 and 5422
|
|
|
|
config PLAT_IMX6
|
|
bool
|
|
default n
|
|
help
|
|
Common flag for Sabre Lite and Wandboard Quad
|
|
|
|
|
|
config PLAT_IMX7
|
|
bool
|
|
default n
|
|
help
|
|
Common flag for iMX7 SoC
|
|
|
|
choice
|
|
prompt "Platform Type"
|
|
help
|
|
Select the platform for the architecture
|
|
|
|
config PLAT_KZM
|
|
bool "KZM iMX.31-based platform"
|
|
depends on ARCH_ARM
|
|
depends on ARM1136JF_S
|
|
help
|
|
Support for the KZM platform
|
|
|
|
config PLAT_OMAP3
|
|
bool "OMAP3 (BeagleBoard)"
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A8
|
|
help
|
|
Support for platforms based on OMAP3 SoCs.
|
|
|
|
config PLAT_AM335X
|
|
bool "AM335X (BeagleBone)"
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A8
|
|
help
|
|
Support for AM335x platform (BeagleBone).
|
|
|
|
config PLAT_EXYNOS4
|
|
bool "EXYNOS4 (ODROID-X)"
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A9
|
|
help
|
|
Support for EXYNOS4 platform (ODROID-X).
|
|
|
|
config PLAT_EXYNOS5410
|
|
bool "EXYNOS5410 (ODROID-XU)"
|
|
select PLAT_EXYNOS54XX
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A15
|
|
help
|
|
Support for EXYNOS5410 platform (ODROID-XU).
|
|
|
|
config PLAT_EXYNOS5422
|
|
bool "EXYNOS5422 (ODROID-XU3)"
|
|
select PLAT_EXYNOS54XX
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A15
|
|
help
|
|
Support for EXYNOS5422 platform (ODROID-XU3).
|
|
|
|
config PLAT_EXYNOS5250
|
|
bool "EXYNOS5250 (ARNDALE)"
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A15
|
|
help
|
|
Support for EXYNOS5250 platform (ARNDALE).
|
|
|
|
config PLAT_APQ8064
|
|
bool "Qualcomm Snapdrogon S4 APQ8064 (Inforce IFC6410)"
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A15
|
|
help
|
|
Support for Qualcomm Snapdragon S4 APQ8064 platforms (Inforce IFC6410).
|
|
|
|
config PLAT_SABRE
|
|
bool "iMX6 (Sabre Lite)"
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A9
|
|
select PLAT_IMX6
|
|
help
|
|
Support for iMX6 platform (Sabre Lite).
|
|
|
|
config PLAT_WANDQ
|
|
bool "iMX6 (Wandboard Quad)"
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A9
|
|
select PLAT_IMX6
|
|
help
|
|
Support for iMX6 platform (Wandboard Quad).
|
|
|
|
config PLAT_IMX7_SABRE
|
|
bool "iMX7 (Sabre)"
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A7
|
|
select PLAT_IMX7
|
|
help
|
|
Support for iMX7 Sabre Dual.
|
|
|
|
config PLAT_ZYNQ7000
|
|
bool "Zynq-7000 (Xilinx ZC706)"
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A9
|
|
help
|
|
Support for Xilinx Zynq-7000 platforms.
|
|
|
|
config PLAT_PC99
|
|
bool "PC99"
|
|
depends on ARCH_X86
|
|
help
|
|
Support for PC99 based platform
|
|
|
|
config PLAT_ALLWINNERA20
|
|
bool "ALLWINNERA20 (CUBIETRUCK)"
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A15
|
|
help
|
|
Support for ALLWINNERA20 platform (CUBIETRUCK).
|
|
|
|
config PLAT_TK1
|
|
bool "Jetson (Tegra K1)"
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A15
|
|
help
|
|
Support for Tegra K1 platform
|
|
|
|
endchoice
|
|
|
|
source "$KERNEL_PATH/src/arch/arm/Kconfig"
|
|
source "$KERNEL_PATH/src/plat/pc99/Kconfig"
|
|
|
|
endmenu
|
|
|
|
|
|
menu "seL4 System Parameters"
|
|
|
|
config ROOT_CNODE_SIZE_BITS
|
|
range 4 27
|
|
int "Root CNode Size (2^n slots)"
|
|
default 12
|
|
help
|
|
The acceptable range is 4-27, based on the kernel-supplied caps.
|
|
The root CNode needs at least enough space to contain up to
|
|
BI_CAP_DYN_START. Note that in practice your root CNode will need
|
|
to be several bits larger than 4 to fit device frame caps and
|
|
cannot be 27 bits as it won't fit in memory.
|
|
|
|
config TIMER_TICK_MS
|
|
int "Timer tick period in milliseconds"
|
|
default 2
|
|
help
|
|
The number of milliseconds between timer ticks.
|
|
|
|
|
|
config TIME_SLICE
|
|
int "Time slice"
|
|
default 5
|
|
help
|
|
Number of timer ticks until a thread is preempted.
|
|
|
|
config RETYPE_FAN_OUT_LIMIT
|
|
int "Retype fan out limit"
|
|
default 256
|
|
help
|
|
Maximum number of objects that can be created in a single Retype()
|
|
invocation.
|
|
|
|
config MAX_NUM_WORK_UNITS_PER_PREEMPTION
|
|
int "Max work units per preemption"
|
|
default 100
|
|
help
|
|
Maximum number of work units (delete/revoke iterations) until
|
|
the kernel checks for pending interrupts (and preempts the
|
|
currently running syscall if interrupts are pending).
|
|
|
|
config MAX_NUM_BOOTINFO_DEVICE_REGIONS
|
|
int "Max number of bootinfo device regions"
|
|
default 199
|
|
|
|
config MAX_NUM_BOOTINFO_UNTYPED_CAPS
|
|
int "Max number of bootinfo untyped caps"
|
|
default 167
|
|
|
|
config MAX_RMRR_ENTRIES
|
|
int "Max number of RMRR entries to support finding in ACPI"
|
|
depends on IOMMU
|
|
default 32
|
|
help
|
|
Sets the maximum number of Reserved Memory Region Reporting
|
|
structures we support recording from the ACPI tables
|
|
|
|
config FASTPATH
|
|
bool "Enable fastpath"
|
|
default y
|
|
help
|
|
Enable IPC fastpath
|
|
|
|
config NUM_DOMAINS
|
|
int "Number of domains"
|
|
default 1
|
|
help
|
|
The number of scheduler domains in the system
|
|
|
|
config DOMAIN_SCHEDULE
|
|
string "Domain schedule"
|
|
help
|
|
A C file providing the symbols ksDomSchedule and
|
|
ksDomScheduleLength to be linked with the kernel as a scheduling
|
|
configuration.
|
|
|
|
config NUM_PRIORITIES
|
|
int "Number of priority levels"
|
|
default 256
|
|
range 1 256
|
|
help
|
|
The number of priority levels per domain
|
|
|
|
config MAX_NUM_TRACE_POINTS
|
|
int "Maximum number of tracepoints"
|
|
default 0
|
|
help
|
|
Setting this value > 1 enables a 1MB log buffer and functions for extracting data from it
|
|
at user level. Use TRACE_POINT_START(k) and TRACE_POINT_STOP(k) macros for recording data,
|
|
where k is an integer between 0 and this value - 1.
|
|
NOTE this is only tested on the sabre and will not work on platforms with < 512mb memory.
|
|
This is not fully implemented for x86.
|
|
The maximum number of different trace point identifiers which can be used.
|
|
|
|
endmenu
|
|
|
|
menu "Build Options"
|
|
|
|
config VERIFICATION_BUILD
|
|
bool "Disable verification unfriendly features"
|
|
default n
|
|
help
|
|
When enabled this configuration option prevents the usage of any other options that
|
|
would compromise the verification story of the kernel. Enabling this option does NOT
|
|
imply you are using a verified kernel.
|
|
|
|
config DEBUG_BUILD
|
|
bool "Enable debug facilities"
|
|
depends on !VERIFICATION_BUILD
|
|
default y
|
|
help
|
|
Enable debug facilities (symbols and assertions) in the kernel
|
|
|
|
config PRINTING
|
|
bool "Enable kernel printing"
|
|
depends on !VERIFICATION_BUILD
|
|
default y if DEBUG_BUILD
|
|
help
|
|
Allow the kernel to print out messages to the serial console during bootup and execution.
|
|
|
|
config IRQ_REPORTING
|
|
bool "Report spurious or undelivered IRQs"
|
|
depends on PRINTING
|
|
default y
|
|
help
|
|
seL4 does not properly check for and handle spurious interrupts
|
|
This can result in unnecessary output from the kernel during
|
|
debug builds. If you are CERTAIN these messages are benign
|
|
then use this config to turn them off
|
|
|
|
config COLOUR_PRINTING
|
|
bool "Print error messages in colour"
|
|
depends on PRINTING
|
|
default y
|
|
help
|
|
In debug mode, seL4 prints diagnostic messages to its serial output
|
|
describing, e.g., the cause of system call errors. This setting
|
|
determines whether ANSI escape codes are applied to colour code
|
|
these error messages. You may wish to disable this setting if your
|
|
serial output is redirected to a file or pipe.
|
|
|
|
choice
|
|
prompt "Compiler optimisation flag"
|
|
default OPTIMISATION_O2
|
|
help
|
|
Select the compiler optimisation level
|
|
|
|
config OPTIMISATION_Os
|
|
bool "-Os"
|
|
help
|
|
Compiler optimisations tuned for size
|
|
|
|
config OPTIMISATION_O0
|
|
bool "-O0"
|
|
help
|
|
No optimisation
|
|
|
|
config OPTIMISATION_O1
|
|
bool "-O1"
|
|
help
|
|
Basic compiler optimisations
|
|
|
|
config OPTIMISATION_O2
|
|
bool "-O2"
|
|
help
|
|
Aggressive compiler optimisations
|
|
|
|
config OPTIMISATION_O3
|
|
bool "-O3"
|
|
help
|
|
Enable all optimisations (may increase code size)
|
|
|
|
endchoice
|
|
|
|
config DANGEROUS_CODE_INJECTION
|
|
bool "Build kernel with support for executing arbitrary code in protected mode"
|
|
depends on !VERIFICATION_BUILD
|
|
default n
|
|
help
|
|
Adds a system call that allows users to specify code to be run in kernel
|
|
mode. Useful for profiling.
|
|
|
|
config DANGEROUS_CODE_INJECTION_ON_UNDEF_INSTR
|
|
bool "Make undefined instructions execute code in protected mode"
|
|
depends on ARCH_ARM_V6 && !VERIFICATION_BUILD
|
|
default n
|
|
help
|
|
Replaces the undefined instruction handler with a call to a function
|
|
pointer in r8. This is an alternative mechanism to the code
|
|
injection syscall. On ARMv6 the syscall interferes with the caches
|
|
and branch predictor in such a way that it is unsuitable for
|
|
benchmarking. This option has no effect on non-ARMv6 platforms.
|
|
|
|
config DEBUG_DISABLE_L2_CACHE
|
|
bool "Disable L2 cache"
|
|
depends on ARCH_ARM
|
|
default n
|
|
help
|
|
Do not enable the L2 cache on startup for debugging purposes.
|
|
|
|
config DEBUG_DISABLE_L1_ICACHE
|
|
bool "Disable L1 instruction cache"
|
|
depends on ARCH_ARM && DEBUG_DISABLE_L2_CACHE
|
|
default n
|
|
help
|
|
Do not enable the L1 instruction cache on startup for debugging purposes.
|
|
|
|
config DEBUG_DISABLE_L1_DCACHE
|
|
bool "Disable L1 data cache"
|
|
depends on ARCH_ARM && DEBUG_DISABLE_L2_CACHE
|
|
default n
|
|
help
|
|
Do not enable the L1 data cache on startup for debugging purposes.
|
|
|
|
config DEBUG_DISABLE_BRANCH_PREDICTION
|
|
bool "Disable branch prediction"
|
|
depends on ARCH_ARM
|
|
default n
|
|
help
|
|
Do not enable branch prediction (also called program flow control)
|
|
on startup. This makes execution time more deterministic at the
|
|
expense of dramatically decreasing performance. Primary use is for
|
|
debugging.
|
|
|
|
config DEBUG_DISABLE_PREFETCHERS
|
|
bool "Disable prefetchers"
|
|
depends on ARCH_IA32
|
|
default n
|
|
help
|
|
On ia32 platforms, this option disables the L2 hardware prefetcher, the L2
|
|
adjacent cache line prefetcher, the DCU prefetcher and the DCU IP prefetcher.
|
|
Currently unimplemented on other platforms.
|
|
|
|
endmenu
|
|
|
|
menu "Errata"
|
|
|
|
config ARM_ERRATA_430973
|
|
bool "Enable workaround for 430973 Cortex-A8 (r1p0..r1p2) erratum"
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A8
|
|
default n
|
|
help
|
|
Enables a workaround for the 430973 Cortex-A8 (r1p0..r1p2) erratum. Error occurs
|
|
if code containing ARM/Thumb interworking branch is replaced by different code
|
|
at the same virtual address.
|
|
|
|
config ARM_ERRATA_773022
|
|
bool "Enable workaround for 773022 Cortex-A15 (r0p0..r0p4) erratum"
|
|
depends on ARCH_ARM
|
|
depends on ARM_CORTEX_A15
|
|
default y
|
|
help
|
|
Enables a workaround for the 773022 Cortex-A15 (r0p0..r0p4) erratum. Error occurs
|
|
on rare sequences of instructions and results in the loop buffer delivering
|
|
incorrect instructions. The work around is to disable the loop buffer
|
|
|
|
endmenu
|