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

#### MDGBK

Prolog

Control Block Contents
MDGBK DSECT

Storage Layout

Cross Reference (Contains links to field and bit definitions)

#### MDGBK Prolog

     NAME       : HCPMDGBK
     DESCRIPTION: MONDIAG control block
     DSECT      : MDGBK
     FUNCTION   : Information relating to an application buffer
                  created by the virtual machine via Diagnose 'DC'.
     LOCATED BY : MNDA_MDGBK_LHEAD:  Beginning of MONDIAG chain
                  MNDA_MDGBK_LTAIL:  End of MONDIAG chain
     CREATED BY : HCPMXPDC        Diagnose 'DC' START processing
                  HCPMXSEV        Diagnose 'DC' EVENT processing
                  HCPMXTCF        Diagnose 'DC' CONFIG processing
     DELETED BY : HCPMXSSP        Diagnose 'DC' STOP  processing
                  HCPMXSEV        Diagnose 'DC' EVENT processing
     REFERENCES : none
     SERIALIZED : The chain of HCPMDGBKs is serialized by the defer
                  lock MNDA_MDGBK_LOCK, which is located in HCPMNDBK.
     NOTES      : -- An MDGBK is created for each invocation of Diagnose 'DC' START
                  -- An MDGBK is deleted under the following circumstances:
                  - When a Diagnose 'DC' STOP is issued
                  - When a virtual storage reset is detected
                  - When a segment purge occurs and it is determined
                  that an application buffer resides within the
                  address range of the NSS that is to be purged

#### MDGBK Control Block Content

#### MDGBK DSECT

    Hex   Dec Type/Val   Lng Label (dup)    Comments
    ---- ---- --------- ---- -------------- --------
    0000    0 Structure      MDGBK          MONDIAG control block
    0000    0 Address      4 MDG_NEXT       Pointer to next MDGBK block in
                                            chain
    0004    4 Address      4 MDG_PREV       Pointer to previous MDGBK block
                                            in chain
    0008    8 Character    8 MDG_APBUF_GAA1_G (0)
                                            Guest absolute addr of the 1st
                                            page
    0008    8 Signed       4 MDG_APBUF_GAA1_HI
                                            of the appl buffer associated
                                            with
    000C   12 Signed       4 MDG_APBUF_GAA1_LO
                                            this MDGBK
    0010   16 Character    8 MDG_APBUF_GAA2_G (0)
                                            Guest absolute addr of the 2nd
                                            page
    0010   16 Signed       4 MDG_APBUF_GAA2_HI
                                            of the appl buffer associated
                                            with
    0014   20 Signed       4 MDG_APBUF_GAA2_LO
                                            this MDGBK. Applicable only when
                                            th application buffer crosses a
                                            page boundary, otherwise set to
                                            FFs.
    0018   24 Character   16 MDG_PROD_ID    Product-id and release id of the
                                            application placing the data in
                                            the buffer
    0028   40 Address      4 MDG_VMDKB_ADDR Address of the Base VMDBK that
                                            owns this application buffer
    002C   44 Address      2 MDG_BUFF_LEN   Total length (in bytes) of the
                                            application buffer. It will
                                            always be the sum of
                                            MDG_BUFF_LEN1 and MDG_BUFF_LEN2
    002E   46 Address      2 MDG_BUFF_LEN1  Length (in bytes) of the first
                                            page of the application buffer
    0030   48 Address      2 MDG_BUFF_LEN2  Length (in bytes) of the second
                                            page of the application buffer.
                                            Set to 0 unless the buffer
                                            crosses a page boundary.
    0032   50 Bitstring    1 MDG_STATUS     Status flags
    0033   51 Bitstring    1 *              Reserved for IBM use
    0034   52 Address      4 MDG_SNTBK_ADDR1
                                            Address of the 1st SNTBK if the
                                            application buffer address is
                                            within a saved segment
    0038   56 Address      4 MDG_SNTBK_ADDR2
                                            Address of the 2nd SNTBK if the
                                            application buffer address is
                                            within two saved segements
    003C   60 Bitstring    4 *              Reserved for IBM use
              00000040       MDG$END        *
              00000008       MDGSIZE        (MDG$END-MDGBK+7)/8 MDGBK size in
                                            doublewords

#### MDGBK Storage Layout

    *** MDGBK - MONDIAG control block
    *
    *     +---------------------------+---------------------------+
    *   0 |         MDG_NEXT          |         MDG_PREV          |
    *     +---------------------------+---------------------------+
    *   8 |    MDG_APBUF_GAA1_HI      |    MDG_APBUF_GAA1_LO      |
    *     +---------------------------+---------------------------+
    *  10 |    MDG_APBUF_GAA2_HI      |    MDG_APBUF_GAA2_LO      |
    *     +---------------------------+---------------------------+
    *  18 |                     MDG_PROD_ID                       |
    *     |                                                       |
    *     +---------------------------+-------------+-------------+
    *  28 |      MDG_VMDKB_ADDR       |MDG_BUFF_LEN |MDG_BUFF_LEN1|
    *     +-------------+------+------+-------------+-------------+
    *  30 |MDG_BUFF_LEN2|(032) |//////|     MDG_SNTBK_ADDR1       |
    *     +-------------+------+------+---------------------------+
    *  38 |     MDG_SNTBK_ADDR2       |///////////////////////////|
    *     +---------------------------+---------------------------+
    *  40
    *
    *** MDGBK - MONDIAG control block

#### MDGBK Cross Reference

    Symbol         Dspl Value
    -------------- ---- -----
    MDG$END        003C 00000040
    MDG_APBUF_GAA1_G
                   0008
    MDG_APBUF_GAA1_HI
                   0008
    MDG_APBUF_GAA1_LO
                   000C
    MDG_APBUF_GAA2_G
                   0010
    MDG_APBUF_GAA2_HI
                   0010
    MDG_APBUF_GAA2_LO
                   0014
    MDG_BUFF_LEN   002C
    MDG_BUFF_LEN1  002E
    MDG_BUFF_LEN2  0030
    MDG_NEXT       0000
    MDG_PREV       0004
    MDG_PROD_ID    0018
    MDG_SNTBK_ADDR1
                   0034
    MDG_SNTBK_ADDR2
                   0038
    MDG_STATUS     0032
    MDG_VMDKB_ADDR
                   0028
    MDGSIZE        003C 00000008

This information is based on z/VM V5R2.0. Last updated on 12 Apr 2006 at 17:04:57 EDT.
Copyright IBM Corporation, 1990, 2005