PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

Hard Decoding Device Address Space

Hard decoding is a practice in which a PCI device does not employ the fully relocatable PCI base address method for defining its address spaces. Instead, it chooses an address space and decodes accesses to it, with no indication to the system that it has done so.

While hard decoding is not recommended by the PCI specification, certain designs based on Intel microprocessor architecture have used it--for example, VGA and IDE expansion cards. Hard decoding cripples the ability of system software to resolve address conflicts between devices. A problem exists when multiple devices that hard decode the same address space are plugged into a system, or when a device does not notify the system that it has hard decoded portions of the address space. If the system knows the range of addresses that a device hard decodes, addresses can be assigned to fully relocatable devices around the spaces already taken. However, if two devices that hard decode the same space are installed in the system, address conflicts can be resolved only by the system turning off one of the devices.

You can never hard decode addresses below 1 MB (for example, VGA addresses A0000 through BFFFF) because the Power Macintosh implementation of PCI does not support devices that address this space. Moreover, it is very common for a user to plug in multiple display cards to use multiple monitors. If more than one of these cards hard decodes the VGA addresses, only one will be enabled, and it cannot be guaranteed which device that will be. It is essential, therefore, that devices which hard decode address spaces after reset provide a method to turn off their hard-decoding logic. The result of turning off hard decoding must mean that the device responds to accesses only in the address spaces that are assigned to it through the PCI base register interface. This method can be executed in FCode during startup, before the device enters its reg property into the device tree. See Startup and System Configuration for more details.

To summarize, avoid hard decoding to ensure that your card will always be allocated address space. If a device cannot turn off hard decoding, its FCode must enter a fixed address reg property entry into the device tree.


© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)