From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 24 11:48:32 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D904616A419 for ; Sat, 24 Nov 2007 11:48:32 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id C447813C461 for ; Sat, 24 Nov 2007 11:48:32 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 297F446BD8; Sat, 24 Nov 2007 06:51:47 -0500 (EST) Date: Sat, 24 Nov 2007 11:48:26 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Aryeh Friedman In-Reply-To: Message-ID: <20071124114625.L14018@fledge.watson.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: a strange/stupid question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Nov 2007 11:48:32 -0000 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