[PATCH 00/41] Document, enhance, and test Interrupt Manager Extension
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Jul 12 12:49:22 UTC 2021
This patch set enhances the Interrupt Manager Extension so that it can be
tested with generic tests. The following new directives are introduced for
this purpose:
* rtems_interrupt_get_attributes()
* rtems_interrupt_vector_is_enabled()
* rtems_interrupt_vector_enable()
* rtems_interrupt_vector_disable()
* rtems_interrupt_is_pending()
* rtems_interrupt_cause_on()
The documentation and the implementation for the following directives is also
provided:
* rtems_interrupt_cause()
* rtems_interrupt_clear()
A default implementation is provided for all BSPs so that the new test cases
link. A proper implementation is provided for SPARC BSPs and AArch32/AArch64
BSPs which use the GIC. I used an i.MX7D BSP to run the tests on real
hardware. The tests don't run on Qemu currently due to a bug in the GIC
emulation:
https://lists.gnu.org/archive/html/qemu-devel/2021-07/msg02500.html
The following new directives were added to support interrupt handlers which are
managed through user-provided storage (rtems_interrupt_entry):
* rtems_interrupt_entry_initialize()
* rtems_interrupt_entry_install()
* rtems_interrupt_entry_remove()
All directives are documented in the RTEMS Classic API Guide:
https://ftp.rtems.org/pub/rtems/people/sebh/c-user.pdf
See also:
https://lists.rtems.org/pipermail/devel/2019-October/055770.html
https://devel.rtems.org/ticket/3269
Sebastian Huber (41):
bsps/irq: Move get/set affinity to separate file
bsps/irq: Canonicalize get/set affinity errors
bsps/irq: Move handler iterate to separate file
rtems: Add rtems_interrupt_cause_on()
rtems: Generate <rtems/irq-extension.h>
rtems: Add rtems_interrupt_get_attributes()
rtems: Add rtems_interrupt_vector_enable()
rtems: Add rtems_interrupt_vector_is_enabled()
rtems: Add rtems_interrupt_is_pending()
rtems: Add RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPT
bsps/irq: Add rtems_interrupt_vector_is_enabled()
bsps/irq: Add rtems_interrupt_cause()
bsps/irq: Add rtems_interrupt_get_attributes()
bsps/irq: Add rtems_interrupt_is_pending()
bsps/irq: bsp_interrupt_vector_enable()
bsps/irq: bsp_interrupt_vector_disable()
bsps/irq: bsp_interrupt_get_affinity()
bsps/irq: bsp_interrupt_set_affinity()
bsps/irq: Implement new directives for GICv2/3
sparc/irq: Implement new interrupt directives
rtems: Add rtems_interrupt_entry_install()
bsps/irq: Use rtems_interrupt_entry
bsps/irq: Add bsp_interrupt_check_and_lock()
bsps/irq: Move bsp_interrupt_handler_is_empty()
bsps/irq: Add rtems_interrupt_entry_install()
bsp/raspberrypi: Add interrupt get/set affinity
validation: Add CallWithinISR()
validation: HasInterruptVectorEntriesInstalled()
validation: GetValidInterruptVectorNumber()
validation: Test rtems_interrupt_get_attributes()
validation: rtems_interrupt_vector_is_enabled()
validation: Test rtems_interrupt_vector_enable()
validation: Test rtems_interrupt_vector_disable()
validation: Test rtems_interrupt_entry_install()
validation: Test rtems_interrupt_entry_remove()
validation: Test rtems_interrupt_cause()
validation: Test rtems_interrupt_clear()
validation: Test rtems_interrupt_is_pending()
validation: Test rtems_interrupt_cause_on()
validation: Test rtems_interrupt_get_affinity()
validation: Test rtems_interrupt_set_affinity()
bsps/arm/beagle/irq/irq.c | 48 +-
bsps/arm/csb336/irq/irq.c | 50 +-
bsps/arm/csb337/irq/irq.c | 48 +-
bsps/arm/edb7312/irq/irq.c | 50 +-
bsps/arm/gumstix/irq/irq.c | 48 +-
bsps/arm/lpc24xx/irq/irq.c | 48 +-
bsps/arm/lpc32xx/irq/irq.c | 50 +-
bsps/arm/raspberrypi/include/bsp/irq.h | 26 +
bsps/arm/raspberrypi/irq/irq.c | 59 +-
bsps/arm/rtl22xx/irq/irq.c | 48 +-
bsps/arm/shared/irq/irq-armv7m.c | 48 +-
bsps/arm/smdk2410/irq/irq.c | 48 +-
bsps/arm/tms570/irq/irq.c | 48 +-
bsps/i386/shared/irq/irq.c | 53 +-
bsps/include/bsp/irq-generic.h | 429 ++-
bsps/include/dev/irq/arm-gic-irq.h | 7 +-
bsps/lm32/shared/irq/irq.c | 48 +-
bsps/m68k/genmcf548x/include/bsp/irq.h | 8 +
bsps/m68k/genmcf548x/irq/irq.c | 188 +-
bsps/mips/shared/irq/irq.c | 48 +-
bsps/powerpc/gen5200/irq/irq.c | 50 +-
bsps/powerpc/gen83xx/irq/irq.c | 50 +-
bsps/powerpc/mpc55xxevb/start/irq.c | 48 +-
bsps/powerpc/mpc8260ads/irq/irq.c | 50 +-
bsps/powerpc/psim/irq/irq_init.c | 48 +-
bsps/powerpc/qemuppc/irq/irq_init.c | 48 +-
bsps/powerpc/qoriq/include/bsp/irq.h | 4 +-
bsps/powerpc/qoriq/irq/irq.c | 126 +-
bsps/powerpc/shared/irq/ppc-irq-generic.c | 48 +-
bsps/powerpc/t32mppc/include/bsp/irq.h | 6 +-
bsps/powerpc/t32mppc/irq/irq.c | 48 +-
bsps/powerpc/tqm8xx/irq/irq.c | 50 +-
bsps/powerpc/virtex/irq/irq_init.c | 50 +-
bsps/riscv/griscv/include/bsp/irq.h | 4 +-
bsps/riscv/griscv/irq/irq.c | 67 +-
bsps/riscv/riscv/include/bsp/irq.h | 4 +-
bsps/riscv/riscv/irq/irq.c | 73 +-
bsps/shared/dev/irq/arm-gicv2.c | 138 +-
bsps/shared/dev/irq/arm-gicv3.c | 182 +-
bsps/shared/irq-default-sources.am | 7 +
bsps/shared/irq-sources.am | 7 +
bsps/shared/irq/irq-affinity.c | 106 +
bsps/shared/irq/irq-cause-clear.c | 100 +
bsps/shared/irq/irq-default-handler.c | 12 +-
bsps/shared/irq/irq-default.c | 48 +-
bsps/shared/irq/irq-enable-disable.c | 101 +
bsps/shared/irq/irq-entry-remove.c | 115 +
bsps/shared/irq/irq-generic.c | 643 ++--
bsps/shared/irq/irq-handler-install.c | 114 +
bsps/shared/irq/irq-handler-iterate.c | 72 +
bsps/shared/irq/irq-handler-remove.c | 80 +
bsps/sparc/erc32/include/bsp/irq.h | 6 +-
bsps/sparc/leon3/include/bsp/irq.h | 4 +-
bsps/sparc/leon3/start/eirq.c | 135 +-
bsps/sparc/shared/irq/irq-shared.c | 70 +-
bsps/x86_64/amd64/interrupts/idt.c | 49 +-
c/src/lib/libbsp/m68k/genmcf548x/Makefile.am | 6 +-
c/src/lib/libbsp/powerpc/ss555/Makefile.am | 7 +
cpukit/include/rtems/irq-extension.h | 2633 +++++++++++++----
cpukit/include/rtems/rtems/intr.h | 162 +-
cpukit/include/rtems/score/interr.h | 7 +
cpukit/sapi/src/fatalsrctext.c | 3 +-
spec/build/bsps/m68k/genmcf548x/grp.yml | 2 +
spec/build/bsps/m68k/genmcf548x/obj.yml | 5 -
spec/build/bsps/objirq.yml | 7 +
spec/build/bsps/powerpc/ss555/bspss555.yml | 7 +
.../testsuites/validation/libvalidation.yml | 2 +
.../testsuites/validation/validation-0.yml | 12 +
testsuites/sptests/spinternalerror02/init.c | 2 +-
testsuites/validation/tc-intr-cause-on.c | 710 +++++
testsuites/validation/tc-intr-cause.c | 577 ++++
testsuites/validation/tc-intr-clear.c | 586 ++++
testsuites/validation/tc-intr-entry-install.c | 1222 ++++++++
testsuites/validation/tc-intr-entry-remove.c | 1302 ++++++++
testsuites/validation/tc-intr-get-affinity.c | 639 ++++
.../validation/tc-intr-get-attributes.c | 445 +++
testsuites/validation/tc-intr-is-pending.c | 630 ++++
testsuites/validation/tc-intr-set-affinity.c | 670 +++++
.../validation/tc-intr-vector-disable.c | 608 ++++
testsuites/validation/tc-intr-vector-enable.c | 641 ++++
.../validation/tc-intr-vector-is-enabled.c | 627 ++++
testsuites/validation/ts-default.h | 12 +-
testsuites/validation/ts-validation-0.c | 2 +-
testsuites/validation/tx-call-within-isr.c | 134 +
testsuites/validation/tx-interrupt.c | 105 +
testsuites/validation/tx-support.h | 21 +
86 files changed, 14542 insertions(+), 1407 deletions(-)
create mode 100644 bsps/shared/irq/irq-affinity.c
create mode 100644 bsps/shared/irq/irq-cause-clear.c
create mode 100644 bsps/shared/irq/irq-enable-disable.c
create mode 100644 bsps/shared/irq/irq-entry-remove.c
create mode 100644 bsps/shared/irq/irq-handler-install.c
create mode 100644 bsps/shared/irq/irq-handler-iterate.c
create mode 100644 bsps/shared/irq/irq-handler-remove.c
create mode 100644 testsuites/validation/tc-intr-cause-on.c
create mode 100644 testsuites/validation/tc-intr-cause.c
create mode 100644 testsuites/validation/tc-intr-clear.c
create mode 100644 testsuites/validation/tc-intr-entry-install.c
create mode 100644 testsuites/validation/tc-intr-entry-remove.c
create mode 100644 testsuites/validation/tc-intr-get-affinity.c
create mode 100644 testsuites/validation/tc-intr-get-attributes.c
create mode 100644 testsuites/validation/tc-intr-is-pending.c
create mode 100644 testsuites/validation/tc-intr-set-affinity.c
create mode 100644 testsuites/validation/tc-intr-vector-disable.c
create mode 100644 testsuites/validation/tc-intr-vector-enable.c
create mode 100644 testsuites/validation/tc-intr-vector-is-enabled.c
create mode 100644 testsuites/validation/tx-call-within-isr.c
create mode 100644 testsuites/validation/tx-interrupt.c
--
2.26.2
More information about the devel
mailing list