Browse Prior Art Database

Method to Initialize the Error Handling Logic of a Peripheral Component Interconnect System

IP.com Disclosure Number: IPCOM000113495D
Original Publication Date: 1994-Aug-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 4 page(s) / 86K

Publishing Venue

IBM

Related People

Merkin, CM: AUTHOR

Abstract

Disclosed is a routine which can be used by the power-on software of a computing system to ensure that all Peripheral Component Interconnect (PCI) devices are enabled to report errors.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 51% of the total text.

Method to Initialize the Error Handling Logic of a Peripheral Component
Interconnect System

      Disclosed is a routine which can be used by the power-on
software of a computing system to ensure that all Peripheral
Component Interconnect (PCI) devices are enabled to report errors.

      The PCI bus provides standard hardware registers through which
devices can signal that an error has occurred.  When the system
powers up, the architected default values for these registers prevent
the devices from reporting errors.  Later, during subsequent power-on
sequencing, these hardware devices are enabled to ensure that the
system is capable of detecting failures.  The PCI device
initialization routine is called by power-on software through the
function pciInitialize [*].

      This function may be called through the "C" interface as
follows:
pciInitialize (0);  /* Initialize PCI devices, starting at bus#0 */

      Alternately, this function may be called through the Intel* x86
assembler interface as follows:
 push  0               ;  Starting at bus#0
 call  _pciInitialize  ;    initialize PCI devices
 add   SP, 2

      The following "C" language routine, in which the functions
ReadPCIword and WritePCIword denote double-byte accesses to the PCI
configuration space for the device at the given PCI bus, device, and
function number, and in which ReadPCIbyte denotes a single-byte
access of this type, provides a recursive algorithm having the
error-handling hardware initialization required for a general,
unbounded PCI system solution:
 void pciInitialize (unsigned char BusNo)
   {
    unsigned char  DevNo,/*Current bus device number (0:31)
 */
                  FunctionNo, /* Current bus/device function number
               (0/7) */
                  multi;/*Multi-function device? (TRUE/FALSE)*/
   unsigned short vid,/*Current device vendor ID*/
                  did,/*Current device ID*/
                  sv;
   for (DevNo = 0; DevNo <= 31; DevNo++)
     {
       for FunctionNo = 0, multi = TRUE; FunctionNo <= 7 && multi ==
      TRUE; FunctionNo++)
         {
           /*-----
           ** A vendor ID of 0FFFFh indicates that a
bus/device/function
           ** is not present.  If the "not present" indication is
           ** returned for function#0, none of the other bus/device
           ** functions are present, either.
           */
           vid = ReadPCIword (BusNo, DevNo, FunctionNo,
PCIHvendorID);
           if (vid == 0xFFFF && FunctionNo == 0)
             {
               multi = FALSE;
             }
           else if (vid != 0xFFFF)
             {
               /*-----
               ** Read the Status...