Subject: Re: {npx,pckbc}* at isa?
To: David Brownlee <abs@absd.org>
From: Quentin Garnier <cube@cubidou.net>
List: port-amd64
Date: 02/01/2007 00:29:09
--/WOH3aHYQbLswZnX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jan 31, 2007 at 10:27:26PM +0000, David Laight wrote:
> On Wed, Jan 31, 2007 at 11:32:55AM +0000, David Brownlee wrote:
> > 	Would anyone object to the following changes to the i386 & amd64
> > 	config files?
> >=20
> > -npx0   at isa? port 0xf0 irq 13        # x86 math coprocessor
> > +npx*   at isa? port 0xf0 irq 13        # x86 math coprocessor
> > -pckbc0         at isa?                 # pc keyboard controller
> > +pckbc*         at isa?                 # pc keyboard controller
> >=20
> > 	With the changes if acpi or pnpbios is also enabled they will
> > 	attach npx0 and pckbc0 rather than npx1 and pckbc1
>=20
> Don't we actually need something to stop the acpi and isa devices
> both attaching?  While allowing either of them to be npx0.

No, we don't.  The acpi-attached devices get their hands on the
resources before the isa ones, because isa devices are attached very
late (and, as a matter of fact, the acpi devices attach very early in
NetBSD, but that might change), so when an isa attachment driver tries
to map the registers, it fails, and therefore doesn't attach.

> I did wonder about 'xxx0 atacpi port 0xnn' in order to tie an acpi device
> to a physical address (also useful to get com port assigned in the
> expected way).

Making ACPI resources locators is not currently possible, because they
are a list of variable length of objects of different kinds.  That's an
idea to keep in mind, although the point of ACPI is specifically to get
rid of situations where you have to wire down those values.

I'm not a big fan of starred instances on indirectly configured busses
because they're confusing to the eyes, and to the autoconf(9) user, too.
Maybe some day I'll think of a better syntax in config(5) for that kind
of stuff.

In the end, why do people care so much about that?  If you're really in
a situation where you keep switching between a kernel that has acpi
attachments and one that doesn't, you might as well wire down an
instance of npx at acpi and one of pckbc at acpi.  It's not like you'll
ever see both attaching anyway.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.

--/WOH3aHYQbLswZnX
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)

iQEVAwUBRcEmRdgoQloHrPnoAQLDXQgAyeGbAMjsTvaaSw+/JTjbMOTSWKIVzHod
NCJSnI8ujWcQjn1v2lmB+beHaKXM3/Dg4C3Rh3RGaNMrLYCDeZJqSs3/LM/JDGOu
R/kvNO5YldZOQ7uMlvQAqTYbQEQQuvUXcn7dSDnCfqmUaFjeKaeVRnvzbFF+qzJj
ox4WVcnutK5I13G5CNUA+uPUqrKpAaKiPVzKpY2Rp2CLgng6oc3IvIwCYBEPtOxK
qdI2mZFT1IcJNQCkGUqEQFDM70jBkWyPaCGecl7k+54t3mL6HCLkLxaet4VWjttA
4svRRTBGI8OZFoOXyVkE6QvcfpPOncPvFts6cXqIxR8b1SfZDDv1yg==
=WxI1
-----END PGP SIGNATURE-----

--/WOH3aHYQbLswZnX--