summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/link_defs.h1
-rw-r--r--include/task.h17
2 files changed, 18 insertions, 0 deletions
diff --git a/include/link_defs.h b/include/link_defs.h
index efabebe300..f2da82262f 100644
--- a/include/link_defs.h
+++ b/include/link_defs.h
@@ -95,6 +95,7 @@ extern const struct mkbp_event_source __mkbp_evt_srcs_end[];
extern const struct irq_priority __irqprio[];
extern const struct irq_priority __irqprio_end[];
extern const void *__irqhandler[];
+extern const struct irq_def __irq_data[], __irq_data_end[];
/* Shared memory buffer. Use via shared_mem.h interface. */
extern uint8_t __shared_mem_buf[];
diff --git a/include/task.h b/include/task.h
index d56a91986e..d68cd74ea2 100644
--- a/include/task.h
+++ b/include/task.h
@@ -329,6 +329,23 @@ struct irq_priority {
};
/*
+ * Some cores may make use of this struct for mapping irqs to handlers
+ * for DECLARE_IRQ in a linker-script defined section.
+ */
+struct irq_def {
+ int irq;
+
+ /* The routine which was declared as an IRQ */
+ void (*routine)(void);
+
+ /*
+ * The routine usually needs wrapped so the core can handle it
+ * as an IRQ.
+ */
+ void (*handler)(void);
+};
+
+/*
* Implement the DECLARE_IRQ(irq, routine, priority) macro which is
* a core specific helper macro to declare an interrupt handler "routine".
*/