コード例 #1
0
ファイル: vatpit.c プロジェクト: Alkzndr/freebsd
static void
vatpit_callout_handler(void *a)
{
	struct vatpit_callout_arg *arg = a;
	struct vatpit *vatpit;
	struct callout *callout;
	struct channel *c;

	vatpit = arg->vatpit;
	c = &vatpit->channel[arg->channel_num];
	callout = &c->callout;

	VM_CTR1(vatpit->vm, "atpit t%d fired", arg->channel_num);

	VATPIT_LOCK(vatpit);

	if (callout_pending(callout))		/* callout was reset */
		goto done;

	if (!callout_active(callout))		/* callout was stopped */
		goto done;

	callout_deactivate(callout);

	if (c->mode == TIMER_RATEGEN) {
		pit_timer_start_cntr0(vatpit);
	}

	vatpic_pulse_irq(vatpit->vm, 0);
	vioapic_pulse_irq(vatpit->vm, 2);

done:
	VATPIT_UNLOCK(vatpit);
	return;
}
コード例 #2
0
int
xh_vm_isa_pulse_irq(int atpic_irq, int ioapic_irq)
{
	int error;

	error = vatpic_pulse_irq(vm, atpic_irq);
	if ((error == 0) && (ioapic_irq != -1)) {
		error = vioapic_pulse_irq(vm, ioapic_irq);
	}

	return (error);
}
コード例 #3
0
int
xh_vm_ioapic_pulse_irq(int irq)
{
	return (vioapic_pulse_irq(vm, irq));
}