[LinuxBIOS] [PATCH][v3] Merge hlt() into cpu.h (svn resync)
peter at stuge.se
Thu Jul 12 17:47:16 CEST 2007
On Thu, Jul 12, 2007 at 03:06:57PM +0200, Uwe Hermann wrote:
> > > 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
Again, the function is a C interface to the instruction.
The instruction will always halt the CPU, but the CPU can wake up
again. All by design. :)
> When I call hlt() from my code I _expect_ a full halt, I don't want
> _any_ other code exectuted.
I think that's another function. Maybe it's die() or halt() but it
sure isn't what the hlt instruction does.
> Or ??s there some reason why you explicitly want that behaviour?
hlt can be used to sleep until further notice. I don't know if we do
in LB yet, but Linux executes hlt all the time. (Less with dynamic
There is definately a legitimate use of hlt() as it stands, but we
may not actually need it in LB at the moment. We would probably be
fine with just a halt().
Until we've looked into it further I think looping in die() is good.
> > Eventually I imagine building a panic room into die() so that
> Yep, surely a nice idea (should be a Kconfig option, though).
Maybe an expert option that is enabled by default? Typically I'd like
it to always be available. But discussion for later.
> But maybe hlt() and die() should do just what they are supposed to
I think they do now.
> It may be better to make an explicit panicroom() function or so...
More information about the coreboot