Expansion Areas

An IOP contains, among other members, the expansion areas required by each driver that receives the IOP. When a driver receives an IOP, it can access its expansion area by using the offset in the DCB_cd_expan_off field to calculate the starting address of the area.

The IOS creates the expansion area for a driver when the driver inserts itself in to the calldown chain. The IOS reserves the number of bytes specified by the ISP_i_cd_expan_len member for the expansion area for the driver. As drivers add themselves to the calldown chain, the IOS keeps a running total of the bytes reserved for all the expansion areas. It keeps this total in the DCB_expansion_length field. The IOS uses this field to determine the offset to a new expansion area whenever a driver requests one.

After all drivers inserted themselves in the calldown chain, the IOS calculates the size of an IOP as the sum of a static IOP, including the IOP header and IOR structure, and the total size of the expansion areas as given by the DCB_expansion_length field. The IOS places this total IOP size in the VRP structure so that IOS clients that prepare requests can allocate an IOP of the correct size. All expansion areas are placed at the end of the static IOP.

The expansion area offset a driver receives depends on the order in which the driver is initialized. The offsets into the expansion area are negative, so that a driver loading later will have a lower memory address pointing to its expansion offset.

Insertion Order

Size

Offset

3rd

Z

-(X+Y)

2nd

Y

-X

1st

X

0


See also DCB, IOP, VRP