[rtems commit] bsps/riscv: Fix bsp_fdt_map_intr()

Sebastian Huber sebh at rtems.org
Wed Nov 23 06:43:33 UTC 2022


Module:    rtems
Branch:    master
Commit:    5756a6af10a4c0d2ea71689fd4416f02c0a8c6e3
Changeset: http://git.rtems.org/rtems/commit/?id=5756a6af10a4c0d2ea71689fd4416f02c0a8c6e3

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Nov 23 07:27:48 2022 +0100

bsps/riscv: Fix bsp_fdt_map_intr()

The interrupt numbers in the device tree are usually PLIC interrupts.  Map the
number to the vector number associated with an external interrupt.

---

 bsps/riscv/riscv/start/bspstart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bsps/riscv/riscv/start/bspstart.c b/bsps/riscv/riscv/start/bspstart.c
index 66e2934013..30d479ce88 100644
--- a/bsps/riscv/riscv/start/bspstart.c
+++ b/bsps/riscv/riscv/start/bspstart.c
@@ -212,7 +212,7 @@ uint32_t riscv_get_core_frequency(void)
 uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells)
 {
   (void) icells;
-  return intr[0];
+  return RISCV_INTERRUPT_VECTOR_EXTERNAL(intr[0]);
 }
 
 void bsp_start(void)



More information about the vc mailing list