Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Aug 1997 19:58:45 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        richw@webcom.com (Rich Wales)
Cc:        terry@lambert.org, smpatel@freebsd.org, hackers@freebsd.org, multimedia@freebsd.org
Subject:   Re: Couldn't change IRQ on Creative SB16 PnP
Message-ID:  <199708250258.TAA00583@phaeton.artisoft.com>
In-Reply-To: <Pine.BSF.3.96.970824165004.221B-100000@localhost> from "Rich Wales" at Aug 24, 97 05:19:29 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> Replying to:
> 
> 	No.  These configurations do not exist anywhere but the
> 	Windows 95 Registry.  They are not attributes of the card.
> 
> I'm confused, then.  It appears that the "pnpinfo" program is getting
> detailed info on multiple configurations from the sound card.  If the
> configurations are not attributes of the card, then what is "pnpinfo"
> seeing when it reads and reports "Dependent Function" material?

It is reading the mapping space supported by the card.  If you
take all the permutations of IRQ, IO port, and memory base address
for the card, then you have all possible arrangements.  These
arrangements are called "tuples"... as if each possible resource
setting were a point in a graph (ie: you could have two IRQ's
required out of two sets of 3, and the sets may be non-intersecting,
etc..

A PnP BIOS uses this information in calculating the configuration
it wants to select for all the PnP devices.

For example, if you had one PnP card that could be only IRQ 5, and
another that could be IRQ 5 or IRQ 10, then the one that can only
be IRQ 5 "wins" the contest for the IRQ, and the other ones
"Configuration 0" will have IRQ 10.

Note: If you are getting data from pnpinfo about the sound card,
then your previous posting is in error: it is a PnP sound card.

If you are dead-set on PnP (which is irrelevant for non-PnP
devices, except to note that they take up resources, such as
IRQ's, IO addresses, and device memory ranges, and can not be
relocated automatically), and you are having problems, I
seriously recommend the PnP architecture book from Mindshare.
Even if you are only going to talk about it, I recommend the book.


> 	The "Configuration 0" is not real in Windows 95, either:
> 	it exists solely as the result of the BIOS PnP configura-
> 	tion for the device.
> 
> Please note, BTW, that I do =not= have Windows 95 on my system.  In
> addition to FreeBSD, I have a partition with DOS 6.22 and Windows 3.1,
> which I use solely for running a few "legacy" apps.  When I said the
> default configuration info I was talking about was the same as Win95's
> "configuration 0", I didn't mean to imply that I was actually running
> Win95.  Apologies if I confused anyone.

No problem.  The same statement still applies.  "Configuration 0" is
the default post-configuration state for the hardware.

Note that there are two types of PnP services:

1)	BIOS services, which configure the hardware at POST time;
	to make these work for non-PnP cards, you must make entries
	in the BIOS setup screen for all non-PnP ISA devices.  For
	example, if you had a bus mouse on IRQ 12 (or a non-PnP ISA
	card on IRQ 5).

2)	PnP OS services.  A PnP OS is capable of configuring PnP
	devices without a PnP BIOS present.  It uses the same
	algorithm, so ISA devices need to be probed first, etc.,
	from least relocatable to most relocatable.  A PnP OS
	without a driver for non-PnP hardware may fail to
	correctly configure your hardware, since it does not
	detect the legacy device and subtract its resources
	(like, say, IRQ 5) from the resources available for
	relocating PnP devices to make them not conflict with
	each other.  These OS services are typically called
	"card services" and are shared with PCMCIA devices (if
	any), which also map resources similar to ISA PnP.  For
	legacy cards, these "card services" generally define a
	way to tell them what ISA resources are already taken.
	FreeBSD does not have a full card services interface at
	this point in time, even after the patches, because of
	the bus probe order issues.  You can thing of an ISA
	card definition interface as being like the EISA .CFG's
	you could create for ISA cards (serving the same function;
	EISA was almost PnP, but failed on several fronts).

In any case, unless you tell the PnP BIOS *OR* you tell the "card
services" about your ISA device, you are *out*of*luck*, and the
PnP configuration will continue to stop IRQ 5 until the cows come
home becase as far as you've told it, IRQ 5 is not being used,
and as such is fair game to be sucked up by the first PnP device
that wants it.

> Well, I went into the BIOS and reconfigured the on-board parallel port
> (normally at 378H/IRQ7) to be 378H/IRQ5.  I rebooted with my "SB16 uses
> IRQ10" kernel, but the sound card wouldn't work.  I then ran "pnpinfo",
> and the first configuration listed by "pnpinfo" still gave IRQ5 as the
> one and only available IRQ -- even though I had set up the on-board
> parallel port to use IRQ5.

The default configuration is decided by the PnP BIOS.  If there is
no PnP BIOS, then the default configuration is decided by POST.

In addition, the BIOS configuration for the printer port may not
be defined for the PnP BIOS.  Are you *certain* you have a PnP
BIOS, and aren't expecting a PnP OS instead?

If you are expecting a PnP OS, you have to make fake entries for
the resources which are already taken.  Amancio posted about how
to do that with the patched kernel when PnP was first being hacked
on.  It's also on the BSD Nomads page, depending on which card
services you are defining.

If you have a PnP BIOS, and it didn't notice the change, then you've
missed a setup step; moving the printer port didn't cut it.

> My sound card =is= PnP.  At least, it claims to be, and "pnpinfo" sees
> it.  What I was trying to say is that it's an ISA PnP card (not a PCI
> PnP card).

PCI is by definition PnP (IRQ sharing, per slot spaces), so I knew
it wasn't a PCI card.

If it's a PnP sound card, and it is not being configured correctly,
it's a BIOS problem.  Again, I'd make sure you defined the card to
the PnP configurator.  If it's a PnP BIOS, this should be enough.
If it's not the PnP BIOS, but a PnP Os that has to do the job...
well, FreeBSD is not a PnP OS yet, it depends on a PnP BIOS to work
properly right now (as Amancio said previously).


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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