[PATCH] common: board_f: Fix crash in print_cpuinfo

Simon Glass sjg at chromium.org
Thu Sep 29 04:36:03 CEST 2022


Hi Christian,

On Wed, 28 Sept 2022 at 18:20, Christian Kohlschütter
<christian at kohlschutter.com> wrote:
>
> With CONFIG_DISPLAY_CPUINFO=y and CONFIG_CPU=y, the initcall sequence
> may fail (and therefore hang the boot process) with an -ENODEV (err=-19)
> error code.
>
> This is caused by either cpu_get_current_dev/cpu_get_desc failing to
> return CPU information.
>
> If no CPU information can be obtained, fall-back to the non-Driver Model
> implementation of print_cpuinfo.
>
> Signed-off-by: Christian Kohlschütter <christian at kohlschutter.com>
> ---
>  common/board_f.c | 14 +++++++++-----
>  include/init.h   |  3 +--
>  2 files changed, 10 insertions(+), 7 deletions(-)

No, we don't want to do this. If you have CPU enabled then the device
must return the info. The non-DM code will go away one day. It is not
intended as a fallback.

Regards,
Simon


More information about the U-Boot mailing list