Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Feb 2007 17:07:28 -0600 (CST)
From:      Sergey Babkin <babkin@verizon.net>
To:        Luigi Rizzo <rizzo@icir.org>, John Baldwin <jhb@freebsd.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: Re: configurable device (and other) tables in the kernel ?
Message-ID:  <25887312.2602951170371248250.JavaMail.root@vms227.mailsrvcs.net>

next in thread | raw e-mail | index | archive | help
>From: Luigi Rizzo <rizzo@icir.org>
>Date: 2007/02/01 Thu AM 11:16:05 CST
>To: John Baldwin <jhb@freebsd.org>
>Cc: freebsd-arch@freebsd.org
>Subject: Re: configurable device (and other) tables in the kernel ?

>On Thu, Feb 01, 2007 at 11:09:12AM -0500, John Baldwin wrote:
>> On Wednesday 31 January 2007 14:51, Luigi Rizzo wrote:
>...
>> > We have several tables in our kernel and modules,
>> > containing at least device-id tables (pci, usb),
>> > quirks for certain devices, and maybe more (i am excluding
>...
>> Windows and MAC OS X both use plain text files to hold things like PCI device 
>> IDs to match drivers to devices.  OS X uses an XML file format that lets you 
>
>plain text files!
>
>too obvious to think of it :)

They way UnixWare works is that it has plain text files
with PCI ID info and such but this information doesn't
go directly into the kernel. Instead an user-space 
process reads the PCI config info from the kernel and 
these tables, matches them up, and loads the drivers.

Well, in reality things are a bit more complicated there:
there is an in-kernel resource manager database
that matches the devices (PCI and such are auto-detected,
ISA are entered by scripts when building the kernel)
with the appropriate drivers. This database is dumped
to a file before reboot and then loaded back by the
boot loader, so it's persistent between the boots.
This user-space program goes through the entries
in the database that don't have a driver assigned,
tries to find the stuff in the plain text files,
and if found then inserts the driver names into the
appropriate database records. Than the kernel can
take care of loading the modules.

Now, sysctl looks like a very similar database to me,
and we already have the boot loader configuration done
through a similar way. Can it be reused for this
purpose too?

-SB




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