[lkml]   [2000]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: PNP design philosophy?
"Richard B. Johnson" wrote:
> On Thu, 9 Mar 2000, Peter Leif Rasmussen wrote:
> > First, excuse me but I am not on this list (too busy), but keeps up by
> > reading Kernel Traffic @ LinuxCare. I have compiled almost every release
> > of 2.3.* and with 2.3.50 wondered about the following.
> >
> > What is the design philosophy of resource management in the kernel and
> > what should I expect in 2.4?
> >
> > Specifically I am interested in IRQ, DMA and IO, but I suppose there is
> > more to it, and what dependance is expected on the BIOS in i386?
> >
> > What worries me is that I have in one present i386 system:
> >
> > 1.Legacy ISA cards
> > 2.ISA PNP cards
> > 3.PCI cards
> > 4.AGP card
> > 5.USB
> > 6.Basic stuff like keyboard, mouse, serial, parallel, etc.
> I don't understand how you could possibly have an AGP card on an i386 or
> any PCI or USB. Perhaps you are referring to "ix86"??
If you want to split hairs I could say I don't know what architecture your
i686 is? One of the architectures in the standard Linux kernel tree is
listed as "i386" (without the quotes), but there is no i686.

> The keyboard/mouse/serial/parallel are all handled by the kernel. There
> is no dependence upon the BIOS. I note that startup code insists in using
> the BIOS to set the keyboard repeat-rate, but that can be handled by
> the kernel after the system is booted so even it it didn't work it can
> be fixed once the system is up.
So what you are saying is that there is no dependance on the BIOS at all or
for the keyboard/mouse/serial/parallel part only?

> >
> > And here I don't seem to be able to specify for the kernel what IRQ, DMA
> > and IO port I want to go where. For example an ISA-PNP soundcard no longer
> > lets me tell it what IRQ, DMA and IO I want it to use because it gets it from
> > the PNP code. And I can't see that I am able to tell the PNP code what
> > resources I want to go where?
> Once the kernel is booted, it does not use the BIOS. However, when it
> is starting, still in 'real' mode, the boot code gets and saves
> information about the system from the BIOS. Often this information is
> wrong. For instance, there is a short word that is supposed to contain
> the total memory in kilobytes. 65535 * 1024 = 67,107,864. What happens
> if you have more? Simple, there is another BIOS hack that is supposed
> to handle it. However, some do, some don't.
> You can override possibly bad information, for drivers that support
> command-lines, by adding the appropriate command into the LILO loader
> configuration file.
> Some drivers don't support parameters that are different from their
> defaults because:
> (1) Physical connections do not exist, i.e., if a port is at 0x300,
> it's at 0x300. Nothing can be done about it. Same thing for some
> IRQs.
> (2) Old drivers, especially for ISA, may never have been envisioned
> for this capability. In particular, shared interrupts were not available
> until recently. They require the APIC because, even though the 8259
> could be set up for level, the ISA bus had pull-up resistors making
> sharing an IRQ line impossible.
> (3) Some information is simply wrong and you get a better chance by
> just turning OFF PNP in the BIOS. For instance, I have a BusLogic
> SCSI controller which, although the BIOS finds it, the kernel won't
> unless PNP is turned OFF. The ASUS P2B-D/P2B-DS AGP mainboard BIOS
> has this problem.
> I just let the kernel find it without being confused by the bad info
> it has picked up during boot. I just turn OFF PNP.
Turning off PNP in an i386 BIOS usually means turning off ISA PNP and as far
as I can see we don't limit ourselves to just that.

What you are saying above is that the PNP code *is* dependant on the BIOS and
that is what worries me because it makes it pretty non-general. I also have
an AXP (UDB/Multia) where I can't set anything in the BIOS (or whatever you
call it there), but I still have both PCI and IDE busses. Incidentally, that
machine is pretty limited, eg. with only one PCI slot so I have no problems
with resource conflicts, but it is also a bad reference system for that
purpose. The PC I mentioned above has almost everything and every IRQ is or
should be in use, so there I need the management that I hoped PNP could or
eventually will provide.

And then you are telling me that some drivers use and some don't use the
services provided by PNP and that I can override bad info on the command line
with some drivers? But I don't think that a driver can or should change
for example the IRQ, DMA or IO port the physical device has been initialized
with, because that is what the PNP code does, right?

> >
> > In the particular system, I have to set up the BIOS manually to configure those
> > resources, and that makes my PNP capable Linux kernel dependant on the i386
> > BIOS, which in my book isn't good, because I could have a machine with a BIOS
> > without that capability. I would prefer to just set everything to automatic in
> > the BIOS (or nothing at all) and fiddle with the resources in the kernel.
> >
> The kernels support initialization of the APIC, this is where it gets
> information about the devices.
I don't exactly know what an APIC is.

> Execute `dmesg` >junk and look at the initialization sequence.
Yes, and that is where I am told I have conflicts, in my case an IRQ.

> Cheers,
> Dick Johnson
> Penguin : Linux version 2.3.41 on an i686 machine (800.63 BogoMips).
Linux version 2.3.50 on an i386 machine (466.94 BogoMips). And what does that
tell us? :-)

main(){char*s="O_>>^PQAHBbPQAHBbPOOH^^PAAHBJPAAHBbPA_H>BB";int i,j,k=1,l,m,n;
putchar(l<6-j?' ':l==40-j?'\n':k&&s[n]&k?'*':' ');}

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:56    [from the cache]
©2003-2011 Jasper Spaans