Example #1
0
int
acpi_machdep_init(device_t dev)
{
	struct	acpi_softc *sc;
	int intr_model;

	acpi_dev = dev;
	sc = device_get_softc(acpi_dev);

	/*
	 * XXX: Prevent the PnP BIOS code from interfering with
	 * our own scan of ISA devices.
	 */
	PnPBIOStable = NULL;

	acpi_capm_init(sc);

	acpi_install_wakeup_handler(sc);

	if (ioapic_enable)
		intr_model = ACPI_INTR_APIC;
	else
		intr_model = ACPI_INTR_PIC;

	if (intr_model != ACPI_INTR_PIC)
		acpi_SetIntrModel(intr_model);

	SYSCTL_ADD_UINT(&sc->acpi_sysctl_ctx,
	    SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO,
	    "reset_video", CTLFLAG_RD | CTLFLAG_RW, &acpi_reset_video, 0,
	    "Call the VESA reset BIOS vector on the resume path");

	return (0);
}
Example #2
0
int
acpi_machdep_init(device_t dev)
{
	struct	acpi_softc *sc;

	acpi_dev = dev;
	if ((sc = device_get_softc(acpi_dev)) == NULL) {
		return (ENXIO);
	}

	/*
	 * XXX: Prevent the PnP BIOS code from interfering with
	 * our own scan of ISA devices.
	 */
	PnPBIOStable = NULL;

	acpi_capm_init(sc);

	acpi_install_wakeup_handler(sc);

#ifdef SMP
	acpi_SetIntrModel(ACPI_INTR_APIC);
#endif
	return (0);
}
Example #3
0
int
acpi_machdep_init(device_t dev)
{
	struct	acpi_softc *acpi_sc;

	acpi_sc = devclass_get_softc(devclass_find("acpi"), 0);

	/* Create a clone for /dev/acpi also. */
	STAILQ_INIT(&acpi_sc->apm_cdevs);
	acpi_sc->acpi_clone = apm_create_clone(acpi_sc->acpi_dev_t, acpi_sc);
	clone_setup(&apm_clones);
	EVENTHANDLER_REGISTER(dev_clone, apm_clone, 0, 1000);
	acpi_install_wakeup_handler(acpi_sc);

	if (intr_model == ACPI_INTR_PIC)
		BUS_CONFIG_INTR(dev, AcpiGbl_FADT.SciInterrupt,
		    INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
	else
		acpi_SetIntrModel(intr_model);

	SYSCTL_ADD_UINT(&acpi_sc->acpi_sysctl_ctx,
	    SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO,
	    "reset_video", CTLFLAG_RW, &acpi_reset_video, 0,
	    "Call the VESA reset BIOS vector on the resume path");

	return (0);
}
Example #4
0
int
acpi_machdep_init(device_t dev)
{
	struct acpi_softc *sc;

	sc = device_get_softc(dev);

	acpi_apm_init(sc);

	if (intr_model != ACPI_INTR_PIC)
		acpi_SetIntrModel(intr_model);

	SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx,
	    SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO,
	    "reset_video", CTLFLAG_RW, &acpi_reset_video, 0,
	    "Call the VESA reset BIOS vector on the resume path");

	return (0);
}
Example #5
0
int
acpi_machdep_init(device_t dev)
{
	struct acpi_softc *sc;

	sc = device_get_softc(dev);

	acpi_apm_init(sc);
	acpi_install_wakeup_handler(sc);

	if (intr_model == ACPI_INTR_PIC)
		BUS_CONFIG_INTR(dev, AcpiGbl_FADT.SciInterrupt,
		    INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
	else
		acpi_SetIntrModel(intr_model);

	SYSCTL_ADD_UINT(&sc->acpi_sysctl_ctx,
	    SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO,
	    "reset_video", CTLFLAG_RW, &acpi_reset_video, 0,
	    "Call the VESA reset BIOS vector on the resume path");

	return (0);
}