Skip to content

Commit

Permalink
libsel4simple-default,riscv: implement irq_trigger
Browse files Browse the repository at this point in the history
Wire up simple->irq_trigger to seL4_IRQControl_GetTrigger on risc-v.
This allows risc-v drivers in libplatsupport to register edge-triggered
interrupts.

Signed-off-by: Jimmy Brush <[email protected]>
  • Loading branch information
canarysnort01 committed Aug 21, 2023
1 parent 173c80c commit 69d3eb6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions libsel4simple-default/src/arch/riscv/default.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,21 @@

#include <vspace/page.h>

seL4_Error simple_default_get_irq(void *data, int irq, seL4_CNode root, seL4_Word index, uint8_t depth) {
seL4_Error simple_default_get_irq(void *data, int irq, seL4_CNode root, seL4_Word index, uint8_t depth)
{
return seL4_IRQControl_Get(seL4_CapIRQControl, irq, root, index, depth);
}

void
simple_default_init_arch_simple(arch_simple_t *simple, void *data)
seL4_Error simple_default_get_irq_trigger(void *data, int irq, int trigger, UNUSED int core, seL4_CNode root,
seL4_Word index, uint8_t depth)
{
return seL4_IRQControl_GetTrigger(seL4_CapIRQControl, irq, trigger, root, index, depth);
}

void simple_default_init_arch_simple(arch_simple_t *simple, void *data)
{
simple->data = data;
simple->irq = simple_default_get_irq;
simple->irq_trigger = simple_default_get_irq_trigger;
}

0 comments on commit 69d3eb6

Please sign in to comment.