zephyr/misc/debug/Kconfig
Andrew Boie 17c0b372a2 x86: improve exception APIs
Previously, exception stubs had to be declared in assembly
language files. Now we have two new APIs to regsiter exception
handlers at C toplevel:

 _EXCEPTION_CONNECT_CODE(handler, vector)
 _EXCEPTION_CONNECT_NOCODE(handler, vector)

For x86 exceptions that do and do not push error codes onto
the stack respectively.

In addition, it's now no longer necessary to #define around
exception registration. We now use .gnu.linkonce magic such that
the first _EXCEPTION_CONNECT_*() that the linker finds is used
for the specified vector. Applications are free to install their
own exception handlers which will take precedence over default
handlers such as installed by arch/x86/core/fatal.c

Some Makefiles have been adjusted so that the default exception
handlers in arch/x86/core/fatal.c are linked last. The code has
been tested that the right order of precedence is taken for
exceptions overridden in the floating point, gdb debug, or
application code. The asm SYS_NANO_CPU_EXC_CONNECT API has been
removed; it was ill- conceived as it only worked for exceptions
that didn't push error codes. All the asm NANO_CPU_EXC_CONNECT_*
APIs are gone as well in favor of the new _EXCEPTION_CONNNECT_*()
APIs.

CONFIG_EXCEPTION_DEBUG no longer needs to be disabled for test
cases that define their own exception handlers.

Issue: ZEP-203
Change-Id: I782e0143fba832d18cdf4daaa7e47820595fe041
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-28 18:13:24 +00:00

128 lines
3.4 KiB
Plaintext

# Kconfig - debug configuration options
#
# Copyright (c) 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.
#
menu "Safe memory access"
config MEM_SAFE
bool
prompt "Enable safe memory access"
default n
help
Add the routines available in mem_safe.h to the system. This is added
as a kconfig option instead of simply linking against the library
because some implementations might require initialization.
choice
prompt "Safe memory access implementation"
depends on MEM_SAFE
default MEM_SAFE_CHECK_BOUNDARIES
config MEM_SAFE_CHECK_BOUNDARIES
bool
prompt "Software validation of memory access within memory regions"
help
This implementation checks the application image's text/rodata
boundaries for its read-only region and the data/bss/noinit boundaries
for its read-write region, in software.
Other regions can be added as needed by using the
sys_mem_safe_region_add() API. The number of regions that can be added
is controlled via the MEM_SAFE_NUM_REGIONS kconfig option.
This implementation requires initialization and thus consumes some boot
time.
endchoice
config MEM_SAFE_NUM_EXTRA_REGIONS
int
prompt "Number of safe memory access regions to be added at runtime"
depends on MEM_SAFE_CHECK_BOUNDARIES
default 0
help
The functions available in mem_safe.h check if memory is within
read-only or read-write regions before accessing it instead of crashing.
The kernel image is added as a valid region automatically, but other
regions can be added if the application makes access to additional
memory outside of the image's boundaries.
endmenu
#
# Generic Debugging Options
#
config DEBUG_INFO
bool "Enable system debugging information"
default n
depends on X86 && !X86_IAMCU
help
This option enables the addition of various information that can be used
by debuggers in debugging the system.
NOTE: Does not currently work with the x86 IAMCU ABI.
#
# GDB Server options
#
config GDB_SERVER
bool
prompt "Enable GDB Server [EXPERIMENTAL]"
default n
select CACHE_FLUSHING
select REBOOT
select MEM_SAFE
select DEBUG_INFO
select UART_CONSOLE_DEBUG_SERVER_HOOKS
help
This option enables the GDB Server support.
config GDB_SERVER_MAX_SW_BP
int "Maximum number of GDB Server Software breakpoints"
default 100
depends on GDB_SERVER
help
This option specifies the maximum number of Software breakpoints
config GDB_SERVER_INTERRUPT_DRIVEN
bool
prompt "Enable GDB interrupt mode"
default y
depends on GDB_SERVER
select CONSOLE_HANDLER
help
This option enables interrupt support for GDB Server.
config GDB_REMOTE_SERIAL_EXT_NOTIF_PREFIX_STR
string
prompt "Trigger string for remote serial ext. via notifi. packets"
default "WrCons"
depends on GDB_SERVER
help
The value of this option depends on the string the GDB client use to
prefix the notification packets.
config GDB_SERVER_BOOTLOADER
bool
prompt "Enable the bootloader mode"
default n
depends on GDB_SERVER
help
This option enables the bootloader mode of the GDB Server.