Control register


A control register is a processor register that changes or controls the general behavior of a CPU or other digital device. Common tasks performed by control registers include interrupt control, switching the addressing mode, paging control, and coprocessor control.

History

The early CPU lacked dedicated control registers, and relied on a limited set of internal signals and flags. When IBM developed a paging version of the System/360, they added 16 control registers to the design for what became the 360/67. IBM did not provide control registers on other S/360 models, but made them a standard part of System/370, although with different register and bit assignments. As IBM added new features to the architecture, e.g., DAS, S/370-XA, S/370-ESA, ESA/390, they added additional fields to the control registers. With z/Architecture, IBM doubled the control register size to 64 bits.

Control registers in IBM 360/67

On the 360/67, CR0 and CR2 are used by address translation, CR 4-6 contain miscellaneous flags including interrupt masks and Extended Control Mode, and CR 8-14 contain the switch settings on the 2167 Configuration Unit.

M67 CR0

Control Register 0 contains the address of the segment table for dynamic address translation.

M67 CR2

Control register 2 is the Relocation exception address register.

M67 CR4

CR4 is the extended mask register for channels 0-31.
Each bit is the 1/0 channel mask for the corresponding channel.

M67 CR5

CR5 is reserved for the extended mask register for channels 32–63.
Each bit is the 1/0 channel mask for the corresponding channel.

M67 CR6

CR6 contains two mode flags plus extensions to the PSW mask bits.
FieldBitDescription
00Machine Check Mask Extension for Channel Controller o
11Machine Check Mask Extension for Channel Controller 1
2-3Reserved for channel controllers 2-3
4-7Unassigned
88Extended Control Mode
99Configuration Control Bit
10-23Unassigned
24-31External interrupt masking
24Timer
25Interrupt Key
26Malfunction Alert - CPU 1
27Malfunction Alert - CPU 2
28Reserved
29Reserved
30External Interrupt - CPU 1, 2
31Reserved

M67 CR8

Control Register 8 contains the assignments of Processor Storage units 1–4 to central processing units and channel controllers.
BitDescription
0Processor Storage Unit 1 to CPU 1
1Processor Storage Unit 1 to CPU 2
2-3Reserved for CPU 3-4
4Processor Storage Unit 1 to CC 0
5Processor Storage Unit 1 to CC 1
6-7Reserved for CC 3-4
8Processor Storage Unit 2 to CPU 1
9Processor Storage Unit 2 to CPU 2
10-11Reserved for CPU 3-4
12Processor Storage Unit 2 to CC 0
13Processor Storage Unit 2 to CC 1
14-15Reserved for CC 3-4
16Processor Storage Unit 3 to CPU 1
17Processor Storage Unit 3 to CPU 2
18-19Reserved for CPU 3-4
20Processor Storage Unit 3 to CC 0
21Processor Storage Unit 3 to CC 1
22-23Reserved for CC 3-4
24Processor Storage Unit 4 to CPU 1
25Processor Storage Unit 4 to CPU 2
26-27Reserved for CPU 3-4
28Processor Storage Unit 4 to CC 0
29Processor Storage Unit 4 to CC 1
30-31Reserved for CC 3-4

M67 CR9

Control Register 9 contains the assignments of Processor Storage units 5–8 to central processing units and channel controllers.
BitDescription
0Processor Storage Unit 5 to CPU 1
1Processor Storage Unit 5 to CPU 2
2-3Reserved for CPU 3-4
4Processor Storage Unit 5 to CC 0
5Processor Storage Unit 5 to CC 1
6-7Reserved for CC 3-4
8Processor Storage Unit 6 to CPU 66
9Processor Storage Unit 6 to CPU 2
10-11Reserved for CPU 3-4
12Processor Storage Unit 6 to CC 0
13Processor Storage Unit 6 to CC 1
14-15Reserved for CC 3-4
16Processor Storage Unit 7 to CPU 1
17Processor Storage Unit 7 to CPU 2
18-19Reserved for CPU 3-4
20Processor Storage Unit 7 to CC 0
21Processor Storage Unit 7 to CC 1
22-23Reserved for CC 3-4
24Processor Storage Unit 8 to CPU 1
25Processor Storage Unit 8 to CPU 2
26-27Reserved for CPU 3-4
28Processor Storage Unit 8 to CC 0
29Processor Storage Unit 8 to CC 1
30-31Reserved for CC 3-4

M67 CR10

Control Register 10 contains the Processor storage address assignment codes.
BitStarting Address Code for
0-3Processor Storage Unit 1
4-7Processor Storage Unit 2
8-11Processor Storage Unit 3
12-15Processor Storage Unit 4
16-19Processor Storage Unit 5
20-23Processor Storage Unit 6
24-27Processor Storage Unit 7
28-31Processor Storage Unit 8

M67 CR11

Control Register 11 contains channel controller assignments.
BitDescription
0CC 0 available on CPU 1
1CC 0 available on CPU 2
2-3Reserved for CPUs 3-4
4CC 1 available on CPU 1
5CC 1 available on CPU 2
6-7Reserved for CPUs 3-4
8-15Unassigned
16CPU 1 to only CC 0
17CPU 1 to only CC 1
18-19Reserved for CC 2-3
20CPU 2 to only CC 0
21CPU 2 to only CC 1
22-23Reserved for CC 2-3
24-31Unassigned

M67 CR12

CR12 contains I/O Control Unit Partitioning.
BitI/O Control UnitInterface
011
112
221
322
431
532
641
742
851
952
1061
1162
1271
1372
1481
1582
1691
1792
18101
19102
20111
21112
22121
23122
24131
25132
26141
27142
28151
29152
30161
31162

M67 CR13

CR13 contains I/O Control Unit Partitioning.
BitI/O Control UnitInterface
0171
1172
2181
3182
4191
5192
6201
7202
8211
9212
10221
11222
12231
13232
14241
15242
16251
17252
18261
19262
20271
21272
22281
23282
24291
25292
26301
27302
28311
29312
30321
31322