Add support for ACPI Module Device ACPI0004?

Dexuan Cui decui at microsoft.com
Wed Apr 19 12:26:57 UTC 2017


The ACPI firmware of Hyper-V UEFI VM has a Module Device whose Hardware
ID is "ACPI0004".  The module device has a _CRS object defining some MMIO
ranges, which are needed when physical PCIe devices are passed through
to the VM.

Currently it looks FreeBSD doesn't make use of the ACPI module device and
hence the _CRS object can't be easily retrieved by Hyper-V VMBus driver.

Can we add the support of "ACPI0004" with the below one-line change?

Looking forward to your suggestion!

--- a/sys/dev/acpica/acpi_resource.c
+++ b/sys/dev/acpica/acpi_resource.c
@@ -653,7 +653,7 @@ MODULE_DEPEND(acpi_sysresource, acpi, 1, 1, 1);
 static int
 acpi_sysres_probe(device_t dev)
 {
-    static char *sysres_ids[] = { "PNP0C01", "PNP0C02", NULL };
+    static char *sysres_ids[] = { "PNP0C01", "PNP0C02", "ACPI0004", NULL };

     if (acpi_disabled("sysresource") ||
        ACPI_ID_PROBE(device_get_parent(dev), dev, sysres_ids) == NULL)

Thanks,
-- Dexuan



More information about the freebsd-current mailing list