Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Nov 2007 11:48:26 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Aryeh Friedman <aryeh.friedman@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: a strange/stupid question
Message-ID:  <20071124114625.L14018@fledge.watson.org>
In-Reply-To: <bef9a7920711231933g4b7e7717sf4667773188f28a@mail.gmail.com>
References:  <bef9a7920711231933g4b7e7717sf4667773188f28a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sat, 24 Nov 2007, Aryeh Friedman wrote:

> Where do I find the main() [and/or other entery point] for the kernel.... I 
> tend to understand stuff better if I follow the flow of exec from the start

Everyone else is suggesting very earlier in the boot, but I think the point 
where the kernel where things get interesting is in init_main.c in 
mi_startup().  The first thing you'll find there is that our kernel 
initialization is modular, where different modules (compiled in or loaded as 
klds) register an ordered set of boot events (see sys/kernel.h for the boot 
order).  You'll need to grep around the kernel to find the registration 
points for various subsystems.

Robert N M Watson
Computer Laboratory
University of Cambridge



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071124114625.L14018>