
Applied Micro Circuits Corporation
6195 Lusk Blvd., San Diego, CA 92121 (619) 450-9333
15-70
S5933
PCI CONTROLLER
byte register_number,
dword value);
/****************************************************************************/
/*
*/
/* Define macros to obtain individual bytes from a word register
*/
/*
*/
/****************************************************************************/
#define HIGH_BYTE(ax) (ax >> 8)
#define LOW_BYTE(ax) (ax & 0xff)
/****************************************************************************/
/*
*/
/*
PCI_BIOS_PRESENT
*/
/*
*/
/* Purpose: Determine the presence of the PCI BIOS
*/
/*
*/
/* Inputs: None
*/
/*
*/
/* Outputs:
*/
/*
*/
/*
byte *hardware_mechanism
*/
/*
Identifies the hardware characteristics used by the platform.
*/
/*
Value not assigned if NULL pointer.
*/
/*
Bit 0 - Mechanism #1 supported
*/
/*
Bit 1 - Mechanism #2 supported
*/
/*
*/
/*
word *interface_level_version
*/
/*
PCI BIOS Version - Value not assigned if NULL pointer.
*/
/*
High Byte - Major version number
*/
/*
Low Byte
- Minor version number
*/
/*
*/
/*
byte *last_pci_bus_number
*/
/*
Number of last PCI bus in the system. Value not assigned if NULL*/
/*
pointer
*/
/*
*/
/*
Return Value - Indicates presence of PCI BIOS
*/
/*
SUCCESSFUL - PCI BIOS Present
*/
/*
NOT_SUCCESSFUL - PCI BIOS Not Present
*/
/*
*/
/****************************************************************************/
int pci_bios_present(byte *hardware_mechanism,
word *interface_level_version,
byte *last_pci_bus_number)
{
int ret_status;
/* Function Return Status. */
byte bios_present_status;/* Indicates if PCI bios present */
dword pci_signature;
/* PCI Signature (‘P’, ‘C’, ‘I’, ‘ ‘) */
word ax, bx, cx, flags;
/* Temporary variables to hold register values */
/* Load entry registers for PCI BIOS */
_AH = PCI_FUNCTION_ID;
_AL = PCI_BIOS_PRESENT;
/* Call PCI BIOS Int 1Ah interface */