ia64/xen-unstable

changeset 12577:97c552510470

[MINIOS] Exports a function to have all Xen ports unbound.

This is necessary when using mini-os as the foundation for a boot-loader.

Signed-off-by: Jacob Gorm Hansen <jacobg@diku.dk>
author kfraser@localhost.localdomain
date Mon Nov 27 10:03:35 2006 +0000 (2006-11-27)
parents 50467f56ed65
children b0a86eda868a
files extras/mini-os/events.c
line diff
     1.1 --- a/extras/mini-os/events.c	Mon Nov 27 10:02:24 2006 +0000
     1.2 +++ b/extras/mini-os/events.c	Mon Nov 27 10:03:35 2006 +0000
     1.3 @@ -35,6 +35,21 @@ typedef struct _ev_action_t {
     1.4  static ev_action_t ev_actions[NR_EVS];
     1.5  void default_handler(evtchn_port_t port, struct pt_regs *regs, void *data);
     1.6  
     1.7 +void unbind_all_ports(void)
     1.8 +{
     1.9 +    int i;
    1.10 +
    1.11 +	for(i=0;i<NR_EVS;i++)
    1.12 +	{
    1.13 +		if(ev_actions[i].handler != default_handler)
    1.14 +		{
    1.15 +			struct evtchn_close close;
    1.16 +			mask_evtchn(i);
    1.17 +			close.port = i;
    1.18 +			HYPERVISOR_event_channel_op(EVTCHNOP_close, &close);
    1.19 +		}
    1.20 +	}
    1.21 +}
    1.22  
    1.23  /*
    1.24   * Demux events to different handlers.