[U-Boot] [PATCH 2/3] mpc85xx: Add a board-specific restart hook
Moffett, Kyle D
Kyle.D.Moffett at boeing.com
Thu Oct 20 00:52:10 CEST 2011
On Oct 19, 2011, at 17:55, Mike Frysinger wrote:
> On Wednesday 19 October 2011 17:05:12 Moffett, Kyle D wrote:
>> On Oct 19, 2011, at 16:35, Wolfgang Denk wrote:
>>> Moffett, Kyle D wrote:
>>>> Since "reset" is basically just like any other U-Boot shell command,
>>>
>>> No, it ain't.
>>>
>>>> (except with some side-effects) it seems reasonable to allow a board
>>>> handler to return an error instead of resetting.
>>>
>>> No. Reset will never return. It is supposed to hard reset the board,
>>> which means crossing the point of no return.
>>
>> Ok.
>>
>> By that definition, my board cannot safely use U-Boot's "reset" command.
>>
>> Would you accept a patch which makes it possible for a board to not
>> implement a "reset" command at all?
>>
>> There are a few places in common/cmd_bootm.c which are converted to use
>> panic("...") instead of printf("...")+do_reset().
>
> i guess i'm dumb, but i don't understand why it can't be made to work on your
> board. but worse comes to worse, you could have your board reset call hang()
> or panic() ...
Each board has two separate processor units on it, each with their own memory
and devices. If either processor reboots on its own then both will hang and
be unusable.
So U-Boot MUST NOT reset without negotiating, even if the current CPU has
crashed, as that will cause the other (possibly perfectly operational) CPU to
also crash.
I suppose in theory I could add the __board_restart() hook and make it call
"panic()", but by removing do_reset() entirely for my board, I get helpful
link errors for tracking down places which should be calling panic() or
whatever instead.
Cheers,
Kyle Moffett
--
Curious about my work on the Debian powerpcspe port?
I'm keeping a blog here: http://pureperl.blogspot.com/
More information about the U-Boot
mailing list