Opened 3 years ago

Last modified 3 years ago

#14350 new bug

ACPI Embedded Controller driver is not loaded

Reported by: mmu_man Owned by: tqh
Priority: normal Milestone: Unscheduled
Component: Drivers/ACPI Version: R1/Development
Keywords: acpi, embedded controller Cc:
Blocked By: Blocking:
Platform: All


The EC driver is part of the ACPI bus_manager module binary, but exports itself as "drivers/power/acpi_embedded_controller/driver_v1", which does not start with "bus_managers/acpi", hence the kernel will never actually see it when walking module lists.

Adding a symlink makes it load but is not really clean.

Changing its name to "bus_managers/acpi/embedded_controller/driver_v1" and alike for the device module seems to make it forgotten, at least it's only loaded after the ACPI enumeration is done, so it never has a chance to see devices it could support.

Change History (5)

comment:1 by waddlesplash, 3 years ago

This was the patch I suggested for mmu_man to try which didn't work, because it does not get called with all the ACPI child devices properly (but does get farther than presently):

diff --git a/src/add-ons/kernel/bus_managers/acpi/EmbeddedController.cpp b/src/add-ons/kernel/bus_managers/acpi/EmbeddedController.cpp
index 92dc164dac..b66dd21a02 100644
--- a/src/add-ons/kernel/bus_managers/acpi/EmbeddedController.cpp
+++ b/src/add-ons/kernel/bus_managers/acpi/EmbeddedController.cpp
@@ -42,12 +42,12 @@
 #include <drivers/PCI.h>
-#define ACPI_EC_DRIVER_NAME "drivers/power/acpi_embedded_controller/driver_v1"
+#define ACPI_EC_DRIVER_NAME "bus_managers/acpi/embedded_controller/driver_v1"
-#define ACPI_EC_DEVICE_NAME "drivers/power/acpi_embedded_controller/device_v1"
+#define ACPI_EC_DEVICE_NAME "bus_managers/acpi/embedded_controller/device_v1"
 /* Base Namespace devices are published to */
-#define ACPI_EC_BASENAME "power/embedded_controller/%d"
+#define ACPI_EC_BASENAME "acpi/embedded_controller/%d"
 // name of pnp generator of path ids
 #define ACPI_EC_PATHID_GENERATOR "embedded_controller/path_id"

comment:2 by korli, 3 years ago

Well I can say that it works with "drivers/misc" in the case of the virtio balloon driver:

The problem might reside elsewhere.

comment:3 by mmu_man, 3 years ago

And looking at the balloon code it seems to me there's an oversight in the device module export, it uses a driver_module_info instead of a device_module_info struct !?

comment:4 by mmu_man, 3 years ago

Oh, ok, actually the balloon driver is different: it creates a subnode in the device tree, and passes register_node() a different module name which also points to a driver_module_info. While the EC driver calls publish_device() to add a devfs entry, which wants a device_module_info. So I guess both are correct, but somehow the later doesn't work.

comment:5 by mmu_man, 3 years ago

After testing with virtualbox, it seems it also isn't loaded when acpi is from ~/config/non-packaged/… while it actually is loaded (even though VB doesn't seem to have an EC in its ACPI table but at least the trace shows up) from the system package.

Note: See TracTickets for help on using tickets.