Dmitry Mottl wrote: > > I got a page fault (page not present, supervisor read) when I try to > modify /sys/kern/init_main.c > > I want kernel print each subsytem name when it called from mi_startup. > So I define char *sysinit_desct[] array and populate it with > description strings. > > After I boot kernel I saw expected '*** mi_startup ***' (see patch) > and pagefault after that. > > Where is my fault?
[ ... ] > + printf("*** mi_startup ***\n"); *** BOGUS [ ... ] > + printf("SYSINIT: %s\n", sysinit_descr[(*sipp)->subsystem]); *** BOGUS Your console must be initialized before you can call printf. Try this *one line* instead: 201a202,204 > if ((*sipp)->subsystem > SI_SUB_CONSOLE) > printf("SYSINIT: %s\n", sysinit_descr[(*sipp)->subsystem]); > Notice that with this patch, it only does printf's after console initialization has taken place (unlike your patch). -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message