summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2019-06-10 14:38:06 +0000
committerkettenis <kettenis@openbsd.org>2019-06-10 14:38:06 +0000
commitf8753e491bc4e42a7f9a92f41ee40de58aafb19a (patch)
tree05edd5734eb62a82866fb301b874f5509cd7e6aa
parentAdd pkcs12 options and smime tests for appstest.sh (diff)
downloadwireguard-openbsd-f8753e491bc4e42a7f9a92f41ee40de58aafb19a.tar.xz
wireguard-openbsd-f8753e491bc4e42a7f9a92f41ee40de58aafb19a.zip
Print proper ACPI version number.
ok mlarkin@
-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 */