> acpi0 at bios2: rev 2, ACPI control unavailable

The diff below should fix that issue and get rid of the

  can't map interrupt

issues.


Index: acpi.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/acpi.c,v
retrieving revision 1.297
diff -u -p -r1.297 acpi.c
--- acpi.c      23 Nov 2015 00:10:53 -0000      1.297
+++ acpi.c      2 Jan 2016 17:53:09 -0000
@@ -852,6 +852,7 @@ acpi_attach(struct device *parent, struc
        struct device *dev;
 #endif /* SMALL_KERNEL */
        paddr_t facspa;
+       uint16_t pm1;
        int s;
 
        sc->sc_iot = ba->ba_iot;
@@ -912,8 +913,9 @@ acpi_attach(struct device *parent, struc
        /*
         * Check if we are able to enable ACPI control
         */
-       if (sc->sc_fadt->smi_cmd &&
-           (!sc->sc_fadt->acpi_enable && !sc->sc_fadt->acpi_disable)) {
+       pm1 = acpi_read_pmreg(sc, ACPIREG_PM1_CNT, 0);
+       if ((pm1 & ACPI_PM1_SCI_EN) == 0 &&
+           (sc->sc_fadt->smi_cmd == 0 || sc->sc_fadt->acpi_enable == 0)) {
                printf(", ACPI control unavailable\n");
                return;
        }
@@ -997,7 +999,7 @@ acpi_attach(struct device *parent, struc
         * This may prevent thermal control on some systems where
         * that actually does work
         */
-       if (sc->sc_fadt->smi_cmd) {
+       if ((pm1 & ACPI_PM1_SCI_EN) == 0) {
                if (acpi_enable(sc)) {
                        printf(", can't enable ACPI\n");
                        return;

Reply via email to