Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/56058 )
Change subject: device: Extend `devtree_die()` log information ......................................................................
device: Extend `devtree_die()` log information
If the `config_of()` function is called with a non-NULL `dev` argument, but its `chip_info` member is NULL, it is possible to print information about `dev` to make debugging easier. Pass `dev` to `devtree_die()` and call the `dev_path()` function with it.
Change-Id: I62f93bd7a4a4e55a84c1436e57e48804de730080 Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/device/device_const.c M src/include/device/device.h 2 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/56058/1
diff --git a/src/device/device_const.c b/src/device/device_const.c index 7e7f2f1..c01efe4 100644 --- a/src/device/device_const.c +++ b/src/device/device_const.c @@ -311,9 +311,9 @@ printk(BIOS_ERR, "BUG: %s requests hidden 00:%02x.%u\n", func, devfn >> 3, devfn & 7); }
-void __noreturn devtree_die(void) +void __noreturn devtree_die(const struct device *dev) { - die("DEVTREE: dev or chip_info is NULL\n"); + die("DEVTREE: dev %s or chip_info is NULL\n", dev_path(dev)); }
/** diff --git a/src/include/device/device.h b/src/include/device/device.h index 8f0650f..4100a5d 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -364,7 +364,7 @@
/* Robust discovery of chip_info. */ void devtree_bug(const char *func, pci_devfn_t devfn); -void __noreturn devtree_die(void); +void __noreturn devtree_die(const struct device *dev);
/* * Dies if `dev` or `dev->chip_info` are NULL. Returns `dev->chip_info` otherwise. @@ -377,7 +377,7 @@ if (dev && dev->chip_info) return dev->chip_info;
- devtree_die(); + devtree_die(dev); }
/*