Signed-off-by: Ralf Ramsauer <[email protected]>
---
 inmates/lib/arm-common/gic-v2.c      | 7 +++++++
 inmates/lib/arm-common/include/gic.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/inmates/lib/arm-common/gic-v2.c b/inmates/lib/arm-common/gic-v2.c
index 1bc775cf..11741e20 100644
--- a/inmates/lib/arm-common/gic-v2.c
+++ b/inmates/lib/arm-common/gic-v2.c
@@ -45,6 +45,7 @@
 #define GICC_EOIR              0x0010
 #define GICD_CTLR              0x0000
 #define  GICD_CTLR_ENABLE      (1 << 0)
+#define GICD_SGIR              0xf00
 
 #define GICC_CTLR_GRPEN1       (1 << 0)
 
@@ -74,3 +75,9 @@ u32 gic_read_ack(void)
 {
        return mmio_read32(GICC_V2_BASE + GICC_IAR);
 }
+
+void gic_issue_sgi(u8 tfl, u8 targets, u8 id)
+{
+       mmio_write32(GICD_V2_BASE + GICD_SGIR,
+                    ((tfl & 0x3) << 24) | (targets << 16) | (id & 0xf));
+}
diff --git a/inmates/lib/arm-common/include/gic.h 
b/inmates/lib/arm-common/include/gic.h
index 584dbe02..591f5a1d 100644
--- a/inmates/lib/arm-common/include/gic.h
+++ b/inmates/lib/arm-common/include/gic.h
@@ -54,6 +54,7 @@
 int gic_init(void);
 void gic_enable(unsigned int irqn);
 void gic_write_eoi(u32 irqn);
+void gic_issue_sgi(u8 tfl, u8 targets, u8 id);
 u32 gic_read_ack(void);
 
 #endif /* !__ASSEMBLY__ */
-- 
2.14.1

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to