[U-Boot] [PATCH] Provide more useful debugging when an initcall fails

Wolfgang Denk wd at denx.de
Sun Apr 14 10:34:24 CEST 2013


Dear Simon Glass,

In message <1365863234-22906-1-git-send-email-sjg at chromium.org> you wrote:
> The debug() which prints out the current call is not very useful, since if
> it is called early enough (such as before the console is ready in the
> pre-relocation board_init_f() sequence) it can hang the board.

This should not happen (and if it does, that wouldbe a bug that needs
fixing).

> It is more useful to print a message when a call fails, and in this case
> the non-relocated symbol address provides a way for the offending function
> to be located in System.map.

No.  it is a long styanding rule that for this tyoe of actions the
begin of the message gets printed before even attempting to call the
respective function, so if the systemn hangs you can see the last
operation which was about to be run.  I think we should follow this
principle here, too.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Love is an ideal thing, marriage a real thing; a  confusion  of  the
real with the ideal never goes unpunished."                  - Goethe


More information about the U-Boot mailing list