PNP Calls In Protected Mode
Jump to navigation
Jump to search
This page or section is a stub. You can help the wiki by accurately contributing to it. |
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. Note the Inline Assembly again for registers interfacing.
void bios32_scan_pnp_entry(void)
{
uint32_t 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 RalfBrown'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).