FreeBSD/sys/x86/acpica/madt.c
/*
 * Parse an interrupt source override for an ISA interrupt.
 */
Parse an interrupt source override for an ISA interrupt.
Parse an interrupt source override for an ISA interrupt .
static void
madt_parse_interrupt_override(ACPI_MADT_INTERRUPT_OVERRIDE *intr)
{
	void *new_ioapic, *old_ioapic;
	u_int new_pin, old_pin;
	enum intr_trigger trig;
	enum intr_polarity pol;
	if (acpi_quirks & ACPI_Q_MADT_IRQ0 && intr->SourceIrq == 0 &&
	    intr->GlobalIrq == 2) {
		if (bootverbose)
			printf("MADT: Skipping timer override\n");
		return;
	}
	if (madt_find_interrupt(intr->GlobalIrq, &new_ioapic, &new_pin) != 0) {
		printf("MADT: Could not find APIC for vector %u (IRQ %u)\n",
		    intr->GlobalIrq, intr->SourceIrq);
		return;
	}
	madt_parse_interrupt_values(intr, &trig, &pol);
	if (intr->SourceIrq != intr->GlobalIrq) {
		if (intr->GlobalIrq > 15 &&
		    intr->SourceIrq == AcpiGbl_FADT.SciInterrupt)
			acpi_OverrideInterruptLevel(intr->GlobalIrq);
		else
			ioapic_remap_vector(new_ioapic, new_pin,
			    intr->SourceIrq);
		if (madt_find_interrupt(intr->SourceIrq, &old_ioapic,
		    &old_pin) != 0)
			printf("MADT: Could not find APIC for source IRQ %u\n",
			    intr->SourceIrq);
		else if (ioapic_get_vector(old_ioapic, old_pin) ==
		    intr->SourceIrq)
			ioapic_disable_pin(old_ioapic, old_pin);
	}
	ioapic_set_triggermode(new_ioapic, new_pin, trig);
	ioapic_set_polarity(new_ioapic, new_pin, pol);
}
static void madt_parse_interrupt_override ( ACPI_MADT_INTERRUPT_OVERRIDE * intr ) { void * new_ioapic , * old_ioapic ; u_int new_pin , old_pin ; enum intr_trigger trig ; enum intr_polarity pol ; if ( acpi_quirks & ACPI_Q_MADT_IRQ0 && intr -> SourceIrq == 0 && intr -> GlobalIrq == 2 ) { if ( bootverbose ) printf ( " \n " ) ; return ; } if ( madt_find_interrupt ( intr -> GlobalIrq , & new_ioapic , & new_pin ) != 0 ) { printf ( " \n " , intr -> GlobalIrq , intr -> SourceIrq ) ; return ; } madt_parse_interrupt_values ( intr , & trig , & pol ) ; if ( intr -> SourceIrq != intr -> GlobalIrq ) { if ( intr -> GlobalIrq > 15 && intr -> SourceIrq == AcpiGbl_FADT . SciInterrupt ) acpi_OverrideInterruptLevel ( intr -> GlobalIrq ) ; else ioapic_remap_vector ( new_ioapic , new_pin , intr -> SourceIrq ) ; if ( madt_find_interrupt ( intr -> SourceIrq , & old_ioapic , & old_pin ) != 0 ) printf ( " \n " , intr -> SourceIrq ) ; else if ( ioapic_get_vector ( old_ioapic , old_pin ) == intr -> SourceIrq ) ioapic_disable_pin ( old_ioapic , old_pin ) ; } ioapic_set_triggermode ( new_ioapic , new_pin , trig ) ; ioapic_set_polarity ( new_ioapic , new_pin , pol ) ; }
Parse an interrupt source override for an ISA interrupt.
Parse an interrupt source override for an ISA interrupt .
/* Remap the IRQ if it is mapped to a different interrupt vector. */ /*
		 * If the SCI is remapped to a non-ISA global interrupt,
		 * then override the vector we use to setup and allocate
		 * the interrupt.
		 */ /* Program the polarity and trigger mode. */