> Date: Mon, 24 Mar 1997 17:14:01 -0500 (EST)
> From: "Charles M. Hannum" <mycroft@gnu.ai.mit.edu>
> I don't know what code you're looking at, but in -current, setroot()
> is called very late, and you should most certainly have interrupts
> enabled by that point!
>
> Indeed, if you've *ever* run swapconf() with interrupts disabled, then
> your port is *seriously* broken. That's just not how it's supposed to
> be done.
I'm doing it exactly the way you do it in the i386 port.
For reference:
init_main.c:main()
i386/machdep.c:cpu_startup()
i386/autoconf.c:configure()
The problem I see here is that the part of configure() that happens
after the spl0() call would like to do a "normal" tsleep with the
benefit of a working timeout mechanism. At this point in configure,
we are done with autoconfiguration proper, but do not yet have any
clock interrupts, and procinit is not done yet, therefore we can not
use the "normal" tsleep mechanism. Instead we have the "lower the
interrupt level and delay" hack in tsleep. I don't see how the hack
in tsleep is supposed to help. Maybe somebody could explain that...
It still seems like a simpler way to deal with this would be to do the
setroot/swapconf/dumpconf stuff later (avoiding the tsleep hack).
Please try to both:
* clear up any misunderstanding of the current design
* comment on the feasibility of the suggested idea
Gordon