aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/events.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-07-02 17:26:42 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-07-02 17:26:42 +0100
commit38cfc3b8d0bcfd2250bafa8efe1714f1b522d3fc (patch)
tree2076432063664702d6834595f470a6225ab0dd65 /extras/mini-os/events.c
parent9194f26eba9e7ce3c27863dabddafe46fcfdba58 (diff)
downloadxen-38cfc3b8d0bcfd2250bafa8efe1714f1b522d3fc.tar.gz
xen-38cfc3b8d0bcfd2250bafa8efe1714f1b522d3fc.tar.bz2
xen-38cfc3b8d0bcfd2250bafa8efe1714f1b522d3fc.zip
minios: PIRQ and MSI/MSI-X support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/events.c')
-rw-r--r--extras/mini-os/events.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/extras/mini-os/events.c b/extras/mini-os/events.c
index 87f54ef5eb..e89d7478fa 100644
--- a/extras/mini-os/events.c
+++ b/extras/mini-os/events.c
@@ -136,6 +136,23 @@ evtchn_port_t bind_virq(uint32_t virq, evtchn_handler_t handler, void *data)
return op.port;
}
+evtchn_port_t bind_pirq(uint32_t pirq, int will_share, evtchn_handler_t handler, void *data)
+{
+ evtchn_bind_pirq_t op;
+
+ /* Try to bind the pirq to a port */
+ op.pirq = pirq;
+ op.flags = will_share ? BIND_PIRQ__WILL_SHARE : 0;
+
+ if ( HYPERVISOR_event_channel_op(EVTCHNOP_bind_pirq, &op) != 0 )
+ {
+ printk("Failed to bind physical IRQ %d\n", pirq);
+ return -1;
+ }
+ bind_evtchn(op.port, handler, data);
+ return op.port;
+}
+
#if defined(__x86_64__)
char irqstack[2 * STACK_SIZE];