Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34298 )
Change subject: devicetree: Add accessors for chip_info ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34298/3/src/include/device/device.h File src/include/device/device.h:
https://review.coreboot.org/c/coreboot/+/34298/3/src/include/device/device.h... PS3, Line 306: devtree_die();
Could this get __func__ passed as parameter? Otherwise, the die() message is rather imprecise.
We could wrap the call inside preprocessor macro to do that. Maybe adjust the error with advice 'Enable DEBUG_xxx to resolve issue' and leave it conditional. To use __func__ alone may not be a unique identifier and I don't want to pull __file__ in by default.
With such DEBUG_xxx enabled, maybe this should fall through with chip_info pointing to some zero-initialized array and die() only after console_init() so that there is chance to actually display the message.
Also auto-discovered devices that are not present in static devicetree will never have chip_info assigned, so we need some more logic here until we expand the use of this function to drivers/. But current use for soc/intel should be fine.