]> xenbits.xensource.com Git - people/royger/xen-test-framework.git/commit
Exception table infrastructure
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 16 Dec 2015 19:04:03 +0000 (19:04 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 22 Dec 2015 20:47:28 +0000 (20:47 +0000)
commit06c8ae1b8821e76959ebf3b6ea6ce611b759919e
tree410d8b626e6558f0af7950b4250747e9a66bdda6
parent8d079026e99bdd997b0c5160db8c06696af153d1
Exception table infrastructure

To redirect control flow if a fault occurs.  Entries are registered with the
_ASM_EXTABLE() and placed in the .ex_table section, which is collected
together by the linker.

The .ex_table section is sorted on boot (to facilitate fast searching), and
searched in do_exception() when a fault or abort is encountered.  If a
matching entry is found, control flow is redirected and the exception returned
from.

Some of the changes are to make the two asm_macros.h files safe to include in
C code.  In addition, an extra selftest is added, making use of the exception
table infrastructure.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
arch/x86/link.lds.S
arch/x86/setup.c
arch/x86/traps.c
build/files.mk
common/extable.c [new file with mode: 0644]
include/arch/x86/asm_macros.h
include/xtf/asm_macros.h
include/xtf/extable.h [new file with mode: 0644]
include/xtf/traps.h
tests/selftest/main.c