Subject: Re: Binary only drivers in sys?
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 08/25/2003 19:13:18
> Perhaps I can clarify slightly about the Atheros code/driver. [...]
> The division between driver and HAL (Hardware Access Layer) has been
> designed so that drivers can use all the functionality of the
> hardware.
I can't see how that can be; otherwise there'd be no need for the HAL
at all. Should this, perhaps, read "all the _legal_ functionality"?
> For all intents and purposes you can think of the HAL as the firmware
> that would be on a device of this sort if it had an onboard processor
> (which the Atheros parts do not).
Except that real firmware is completely independent of the host, and
your HAL isn't.
Also, real firmware does not run on the host cpu in the hardware's
privileged mode; it does not have to be as trusted as the OS kernel.
> The big downside to this whole thing is that you need a binary HAL
> for your platform.
Yes, and complicating the matter is that "platform" includes not just
cpu architecture but also object file format, hardware interface[$],
and to some extent OS architecture (try to build a single HAL that
works on Windows NT, VMS, and NetBSD - real firmware, again, wouldn't
care). Worse, it also includes knowledge of the regulatory
jurisdiction in question; I'm sure that different jurisdictions'
regulations on emitted power and frequency and such are at least
slightly different.
[$] The HAL has to know how to talk to the hardware - memory-mapped?
bus_space_{read,write}_*? {in,out}{b,w,etc}? callbacks?
So instead of having "Atheros firmware" we have "Atheros
pseudo-firmware for a.out NetBSD/i386 in the USA", "Atheros
pseudo-firmware for ELF NetBSD/sparc64 in Egypt", "Atheros
pseudo-firmware for VAX/VMS in Germany"[%], "Atheros pseudo-firmware
for NT on Alpha in China"[%], etc - at least in theory; I'm sure that
in practice most of the possibilities don't actually exist.
[%] I don't know whether these OSes have multiple object file formats.
Not that it's no better than nothing at all, most certainly, nor that
it's necessarily a wrong tack for a card maker to take. Just that it's
a long way from being firmware "for all intents and purposes".
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B