Chapter 4 – Programming
4-7
Calling Conventions
The PCI BIOS functions preserve all registers and flags except those used for return pa-
rameters. The Carry Flag [CF] will be altered as shown to indicate completion status.
The calling routine will be returned to with the interrupt flag unmodified and interrupts
will not be enabled during function execution. These routines, which are re-entrant, re-
quire 1024 bytes of stack space and the stack segment must be the same size (i.e., 16- or
32-bit) as the code segment. The PCI BIOS provides a 16-bit real and protect mode inter-
face and a 32-bit protect mode interface.
16-Bit Interface
The 16-bit interface is provided through the Int 1Ah software interrupt. The PCI BIOS
Int 1Ah interface operates in either real mode, virtual-86 mode, or 16:16 protect mode.
The Int 1Ah entry point supports 16-bit code only.
32-Bit Interface
The protected mode interface supports 32-bit protect mode callers. The protected mode
PCI BIOS interface is accessed by calling through a protected mode entry point in the
PCI BIOS. The entry point and information needed for building the segment descriptors
are provided by the BIOS32 Service Directory. Thirty-two bit callers invoke the PCI
BIOS routines using CALL FAR.
The BIOS32 Service Directory is implemented in the BIOS in a contiguous 16-byte data
structure, beginning on a 16-byte boundary somewhere in the physical address range
0E0000h-0FFFFFh. The address range should be scanned for the following valid, check-
summed data structure containing the following fields:
Table 4-4 BIOS32 Service Table
Offset
Size
Description
0
4 bytes
Signature string in ASCII. The string is
_32_
. This puts an underscore at offset
0, a
3
at offset 1, a
2
at offset 2, and another underscore at offset 3.
4
4 bytes
Entry point for the BIOS32 Service Directory. This is a 32-bit physical address.
8
1 byte
Revision level.
9
1 byte
Length of the data structure in 16-byte increments. (This data structure is 16
bytes long, so this field contains 01h.)
0Ah
1 byte
Checksum. This field is the checksum of the complete data structure. The sum
of all bytes must add up to 0.
0Bh
5 bytes
Reserved. Must be zero.
The BIOS32 Service Directory is accessed by doing a FAR CALL to the entry point ob-
tained from the Service data structure. There are several requirements about the calling
environment that must be met. The CS code segment selector and the DS data segment
selector must be set up to encompass the physical page holding the entry point as well as
the immediately following physical page. They must also have the same base. The SS
stack segment selector must be 32-bit and provide at least 1 KB of stack space. The
calling environment must also allow access to I/O space.
The BIOS32 Service Directory provides a single function call to locate the PCI BIOS
service. All parameters to the function are passed in registers. Parameter descriptions are
provided below. Three values are returned by the call. The first is the base physical ad-
dress of the PCI BIOS service, the second is the length of the service, and the third is the
entry point to the service encoded as an offset from the base. The first and second values
can be used to build the code segment selector and data segment selector for accessing
the service.
Summary of Contents for XVME-653
Page 4: ......
Page 8: ......
Page 32: ...XVME 653 658 Manual 2 16 Figure 2 3 XVME 653 658 Front Panel...
Page 56: ......
Page 72: ......
Page 82: ......
Page 86: ......
Page 88: ......
Page 89: ......
Page 90: ......
Page 91: ......
Page 92: ......
Page 93: ......
Page 94: ......
Page 95: ......
Page 96: ......
Page 97: ......
Page 98: ......
Page 99: ......
Page 100: ......
Page 101: ......
Page 102: ......
Page 103: ......
Page 104: ......
Page 105: ......
Page 106: ......
Page 107: ......
Page 108: ......
Page 109: ......
Page 110: ......