[LinuxBIOS] [PATCH][v3] Merge hlt() into cpu.h (svn resync)

Uwe Hermann uwe at hermann-uwe.de
Thu Jul 12 15:06:57 CEST 2007


On Thu, Jul 12, 2007 at 04:27:46AM +0200, Peter Stuge wrote:
> On Thu, Jul 12, 2007 at 03:44:23AM +0200, Uwe Hermann wrote:
> > Btw, why does die() do an endless loop around hlt()? Is there a
> > reason a hlt() will _not_ immediately halt the CPU? Can that
> > happen?
> 
> It should halt, but the CPU may wake up again and continue executing
> if an interrupt arrives. All should be masked, but you never know..
> 
> 
> > If so, shall we move the loop into hlt() itself?
> 
> I don't think so. hlt() is just a C wrapper around the instruction.

Hm, but given your above explanations that the hlt() may not really
completely halt, I'd say that we really should move the loop into
hlt(). When I call hlt() from my code I _expect_ a full halt, I don't
want _any_ other code exectuted.

Or іs there some reason why you explicitly want that behaviour?


> Eventually I imagine building a panic room into die() so that
> recovery can be made via console on fatal errors. Ideally with
> some kind of stub for debugging stage0 and definately one for
> initram.

Yep, surely a nice idea (should be a Kconfig option, though).

But maybe hlt() and die() should do just what they are supposed to do.
It may be better to make an explicit panicroom() function or so...


> > Merge hlt() into cpu.h where it belongs. Add some documentation.
> > 
> > Signed-off-by: Uwe Hermann <uwe at hermann-uwe.de>
> 
> Acked-by: Peter Stuge <peter at stuge.se>

Thanks, r449.


Uwe.
-- 
http://www.hermann-uwe.de  | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20070712/dac49af5/attachment.sig>


More information about the coreboot mailing list