Programming Interface Information: This information is NOT intended to be used as Programming Interfaces of z/VM.

#### CTCBK

Prolog

Control Block Contents
CTCBK DSECT
CTCPGTBL DSECT

Storage Layout

Cross Reference (Contains links to field and bit definitions)

#### CTCBK Prolog

     NAME       : HCPCTCBK
     DESCRIPTION: ISFC Link Extension for CTCA devices
     DSECT      : CTCBK
     FUNCTION   : This DSECT maps information for an ISFC link using
                  a Channel to Channel Adapter.
     LOCATED BY : LNKEXTBK  points to the CTCBK for this link.
                  LDVEXTBK  points to the CTCBK for this link.
     CREATED BY : HCPDCD    when a new link is activated.
     DELETED BY : HCPDCD    when a link is deactivated.
     SERIALIZED : The ISFC Global Lock (HCPBDSGL).
                  The ISFC LNKBK lock (LNKLKWRD).
     COMMENTS   : None

#### CTCBK Control Block Content

#### CTCBK DSECT

####

####

####

    Hex   Dec Type/Val   Lng Label (dup)    Comments
    ---- ---- --------- ---- -------------- --------
    0000    0 Structure      CTCBK          ISFC Link Extension for CTCA
                                            devices
          CTC Link Header.
             The link header is one reason why CTCBK storage has
             to be below the 2 gig bar. Treat the address of
             CTCLNKHD as a Host Logical address.
    0000    0 Bitstring    8 CTCLNKHD (0)   Dummy link header
    0000    0 Character    2 CTCRELID       Current release identifier
    0002    2 Signed       2 CTCBUFCT       Buffer allocation count
    0004    4 Signed       2 CTCWRCNT       Active Write buffer count
    0006    6 Bitstring    1 CTCCAPS        Channel driver capabilities
    0007    7 Bitstring    1 *              Reserved
          ISFC Objects (Link, DataQueue, and Device).
    0008    8 Address      4 CTCLNKBK       Address of ISFC link block
    000C   12 Address      4 CTCQUEBK       Address of ISFC Data QUEBK
    0010   16 Address      4 CTCLDVBK       Address of ISFC device extension
    0014   20 Address      4 CTCACOLS       Address of Accounting Fields
          Link Status.
    0018   24 Signed       4 CTCDEVNO       Real device address
    001C   28 Character    4 CTCDEVID       Printable device address
    0020   32 Bitstring    1 CTCSTAT        Link Status
              00000001       LNKIDLE        1 - Idle
              00000002       LNKBUSY        2 - Busy
              00000003       LNKWRITE       3 - Write in progress
              00000004       LNKREAD        4 - Read in progress
              00000005       LNKRESET       5 - Reset in progress
              00000006       LNKATTN        6 - Handling link attention
              00000007       LNKFATAL       7 - Fatal I/O on link
              00000008       LNKINIT        8 - Initialization in progress
              00000008       LNKDEACT       8 - Deactivation in progress
    0021   33 Bitstring    1 CTCFLAG        Link Flags
              1... ....      CTCDLPRG       X'80' - Delete in progress
              .1.. ....      CTCWSPRG       X'40' - Write Sequence in
                                            progress Notes : CTCPCAPS is
                                            cleared during a line driver
                                            RESET.
    0022   34 Bitstring    1 CTCPCAPS       Partner's link capabilities
              1... ....      CTCWEOF        X'80' - Write End Of File
                                            supported
    0023   35 Bitstring    1 *              Reserved
    0024   36 Signed       4 CTCMSNUM       Most recent msg number
    0028   40 Signed       4 CTCWSQCT       Write Sequence count
    002C   44 Bitstring    4 *              Reserved
          CTCMDEHD and CTCMDETL are used to maintain a list of
          messages (MDEBKs) for this link that have not yet been
          verified.  An MDEBK in this list may represent frames in
          various stages of completion (none started, some written,
          some completed).
    0030   48 Address      4 CTCMDEHD       Top of Pending Message queue
    0034   52 Address      4 CTCMDETL       End of Pending Message queue
          Key addresses in the channel programs and page tables.
          All are host logical addresses
    0038   56 Address      4 CTCWRBGN       Address of first Write CCW
    003C   60 Address      4 CTCWREND       Address of last Write CCW
    0040   64 Address      4 CTCRDBGN       Address of first Read CCW
    0044   68 Address      4 CTCRDEND       Address of last Read CCW
    0048   72 Address      4 CTCPGRDR       Address of first Read PGEBK ptr
    004C   76 Address      4 CTCPGWRT       Address of first Write PGEBK ptr
    0050   80 Address      4 CTCWRPTR       Address of current Write ptr
    0054   84 Address      4 CTCRDPTR       Address of current Read ptr
    0058   88 Signed       2 CTCRDCNT       Active Read buffer count
    005A   90 Bitstring    6 *              reserved
          Device status.
    0060   96 Bitstring    1 CTCXSTAT       Latest operation attempted
              00000001       LNKIDLE        1 - Idle
              00000002       LNKBUSY        2 - Busy
              00000003       LNKWRITE       3 - Write in progress
              00000004       LNKREAD        4 - Read in progress
              00000005       LNKRESET       5 - Reset in progress
              00000006       LNKATTN        6 - Handling link attention
              00000007       LNKFATAL       7 - Fatal I/O on link
              00000008       LNKINIT        8 - Initialization in progress
              00000008       LNKDEACT       8 - Deactivation in progress
    0061   97 Bitstring    1 CTCXNEXT       Next operation to be started
              00000001       LNKIDLE        1 - Idle
              00000002       LNKBUSY        2 - Busy
              00000003       LNKWRITE       3 - Write in progress
              00000004       LNKREAD        4 - Read in progress
              00000005       LNKRESET       5 - Reset in progress
              00000006       LNKATTN        6 - Handling link attention
              00000007       LNKFATAL       7 - Fatal I/O on link
              00000008       LNKINIT        8 - Initialization in progress
              00000008       LNKDEACT       8 - Deactivation in progress
    0062   98 Bitstring    1 CTCXPEND       I/O Pending Flags:
              1... ....      CTCIOACT       X'80' - I/O is active on this
                                            device
              .1.. ....      CTCRQSEM       X'40' - SEM is required on this
                                            device
    0063   99 Bitstring    1 *              reserved
    0064  100 Signed       4 CTCXRTRY       Retry counter
          ORB for this device.
                                      Treat as Host Logical address
    0068  104 Bitstring   12 CTCXORB (0)    ORB for I/O requests Treat as
                                            Host Logical address
    0068  104 Signed       4 CTCXRET        ORB User Parm (I/O Return Addr)
    006C  108 Bitstring    4 CTCXREQ        ORB Request Flags Host Absolute
                                            32 bit address
    0070  112 Address      4 CTCXCPA        ORB Channel Program Address
          Interrupt information for this device.
                                      32 bit Host Absolute address
    0074  116 Address      4 CTCXIRB        Latest IRBLK address
    0078  120 Address      4 CTCXSNS        Latest SNSBK address
    007C  124 Signed       4 CTCXIORC       Latest I/O Return Code Host
                                            Logical address
    0080  128 Address      4 CTCXCCWX       Last CCW expected Not in use - 32
                                            bit host absolute
    0084  132 Address      4 CTCXCCWF       Failing CCW Address
    0088  136 Address      8 CTCIDAW (0)    64 Bit Host Absolute address
    0088  136 Address      4 CTCHIDAW       High word of address
    008C  140 Address      4 CTCLIDAW       Low word of address
          Work area for this device.
    0090  144 Dbl-Word     8 CTCXBUFF (8)   Space for a work buffer
          Variable part of the CTCBK.  This area contains:
          - the Write channel program (8 bytes/buffer)
          - the Read channel program (8 bytes/buffer)
          - the PGEBK table (4 bytes/buffer)
          Another area which requires CTCBK storage to be below the
          2 gig bar.
                                     Address of CTCCONT is
                                     treated as Host Logical address
    00D0  208 Dbl-Word     8 CTCCONT (0)    Start of variable length data
              000000D0       CTCBKLEN       *-CTCBK Size of base CTCBK in
                                            bytes
              0000001A       CTCSIZE        (*-CTCBK+7)/8 Size of base CTCBK
                                            in doublewords
          FUNCTION   :
            Map an entry in the table of PGEBK pointers.  This
            table is variable in length and is contained within
            the CTCBK.  Each entry points to a PGEBK that is
            used to manage an input buffer page.
          LOCATED BY :
            CTCPGRDR  points to the first Read entry.
            CTCPGWRT  points to the first Write entry.

    CTCPGTBL DSECT

    Hex   Dec Type/Val   Lng Label (dup)    Comments
    ---- ---- --------- ---- -------------- --------
    0000    0 Structure      CTCPGTBL       ISFC Link Extension for CTCA
                                            devices
    0000    0 Address      4 CTCPGPTR       Address of a PGEBK entry
              00000004       CTCPGLEN       *-CTCPGTBL Length of one PGEBK
                                            pointer
          The CTCBK must fit entirely within a 4K page.  Since the
          variable portion of the control block increases in size
          for each I/O buffer, we have to limit the number of I/O
          buffers that can be defined for this type of link.  The
          limit can be calculated with the following:
            Limit := 4064 - ((CTCSIZE*8) / (L'CCW+L'CCW+2*CTCPGLEN))
          The advertised limit should be set to a reasonable number
          below this calculated limit, leaving room for future
          expansion of the CTCBK.
          Notes      :
            Bytes per page (4064) leaves 32 bytes for free storage
            header and trailer information (currently 24 bytes).
            See HCPFREBK FRERECL for the number of doublewords
            required for free storage management.
              000000A0       CTCMAXCT       (4064-(CTCSIZE*8))/(8+8+(2*CTCPGL
                                            EN)) Max count

    CTCBK Storage Layout

    *** CTCBK - ISFC Link Extension for CTCA devices
    *
    *     +-------------+-------------+-------------+------+------+
    *   0 |  CTCRELID   |  CTCBUFCT   |  CTCWRCNT   |:CAPS |//////|
    *     +-------------+-------------+-------------+------+------+
    *   8 |         CTCLNKBK          |         CTCQUEBK          |
    *     +---------------------------+---------------------------+
    *  10 |         CTCLDVBK          |         CTCACOLS          |
    *     +---------------------------+---------------------------+
    *  18 |         CTCDEVNO          |         CTCDEVID          |
    *     +------+------+------+------+---------------------------+
    *  20 |:STAT |:FLAG |:PCAPS|//////|         CTCMSNUM          |
    *     +------+------+------+------+---------------------------+
    *  28 |         CTCWSQCT          |///////////////////////////|
    *     +---------------------------+---------------------------+
    *  30 |         CTCMDEHD          |         CTCMDETL          |
    *     +---------------------------+---------------------------+
    *  38 |         CTCWRBGN          |         CTCWREND          |
    *     +---------------------------+---------------------------+
    *  40 |         CTCRDBGN          |         CTCRDEND          |
    *     +---------------------------+---------------------------+
    *  48 |         CTCPGRDR          |         CTCPGWRT          |
    *     +---------------------------+---------------------------+
    *  50 |         CTCWRPTR          |         CTCRDPTR          |
    *     +-------------+-------------+---------------------------+
    *  58 |  CTCRDCNT   |/////////////////////////////////////////|
    *     +------+------+------+------+---------------------------+
    *  60 |:XSTAT|:XNEXT|:XPEND|//////|         CTCXRTRY          |
    *     +------+------+------+------+---------------------------+
    *  68 |         CTCXRET           |         CTCXREQ           |
    *     +---------------------------+---------------------------+
    *  70 |         CTCXCPA           |         CTCXIRB           |
    *     +---------------------------+---------------------------+
    *  78 |         CTCXSNS           |         CTCXIORC          |
    *     +---------------------------+---------------------------+
    *  80 |         CTCXCCWX          |         CTCXCCWF          |
    *     +---------------------------+---------------------------+
    *  88 |         CTCHIDAW          |         CTCLIDAW          |
    *     +---------------------------+---------------------------+
    *  90 |                                                       |
    *     =                       CTCXBUFF                        =
    *     |                                                       |
    *     +-------------------------------------------------------+
    *
    *** CTCBK - ISFC Link Extension for CTCA devices

    *** CTCPGTBL - ISFC Link Extension for CTCA devices
    *
    *     +---------------------------+
    *   0 |         CTCPGPTR          | 4
    *     +---------------------------+
    *
    *** CTCPGTBL - ISFC Link Extension for CTCA devices

    CTCBK Cross Reference

    Symbol         Dspl Value
    -------------- ---- -----
    CTCACOLS       0014
    CTCBKLEN       00D0 000000D0
    CTCBUFCT       0002
    CTCCAPS        0006
    CTCCONT        00D0
    CTCDEVID       001C
    CTCDEVNO       0018
    CTCDLPRG       0021 80
    CTCFLAG        0021
    CTCHIDAW       0088
    CTCIDAW        0088
    CTCIOACT       0062 80
    CTCLDVBK       0010
    CTCLIDAW       008C
    CTCLNKBK       0008
    CTCLNKHD       0000
    CTCMAXCT       0000 000000A0
    CTCMDEHD       0030
    CTCMDETL       0034
    CTCMSNUM       0024
    CTCPCAPS       0022
    CTCPGLEN       0000 00000004
    CTCPGPTR       0000
    CTCPGRDR       0048
    CTCPGWRT       004C
    CTCQUEBK       000C
    CTCRDBGN       0040
    CTCRDCNT       0058
    CTCRDEND       0044
    CTCRDPTR       0054
    CTCRELID       0000
    CTCRQSEM       0062 40
    CTCSIZE        00D0 0000001A
    CTCSTAT        0020
    CTCWEOF        0022 80
    CTCWRBGN       0038
    CTCWRCNT       0004
    CTCWREND       003C
    CTCWRPTR       0050
    CTCWSPRG       0021 40
    CTCWSQCT       0028
    CTCXBUFF       0090
    CTCXCCWF       0084
    CTCXCCWX       0080
    CTCXCPA        0070
    CTCXIORC       007C
    CTCXIRB        0074
    CTCXNEXT       0061
    CTCXORB        0068
    CTCXPEND       0062
    CTCXREQ        006C
    CTCXRET        0068
    CTCXRTRY       0064
    CTCXSNS        0078
    CTCXSTAT       0060
    LNKATTN        0020 00000006
    LNKATTN        0060 00000006
    LNKATTN        0061 00000006
    LNKBUSY        0020 00000002
    LNKBUSY        0060 00000002
    LNKBUSY        0061 00000002
    LNKDEACT       0020 00000008
    LNKDEACT       0060 00000008
    LNKDEACT       0061 00000008
    LNKFATAL       0020 00000007
    LNKFATAL       0060 00000007
    LNKFATAL       0061 00000007
    LNKIDLE        0020 00000001
    LNKIDLE        0060 00000001
    LNKIDLE        0061 00000001
    LNKINIT        0020 00000008
    LNKINIT        0060 00000008
    LNKINIT        0061 00000008
    LNKREAD        0020 00000004
    LNKREAD        0060 00000004
    LNKREAD        0061 00000004
    LNKRESET       0020 00000005
    LNKRESET       0060 00000005
    LNKRESET       0061 00000005
    LNKWRITE       0020 00000003
    LNKWRITE       0060 00000003
    LNKWRITE       0061 00000003

    This information is
    based on z/VM V5R2.0.
    Last updated on 12 Apr 2006 at 16:47:09 EDT.

    Copyright IBM Corporation, 1990, 2005