PNP Calls In Protected Mode
|
The content of this article or section is considered a historical curiosity and should not be considered for new designs. |
|
|
Similar to PCI BIOS32 calls, PnP calls in protected mode are also possible.
Once the BIOS32 service directory is obtained (see PCI example routine), it can be called with the PnP automatic configuration magic.
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 the existence of protected mode PnP BIOS calls have been checked, the PCI v2.0c+ calls can be called (see INT 0x1A, function 0xB400 to 0xB407 in Ralf Brown's INT List).
Note that not many BIOS seem to support PnP BIOS32 calls, so 16-bit protected mode calling directly to the PnP BIOS (requiring a 286 TSS) may have to be used instead.
