summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2018-05-23 23:08:22 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2018-05-23 23:08:22 +0000
commitf98df89fbfa487b3c67d593bf43b0af31607b2d6 (patch)
treec69903ccf270b75398966acd6f8ce45c00415e0a /sys
parent785af5bcf622d3c97bf48670b5d1f9beafdfa402 (diff)
Print a message if AML attempts to access a part of the Operation Region
that we haven't implemented yet.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpi/tipmic.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/acpi/tipmic.c b/sys/dev/acpi/tipmic.c
index 0c8666f3c06..4346b1d885b 100644
--- a/sys/dev/acpi/tipmic.c
+++ b/sys/dev/acpi/tipmic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tipmic.c,v 1.2 2018/05/21 08:01:56 kettenis Exp $ */
+/* $OpenBSD: tipmic.c,v 1.3 2018/05/23 23:08:21 kettenis Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
*
@@ -294,8 +294,10 @@ tipmic_thermal_opreg_handler(void *cookie, int iodir, uint64_t address,
if (address == tipmic_thermal_regmap[i].address)
break;
}
- if (i == nitems(tipmic_thermal_regmap))
+ if (i == nitems(tipmic_thermal_regmap)) {
+ printf("%s: addr 0x%02llx\n", __func__, address);
return -1;
+ }
/* Turn ADC on and select the appropriate channel. */
reg = tipmic_read_1(sc, TIPMIC_ADC_CTRL, 0);
@@ -393,8 +395,10 @@ tipmic_power_opreg_handler(void *cookie, int iodir, uint64_t address,
if (address == tipmic_power_regmap[i].address)
break;
}
- if (i == nitems(tipmic_power_regmap))
+ if (i == nitems(tipmic_power_regmap)) {
+ printf("%s: addr 0x%02llx\n", __func__, address);
return -1;
+ }
reg = tipmic_power_regmap[i].hi;
val = tipmic_read_1(sc, reg, 0);