Subject: RE: PCIC interrupt selection
To: None <port-i386@netbsd.org>
From: Harald Bjoroy <harald@bitcon.no>
List: port-i386
Date: 08/11/1998 17:22:08
	Win95 laptops comes with the OEM SR2 (or OSR SR 2.5).

	There are no mods to the OS for the machine. The only difference
is that the licensing pages tells the customer to call the hardware
vendor for support, not M$. (Also some preloaded software and specific
utilitysoftware sometimes, but you can always scrap the machine and
install a blank OSR2, infact if you get a CD-ROM with the machine, it is
a MS-printed OSR2 CD.)

	There is definately some magic the OS does to boot the devices,
and it is embedded in the PNP concept.

	The OS is half booted before the PCMCIA controller is
initialized; when it gets intialized, it enumerates the devices and
activate the drivers as specified in the registry. 

	If a device is not in the registry, it is not turned on. When
the user logs on, the system detects any PCMCIA hardware, and installs
drivers for it.

	The OS finds the ID of the card from the card, searches Win95's
defined drivers for this string, copies the drivers and then detemine
the resources to set it to by finding free resources that matches the
capabilities of the card. If it can't find the driver, it asks for a
third-party diskette.

	What NetBSD must do to fix this, is to compile in all drivers it
needs to support, add a special driver for the PCMCIA controller which
finds which cards are in the controller and then activates the correct
driver based on the ID from the card. How to assign the correct
resources I don't know, but I believe there is already code for this in
the PNP support (?).

	At this point the card is intialized and should not conflict
with anything. This of couse fails horribly if you have an old ISA card
which doesn't identify itself to the system (BIOS?). Typically all PNP
crashes if you use old IBM clone terminal-emulation cards.

	I am somewhat new to NetBSD, at least for this level, so I don't
know how support for PNP is implemented, so I cannot give good
suggestions to how to implement this on NetBSD.

	Don't fool yourselves to believe that Win95 is DOS with some
add-on; MSDOS.SYS and IO.SYS are text-files, so all parts of the boot
happens in 32-bit Windows code. 

	I believe it must be possible to steal some good ideas from
Windows for this part of NetBSD.

	Harald.
>  
> > Here's my question.. how the heck does win95 do it?  They must
> > either have some massive database, or maybe they use something akin
> > to LKM's.. (I'm not actually up to date with anything past dos5.0
> > these days..)
> 
> 	Custom versions for specific laptops. If you buy a laptop with
> Win95 on it, the version of Win95 on the drive (and likely on the
> "recovery" CD as well) is tuned specifically for that brand and
> model. Unfortunately, this gives us no insight on how we might go
> about doing this automatically - although perhaps someone could be
> inspired to create a tool that can extract the information we need
> from the Win95 installation, and allow us to get some leverage from
> the information.
> 
> 	- Nathan