seL4/include/plat
Jack Suann cea45cd1bd x86: Handling pending interrupts in kernel mode
This commit allows x86 to completely handle a pending interrupt without switching
out to user mode. To handle an interrupt on x86 the APIC *must* generate an exception,
prior to you being able to acknowledge it. Previously we only allow exceptions (i.e.
interrupts) to be generated outside of kernel mode when we are in user mode.

This change allows us to 'poll' for an interrupt and transition the APIC whilst in kernel
mode by enabling and taking interrupts at carefully defined points. A pending interrupt
will be stored by the exception handler, allowing us to then handle the interrupt and
acknowledge the hardware APIC. Handling is done by waiting until after we have 'left' the
kernel and are about to switch to user mode and then 'entering' the kernel again by jumping
to the interrupt entry point.

Handling interrupts entirely in kernel mode provides two advantages
 * It will allow, in the future, the ability to handle kernel interrupts in situations
   where we need to handle the interrupt before actually performing the hardware switch
   back to user mode. This case happens where the user thread is using vt-x and so
   pending interrupts do not generate an interrupt exception, but rather cause an exception
   to be generated telling the system that there is a pending interrupt
 * Where there are multiple pending interrupts it is more efficient to avoid additional
   switches in and out of the user thread

Whilst this change does not enable pre-emption points to handle the interrupt before
returning out of `handleSyscall` it should be easily implementable with what is provided.
2017-02-01 12:44:14 +11:00
..
allwinnerA20/plat SELFOUR-222: Configure IRQ cnode size per platform 2016-11-08 11:48:31 +11:00
am335x Define CONFIG_MAX_NUM_NODES and CONFIG_KERNEL_STACK_BITS in plat/autoconf.h 2017-01-17 17:03:07 +11:00
apq8064 Define CONFIG_MAX_NUM_NODES and CONFIG_KERNEL_STACK_BITS in plat/autoconf.h 2017-01-17 17:03:07 +11:00
bcm2837/plat Remove many MODIFIES annotations. 2016-12-12 17:30:51 +11:00
exynos4 Define CONFIG_MAX_NUM_NODES and CONFIG_KERNEL_STACK_BITS in plat/autoconf.h 2017-01-17 17:03:07 +11:00
exynos5 Define CONFIG_MAX_NUM_NODES and CONFIG_KERNEL_STACK_BITS in plat/autoconf.h 2017-01-17 17:03:07 +11:00
hikey hikey: Add the rest of the dual timers for hi6220 2017-02-01 11:17:46 +11:00
imx6 arm: SELFOUR-779: Remove ARM_MPCORE config 2017-01-23 09:45:34 +11:00
imx7 Define CONFIG_MAX_NUM_NODES and CONFIG_KERNEL_STACK_BITS in plat/autoconf.h 2017-01-17 17:03:07 +11:00
imx31 Define CONFIG_MAX_NUM_NODES and CONFIG_KERNEL_STACK_BITS in plat/autoconf.h 2017-01-17 17:03:07 +11:00
omap3 Define CONFIG_MAX_NUM_NODES and CONFIG_KERNEL_STACK_BITS in plat/autoconf.h 2017-01-17 17:03:07 +11:00
pc99 x86: Handling pending interrupts in kernel mode 2017-02-01 12:44:14 +11:00
tk1 arm: SELFOUR-779: Remove ARM_MPCORE config 2017-01-23 09:45:34 +11:00
zynq7000 Define CONFIG_MAX_NUM_NODES and CONFIG_KERNEL_STACK_BITS in plat/autoconf.h 2017-01-17 17:03:07 +11:00