BIOS32: Difference between revisions
[unchecked revision] | [unchecked revision] |
Added structure for Service Directory Header |
Added details about finding available services |
||
Line 1: | Line 1: | ||
⚫ | |||
== BIOS32 == |
|||
== Introduction == |
|||
BIOS32 is a method for calling BIOS services directly from 32 bit Protected Mode. It is mainly used for PNP and PCI services. |
|||
BIOS32 is a method for calling BIOS services from either 16-Bit Real Mode, 16-Bit Protected Mode or 32-Bit Protected Mode. It is mainly used for PNP and PCI services, but there may be other services available, as well. These services are not well documented, and are not necessarily supported on all systems. The BIOS32 API provides a method to query the system for support for a specific service, but it does not provide any method for getting a complete list of supported services. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
The BIOS32 ''Service Directory'' Header is located on a paragraph (16 Byte) boundary in the physical memory region 0xE0000-0xFFFFF. |
The BIOS32 ''Service Directory'' Header is located on a paragraph (16 Byte) boundary in the physical memory region 0xE0000-0xFFFFF. |
||
It starts with a 4 byte signature of "_32_" (0x5F32335F) |
It starts with a 4 byte signature of "_32_" (0x5F32335F) |
||
=== Structure === |
|||
⚫ | |||
{| {{wikitable}} |
{| {{wikitable}} |
||
|+<b>Service Directory Header</b> |
|+<b>Service Directory Header</b> |
||
Line 25: | Line 27: | ||
|11 || 5 bytes || Reserved || Reserved for future use, should be 0. |
|11 || 5 bytes || Reserved || Reserved for future use, should be 0. |
||
|} |
|} |
||
=== Service Availability === |
|||
In order to verify that a service is available, you must FAR JUMP to the 32-bit address located at offset 4 in the structure above, with the EBX register set to zero, and the EAX register set to the Component ID for the service that you are looking for. If the service is available, the AL register will contain a zero, EBX will contain the base address for the service, ECX will contain the length of the service in bytes, and EDX will contain the offset (from EBX) for the entry point for the service. |
|||
If the service is not supported, the AL register will contain either 0x80 or 0x81. (The documentation is ambiguous on this specific value, so it may be better to check for a non-zero value) |
|||
== See Also == |
== See Also == |
||
=== On the Wiki === |
=== On the Wiki === |
Revision as of 20:03, 26 August 2014
Introduction
BIOS32 is a method for calling BIOS services from either 16-Bit Real Mode, 16-Bit Protected Mode or 32-Bit Protected Mode. It is mainly used for PNP and PCI services, but there may be other services available, as well. These services are not well documented, and are not necessarily supported on all systems. The BIOS32 API provides a method to query the system for support for a specific service, but it does not provide any method for getting a complete list of supported services.
Interface
Locating
The BIOS32 Service Directory Header is located on a paragraph (16 Byte) boundary in the physical memory region 0xE0000-0xFFFFF. It starts with a 4 byte signature of "_32_" (0x5F32335F)
Structure
Offset | Size | Name | Description |
0 | 4 bytes | Signature | ASCII signature "_32_" (0x5F32335F) |
4 | 4 bytes | Entry Point | 32 bit physical address (not CS:IP) of BIOS32 calling interface entry point. |
8 | 1 byte | Revision | Revision of BIOS32. Current 0h |
9 | 1 byte | Length | Length of structure, in paragraphs |
10 | 1 byte | Checksum | A summation checksum (1 byte granularity) |
11 | 5 bytes | Reserved | Reserved for future use, should be 0. |
Service Availability
In order to verify that a service is available, you must FAR JUMP to the 32-bit address located at offset 4 in the structure above, with the EBX register set to zero, and the EAX register set to the Component ID for the service that you are looking for. If the service is available, the AL register will contain a zero, EBX will contain the base address for the service, ECX will contain the length of the service in bytes, and EDX will contain the offset (from EBX) for the entry point for the service.
If the service is not supported, the AL register will contain either 0x80 or 0x81. (The documentation is ambiguous on this specific value, so it may be better to check for a non-zero value)