[rtems commit] bsp/qoriq: Fix hypervisor guest interrupt init

Sebastian Huber sebh at rtems.org
Mon Jan 22 09:39:58 UTC 2018


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Jan 17 09:39:16 2018 +0100

bsp/qoriq: Fix hypervisor guest interrupt init

Update #3085.

---

 c/src/lib/libbsp/powerpc/qoriq/irq/irq.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/c/src/lib/libbsp/powerpc/qoriq/irq/irq.c b/c/src/lib/libbsp/powerpc/qoriq/irq/irq.c
index 3ead10f..625b9fc 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/irq/irq.c
+++ b/c/src/lib/libbsp/powerpc/qoriq/irq/irq.c
@@ -126,6 +126,23 @@ void bsp_interrupt_dispatch(uintptr_t exception_number)
 
 rtems_status_code bsp_interrupt_facility_initialize(void)
 {
+	unsigned int i;
+
+	for (i = BSP_INTERRUPT_VECTOR_MIN; i <= BSP_INTERRUPT_VECTOR_MAX; ++i) {
+		uint32_t config;
+		unsigned int priority;
+		uint32_t destination;
+		unsigned int err;
+
+		err = ev_int_get_config(i, &config, &priority, &destination);
+		if (err != EV_SUCCESS)
+			continue;
+
+		priority = QORIQ_PIC_PRIORITY_DEFAULT;
+
+		ev_int_set_config(i, config, priority, destination);
+	}
+
 	return RTEMS_SUCCESSFUL;
 }
 
@@ -340,7 +357,8 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
 		for (i = BSP_INTERRUPT_VECTOR_MIN; i <= BSP_INTERRUPT_VECTOR_MAX; ++i) {
 			volatile qoriq_pic_src_cfg *src_cfg = get_src_cfg(i);
 
-			src_cfg->vpr = VPR_MSK | VPR_P | VPR_PRIORITY(1) | VPR_VECTOR(i);
+			src_cfg->vpr = VPR_MSK | VPR_P
+				| VPR_PRIORITY(QORIQ_PIC_PRIORITY_DEFAULT) | VPR_VECTOR(i);
 
 			if (!pic_is_ipi(i)) {
 				src_cfg->dr = 0x1;



More information about the vc mailing list