
On 15/03/11 09:01, Wolfgang Denk wrote:
Dear "Moffett, Kyle D",
In message 44A75130-ED4F-46D6-B0E4-12433CC15142@boeing.com you wrote:
[Snip]
I kind of like the idea of different reset sources (CPU exception, hardware failure, user initiated) but agree copying the linux architecture is over the top.
Is there any reason reset() could not take a 'reason' parameter? It could be a bit-mask with CPU, SOC and arch reserved bits (unhandled exception, user initiated, panic etc) and board specific bits
Board or arch specific code could handle different reasons however they please (like logging it in NVRAM prior to restart, gracefully shutting down multiple CPU's, clearing DMA buffers etc)
All 'hang', 'panic', 'reset' etc code can be simplified into a single code path (although calling 'reset' to 'hang' is a bit odd)
Just a thought
Regards,
Graeme