Exemplo n.º 1
0
static int
nexus_xen_attach(device_t dev)
{
	int error;
	device_t acpi_dev = NULL;

	nexus_init_resources();
	bus_generic_probe(dev);

	if (xen_initial_domain()) {
		/* Disable some ACPI devices that are not usable by Dom0 */
		acpi_cpu_disabled = true;
		acpi_hpet_disabled = true;
		acpi_timer_disabled = true;

		acpi_dev = BUS_ADD_CHILD(dev, 10, "acpi", 0);
		if (acpi_dev == NULL)
			panic("Unable to add ACPI bus to Xen Dom0");
	}

	error = bus_generic_attach(dev);
	if (xen_initial_domain() && (error == 0))
		acpi_install_wakeup_handler(device_get_softc(acpi_dev));

	return (error);
}
Exemplo n.º 2
0
static int
nexus_acpi_attach(device_t dev)
{

	nexus_init_resources();
	bus_generic_probe(dev);
	if (BUS_ADD_CHILD(dev, 10, "acpi", 0) == NULL)
		panic("failed to add acpi0 device");

	return (bus_generic_attach(dev));
}
Exemplo n.º 3
0
static int
nexus_attach(device_t dev)
{

	nexus_init_resources();
	bus_generic_probe(dev);

	/*
	 * Explicitly add the legacy0 device here.  Other platform
	 * types (such as ACPI), use their own nexus(4) subclass
	 * driver to override this routine and add their own root bus.
	 */
	if (BUS_ADD_CHILD(dev, 10, "legacy", 0) == NULL)
		panic("legacy: could not attach");
	bus_generic_attach(dev);
	return 0;
}
Exemplo n.º 4
0
static int
nexus_acpi_attach(device_t dev)
{
	device_t acpi_dev;
	int error;

	nexus_init_resources();
	bus_generic_probe(dev);
	acpi_dev = BUS_ADD_CHILD(dev, 10, "acpi", 0);
	if (acpi_dev == NULL)
		panic("failed to add acpi0 device");

	error = bus_generic_attach(dev);
	if (error == 0)
		acpi_install_wakeup_handler(device_get_softc(acpi_dev));

	return (error);
}