Subject: Re: consinit in machdep.c?
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Perry E. Metzger <perry@piermont.com>
List: port-i386
Date: 03/09/2003 12:36:13
Jason R Thorpe <thorpej@wasabisystems.com> writes:
> On Sun, Mar 09, 2003 at 11:33:29AM -0500, Perry E. Metzger wrote:
>  > i386/machdep.c:init386() contains, early on:
>  > 
>  >         consinit();     /* XXX SHOULD NOT BE DONE HERE */
>  > 
>  > Why is it there? It really should only be done in init_main.c:main()
> 
> It's there so you can see console messages before main() is called.

Well, duh, of course.

However, the only thing running before main() is init386 itself, which
only calls printf in certain debugging modes. Presumably the consinit
is there for those debuging statements -- there isn't much mystery
here. Presumably either:

1) We should get rid of the XXX line, or document it differently
   (i.e. make the comment reflect why the line is there)
or
2) We should #ifdef consinit to be called only when debugging code
   that might printf inside init386() is called,a nd also get rid of
   the XXX.

> There is nothing wrong with leaving it there; please don't touch it.

-- 
Perry E. Metzger		perry@piermont.com