zephyr/arch/x86/core/Makefile

19 lines
596 B
Makefile
Raw Normal View History

ccflags-y += -I$(srctree)/kernel/nanokernel/include
ccflags-y += -I$(srctree)/kernel/microkernel/include
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
# To create dynamic stubs we need to do a .rept on the total number of
# stubs divided by a constant, this prevents GAS from thinking the '/'
# character starts a comment
KBUILD_AFLAGS += -Wa,--divide
obj-y = gdt.o thread.o fatal.o cpuhalt.o \
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
excstub.o swap.o msr.o dynamic.o \
excconnect.o sys_fatal_error_handler.o \
crt0.o driver_static_irq_stubs.o \
atomic.o cache_s.o cache.o intconnect.o \
intstub.o
obj-$(CONFIG_FP_SHARING) += float.o
obj-$(CONFIG_MICROKERNEL) += strtask.o