Date: Wed, 11 Jul 2007 13:54:40 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Alexander Leidinger <Alexander@Leidinger.net> Cc: Rui Paulo <rpaulo@fnop.net>, Shteryana Shopova <syrinx@FreeBSD.org>, freebsd-arch@FreeBSD.org, Robert Watson <rwatson@FreeBSD.org>, "Constantine A. Murenin" <cnst@FreeBSD.org> Subject: Re: Porting OpenBSD's sysctl hw.sensors framework to FreeBSD Message-ID: <56736.1184162080@critter.freebsd.dk> In-Reply-To: Your message of "Wed, 11 Jul 2007 14:42:40 %2B0200." <20070711144240.a3gdtxjvqcwkg4o4@webmail.leidinger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20070711144240.a3gdtxjvqcwkg4o4@webmail.leidinger.net>, Alexander Leidinger writes: >I was not thinking about 7-layer-OSI, I was thinking about 3 layers: >presentation, infrastructure and "low-level" data acquiring stuff (I >prefer the pragmatic way of looking at things). This again misses the point, because you assume a simple bottom-up architecture will work like it does for PCI devices. In this case however, the majority of systems need some piece of code to identify them, look up in a table (which we get from where ?) and configure the sensors. Sensor hardware is not context-free and selfidentifying like PCI and USB devices, in fact, it is about as far from PnP as you can get. Finding an LM75 and reading the temperature is worth next to nothing if you don't know where the LM75 is mounted. Reading an ADC is worth absolutely nothing, if you don't know what it measures and what voltage dividers are in front of it. Finding an I2C sensor and trying to read it is a catastrophe when it turns out not to be a sensor but the motherboard clock generator or voltage regulater. IFF we want to do something more comprehensive than the gaggle of ports, then we want to do it properly so that it doesn't weigh down the kernel with tons of, on average unused, junk, doesn't imperil hardware and delivers sensor readings which come with the necessary context to have a real physical meaning. Access to I2C busses and I/O registers should happen in the kernel, but maintaining a database of all sorts of weird systems should not. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56736.1184162080>