Date: Wed, 31 Jan 2007 11:51:48 -0800 From: Luigi Rizzo <rizzo@icir.org> To: arch@freebsd.org Subject: configurable device (and other) tables in the kernel ? Message-ID: <20070131115148.A60420@xorpc.icir.org>
next in thread | raw e-mail | index | archive | help
I think there was some discussion on the topic some time ago but cannot remember if there was any outcome so let me ask. 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 firmware because it is not something where you may want to change a few lines manually). Right now we compile them statically in the code. However sometimes it is useful to update them 'on the fly' without having to rebuild a kernel/module - e.g. because an entry (e.g. a quirk for a specific device) cannot be safely included in the distribution, etc.etc. What are the options to implement a mechanism that lets userland update such tables, and maybe in a way that is accessible to the boot loader ? The (obvious) requirements are: + support for multiple tables with variable (maybe defined at compile time) structure; + initial values should be compiled in; + the access mechanism should provide mechanism to read/modify/write/delete entries; + human-readable (i.e. textual) representation of entries in userland, with hooks to translate them in a machine-friendly format on writes, and back on reads; sysctl is the first method that comes to my mind, but perhaps there is some better way ? cheers luigi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070131115148.A60420>