Add code for ACPI PCI link object manipulation.
This allocate the best IRQ to boot-disable devices (have IRQ 0). Allocated IRQ will be used for PCI interrupt routing when ACPI is enabled. Note that verbose messaging enabled for the time being so that people can easily notice the strange behavior if it happened.
This commit is contained in:
parent
d8a44cf9b4
commit
dab1d6684a
@ -234,6 +234,7 @@ dev/acpica/acpi_cpu.c optional acpica
|
||||
dev/acpica/acpi_ec.c optional acpica
|
||||
dev/acpica/acpi_lid.c optional acpica
|
||||
dev/acpica/acpi_pci.c optional acpica pci
|
||||
dev/acpica/acpi_pci_link.c optional acpica pci
|
||||
dev/acpica/acpi_pcib.c optional acpica pci
|
||||
dev/acpica/acpi_pcib_acpi.c optional acpica pci
|
||||
dev/acpica/acpi_pcib_pci.c optional acpica pci
|
||||
|
@ -87,9 +87,17 @@ acpi_pcib_attach(device_t dev, ACPI_BUFFER *prt, int busno)
|
||||
/*
|
||||
* Now go scan the bus.
|
||||
*/
|
||||
acpi_pci_link_config(dev, prt, busno);
|
||||
return_VALUE(bus_generic_attach(dev));
|
||||
}
|
||||
|
||||
int
|
||||
acpi_pcib_resume(device_t dev, ACPI_BUFFER *prt, int busno)
|
||||
{
|
||||
acpi_pci_link_resume(dev, prt, busno);
|
||||
return (bus_generic_resume(dev));
|
||||
}
|
||||
|
||||
/*
|
||||
* Route an interrupt for a child of the bridge.
|
||||
*
|
||||
|
@ -62,6 +62,7 @@ struct acpi_hpcib_softc {
|
||||
|
||||
static int acpi_pcib_acpi_probe(device_t bus);
|
||||
static int acpi_pcib_acpi_attach(device_t bus);
|
||||
static int acpi_pcib_acpi_resume(device_t bus);
|
||||
static int acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result);
|
||||
static int acpi_pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value);
|
||||
static u_int32_t acpi_pcib_read_config(device_t dev, int bus, int slot, int func, int reg, int bytes);
|
||||
@ -76,7 +77,7 @@ static device_method_t acpi_pcib_acpi_methods[] = {
|
||||
DEVMETHOD(device_attach, acpi_pcib_acpi_attach),
|
||||
DEVMETHOD(device_shutdown, bus_generic_shutdown),
|
||||
DEVMETHOD(device_suspend, bus_generic_suspend),
|
||||
DEVMETHOD(device_resume, bus_generic_resume),
|
||||
DEVMETHOD(device_resume, acpi_pcib_acpi_resume),
|
||||
|
||||
/* Bus interface */
|
||||
DEVMETHOD(bus_print_child, bus_generic_print_child),
|
||||
@ -180,6 +181,14 @@ acpi_pcib_acpi_attach(device_t dev)
|
||||
return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_bus));
|
||||
}
|
||||
|
||||
static int
|
||||
acpi_pcib_acpi_resume(device_t dev)
|
||||
{
|
||||
struct acpi_hpcib_softc *sc = device_get_softc(dev);
|
||||
|
||||
return (acpi_pcib_resume(dev, &sc->ap_prt, sc->ap_bus));
|
||||
}
|
||||
|
||||
/*
|
||||
* Support for standard PCI bridge ivars.
|
||||
*/
|
||||
|
@ -64,6 +64,7 @@ struct acpi_pcib_lookup_info {
|
||||
|
||||
static int acpi_pcib_pci_probe(device_t bus);
|
||||
static int acpi_pcib_pci_attach(device_t bus);
|
||||
static int acpi_pcib_pci_resume(device_t bus);
|
||||
static int acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result);
|
||||
static int acpi_pcib_pci_route_interrupt(device_t pcib,
|
||||
device_t dev, int pin);
|
||||
@ -74,7 +75,7 @@ static device_method_t acpi_pcib_pci_methods[] = {
|
||||
DEVMETHOD(device_attach, acpi_pcib_pci_attach),
|
||||
DEVMETHOD(device_shutdown, bus_generic_shutdown),
|
||||
DEVMETHOD(device_suspend, bus_generic_suspend),
|
||||
DEVMETHOD(device_resume, bus_generic_resume),
|
||||
DEVMETHOD(device_resume, acpi_pcib_pci_resume),
|
||||
|
||||
/* Bus interface */
|
||||
DEVMETHOD(bus_print_child, bus_generic_print_child),
|
||||
@ -131,6 +132,14 @@ acpi_pcib_pci_attach(device_t dev)
|
||||
return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_pcibsc.secbus));
|
||||
}
|
||||
|
||||
static int
|
||||
acpi_pcib_pci_resume(device_t dev)
|
||||
{
|
||||
struct acpi_pcib_softc *sc = device_get_softc(dev);
|
||||
|
||||
return (acpi_pcib_resume(dev, &sc->ap_prt, sc->ap_pcibsc.secbus));
|
||||
}
|
||||
|
||||
static int
|
||||
acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
|
||||
{
|
||||
|
@ -33,5 +33,9 @@
|
||||
int acpi_pcib_attach(device_t bus, ACPI_BUFFER *prt, int busno);
|
||||
int acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin,
|
||||
ACPI_BUFFER *ptrbuf);
|
||||
int acpi_pcib_resume(device_t bus, ACPI_BUFFER *prt, int busno);
|
||||
|
||||
int acpi_pci_link_config(device_t pcib, ACPI_BUFFER *prt, int busno);
|
||||
int acpi_pci_link_resume(device_t pcib, ACPI_BUFFER *prt, int busno);
|
||||
|
||||
#endif
|
||||
|
@ -39,6 +39,7 @@ SRCS+= acpi.c acpi_acad.c acpi_battery.c acpi_button.c acpi_cmbat.c acpi_cpu.c
|
||||
SRCS+= acpi_ec.c acpi_lid.c acpi_pci.c acpi_pcib.c acpi_pcib_acpi.c
|
||||
SRCS+= acpi_pcib_pci.c acpi_powerres.c acpi_resource.c acpi_thermal.c
|
||||
SRCS+= acpi_timer.c acpica_support.c
|
||||
SRCS+= acpi_pci_link.c
|
||||
SRCS+= OsdDebug.c
|
||||
SRCS+= OsdHardware.c OsdInterrupt.c OsdMemory.c OsdSchedule.c
|
||||
SRCS+= OsdStream.c OsdSynch.c OsdTable.c OsdEnvironment.c
|
||||
|
Loading…
Reference in New Issue
Block a user