Subject: Re: Is the kernel designed to return?
To: Derek Peschel <dpeschel@eskimo.com>
From: John Hawkinson <jhawk@mit.edu>
List: port-macppc
Date: 01/12/2002 14:02:37
Derek Peschel <dpeschel@eskimo.com> wrote on Sun, 30 Dec 2001
at 08:23:21 -0800 in <20011230082321.B28439@eskimo.eskimo.com>:

> Probably I mentioned this... I got the idea that "halt" should return
> to an OF prompt instead of just looping.

Yes, the current behavior is clearly a bug.

> But I realized that calling the
> cpu_reboot function is not the cleanest way to do that -- I want to return
> from a series of nested functions (ultimately reaching the boot loader,
> which has an "OF_exit" statement following the "chain" statement that
> transfers control to the kernel).

I don't believe this is necessary. I think you can just
call OF_exit().

> Is the kernel designed to be tortured in this way?  Otherwise I'd have
> to do something even nastier (which I wouldn't understand anyway).

You haven't specified a torture as far as I can see.

> The other issue is that (AIUI) OF_exit should be called exactly
> as many times as OF_enter is.  So I'd need to track down all the exits
> and enters.  Is anyone using another boot loader besides ofwboot?

No, OF_enter() calls have nothing to do with OF_exit() calls.

--jhawk