From owner-freebsd-hackers Thu Aug 27 11:58:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA02448 for freebsd-hackers-outgoing; Thu, 27 Aug 1998 11:58:59 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA02427 for ; Thu, 27 Aug 1998 11:58:48 -0700 (PDT) (envelope-from tlambert@usr01.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id LAA07177; Thu, 27 Aug 1998 11:57:47 -0700 (MST) Received: from usr01.primenet.com(206.165.6.201) via SMTP by smtp02.primenet.com, id smtpd007075; Thu Aug 27 11:57:36 1998 Received: (from tlambert@localhost) by usr01.primenet.com (8.8.5/8.8.5) id LAA26413; Thu, 27 Aug 1998 11:57:27 -0700 (MST) From: Terry Lambert Message-Id: <199808271857.LAA26413@usr01.primenet.com> Subject: Re: PCI devices To: mike@smith.net.au (Mike Smith) Date: Thu, 27 Aug 1998 18:57:27 +0000 (GMT) Cc: tlambert@primenet.com, tony@dell.com, wpaul@skynet.ctr.columbia.edu, chuckr@glue.umd.edu, hackers@FreeBSD.ORG In-Reply-To: <199808262207.WAA00827@word.smith.net.au> from "Mike Smith" at Aug 26, 98 10:07:56 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > A PnP OS follows the PnP specification, available from the Intel > > and Microsoft sites, for free download (use "site search" and > > look for "PnP specification"). > > > > A PnP OS is superior, since it will work on machines without a PnP > > BIOS. > > This is a fallacious conclusion. An OS which meets the criteria for > "PnP OS" in the preceeding discussion need not (and may not) work on a > system without a PnP BIOS. Then the OS sucks. An OS that does not know how to do card isolation will be unable, in the absence of a PnP BIOS, to utilize cards other than those whose POST's enable them as being potential boot devices. A nominally "PnP OS" that can't talk to "PnP cards", isn't very "PnP". This was a major flaw in the initial "PnP Windows 95" release. > As Tony pointed out, all the "PnP OS" setting does is determine whether > the BIOS or the OS will perform resource allocation for devices that > are not marked as being a potential boot path. Actually, According to "Plug and Play System Architecture", page 190, item 6: If the software must boot a non-PnP OS, it must enable (i.e., activate) every device in the system so that they are available for use by the OS and application programs. > > By default, PnP devices are required to be "disabled until enabled"; > > the bsearch mechanism can be implemented once in the OS; after that, > > it is no longer necessary to rely on the BIOS vendor "doing the right > > thing". > > This is also not correct, as a PnP OS can only operate properly in a > situation where resource availibility can be determined. In the PnP > BIOS case, this can be obtained from the BIOS. Without a PnP (actually > ESCD) BIOS, the OS must guess. No. 1) All legacy ISA device ROMs are required to begin on a 2K boundary in the range 0x000C0000 through 0x000EFFFF. The first and second bytes must be 0x55AA. The third byte is the number of 512 byte blocks in the ROM. The fourth is the actual entry point to the code. 2) All PnP device ROMS have the same requirements. But as of the fourth byte, there are 4 bytes of jump instruction to the actual initialization entrypoint. One can differentiate PnP devices from legacy ISA devices using this information. 3) On a non-PnP-BIOS machine, devices in the boot path will be enabled. Devices which are not boot devices are supposed to be disabled by default (the infamous "turn off PnP on the card" soloution to missing hardware). 4) The PnP OS can then: A) issues the key sequence to put all PnP devices to sleep. B) identify all EISA, MCA, PCI, and PCMCIA hardware, for the purpose of excluding it from ISA identification. C) Identify all remaining (legacy) ISA hardware. D) Perform PnP card isolation for configuration, and identify all possible locations for the cards. E) Perform closure over all possible configuration combinations for all cards. F) Configure the cards, as necessary. This is, in fact, the basis for the Microsoft claim that Windows 98 is better at autoconfiguration that most PnP BIOS's. In the presence of legacy cards unknown to the BIOS, Microsoft will not assign a resource used by a legacy card to a PnP card. This is what FreeBSD should be doing, as well. Note that this will be necessary for the OS to do on non-Intel hardware in most cases, since the OS must run an x86 interpreter to implement the card POST and other BIOS execution functions for Intel cards in these systems. In any case, there should be no more reason for an OS to guess than there would be for a BIOS to guess. Yes, this may mean allocating legacy cards PnP resources in the OS data store/Registry. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message