summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpi/acpitimer.c
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2007-11-04 22:25:53 +0000
committermikeb <mikeb@openbsd.org>2007-11-04 22:25:53 +0000
commitf2da8145823195b06d904d2b27566d2ae41e50f2 (patch)
tree987f68cbb26532c99359a774ef6a725e4de03bb5 /sys/dev/acpi/acpitimer.c
parentthe last change to enable logging to stderr on startup also enabled (diff)
downloadwireguard-openbsd-f2da8145823195b06d904d2b27566d2ae41e50f2.tar.xz
wireguard-openbsd-f2da8145823195b06d904d2b27566d2ae41e50f2.zip
Check for non-zero address if mapping to the extended addresses.
Patch from Oleg Safiullin (a.k.a form@) ok kettenis canacar weingart
Diffstat (limited to 'sys/dev/acpi/acpitimer.c')
-rw-r--r--sys/dev/acpi/acpitimer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpitimer.c b/sys/dev/acpi/acpitimer.c
index 700e08c6de0..9cbdca74827 100644
--- a/sys/dev/acpi/acpitimer.c
+++ b/sys/dev/acpi/acpitimer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpitimer.c,v 1.6 2007/02/22 07:01:41 jordan Exp $ */
+/* $OpenBSD: acpitimer.c,v 1.7 2007/11/04 22:25:53 mikeb Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -81,7 +81,8 @@ acpitimerattach(struct device *parent, struct device *self, void *aux)
struct acpi_softc *psc = (struct acpi_softc *) parent;
int rc;
- if (psc->sc_fadt->hdr_revision >= 3)
+ if (psc->sc_fadt->hdr_revision >= 3 &&
+ psc->sc_fadt->x_pm_tmr_blk.address != 0)
rc = acpi_map_address(psc, &psc->sc_fadt->x_pm_tmr_blk, 0,
psc->sc_fadt->pm_tmr_len, &sc->sc_ioh, &sc->sc_iot);
else