Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Mar 2003 11:27:46 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Damien Tougas <damien@tougas.net>
Cc:        freebsd-chat@freebsd.org
Subject:   Re: A question about kernel modules
Message-ID:  <3E68F2B2.43FB7053@mindspring.com>
References:  <200303071134.27979.damien@tougas.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Damien Tougas wrote:
> Is there any advantage/disadvantage to using kernel moduls vs. staticly
> linking stuff in the kernel? I would like to eliminate everything from my
> kernel config that can be loaded as a module, then load them at boot using
> loader.conf. Is there any reason I would not want to do that? It seems to me
> that it would make things much easier.

Code in the boot path which must operate before the kernel is
fully up can not be handled as modules.

In general, drivers which require large contiguous chunks of physical
memory (e.g. video capture cards) must obtain their memory before
much has been done, since physical memory fragments quickly under the
influence of aggressive page caching, etc..

Some interfaces do not have the indirect references necessary to
allow modules which attach to them to be dynamically loaded (e.g.
networking stacks in general, or the TCP and IP protocol boundary,
as a specific example).


> Why does FreeBSD not do this by default for the GENERIC kernel?

The GENERIC kernel is loaded from a CDROM controller BIOS faked-up
floppy drive, which is how CDROMs are able to boot.  Even if all
other issues were resolved, this floppy image would be unable to
contain all the necessary modules.  For the modules to be read off
the CDROM or other boot media, all the code in the module loading
path would have to be statically present (ISO9660 FS, ATA and SCSI
drivers, CDROM driver, etc., etc.).  By including all the drivers
in the GENERIC kernel, it makes it much more likely that you will
b able to actually install FreeBSD in the first place.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E68F2B2.43FB7053>