diff options
author | adrian <adrian@FreeBSD.org> | 2014-09-20 04:31:12 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2014-09-20 04:31:12 +0000 |
commit | fece021428127bb0cebaa00c820ee4d4b25e947f (patch) | |
tree | 51392f923f595ef30c85affc0d7370e68e83cab4 /sys/dev/acpica/acpi.c | |
parent | 46721cc2c7d83b96c9c48ed0f7a7fa51d989cfaf (diff) | |
download | FreeBSD-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.c | 17 |
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); } |