summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/device')
-rw-r--r--src/device/device_util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c
index 039e562b43..32f57ac0f3 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -932,3 +932,12 @@ const char *dev_path_name(enum device_path_type type)
type_name = type_names[type];
return type_name;
}
+
+void log_resource(const char *type, const struct device *dev, const struct resource *res,
+ const char *srcfile, const int line)
+{
+ printk(BIOS_SPEW, "%s:%d res: %s, dev: %s, index: 0x%lx, base: 0x%llx, "
+ "end: 0x%llx, size_kb: 0x%llx\n",
+ srcfile, line, type, dev_path(dev), res->index, res->base,
+ resource_end(res), res->size / KiB);
+}