Linux Step By Steps
ISAPNP-Programming-Records

UP

INTERFACE
ISOLATION
SERIAL NUMBER
DECODES
REGISTERS


READING PLUG AND PLAY INFO

The PNP interface of a card will supply an stream of 'records' about itself when that specific csn is woken up. The first part of this byte stream is the same 9 byte serial number (including checksum) that was provided during serial isolation. Only this time, the data is in bytes rather than psuedo encoded 'one bits'.

After which a variable number of records is provided. Variable meaning it continues until all resources and info about the card are supplied to the interface.

Typically, a 'woken' card  will issue the following record stream

9 byte serial number
pnp version
card name
vendor id
  device id 0
   device name
   resource config 0
   resource config n
   resource end
  device id n
   device name
   resource configs 0 to n
   resource end
end

The structure of each record is fixed as follows <TAG> [length] [data].
 

TAG 1 Byte describing this record type.
LENGTH An optional two byte length (lsb first) 
DATA.............. A variable number of bytes (if any) as determined by the length fields.

Tag byte encoding

<TAG> [nnnn] data.......

Two types of tag exist. Long, and short format, as defined by bit 7 of the byte

Short format:    0TTTTLLL  data....

Long Format:   1TTTTTTT   nnnn  data.....

TTTTTTT is the decode, and the number of data bytes is declared in the next two bytes.

Almost all tag decodes have a fixed length associated with them.