Back to main

 

Function 62 and its subfunctions (0-2, 4-6, 8-10)

 

Subfunction 0 - get the version of the PCI interface

 

Options:

·         eax = 62 - function number

·         bl = 0 - subfunction number

Return value:

·         eax = -1 - access to PCI is prohibited; otherwise

·         ah.al = PCI version (ah = version, al = sub version)

·         high word eax cleared

 

Remarks:

·         Low-level access to PCI for applications of sub-function 12 of function 21 must be enabled in advance.

·         If the PCI BIOS is not supported, then the value of ax is undefined.

 

Constants for registers:

  eax - SF_PCI (62)

  ebx - SSF_GET_VERSION (0)

 

Subfunction 1 - get the latest PCI bus number

 

Options:

·         eax = 62 - function number

·         bl = 1 - subfunction number

Return value:

·         eax = -1 - access to PCI is prohibited; otherwise

·         al = last PCI bus number; the remaining eax bytes are destroyed

 

Remarks:

·         Low-level access to PCI for applications of sub-function 12 of function 21 must be enabled in advance.

·         If the PCI BIOS is not supported, then al is undefined.

 

Constants for registers:

  eax - SF_PCI (62)

  ebx - SSF_GET_LAST_BUS (1)

 

Subfunction 2 - Obtain the mechanism for accessing the PCI configuration space

 

Options:

·         eax = 62 - function number

·         bl = 2 - subfunction number

Return value:

·         eax = -1 - access to PCI is prohibited; otherwise

·         al = mechanism (1 or 2); other eax bytes are destroyed

 

Remarks:

·         Low-level access to PCI for applications of sub-function 12 of function 21 must be enabled in advance.

·         The mechanism of treatment is selected in accordance with the characteristics of the equipment.

·         Sub-functions of reading and writing automatically work with the selected mechanism.

 

Constants for registers:

  eax - SF_PCI (62)

  ebx - SSF_GET_ADRR_MODE (2)

 

Subfunctions 4,5,6 - read the PCI register

 

Options:

·         eax = 62 - function number

·         bl = 4 - read byte

·         bl = 5 - read the word

·         bl = 6 - read double word

·         bh = PCI bus number

·         ch = dddddfff, where ddddd = device number on the bus, fff = device function number

·         cl = register number (must be even for bl = 5, divide by 4 for bl = 6)

Return value:

·         eax = -1 - error (access to PCI or unsupported parameters is prohibited); otherwise

·         al / ax / eax (depending on the requested size) contains data; the rest of the eax register collapses

 

Remarks:

·         Low-level access to PCI for applications of sub-function 12 of function 21 must be enabled in advance.

·         Access mechanism 2 supports only 16 devices on the bus and ignores the function number. You can get access mechanism by calling subfunction 2.

·         Some registers are standard and exist for all devices, some are determined by a specific device. The first list includes, for example, the well-known Interrupt List by Ralf Brown (http://www.pobox.com/~ralf/files.html, ftp://ftp.cs.cmu.edu/afs/cs/user/ralf /pub/); the second list must be specified in the device documentation.

 

Constants for registers:

  eax - SF_PCI (62)

  ebx - SSF_READ_BYTE (4), SSF_READ_WORD (5), SSF_READ_DWORD (6)

 

Subfunctions 8,9,10 - write to the PCI register

 

Options:

·         eax = 62 - function number

·         bl = 8 - write byte

·         bl = 9 - write the word

·         bl = 10 - write a double word

·         bh = PCI bus number

·         ch = dddddfff, where ddddd = device number on the bus, fff = device function number

·         cl = register number (must be even for bl = 9, divide by 4 for bl = 10)

·         dl / dx / edx (depending on the requested size) contains data to be written

Return value:

·         eax = -1 - error (denied access to PCI or unsupported parameters)

·         eax = 0 - successful

 

Remarks:

·         Low-level access to PCI for applications of sub-function 12 of function 21 must be enabled in advance.

·         Access mechanism 2 supports only 16 devices on the bus and ignores the function number. You can get access mechanism by calling subfunction 2.

·         Some registers are standard and exist for all devices, some are determined by a specific device. The first list includes, for example, the famous Interrupt List by Ralf Brown (see above); the second list must be specified in the device documentation.

 

Constants for registers:

   eax - SF_PCI (62)

   ebx - SSF_WRITE_BYTE (8), SSF_WRITE_WORD (9), SSF_WRITE_DWORD (10)