Where can I find programming info :: PNP

You can get the official Plug-and-Play documentation from the Microsoft ftp site. These documents are .EXE (self extracting) MS-Word format files.

The documents are the industry (MS) specifications for PNP on BIOS, SCSI, Peripherals, etc.


also Craig Hart has a good page on PNP programming at http://members.hyperlink.net.au/~chart/pnpinfo.htm


I heard you can do PNP BIOS calls in pmode?

Yes, just like PCI bios32 calls you can do PNP calls in pmode.

Once you have the BIOS32 service directory (see PCI example routine) you can call it with the PNP Auto Config magic.

void bios32_scan_pnp_entry(void)
	ULONG	cseg_size, offset, base_addr;

	/* call the BIOS32 BSD for the PCI address
 	   BSD calls terminate in RETF not RET */

	/* eax is loaded with "$ACF" magic */
	asm("movl	$0x46434124, %%eax\n"
		"lcall _bios32_call\n"
		: "=c" (cseg_size),
		"=d" (offset),
		"=b" (base_addr)
		: "eax", "ebx", "ecx", "edx", "ebp", "memory" );

	/* setup two new selectors of pnp_code32, pnp_data32, etc. */
Once you have determined that PNP BIOS calls exist for pmode applications, you can call the PCI v2.0c+ calls (see INT 0x1A, function 0xB400 to 0xB407 in Ralf Brown's INT List).

Note, not many BIOS seem to support PNP Bios32 calls, so you may have to resort to using pmode16 calls directly to the PNP bios (requiring a 286 TSS).