TITLE
    FireWire: Technology Overview
Article ID:
Created:
Modified:
30520
4/29/98
6/12/00

TOPIC

    This article provides a brief overview of the FireWire technology used for Macintosh computers.


DISCUSSION

    What is FireWire?
    FireWire is a cross-platform implementation of the high speed serial data bus -- defined by IEEE Standard 1394-1995 -- that can move large amounts of data between computers and peripheral devices. It features simplified cabling, hot swapping and transfer speeds up to 400 megabits per second. Major manufacturers of multimedia devices are already adopting the FireWire technology.

    Invented at Apple, FireWire enables the connection of new digital consumer products including digital camcorders, digital video tapes, digital video disks, set-top boxes, and music systems directly to the personal computer. Apple is a cofounder of the 1394 Trade Association and is actively participating in the group's market and technology development activities.


    Mac OS Support
    The Mac OS is being extended to provide services and support for FireWire drivers and the applications that control them. This support exists below the Toolbox level, so developers of existing high-level applications do not need to modify their code to take advantage of FireWire input/output (I/O).

    Main features of Mac OS support for FireWire include:
    • A hardware abstraction layer that isolates peripheral driver code from host adapter driver code. This lets the computer work with multiple FireWire cards from different vendors.
    • Automatic startup and runtime driver loading by a system expert.
    • A native driver model for PCI-based Power Macintosh computers running System 7.6 and later.
    • Works with many third party drivers for many device types.
    • Hot connect and disconnect capabilities for devices.
    • Asynchronous and isochronous services for drivers.
    • Bus topology management.
    Mac OS supports these features through a FireWire family expert and a set of FireWire family services.


    FW Interface Modules
    The FireWire interface module (FWIM) software architecture abstracts the hardware specifics of a FireWire card or logic board implementation into a standard interface. It resembles the SCSI interface module (SIM) architecture described in Inside Macintosh: Devices. The FWIM architecture lets multiple FireWire cards and devices from multiple vendors work together in a single system.

    A FWIM is a hardware driver that Mac OS uses to access a FireWire bus. It exports a driver descriptor that Mac OS uses to match it with a FireWire card. When starting up, the Mac OS scans the Name Registry for devices that have a driver with the service category 'fwim'. It loads the appropriate FWIM and calls the FWIM's initialization routine. It then uses the FWIM interface to scan the bus for FireWire devices and loads their drivers, as described below. In this way, the Mac OS keeps track of which FWIM is associated with each device driver.


    FW Device Drivers
    FireWire device drivers follow the architecture described in Designing PCI Cards and Drivers for Power Macintosh Computers. Each driver is a Macintosh code fragment that exports a driver description structure.

    When a FireWire bus reset occurs, the FireWire expert scans the bus for attached devices. It creates a Name Registry entry for each device, containing the device's Spec_Id and Sw_Version values. The expert then loads and installs the appropriate driver for each device by matching these values to the driver's description structure.

    Once installed, the driver registers itself with the set of FireWire family services supplied by the Mac OS. Some of these services are described below.


    Asynchronous Request Services
    FireWire family services can be used to send asynchronous requests to nodes on a FireWire bus, including basic read, write, and lock requests. Atomic routines are also provided for logical bit operations, addition, and incrementing.

    The asynchronous request services use reference IDs, which identify entities on the FireWire bus such as drivers, devices, interface cards, the isochronous resource manager, the bus manager, or the root device. A driver can use its own reference ID to specify the target of an asynchronous request. Using reference IDs reduces the complexity of a FireWire driver by making it unnecessary to deal with node IDs, topology generation numbers, and bus resets.


    Isochronous Services
    FireWire family services in Mac OS provide support for the isochronous data streams specified by the IEEE 1394 standard. These services include allocating isochronous channel numbers and bandwidth, as well as setting up and controlling data streams between a remote device and the local node or between multiple remote devices.

    Isochronous services provide a flexible buffering mechanism to support a wide variety of data formats. They use isochronous channel IDs to construct pathways between devices and identify all the information needed to manage data transfers. Channel IDs also help coordinate the construction and control of isochronous channels between multiple drivers.


    Configuration ROM Services
    Mac OS services are provided for searching and accessing configuration ROMs on local and remote nodes of a FireWire bus, using relatively simple data structures. These services make it unnecessary for the driver to interpret the format of the CSR Configuration ROM directory hierarchy specified by the IEEE 1394 standard. Using configuration ROM entry IDs, drivers can reference specific entries in a CSR Configuration ROM and access their values.


    FCP Services
    Certain FireWire family services can be used to send Function Control Protocol (FCP) commands in a way similar to asynchronous requests. These services help drivers interpret and match FCP responses to outstanding FCP commands.


    Bus Topology Services
    FireWire family services help obtain information about the topology of a FireWire bus. Using them, a driver can access information such as the current bus topology map, a device's node ID, or a device's unique ID.

Document Information
Product Area: Communications-Networking
Category: Other System Connectivity
Sub Category: General Topics

Copyright © 2000 Apple Computer, Inc. All rights reserved.