Windows 95 ISA Plug and Play Resource Allocation

Windows 95 revolutionized PC hardware management by integrating the ISA Plug and Play (PnP) specification directly into the operating system's kernel architecture. Prior to this, configuring expansion cards on the Industry Standard Architecture (ISA) bus required manually setting jumpers and DIP switches to avoid hardware resource conflicts. Windows 95 automated this process by introducing a dedicated software framework—led by the Configuration Manager, bus enumerators, and resource arbiters—that dynamically detected ISA PnP hardware, isolated individual cards, resolved conflicts, and programmatically assigned Interrupt Request Lines (IRQs), Direct Memory Access (DMA) channels, I/O port addresses, and memory ranges.

The ISA Plug and Play State Machine

Standard legacy ISA cards lacked an addressing mechanism to communicate with the CPU before their base addresses were configured. To solve this, the ISA Plug and Play specification defined a strict hardware state machine that all compliant cards entered upon system power-up.

  1. Wait for Key State: At boot, every ISA PnP device powers on into an inactive, silent mode where it does not decode standard bus cycles or respond to I/O reads.
  2. Initiation Key Sequence: The Windows 95 ISA bus enumerator sends a specific 32-byte pseudo-random sequence, known as the Initiation Key, to a fixed write-only I/O port (typically port 0x0279). This sequence transitions all ISA PnP cards into the "Sleep" state simultaneously.
  3. Isolation Protocol: Because all cards share the same bus, Windows 95 executes an isolation protocol to address cards individually without address contention. The OS commands all cards to write their 64-bit unique Serial Identifier (which includes a vendor ID, product ID, and checksum) bit-by-bit to a designated read port. Using a hardware-level wire-OR arbitration mechanism, cards that read a differing bit back off until a single card remains active.
  4. Card Select Number (CSN): Once an individual card wins the isolation cycle, the OS assigns it a unique Card Select Number (CSN) from 1 to 255. The card enters the "Standby" state, and the process repeats until all cards on the bus have distinct CSNs.

Reading Resource Requirements

With unique CSNs assigned, the ISA bus enumerator queries each card's internal non-volatile storage to read its resource data structure. This structure outlines the device's operational capabilities, including:

  • Acceptable alternative ranges for I/O base addresses and memory windows.
  • Permissible IRQ lines (and whether they can be shared).
  • Supported DMA channels.
  • Dependent resource lists (for example, selecting IRQ 5 might dictate using I/O port 0x220).

The bus enumerator packages these hardware requirements into device nodes and hands them to the central Windows 95 configuration subsystem.

The Windows 95 Configuration Subsystem

Windows 95 processes hardware resources centrally through the cooperation of three core components:

  • Configuration Manager (ConfigMgr): The central orchestrator that builds and maintains the dynamic Hardware Tree in memory. ConfigMgr tracks all devices, active drivers, and system states.
  • ISA Bus Enumerator: The hardware-specific driver (ISAPNP.VXD) responsible for executing the physical isolation protocol, reading the resource structures from the cards, and writing resource allocations back to them.
  • Resource Arbiters: Dedicated system modules that track available system resources globally. Windows 95 contains distinct arbiters for IRQs, I/O ports, DMA channels, and memory ranges.

When the Configuration Manager receives the resource requirements from the ISA enumerator, it queries the arbiters to build an conflict-free resource assignment plan.

Legacy Device Coexistence and Conflict Resolution

A primary challenge for Windows 95 was the coexistence of non-PnP "legacy" ISA cards with modern PnP cards. Because legacy cards could not be programmatically queried, Windows 95 handled them through several steps:

  1. Static Detection and Registry Constraints: Legacy hardware configurations were either detected during the initial Windows 95 setup via low-level hardware probing or manually entered by the user via the Device Manager.
  2. Resource Reservation: The arbiters marked resources used by legacy devices as reserved and immutable, removing them from the pool of available allocations.
  3. PnP Rebalancing: When configuring ISA PnP devices, the arbiters tested various combinations of flexible configurations specified by the PnP cards' resource descriptors, mapping them around the fixed, legacy allocations. If a configuration conflict arose, the arbiters attempted to dynamically reshuffle other PnP devices that possessed alternative configurations.

Configuration Programming and Activation

Once the Configuration Manager and arbiters finalized a conflict-free resource map:

  1. The ISA bus enumerator selected each card individually using its CSN.
  2. The assigned base I/O addresses, memory windows, IRQ numbers, and DMA channels were written into the standard PnP configuration registers located on the card.
  3. The enumerator wrote an activation command to the card's active control register, shifting it into the "Configured" state.

Once activated, the card began decoding its newly assigned bus resources just like a traditional ISA card. The Configuration Manager then loaded the appropriate Virtual Device Drivers (VxDs), mapped them to the assigned resources, and made the device available to the operating system.