GA22-7000-10 IBM System/370 Principles of Operation Sept 1987
Page3-29(54 of 558)
Control Register 1 Control Register 7 Virtual Address PSTD I SSTD I I sx I pxl BX I I I (x4) (x2) I 4 I I ..... Effe ctive STD STO I (x64) I Segment Table + R PTL 01 PTa (x8) I 2 Translation Lookaside Buffer (TLB) Page Table + 1 PFRA 1 R PFRA G 1- 0 3 I I Real Address R: Address is real Translation Process (Part 1 of 2) Chapter 3. Storage 3-29
Control register 1 provides the primary segment-table designation for translation of a primary virtual address, and, when DAS is installed, control register 7 provides the secondary segment-table designation for translation of a secondary virtual address. Information, which may include portions of the virtual address and the translation parameters, is used to search the TLB. If a match exists, the page-frame real address from the TLB is used in forming the real address. If no match exists, table entries in real storage are fetched. The resulting fetched entries, in conjunction with the search information, are used to translate the address and may be used to form an entry in the TLB. Translation Process (Part 2 of 2) Inspection of Control Register Q The interpretation of the virtual address for translation purposes is controlled by the translation format, bits 8-12 of control register O. If bits 8-12 contain an invalid code, a translation-specification exception is recognized. Segment-Table Lookup The segment-index portion of the virtual address, in conjunction with the segment-table origin contained in the effective segment-table designation, is used to select an entry from the segment table. The 24-bit real address of the segment table entry is obtained by appending six zeros to the right of bits 8-25 of the effective segment-table designation and adding the segment index to this value, with the rightmost bit position of the segment index aligned with bit position 29 of the address. A carry, if any, into bit position 7 is ignored. With extended real addressing, this 24-bit real address is extended on the left with zeros; thus, the segment table can wrap from 224 -1 to zero. As part of the segment-table-Iookup process, the segment index is compared against the segment-table length, bits 0-7 of the effective segment-table designation, to establish whether the addressed entry is within the segment table. With 1M-byte segments, entries for all addressable segments are contained in a table of minimum length (length code of 0). With 64K-byte segments, four zeros are appended to the left of bits 8-11 of the virtual address, and this extended value is compared against the eight-bit segment- 3-30 System/370 Principles of Operation table length. If the value in the segment-table-length field is less than the value in the corresponding bit posi tions of the virtual address, a segment-translation exception is recog nized. All four bytes of the segment-table entry appear to be fetched concurrently as observed by other CPUs. The fetch access is not subject to protection. When the storage address generated for fetching the segment-table entry desig nates a location which is not available in the configuration, an addressing exception is recognized, and the unit of operation is suppressed. Bit 31 of the entry fetched from the segment table specifies whether the corresponding segment is available. This bit is inspected, and, if it is one, a segment-translation exception is recognized. Handling of bit positions 4-7 and 29-30 of the segment-table entry depends on the model: normally a translation-specification exception is indicated when they do not contain zeros; however, on some models they may be ignored. On machines with the segment-protection facility, bit 29 is the segment protection bit and does not cause a translation-specification exception; bit 29 is retained with the entry in the TLB. On machines with the common-segment facility, bit 30 is the common-segment bit and does not cause a translation specification exception. Bit 30 may be retained with the entry in the TLB, or it may be ignored. When no exceptions are recognized in the process of segment-table lookup, the entry fetched from the segment table designates the beginning and specifies the length of the corresponding page table.