Lines Matching +full:re +full:- +full:routed

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
109 return (-50); in madt_probe()
120 madt_length = madt->Header.Length; in madt_probe_cpus()
121 KASSERT(madt != NULL, ("Unable to re-map MADT")); in madt_probe_cpus()
154 if ((dmartbl->Flags & ACPI_DMAR_X2APIC_OPT_OUT) != 0) in madt_x2apic_disable_reason()
174 * It seems that some SandyBridge-based notebook in madt_x2apic_disable_reason()
247 lapic_init(madt->Address); in madt_setup_local()
249 (int)sizeof(madt->Header.OemId), madt->Header.OemId, in madt_setup_local()
250 (int)sizeof(madt->Header.OemTableId), madt->Header.OemTableId); in madt_setup_local()
253 * We ignore 64-bit local APIC override entries. Should we in madt_setup_local()
291 * force it to use level trigger and active-low polarity. in madt_setup_io()
300 "MADT: Forcing active-low polarity and level trigger for SCI\n"); in madt_setup_io()
330 SYSINIT(madt_register, SI_SUB_TUNABLES - 1, SI_ORDER_FIRST, madt_register, NULL);
339 acpi_walk_subtables(madt + 1, (char *)madt + madt->Header.Length, in madt_walk_table()
356 mp_maxid = mp_ncpus - 1; in madt_parse_cpu()
383 KASSERT(la->la_enabled == 0, ("Duplicate local APIC ID %u", apic_id)); in madt_add_cpu()
384 la->la_enabled = 1; in madt_add_cpu()
385 la->la_acpi_id = acpi_id; in madt_add_cpu()
395 switch (entry->Type) { in madt_probe_cpus_handler()
398 madt_parse_cpu(proc->Id, proc->LapicFlags); in madt_probe_cpus_handler()
402 madt_parse_cpu(x2apic->LocalApicId, x2apic->LapicFlags); in madt_probe_cpus_handler()
413 switch (entry->Type) { in madt_setup_cpus_handler()
416 madt_add_cpu(proc->ProcessorId, proc->Id, proc->LapicFlags); in madt_setup_cpus_handler()
420 madt_add_cpu(x2apic->Uid, x2apic->LocalApicId, in madt_setup_cpus_handler()
421 x2apic->LapicFlags); in madt_setup_cpus_handler()
434 switch (entry->Type) { in madt_parse_apics()
440 apic->Id, apic->GlobalIrqBase, in madt_parse_apics()
441 (void *)(uintptr_t)apic->Address); in madt_parse_apics()
442 if (apic->Id > IOAPIC_MAX_ID) in madt_parse_apics()
444 apic->Id); in madt_parse_apics()
445 if (ioapics[apic->Id].io_apic != NULL) in madt_parse_apics()
446 panic("%s: Double APIC ID %u", __func__, apic->Id); in madt_parse_apics()
447 ioapics[apic->Id].io_apic = ioapic_create(apic->Address, in madt_parse_apics()
448 apic->Id, apic->GlobalIrqBase); in madt_parse_apics()
449 ioapics[apic->Id].io_vector = apic->GlobalIrqBase; in madt_parse_apics()
530 best = -1; in madt_find_interrupt()
535 if (best == -1 || in madt_find_interrupt()
539 if (best == -1) in madt_find_interrupt()
542 *pin = intr - ioapics[best].io_vector; in madt_find_interrupt()
560 intr->SourceIrq, intr->GlobalIrq); in madt_parse_interrupt_values()
561 KASSERT(intr->Bus == 0, ("bus for interrupt overrides must be zero")); in madt_parse_interrupt_values()
567 *trig = interrupt_trigger(intr->IntiFlags, intr->SourceIrq); in madt_parse_interrupt_values()
568 *pol = interrupt_polarity(intr->IntiFlags, intr->SourceIrq); in madt_parse_interrupt_values()
572 * active-hi polarity or the force_sci_lo tunable is set, in madt_parse_interrupt_values()
575 if (intr->SourceIrq == AcpiGbl_FADT.SciInterrupt) { in madt_parse_interrupt_values()
615 if (acpi_quirks & ACPI_Q_MADT_IRQ0 && intr->SourceIrq == 0 && in madt_parse_interrupt_override()
616 intr->GlobalIrq == 2) { in madt_parse_interrupt_override()
622 if (madt_find_interrupt(intr->GlobalIrq, &new_ioapic, &new_pin) != 0) { in madt_parse_interrupt_override()
624 intr->GlobalIrq, intr->SourceIrq); in madt_parse_interrupt_override()
631 if (intr->SourceIrq != intr->GlobalIrq) { in madt_parse_interrupt_override()
633 * If the SCI is remapped to a non-ISA global interrupt, in madt_parse_interrupt_override()
637 if (intr->GlobalIrq > 15 && in madt_parse_interrupt_override()
638 intr->SourceIrq == AcpiGbl_FADT.SciInterrupt) in madt_parse_interrupt_override()
639 acpi_OverrideInterruptLevel(intr->GlobalIrq); in madt_parse_interrupt_override()
642 intr->SourceIrq); in madt_parse_interrupt_override()
643 if (madt_find_interrupt(intr->SourceIrq, &old_ioapic, in madt_parse_interrupt_override()
646 intr->SourceIrq); in madt_parse_interrupt_override()
648 intr->SourceIrq) in madt_parse_interrupt_override()
658 * Parse an entry for an NMI routed to an IO APIC.
666 if (madt_find_interrupt(nmi->GlobalIrq, &ioapic, &pin) != 0) { in madt_parse_nmi()
668 nmi->GlobalIrq); in madt_parse_nmi()
673 if (!(nmi->IntiFlags & ACPI_MADT_TRIGGER_CONFORMS)) in madt_parse_nmi()
675 interrupt_trigger(nmi->IntiFlags, 0)); in madt_parse_nmi()
676 if (!(nmi->IntiFlags & ACPI_MADT_POLARITY_CONFORMS)) in madt_parse_nmi()
678 interrupt_polarity(nmi->IntiFlags, 0)); in madt_parse_nmi()
682 * Parse an entry for an NMI routed to a local APIC LVT pin.
693 printf("MADT: Ignoring local NMI routed to " in madt_handle_local_nmi()
714 madt_handle_local_nmi(nmi->ProcessorId == 0xff ? 0xffffffff : in madt_parse_local_nmi()
715 nmi->ProcessorId, nmi->Lint, nmi->IntiFlags); in madt_parse_local_nmi()
722 madt_handle_local_nmi(nmi->Uid, nmi->Lint, nmi->IntiFlags); in madt_parse_local_x2apic_nmi()
732 switch (entry->Type) { in madt_parse_ints()
751 * Setup per-CPU ACPI IDs.
768 la = &lapics[pc->pc_apic_id]; in madt_set_ids()
769 if (!la->la_enabled) in madt_set_ids()
771 pc->pc_apic_id); in madt_set_ids()
772 pc->pc_acpi_id = la->la_acpi_id; in madt_set_ids()
775 la->la_acpi_id); in madt_set_ids()