4.3. Control Register Summary
Plug and Play cards respond to commands written to Plug and Play registers as well as certain ISA bus conditions. These commands are summarized below:
- RESET_DRV - This is the ISA bus reset signal. When a Plug and Play card detects this signal it enters the Wait for Key state. All CSNs are reset to 0x0. The configuration registers for all logical devices are loaded with their power-up values from non-volatile memory or jumpers. All non-boot logical devices become inactive. Boot devices become active using their power-up ISA resources.
Note The software must delay 2 msec after RESET_DRV before accessing the auto-configuration ports.
- Config control register - The Config Control register consists of three independent commands which are activated by writing a "1" to their corresponding register bits. These bits are automatically reset to "0" by the hardware after the commands execute.
- Reset command - The Reset command is sent to the Plug and Play cards by writing a value of 0x01 to the Config Control register. All Plug and Play cards in any state, except Wait for Key, respond to this command. This command performs a reset function on all logical devices. This resets the contents of configuration registers to their default state. The configuration registers for all logical devices are loaded with their power-up values from non-volatile memory or jumpers. The READ_DATA port, CSN and Plug and Play state are preserved.
Note The software must delay 2 msec after issuing the reset command before accessing the auto-configuration ports.
- Wait for Key command - The Wait for Key command is sent to the Plug and Play cards by writing a value of 0x02 to the Config Control register. All Plug and Play cards in any state will respond to this command. This command forces all Plug and Play cards to enter the Wait for Key state. The CSNs are preserved and no logical device status is changed.
- Reset CSN command - The Reset CSN command is sent to the Plug and Play cards by writing a value of 0x04 to the Config Control register. All Plug and Play cards in any state, except Wait for Key, will reset their CSN to 0.
Implementor's note: On a CTRL-ALT-DEL key sequence, the BIOS issues a reset of all logical devices, restores configuration registers to their default values, and returns all cards to the Wait for Key state (i.e., write a value of 0x03 to the Config Control register). This retains the CSNs and READ_DATA port and will eliminate the need to go through the isolation sequence again. A write to this register with all three bits set is equivalent to a RESET_DRV event.
- Set RD_DATA Port command - This command sets the address of the READ_DATA Port for all Plug and Play cards. Write data bits[7:0] is used as ISA I/O bus address bits[09:02]. The ISA bus address bits[1:0] is fixed at binary "11." The ISA bus address bits[15:10] is fixed at binary "000000." This command can only be used in the Isolation state. The exact method for setting the read data port is:
Issue the Initiation Key
Send command Wake[0]
Send command Set RD_DATA Port
Note After a RESET_DRV or Reset CSN command, this register is considered uninitialized and must be reinitialized.
- Serial Isolation register - A read from the Serial Isolation register causes Plug and Play cards in the Isolation state to respond to the ISA bus read cycle as described in the Isolation Protocol section above. Cards that "lose" the isolation protocol will enter the Sleep state.
- Card Select Number - A Card Select Number is uniquely assigned to each Plug and Play card when the card has been isolated and is the only card in the Isolation state. A Card Select Number of zero represents an unidentified card. Valid Card Select Numbers for identified ISA cards range from 1 to 255 and must be assigned sequentially starting from 1. The Card Select Number is used to select a card via the Wake[CSN] command as described above. The Card Select Number on all ISA cards is set to zero on a RESET_DRV or Reset CSN command. The CSN is never set to zero using the CSN register.
Figure 7. Serial Identifier and Resource Data
- Wake[CSN] command - This command is used to bring ISA cards in the Sleep state to either the Isolation state or the Config state. A Wake[CSN] command with a parameter of zero will force all cards without a CSN to enter the Isolation state. A Wake[CSN] command with a parameter other than zero will force a card with a matching CSN to enter the Config state. Any card in the Isolation or Config states that receives a Wake[CSN] command with a parameter that does not match its CSN will transition to the Sleep state.
All Plug and Play cards function as if their 72-bit serial identifier and their resource data come from a single serial device. The pointer to this data is reset to the beginning whenever a card receives any Wake[CSN] command.
- Resource Data register - A read of the Resource Data register will return one byte of resource data from a Plug and Play card in the Config state. Resource data is always returned byte sequentially. The Status register must always be read to confirm that resource data is available before the Resource Data register is read.
- Status register - Bit[0] of the Status register indicates that the next byte of resource data is available to be read. If this bit is equal to one then data is available, otherwise resource data is not yet available. The Plug and Play software will poll this location until bit[0] is set, then the next data byte from the Resource Data register is read.
- Logical Device Number register - The logical device number register is used to select which logical device the following configuration commands will operate on. Cards may contain more than one logical device, in which case the logical device is selected by writing the 8-bit logical device number into this register. The logical device number is determined by the order in which the logical devices are read from the resource data. The first logical device number is 0, the second is 1, and so on.
- I/O Range Check register - I/O Range Check register allows the Plug and Play software to determine if another card conflicts with the I/O port range that has been assigned to a logical device. The I/O range check works by having all I/O ranges that would be used by a logical device return 0x55 then 0xAA on I/O read commands. The Plug and Play software performs reads to all the ports that would be used by the logical device and verifies that the correct data is returned. If a conflict is detected, then the Plug and Play software relocates the I/O range of the logical device to a new location. Setting bit[1] of this register enables the I/O check range check logic. Setting bit[0] forces the logical device to respond to I/O reads within its assigned I/O range with the value 0x55. If bit[0] is cleared, then the logical device responds to reads within its assigned I/O range with the value of 0xAA. This function operates only when bit[0] of the Activate register (described below) is not set. This command is optional and is not implemented on cards that do not have configurable I/O port ranges.
- Activate register - The Activate register is a read/write register that is used to activate a logical device. An active logical device responds to all ISA bus cycles as per its normal operation. An inactive logical device does not respond to nor drive any ISA bus signals. Bit[0] is the active bit, if it is set to "1" then the logical device is active, otherwise it is inactive.
The state transitions for the Plug and Play ISA card are shown below.
Figure 8. Plug and Play ISA Card State Transitions