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

SEGTE

Prolog  

Control Block Contents  
   SEGTE DSECT
   SEGTB DSECT

Storage Layout  

Cross Reference (Contains links to field and bit definitions)  


SEGTE Prolog

 NAME       : HCPSEGTE
 DESCRIPTION: SEGMENT TABLE ENTRY
 DSECT      : SEGTE
 Function   : There is one segment table entry for each
              megabyte of address space.  A segment table is
              made up of contiguous segment table entries.
              For details on the segment table, see the SEGTB
              DSECT definition below.
              The format of the segment table entry is
              ARCHITECTED and cannot be changed in any way
              which violates the architecture.
 Located by : ASTSTD    field of HCPASTE
              CONTROL REGISTER 1
              CONTROL REGISTER 7
              PGMSEGTE  field of the associated PGMBK (if any)
              STLSTEPT  field of HCPSTLBK
              STLSTE2   field of HCPSTLBK
              VMDPSTD   field of HCPVMDBK
              VMDPXSOL  field of HCPVMDBK for shadow tables
              Note that STEs pointed to from the STLBK fields
              STLSTEPT and STLSTE2 are only "templates" used
              during saved segment processing, and are never
              *attached* (accessible by DAT hardware) in the
              architectural sense.
 Created by : HCPBPBSL  when an STLBK is built
              HCPBPCBS  when an STLBK is built
              HCPBVMBK  when a VMDBK is built
              HCPFTUSG  when an FTC address space is built
              HCPSEGAS  when a normal segment table is built
              HCPWLGET  when a shadow segment table is built
 Deleted by : HCPBPCBS  when an STLBK is released
              HCPRPSSL  when an STLBK is released
              HCPSTKFG  when a VMDBK is released
              HCPSEGRS  when a normal segment table is released
              HCPWLBRE  when a shadow segment table is released

 

SEGTE Control Block Content


SEGTE DSECT

Hex   Dec Type/Val   Lng Label (dup)    Comments
---- ---- --------- ---- -------------- --------
0000    0 Structure      SEGTE          SEGMENT TABLE ENTRY
     ESA/390 mode Segment-Table Entry format
     THE SEGMENT TABLE DESCRIBES THE ADDRESS SPACE WHICH CONTAINS GUEST
     STORAGE.
     THERE IS ALSO A SEGMENT TABLE IDENTIFIED BY THE SYSTEM VMDBK, WHICH
     DESCRIBES THE SYSTEM VIRTUAL ADDRESS SPACE, WHICH IS ALWAYS ALLOCATED
     AS TWO FRAMES OF STORAGE.
     THERE IS ONE SEGMENT TABLE ENTRY FOR EACH MEGABYTE OF ADDRESS SPACE.
0000    0 Signed       4 SEGENTRY       POINTER TO PAGE TABLE, PAGTB
                                        WITHIN THE PGMBK NOTE THAT
                                        ARCHITECTURE ALIGNS PAGE TABLES
                                        ON 64 BYTE BOUNDARIES BUT
                                        SOFTWARE RESTRICTS THE ALIGNMENT
                                        TO 256 BYTE BOUNDARIES BECAUSE OF
                                        THE USE OF THE LEFT- MOST 2 BITS
                                        IN THE RIGHTMOST BYTE. PAGE
                                        TABLES ARE IMBEDDED WITHIN
                                        PGMBK'S, THEREBY FORCING 4K
                                        ALIGNMENT.
          .... ....      SEGNULLM       X'80000000' Isolate null segment
                                        flag
          00FFFFC0       SEGPTOM        X'7FFFFFC0' Isolate page-table
                                        origin
          ..1. ....      SEGINVM        X'00000020' Isolate invalid bit
          ...1 ....      SEGCOMM        X'00000010' Isolate
                                        common-segment bit
          .... 1111      SEGPTLM        X'0000000F' Isolate page-table
                                        length
          00000004       SEGLENTH       *-SEGENTRY LENGTH OF ONE SEGMENT
                                        TABLE ENTRY
0004    4 Signed       4 SEGNEXT (0)    NEXT SEGMENT TABLE ENTRY
0000    0 Bitstring    1 SEGFLAG        SEGMENT ALLOCATION STATUS
                                        SEGINVAL MUST BE = 1.
          1... ....      SEGNULL        X'80' SEGMENT CANNOT BE ALLOCATED
                                        FOR GUEST STORAGE, IT IS NOT
                                        ADDRESSABLE BY THE USER. SEGINVAL
                                        MUST BE = 1.
     LEFTMOST BIT ARCHITECTED AS ZERO. RIGHTMOST 7 BITS COMPRISE BITS 1-7 OF
     THE 31 BIT REAL ADDRESS OF THE PAGE TABLE FOR THIS SEGMENT.
0001    1 Bitstring    1 *              BITS 8-15 OF THE PAGE TABLE
                                        ADDRESS.
0002    2 Bitstring    1 *              BITS 16-23 OF THE PAGE TABLE
                                        ADDRESS.
0003    3 Bitstring    1 SEGSTAT        SEGMENT TABLE ENTRY STATUS
          1... ....      SEGWAIT        X'80' SEGMENT HAS TRANSLATION
                                        REQUESTS WAITING. SEGINVAL MUST
                                        BE = 1.
          .1.. ....      SEGTRANS       X'40' SEGMENT IS BEING TRANSLATED
                                        THIS BIT IS USED BY SOFTWARE TO
                                        SERIALIZE SEGMENT TRANSLATION.
                                        SEGINVAL MUST BE = 1.
          ..1. ....      SEGINVAL       X'20' SEGMENT TABLE ENTRY IS
                                        INVALID
          ...1 ....      SEGCOMMN       X'10' Common segment bit.
          .... 1111      SEGPTLNG       X'0F' Page table length (in units
                                        of 64 byte blocks, minus 1).
                                        Note: page table length bits only
                                        used when the SEGTE is valid
                                        (SEGINVAL bit is OFF) or in a
                                        "not yet referenced" state. If
                                        the SEGTE is invalid because the
                                        PGMBK has been paged out, these
                                        bits are re-used as status bits.
                                        Therefore, the page table length
                                        value must be restored from the
                                        copy saved in the PGMBK PGMPTLNG
                                        field whenever the SEGTE is
                                        validated (by turning SEGINVAL
                                        off) or cleared to a "not yet
                                        referenced" state
          .... 1...      SEGXSTOR       X'08' Used by CP to indicate that
                                        a PGMBK that resides on XSTORE
                                        supports pages that also reside
                                        on XSTORE. Note: This bit is only
                                        valid when SEGINVAL is on, and
                                        the PGMBK is paged out (bits 1-23
                                        of the SEGTE are non-zero and
                                        contain a valid PTRM "virtual
                                        address"). SEGXSTOR must not be
                                        used in a valid segment table
                                        entry, since it is one of the
                                        bits that make up the page table
                                        length field, SEGPTLNG.
          .... .1..      SEGPARTL       X'04' Used by CP to indicate that
                                        a SEGTE which has had its PGMBK
                                        paged out represents a partial
                                        segment with a less than full
                                        length page table. This bit will
                                        only be on in SEGTEs with paged
                                        out PGMBKs which represent
                                        partial segments at the end of
                                        the defined storage size of the
                                        address space (the last partial
                                        segment). Note: This bit is only
                                        valid when SEGINVAL is on, and
                                        the PGMBK is paged out (bits 1-23
                                        of the SEGTE are non-zero and
                                        contain a valid PTRM "virtual
                                        address"). SEGPARTL must not be
                                        used in a valid segment table
                                        entry, since it is one of the
                                        bits that make up the page table
                                        length field, SEGPTLNG.
          0SEGSTAT       SEGINOFF       X'FFFFFFFF'-(SEGINVAL+SEGPTLNG)
                                        Mask to turn SEGINVAL and
                                        SEGPTLNG bits (including
                                        SEGXSTOR) all off at once. NOTE:
                                        The original page table length
                                        value must be restored (from
                                        PGMPTLNG) before the SEGTE is
                                        actually validated by storing the
                                        value generated using SEGINOFF
     LEFTMOST 2 BITS COMPRISE BITS 24-25 OF THE PAGE TABLE ADDRESS (6 BITS
     ARE APPENDED ON THE RIGHT TO FORM THE PAGE TABLE ADDRESS). LEFTMOST 2
     BITS USED BY SOFTWARE WHEN SEGMENT ENTRY IS INVALID. RIGHTMOST 6 BITS
     ARE ARCHITECTED AND USED AS DEFINED BELOW.
          00000028       SEGINON        (SEGINVAL+SEGXSTOR) Mask to turn
                                        SEGINVAL and SEGXSTOR on, and
                                        clear the remaining SEGPTLNG
                                        bits.
          .... 1111      SEGPTLMK       X'00000000'+SEGPTLNG Mask to
                                        isolate SEGPTLNG
          00FFFFBF       SEGTROFF       X'FFFFFFFF'-SEGTRANS MASK TO TURN
                                        SEGTRANS OFF
          00FFFF7F       SEGWTOFF       X'FFFFFFFF'-SEGWAIT MASK TO TURN
                                        SEGWAIT OFF
          00FFFF00       SEGPTRMK       X'7FFFFFFF'-(SEGWAIT+SEGTRANS+SEG
                                        INVAL+SEGCOMMN+SEGPTLNG) Mask to
                                        isolate or test for a PTRM
                                        "virtual address"
     The following maps the segment table entry in the System/370
     architecture.
          00FFFFF8       SEG3PTOM       X'00FFFFF8' Isolate page-table
                                        origin in S/370 architecture STE
          .... ...1      SEG3INVM       X'00000001' Isolate
                                        segment-invalid bit in S/370
                                        architecture STE
          .... ..1.      SEG3COMM       X'00000002' Isolate
                                        common-segment bit in S/370
                                        architecture STE
          .... .1..      SEG3PROM       X'00000004' Isolate
                                        segment-protection bit in S/370
                                        architecture STE
          .... ....      SEG3PTLM       X'F0000000' Isolate page-table
                                        length in S/370 architecture STE
          .... ...1      SEG3RSVM       X'0F000001' Reserved bits, must
                                        be 0 in any valid S/370
                                        architecture STE
0003    3 Bitstring    1 SEGST370       SEGMENT TABLE ENTRY STATUS FOR
                                        370 NON-EXTENDED ARCHITECTURE
          .... .1..      SEG370PR       X'04' SEGMENT IS WRITE PROTECTED
          .... ...1      SEG370IV       X'01' SEGMENT IS INVALID
          ...1 .1..      SEGSHIFT       20 BITS TO SHIFT RIGHT TO GET
                                        SEGMENT NUMBER FROM AN ADDRESS OR
                                        SHIFT LEFT TO GET STARTING
                                        SEGMENT ADDRESS FROM A SEGMENT
                                        NUMBER
          .1.. ....      SEGPTUNT       64 Number of bytes in a
                                        "page-table unit", the number of
                                        bytes in the smallest variation
                                        of the size of a page table.
          .... .11.      SEGPTUNS       6 Number of bits to shift left in
                                        order to multiply by SEGPTUNT.
          ...1 ....      SEGPXPTL       12+4 Bits to shift right an
                                        isolated page index to obtain a
                                        page- table length.
          .... 1.1.      SEGPXDSP       12-2 Bits to shift right an
                                        isolated page index to obtain the
                                        displacement into the page table
                                        of the applicable PTE.
     LEFTMOST 4 BITS COMPRISE BITS 16-19 OF THE PAGE TABLE ADDRESS
     RIGHTMOST 4 BITS DESCRIBE THE STATUS OF THE SEGMENT TABLE ENTRY
     FUNCTION : The segment table describes a virtual address space. A
     segment table is made up of contiguous segment table entries. Segment
     tables must begin on 4K page boundaries, and must be of integral
     multiples of the minimum segment table size, 64 bytes for ESA/390 and
     1024 bytes for ESAME.
     For guest primary address spaces of 512MB or less, or for non-primary
     virtual address spaces of 512MB or less, the segment table is allocated
     either as a seperate page of storage or out of the low addresses of a
     GUESTPERM type VMDBK free storage frame.
     For non-guest primary address spaces, such as VM data spaces and system
     address spaces, if the address space is 512MB or smaller, the segment
     table is always allocated either from a seperate page of storage or out
     of the low addresses of a GUESTPERM type VMDBK free storage frame.
     When a virtual address space is defined greater than 512MB in size, up
     to four contiguous pages are allocated.
     The SYSTEM virtual address space is always defined to be 2048MB in size
     and its segment table is always allocated as four contiguous frames of
     storage at system initialization.
     The format of the segment table entry is ARCHITECTED and cannot be
     changed in any way which violates the architecture.
     Located by : ASTSTD field of HCPASTE (ESA/390) ASTASCE field of HCPASTE
     (ESAME) CONTROL REGISTER 1 CONTROL REGISTER 7 PGMSEGTE field of the
     associated PGMBK (if any) VMDPSTD field of HCPVMDBK (ESA/390) VMDPASCE
     field of HCPVMDBK (ESAME) VMDPXSOL field of HCPVMDBK for shadow tables
     Created by : HCPBVMBK when a VMDBK is built HCPFTUSG when an FTC
     address space is built HCPSEGAS when a normal segment table is built
     HCPWLGET when a shadow segment table is built For guest primary address
     space addressability less than or equal to 32 MB, the segment table
     created by HCPBVM (imbedded in the beginning of the VMDBK) which was
     created during LOGON processing is used. HCPBVM always builds this
     segment table regardless of the guest primary virtual address space
     storage size, but it is only used if the actual addressability needed
     is 32MB or less.
     For guest primary address space storage sizes from 33 Megabytes to 1024
     MB, and for all other address spaces less than or equal to 1024 MB, the
     segment table is allocated either as a seperate page or from the low
     addresses of a GUESTPERM type VMDBK free storage page.
     For all address spaces from 1024 MB to 2048 MB in size, two contiguous
     pages are allocated to contain the segment table. If there is enough
     unused storage in the secong page past the end of the segment table,
     the second page may be used for GUESTPERM type VMDBK free storage (with
     the low addresses allocated for use as the segment table).
     Deleted by : HCPSTKFG when a VMDBK is released HCPSEGRS when a normal
     segment table is released HCPWLBRE when a shadow segment table is
     released
     The segment table in guest primary VMDBKs is not deleted until the
     VMDBK itself is deleted (after the guest is logged off). If the guest
     primary virtual storage size at the time of logoff is 32MB or less,
     this is the actual segment table. Normal segment tables allocated
     outside the VMDBK are released whenever the address space is destroyed
     or reset, and may be released when an address space is resized due to
     saved segment imbed/unimbed processing.
     Shadow segment tables are deleted when the owning RGuest base VMDBK is
     destroyed.

SEGTB DSECT

Hex   Dec Type/Val   Lng Label (dup)    Comments
---- ---- --------- ---- -------------- --------
0000    0 Structure      SEGTB          SEGMENT TABLE
0000    0 Signed       4 SEGORIGN (0)   Segment Table Origin
0000    0 Bitstring    0 * (0)          First STE / SEGTE

 

SEGTE Storage Layout

          
*** SEGTE - SEGMENT TABLE ENTRY
*
*     +---------------------------+
*   0 |         SEGENTRY          |
*     +---------------------------+
*
*** SEGTE - SEGMENT TABLE ENTRY
          
*** Overlay for SEGENTRY in SEGTE
*
*     +------+------+------+------+
*   0 |:FLAG |//////|//////|:STAT | 4
*     +------+------+------+------+
*
*** Overlay for SEGENTRY in SEGTE
          
*** Overlay for SEGSTAT in SEGTE
*
*                          +------+
*   0 ...                3 |:ST370| 4
*                          +------+
*
*** Overlay for SEGSTAT in SEGTE
          
*** SEGTB - SEGMENT TABLE
*
*
*** SEGTB - SEGMENT TABLE

 

SEGTE Cross Reference

Symbol         Dspl Value
-------------- ---- -----
SEGCOMM        0000 10
SEGCOMMN       0003 10
SEGENTRY       0000
SEGFLAG        0000
SEGINOFF       0003 0SEGSTAT
SEGINON        0003 00000028
SEGINVAL       0003 20
SEGINVM        0000 20
SEGLENTH       0000 00000004
SEGNEXT        0004
SEGNULL        0000 80
SEGNULLM       0000 00
SEGORIGN       0000
SEGPARTL       0003 04
SEGPTLM        0000 0F
SEGPTLMK       0003 0F
SEGPTLNG       0003 0F
SEGPTOM        0000 00FFFFC0
SEGPTRMK       0003 00FFFF00
SEGPTUNS       0003 06
SEGPTUNT       0003 40
SEGPXDSP       0003 0A
SEGPXPTL       0003 10
SEGSHIFT       0003 14
SEGSTAT        0003
SEGST370       0003
SEGTRANS       0003 40
SEGTROFF       0003 00FFFFBF
SEGWAIT        0003 80
SEGWTOFF       0003 00FFFF7F
SEGXSTOR       0003 08
SEG3COMM       0003 02
SEG3INVM       0003 01
SEG3PROM       0003 04
SEG3PTLM       0003 00
SEG3PTOM       0003 00FFFFF8
SEG3RSVM       0003 01
SEG370IV       0003 01
SEG370PR       0003 04

This information is based on z/VM V4R1.0.
Last updated on 5 Jun 2001 at 16:32:09 EDT.
Copyright IBM Corporation, 1990, 2001