Tweak the probe/attach order of devices on the x86 nexus devices.

Various BIOS-related psuedo-devices are added at an order of 5.  acpi0 is
added at an order of 10, and legacy0 is added at an order of 11.
This commit is contained in:
John Baldwin 2007-03-20 20:21:44 +00:00
parent 86f07bb052
commit ce533e82a2
6 changed files with 10 additions and 10 deletions

View File

@ -105,10 +105,10 @@ legacy_identify(driver_t *driver, device_t parent)
{
/*
* Add child device with order of 1 so it gets probed
* after ACPI (which is at order 0.
* Add child device with order of 11 so it gets probed
* after ACPI (which is at order 10).
*/
if (BUS_ADD_CHILD(parent, 1, "legacy", 0) == NULL)
if (BUS_ADD_CHILD(parent, 11, "legacy", 0) == NULL)
panic("legacy: could not attach");
}

View File

@ -350,7 +350,7 @@ acpi_identify(driver_t *driver, device_t parent)
snprintf(acpi_ca_version, sizeof(acpi_ca_version), "%x", ACPI_CA_VERSION);
/* Attach the actual ACPI device. */
if ((child = BUS_ADD_CHILD(parent, 0, "acpi", 0)) == NULL) {
if ((child = BUS_ADD_CHILD(parent, 10, "acpi", 0)) == NULL) {
device_printf(parent, "device_identify failed\n");
return_VOID;
}

View File

@ -166,7 +166,7 @@ smapi_identify (driver_t *driver, device_t parent)
rid = 0;
length = ADDR2HDR(addr)->length;
child = BUS_ADD_CHILD(parent, 0, "smapi", -1);
child = BUS_ADD_CHILD(parent, 5, "smapi", -1);
device_set_driver(child, driver);
bus_set_resource(child, SYS_RES_MEMORY, rid, addr, length);
device_set_desc(child, "SMAPI BIOS");

View File

@ -131,7 +131,7 @@ smbios_identify (driver_t *driver, device_t parent)
return;
}
child = BUS_ADD_CHILD(parent, 0, "smbios", -1);
child = BUS_ADD_CHILD(parent, 5, "smbios", -1);
device_set_driver(child, driver);
bus_set_resource(child, SYS_RES_MEMORY, rid, addr, length);
device_set_desc(child, "System Management BIOS");

View File

@ -128,7 +128,7 @@ vpd_identify (driver_t *driver, device_t parent)
rid = 0;
length = ADDR2VPD(addr)->Length;
child = BUS_ADD_CHILD(parent, 0, "vpd", -1);
child = BUS_ADD_CHILD(parent, 5, "vpd", -1);
device_set_driver(child, driver);
bus_set_resource(child, SYS_RES_MEMORY, rid, addr, length);
device_set_desc(child, "Vital Product Data Area");

View File

@ -110,10 +110,10 @@ legacy_identify(driver_t *driver, device_t parent)
{
/*
* Add child device with order of 1 so it gets probed
* after ACPI (which is at order 0.
* Add child device with order of 11 so it gets probed
* after ACPI (which is at order 10).
*/
if (BUS_ADD_CHILD(parent, 1, "legacy", 0) == NULL)
if (BUS_ADD_CHILD(parent, 11, "legacy", 0) == NULL)
panic("legacy: could not attach");
}