Add support for ACPI Module Device ACPI0004?

From: Dexuan Cui <decui_at_microsoft.com>
Date: Wed, 19 Apr 2017 12:26:51 +0000
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
_at__at_ -653,7 +653,7 _at__at_ 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
Received on Wed Apr 19 2017 - 10:26:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:11 UTC