Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/acpica/acpi_pcib.c
Show First 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
ACPI_PCI_ROUTING_TABLE *prt; | ACPI_PCI_ROUTING_TABLE *prt; | ||||
struct prt_lookup_request pr; | struct prt_lookup_request pr; | ||||
ACPI_HANDLE lnkdev; | ACPI_HANDLE lnkdev; | ||||
int interrupt; | int interrupt; | ||||
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); | ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); | ||||
lnkdev = NULL; | |||||
interrupt = PCI_INVALID_IRQ; | interrupt = PCI_INVALID_IRQ; | ||||
/* ACPI numbers pins 0-3, not 1-4 like the BIOS. */ | /* ACPI numbers pins 0-3, not 1-4 like the BIOS. */ | ||||
pin--; | pin--; | ||||
ACPI_SERIAL_BEGIN(pcib); | ACPI_SERIAL_BEGIN(pcib); | ||||
/* Search for a matching entry in the routing table. */ | /* Search for a matching entry in the routing table. */ | ||||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin, | ||||
prt->SourceIndex); | prt->SourceIndex); | ||||
if (bootverbose && PCI_INTERRUPT_VALID(interrupt)) | if (bootverbose && PCI_INTERRUPT_VALID(interrupt)) | ||||
device_printf(pcib, "slot %d INT%c routed to irq %d via %s\n", | device_printf(pcib, "slot %d INT%c routed to irq %d via %s\n", | ||||
pci_get_slot(dev), 'A' + pin, interrupt, acpi_name(lnkdev)); | pci_get_slot(dev), 'A' + pin, interrupt, acpi_name(lnkdev)); | ||||
out: | out: | ||||
ACPI_SERIAL_END(pcib); | ACPI_SERIAL_END(pcib); | ||||
#ifdef INTRNG | |||||
if (PCI_INTERRUPT_VALID(interrupt)) { | |||||
interrupt = acpi_map_intr(dev, interrupt, lnkdev); | |||||
KASSERT(PCI_INTERRUPT_VALID(interrupt), ("mapping fail")); | |||||
} | |||||
#endif | |||||
return_VALUE(interrupt); | return_VALUE(interrupt); | ||||
} | } | ||||
int | int | ||||
acpi_pcib_power_for_sleep(device_t pcib, device_t dev, int *pstate) | acpi_pcib_power_for_sleep(device_t pcib, device_t dev, int *pstate) | ||||
{ | { | ||||
device_t acpi_dev; | device_t acpi_dev; | ||||
Show All 12 Lines |