summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi.c
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2014-09-20 04:31:12 +0000
committeradrian <adrian@FreeBSD.org>2014-09-20 04:31:12 +0000
commitfece021428127bb0cebaa00c820ee4d4b25e947f (patch)
tree51392f923f595ef30c85affc0d7370e68e83cab4 /sys/dev/acpica/acpi.c
parent46721cc2c7d83b96c9c48ed0f7a7fa51d989cfaf (diff)
downloadFreeBSD-src-fece021428127bb0cebaa00c820ee4d4b25e947f.zip
FreeBSD-src-fece021428127bb0cebaa00c820ee4d4b25e947f.tar.gz
Populate the device info string with _PXM (proximity domain) information.
This is primarily useful for debugging right now - it'll show up in devinfo. Reviewed by: jhb
Diffstat (limited to 'sys/dev/acpica/acpi.c')
-rw-r--r--sys/dev/acpica/acpi.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index b37e252..2f30092 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -851,11 +851,18 @@ acpi_child_location_str_method(device_t cbdev, device_t child, char *buf,
size_t buflen)
{
struct acpi_device *dinfo = device_get_ivars(child);
-
- if (dinfo->ad_handle)
- snprintf(buf, buflen, "handle=%s", acpi_name(dinfo->ad_handle));
- else
- snprintf(buf, buflen, "unknown");
+ char buf2[32];
+ int pxm;
+
+ if (dinfo->ad_handle) {
+ snprintf(buf, buflen, "handle=%s", acpi_name(dinfo->ad_handle));
+ if (ACPI_SUCCESS(acpi_GetInteger(dinfo->ad_handle, "_PXM", &pxm))) {
+ snprintf(buf2, 32, " _PXM=%d", pxm);
+ strlcat(buf, buf2, buflen);
+ }
+ } else {
+ snprintf(buf, buflen, "unknown");
+ }
return (0);
}
OpenPOWER on IntegriCloud