1 /* SPDX-License-Identifier: GPL-2.0 */
3 * DAT table and related structures
5 * Copyright IBM Corp. 2024
9 #ifndef _S390_DAT_BITS_H
10 #define _S390_DAT_BITS_H
15 unsigned long rsto: 52;/* Region- or Segment-Table Origin */
17 unsigned long g : 1; /* Subspace Group control */
18 unsigned long p : 1; /* Private Space control */
19 unsigned long s : 1; /* Storage-Alteration-Event control */
20 unsigned long x : 1; /* Space-Switch-Event control */
21 unsigned long r : 1; /* Real-Space control */
23 unsigned long dt : 2; /* Designation-Type control */
24 unsigned long tl : 2; /* Region- or Segment-Table Length */
29 ASCE_TYPE_SEGMENT = 0,
30 ASCE_TYPE_REGION3 = 1,
31 ASCE_TYPE_REGION2 = 2,
35 union region1_table_entry {
38 unsigned long rto: 52;/* Region-Table Origin */
40 unsigned long p : 1; /* DAT-Protection Bit */
42 unsigned long tf : 2; /* Region-Second-Table Offset */
43 unsigned long i : 1; /* Region-Invalid Bit */
45 unsigned long tt : 2; /* Table-Type Bits */
46 unsigned long tl : 2; /* Region-Second-Table Length */
50 union region2_table_entry {
53 unsigned long rto: 52;/* Region-Table Origin */
55 unsigned long p : 1; /* DAT-Protection Bit */
57 unsigned long tf : 2; /* Region-Third-Table Offset */
58 unsigned long i : 1; /* Region-Invalid Bit */
60 unsigned long tt : 2; /* Table-Type Bits */
61 unsigned long tl : 2; /* Region-Third-Table Length */
65 struct region3_table_entry_fc0 {
66 unsigned long sto: 52;/* Segment-Table Origin */
68 unsigned long fc : 1; /* Format-Control */
69 unsigned long p : 1; /* DAT-Protection Bit */
71 unsigned long tf : 2; /* Segment-Table Offset */
72 unsigned long i : 1; /* Region-Invalid Bit */
73 unsigned long cr : 1; /* Common-Region Bit */
74 unsigned long tt : 2; /* Table-Type Bits */
75 unsigned long tl : 2; /* Segment-Table Length */
78 struct region3_table_entry_fc1 {
79 unsigned long rfaa: 33;/* Region-Frame Absolute Address */
81 unsigned long av : 1; /* ACCF-Validity Control */
82 unsigned long acc : 4; /* Access-Control Bits */
83 unsigned long f : 1; /* Fetch-Protection Bit */
84 unsigned long fc : 1; /* Format-Control */
85 unsigned long p : 1; /* DAT-Protection Bit */
86 unsigned long iep : 1; /* Instruction-Execution-Protection */
88 unsigned long i : 1; /* Region-Invalid Bit */
89 unsigned long cr : 1; /* Common-Region Bit */
90 unsigned long tt : 2; /* Table-Type Bits */
94 union region3_table_entry {
96 struct region3_table_entry_fc0 fc0;
97 struct region3_table_entry_fc1 fc1;
100 unsigned long fc: 1; /* Format-Control */
102 unsigned long i : 1; /* Region-Invalid Bit */
103 unsigned long cr: 1; /* Common-Region Bit */
104 unsigned long tt: 2; /* Table-Type Bits */
109 struct segment_table_entry_fc0 {
110 unsigned long pto: 53;/* Page-Table Origin */
111 unsigned long fc : 1; /* Format-Control */
112 unsigned long p : 1; /* DAT-Protection Bit */
114 unsigned long i : 1; /* Segment-Invalid Bit */
115 unsigned long cs : 1; /* Common-Segment Bit */
116 unsigned long tt : 2; /* Table-Type Bits */
120 struct segment_table_entry_fc1 {
121 unsigned long sfaa: 44;/* Segment-Frame Absolute Address */
123 unsigned long av : 1; /* ACCF-Validity Control */
124 unsigned long acc : 4; /* Access-Control Bits */
125 unsigned long f : 1; /* Fetch-Protection Bit */
126 unsigned long fc : 1; /* Format-Control */
127 unsigned long p : 1; /* DAT-Protection Bit */
128 unsigned long iep : 1; /* Instruction-Execution-Protection */
130 unsigned long i : 1; /* Segment-Invalid Bit */
131 unsigned long cs : 1; /* Common-Segment Bit */
132 unsigned long tt : 2; /* Table-Type Bits */
136 union segment_table_entry {
138 struct segment_table_entry_fc0 fc0;
139 struct segment_table_entry_fc1 fc1;
142 unsigned long fc: 1; /* Format-Control */
144 unsigned long i : 1; /* Segment-Invalid Bit */
145 unsigned long cs: 1; /* Common-Segment Bit */
146 unsigned long tt: 2; /* Table-Type Bits */
151 union page_table_entry {
154 unsigned long pfra: 52;/* Page-Frame Real Address */
155 unsigned long z : 1; /* Zero Bit */
156 unsigned long i : 1; /* Page-Invalid Bit */
157 unsigned long p : 1; /* DAT-Protection Bit */
158 unsigned long iep : 1; /* Instruction-Execution-Protection */
164 TABLE_TYPE_SEGMENT = 0,
165 TABLE_TYPE_REGION3 = 1,
166 TABLE_TYPE_REGION2 = 2,
167 TABLE_TYPE_REGION1 = 3
170 #endif /* _S390_DAT_BITS_H */