summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2019-06-10 14:38:07 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2019-06-10 14:38:07 +0000
commit4b45eaec39ba91d11ff7265a20e715f58a40655c (patch)
tree4703baf341893161ce04e6f0db128a656f60e82a /sys/dev/acpi
parentcc60a8eb62fa2b056e3daefb4017829b504d670e (diff)
Print proper ACPI version number.
ok mlarkin@
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r--sys/dev/acpi/acpi.c16
-rw-r--r--sys/dev/acpi/acpireg.h4
-rw-r--r--sys/dev/acpi/acpivar.h5
3 files changed, 14 insertions, 11 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index 37da92c91e6..6be6b3b613d 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.369 2019/06/08 12:25:19 kettenis Exp $ */
+/* $OpenBSD: acpi.c,v 1.370 2019/06/10 14:38:06 kettenis Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -994,10 +994,7 @@ acpi_attach_common(struct acpi_softc *sc, paddr_t base)
printf(": can't map memory\n");
return;
}
-
rsdp = (struct acpi_rsdp *)handle.va;
- sc->sc_revision = (int)rsdp->rsdp_revision;
- printf(": rev %d", sc->sc_revision);
SIMPLEQ_INIT(&sc->sc_tables);
SIMPLEQ_INIT(&sc->sc_wakedevs);
@@ -1009,14 +1006,14 @@ acpi_attach_common(struct acpi_softc *sc, paddr_t base)
#ifndef SMALL_KERNEL
sc->sc_note = malloc(sizeof(struct klist), M_DEVBUF, M_NOWAIT | M_ZERO);
if (sc->sc_note == NULL) {
- printf(", can't allocate memory\n");
+ printf(": can't allocate memory\n");
acpi_unmap(&handle);
return;
}
#endif /* SMALL_KERNEL */
if (acpi_loadtables(sc, rsdp)) {
- printf(", can't load tables\n");
+ printf(": can't load tables\n");
acpi_unmap(&handle);
return;
}
@@ -1034,10 +1031,15 @@ acpi_attach_common(struct acpi_softc *sc, paddr_t base)
}
}
if (sc->sc_fadt == NULL) {
- printf(", no FADT\n");
+ printf(": no FADT\n");
return;
}
+ sc->sc_major = sc->sc_fadt->hdr.revision;
+ if (sc->sc_major > 4)
+ sc->sc_minor = sc->sc_fadt->fadt_minor;
+ printf(": ACPI %d.%d", sc->sc_major, sc->sc_minor);
+
/*
* A bunch of things need to be done differently for
* Hardware-reduced ACPI.
diff --git a/sys/dev/acpi/acpireg.h b/sys/dev/acpi/acpireg.h
index 76e92fcb85d..4e92d113e73 100644
--- a/sys/dev/acpi/acpireg.h
+++ b/sys/dev/acpi/acpireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpireg.h,v 1.43 2018/08/19 08:23:47 kettenis Exp $ */
+/* $OpenBSD: acpireg.h,v 1.44 2019/06/10 14:38:06 kettenis Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
@@ -184,7 +184,7 @@ struct acpi_fadt {
uint8_t reset_value;
uint8_t reserved2a;
uint8_t reserved2b;
- uint8_t reserved2c;
+ uint8_t fadt_minor;
uint64_t x_firmware_ctl;
uint64_t x_dsdt;
struct acpi_gas x_pm1a_evt_blk;
diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h
index 6c3a4e384ba..42c05e66567 100644
--- a/sys/dev/acpi/acpivar.h
+++ b/sys/dev/acpi/acpivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpivar.h,v 1.100 2019/06/07 15:40:41 kettenis Exp $ */
+/* $OpenBSD: acpivar.h,v 1.101 2019/06/10 14:38:06 kettenis Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -264,7 +264,8 @@ struct acpi_softc {
struct timeout sc_dev_timeout;
- int sc_revision;
+ int sc_major;
+ int sc_minor;
int sc_pse; /* passive cooling enabled */