Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 May 2006 09:55:19 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-hackers@freebsd.org
Cc:        "R. Tyler Ballance" <tyler@tamu.edu>
Subject:   Re: Kernel call stack for dummies.
Message-ID:  <200605240955.19370.jhb@freebsd.org>
In-Reply-To: <EC9C1F8D-C609-49D7-ACA4-559415149BD6@tamu.edu>
References:  <EC9C1F8D-C609-49D7-ACA4-559415149BD6@tamu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 24 May 2006 03:05, R. Tyler Ballance wrote:
> I've started the uphill battle to port FreeBSD's kernel to run
> "paravirtualized" (<--note the smart sounding vocabulary) on top of
> the L4/Iguana OS (Iguana is a very barebones OS developed by NICTA:
> http://www.ertos.nicta.com.au/software/kenge/iguana-project/latest/)
>=20
> On of the first steps is basically porting the lowest of low kernel
> calls such as those in sys/i386 sys/arm and sys/amd64 for example
> into sys/iguana to talk to iguana instead of actual hardware.
>=20
> One of the things I need to figure out is the order in which kernel
> calls are made on boot, so I can go through and reimplement them one
> by one (in order to spend as little time as possible going back and
> fixing other problems of mine), as suggested by Ben Leslie at NICTA.
> Is there a good overview of what's happening directly after boot in
> terms of the procedure in which functions are called right after the
> bootloader finishes it business?

The boot loader hands off execution to locore.S.  The entry point in
there sets up various things and then calls init_<arch>() (such as
init_i386() in sys/i386/i386/machdep.c).  When init_i386() returns,
locore then calls mi_startup() which runs through all of the SYSINITs
and never returns (the last SYSINIT kicks off the swapper kthread
using the boot stack).

=2D-=20
John Baldwin <jhb@FreeBSD.org> =A0<>< =A0http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org



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