1a305bda15
This patch utilizes the fixed_devclass attribute in order to make sure other acpi devices with params don't get confused for an EC device. The existing code assumes that acpi_ec_probe is only ever called with a dereferencable acpi param. Aside from being incorrect because other devices of ACPI_TYPE_DEVICE may be probed here which aren't ec devices, (and they may have set acpi private data), it is even more nefarious if another ACPI driver uses private data which is not dereferancable. This will result in a pointer deref during boot and therefore boot failure. On X86, as it stands today, no other devices actually do this (acpi_cpu checks for PROCESSOR type devices) and so there is no issue. I ran into this because I am adding such a device which gets probed before acpi_ec_probe and sets private data. If ARM ever has an EC, I think they'd run into this issue as well. There have been several iterations of this patch. Earlier iterations had ECDT enumerated ECs not call into the probe/attach functions of this driver. This change was Suggested by: jhb@. Reviewed by: jhb Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D16635 |
||
---|---|---|
.. | ||
Osd | ||
acpi_acad.c | ||
acpi_battery.c | ||
acpi_bus_if.m | ||
acpi_button.c | ||
acpi_cmbat.c | ||
acpi_container.c | ||
acpi_cpu.c | ||
acpi_dock.c | ||
acpi_ec.c | ||
acpi_hpet.c | ||
acpi_hpet.h | ||
acpi_if.m | ||
acpi_isab.c | ||
acpi_lid.c | ||
acpi_package.c | ||
acpi_pci_link.c | ||
acpi_pci.c | ||
acpi_pcib_acpi.c | ||
acpi_pcib_pci.c | ||
acpi_pcib.c | ||
acpi_pcibvar.h | ||
acpi_pcivar.h | ||
acpi_perf.c | ||
acpi_powerres.c | ||
acpi_quirk.c | ||
acpi_quirks | ||
acpi_resource.c | ||
acpi_smbat.c | ||
acpi_smbus.h | ||
acpi_thermal.c | ||
acpi_throttle.c | ||
acpi_timer.c | ||
acpi_video.c | ||
acpi.c | ||
acpiio.h | ||
acpivar.h |