forked from SDL-Hercules-390/hyperion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chsc.c
646 lines (495 loc) · 18.6 KB
/
chsc.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
/* CHSC.C (c) Copyright Jan Jaeger, 2002-2012 */
/* Channel Subsystem Call */
/* Interpretive Execution - (c) Copyright Jan Jaeger, 1999-2012 */
/* z/Architecture support - (c) Copyright Jan Jaeger, 1999-2012 */
/* This module implements channel subsystem interface functions */
/* for the Hercules ESA/390 emulator. */
/* */
/* This implementation is based on the S/390 Linux implementation */
#include "hstdinc.h"
#if !defined(_HENGINE_DLL_)
#define _HENGINE_DLL_
#endif
#if !defined(_CHSC_C_)
#define _CHSC_C_
#endif
#include "hercules.h"
#include "opcode.h"
#include "inline.h"
#include "chsc.h"
#if defined(FEATURE_CHSC)
#if 0
static int ARCH_DEP(chsc_get_conf_info) (CHSC_REQ *chsc_req, CHSC_RSP *chsc_rsp)
{
U16 req_len, rsp_len;
CHSC_REQ12 *chsc_req12 = (CHSC_REQ12 *)(chsc_req);
CHSC_RSP12 *chsc_rsp12 = (CHSC_RSP12 *)(chsc_rsp+1);
/* Fetch length of request field */
FETCH_HW(req_len, chsc_req12->length);
rsp_len = sizeof(CHSC_RSP) + sizeof(CHSC_RSP12);
memset(chsc_rsp12, 0, sizeof(CHSC_RSP12) );
STORE_HW(chsc_rsp12->len1,80);
STORE_FW(chsc_rsp12->info1,0x10);
STORE_FW(chsc_rsp12->info2,0x10);
STORE_FW(chsc_rsp12->info3,0xFF);
STORE_FW(chsc_rsp12->test,0xE3C5E2E3);
/* Store response length */
STORE_HW(chsc_rsp->length,rsp_len);
/* Store request OK */
STORE_HW(chsc_rsp->rsp,CHSC_REQ_OK);
/* No reaon code */
STORE_FW(chsc_rsp->info,0);
return 0;
}
#endif
static int ARCH_DEP(chsc_get_sch_desc) (CHSC_REQ *chsc_req, CHSC_RSP *chsc_rsp)
{
U16 req_len, sch, f_sch, l_sch, rsp_len, lcss;
CHSC_REQ4 *chsc_req4 = (CHSC_REQ4 *)(chsc_req);
CHSC_RSP4 *chsc_rsp4 = (CHSC_RSP4 *)(chsc_rsp+1);
FETCH_HW(f_sch,chsc_req4->f_sch);
FETCH_HW(l_sch,chsc_req4->l_sch);
FETCH_HW(lcss,chsc_req4->ssidfmt);
lcss &= CHSC_REQ4_SSID;
lcss >>= 4;
/* Fetch length of request field */
FETCH_HW(req_len, chsc_req4->length);
rsp_len = sizeof(CHSC_RSP) + ((1 + l_sch - f_sch) * sizeof(CHSC_RSP4));
if(l_sch < f_sch
|| rsp_len > (0x1000 - req_len)) {
/* Set response field length */
STORE_HW(chsc_rsp->length,sizeof(CHSC_RSP));
/* Store request error */
STORE_HW(chsc_rsp->rsp,CHSC_REQ_ERRREQ);
/* No reaon code */
STORE_FW(chsc_rsp->info,0);
return 0;
}
for(sch = f_sch; sch <= l_sch; sch++, chsc_rsp4++)
{
DEVBLK *dev;
memset(chsc_rsp4, 0, sizeof(CHSC_RSP4) );
if((dev = find_device_by_subchan((LCSS_TO_SSID(lcss) << 16)|sch)))
{
int n;
chsc_rsp4->sch_val = 1;
if(dev->pmcw.flag5 & PMCW5_V)
chsc_rsp4->dev_val = 1;
chsc_rsp4->st = (dev->pmcw.flag25 & PMCW25_TYPE) >> 5;
chsc_rsp4->unit_addr = dev->devnum & 0xff;
STORE_HW(chsc_rsp4->devno,dev->devnum);
chsc_rsp4->path_mask = dev->pmcw.pim;
STORE_HW(chsc_rsp4->sch, sch);
memcpy(chsc_rsp4->chpid, dev->pmcw.chpid, 8);
if(dev->fla[0])
chsc_rsp4->fla_valid_mask = dev->pmcw.pim;
for(n = 0; n < 7; n++)
if(dev->pmcw.pim & (0x80 >> n))
STORE_HW(chsc_rsp4->fla[n], dev->fla[n]);
}
}
/* Store response length */
STORE_HW(chsc_rsp->length,rsp_len);
/* Store request OK */
STORE_HW(chsc_rsp->rsp,CHSC_REQ_OK);
/* No reaon code */
STORE_FW(chsc_rsp->info,0);
return 0;
}
#if 0
static int ARCH_DEP(chsc_get_cu_desc) (CHSC_REQ *chsc_req, CHSC_RSP *chsc_rsp)
{
U16 req_len, sch, f_sch, l_sch, rsp_len, lcss;
CHSC_REQ6 *chsc_req6 = (CHSC_REQ6 *)(chsc_req);
CHSC_RSP6 *chsc_rsp6 = (CHSC_RSP6 *)(chsc_rsp+1);
FETCH_HW(f_sch,chsc_req6->f_sch);
FETCH_HW(l_sch,chsc_req6->l_sch);
FETCH_HW(lcss,chsc_req6->ssidfmt);
lcss &= CHSC_REQ6_SSID;
/* Fetch length of request field */
FETCH_HW(req_len, chsc_req6->length);
rsp_len = sizeof(CHSC_RSP) + ((1 + l_sch - f_sch) * sizeof(CHSC_RSP6));
if(l_sch < f_sch
|| rsp_len > (0x1000 - req_len)) {
/* Set response field length */
STORE_HW(chsc_rsp->length,sizeof(CHSC_RSP));
/* Store request error */
STORE_HW(chsc_rsp->rsp,CHSC_REQ_ERRREQ);
/* No reaon code */
STORE_FW(chsc_rsp->info,0);
return 0;
}
for(sch = f_sch; sch <= l_sch; sch++, chsc_rsp6++)
{
DEVBLK *dev;
memset(chsc_rsp6, 0, sizeof(CHSC_RSP6) );
if((dev = find_device_by_subchan((LCSS_TO_SSID(lcss) << 16)|sch)))
{
int n;
chsc_rsp6->sch_val = 1;
if(dev->pmcw.flag5 & PMCW5_V)
chsc_rsp6->dev_val = 1;
chsc_rsp6->st = (dev->pmcw.flag25 & PMCW25_TYPE) >> 5;
chsc_rsp6->fla_valid_mask = dev->pmcw.pim;
STORE_HW(chsc_rsp6->devnum,dev->devnum);
STORE_HW(chsc_rsp6->sch, sch);
memcpy(chsc_rsp6->chpid, dev->pmcw.chpid, 8);
for(n = 0; n < 7; n++)
STORE_HW(chsc_rsp6->fla[n], dev->fla[n]);
}
}
/* Store response length */
STORE_HW(chsc_rsp->length,rsp_len);
/* Store request OK */
STORE_HW(chsc_rsp->rsp,CHSC_REQ_OK);
/* No reaon code */
STORE_FW(chsc_rsp->info,0);
return 0;
}
#endif
static int ARCH_DEP(chsc_get_css_info) (REGS *regs, CHSC_REQ *chsc_req, CHSC_RSP *chsc_rsp)
{
CHSC_RSP10 *chsc_rsp10;
U16 req_len, rsp_len;
UNREFERENCED(chsc_req);
chsc_rsp10 = (CHSC_RSP10 *)(chsc_rsp + 1);
/* Fetch length of request field */
FETCH_HW(req_len, chsc_req->length);
rsp_len = sizeof(CHSC_RSP) + sizeof(CHSC_RSP10);
if(rsp_len > (0x1000 - req_len)) {
/* Set response field length */
STORE_HW(chsc_rsp->length,sizeof(CHSC_RSP));
/* Store request error */
STORE_HW(chsc_rsp->rsp,CHSC_REQ_ERRREQ);
/* No reaon code */
STORE_FW(chsc_rsp->info,0);
return 0;
}
STORE_HW(chsc_rsp->length,rsp_len);
memset(chsc_rsp10->general_char, 0, sizeof(chsc_rsp10->general_char));
memset(chsc_rsp10->chsc_char, 0, sizeof(chsc_rsp10->chsc_char));
#if defined(FEATURE_REGION_RELOCATE)
CHSC_SB(chsc_rsp10->general_char,2);
CHSC_SB(chsc_rsp10->general_char,5);
#endif
#if defined(FEATURE_CANCEL_IO_FACILITY)
CHSC_SB(chsc_rsp10->general_char,6);
#endif
CHSC_SB(chsc_rsp10->general_char,7); /* Concurrent Sense */
CHSC_SB(chsc_rsp10->general_char,12); /* Dynamic IO */
#if defined(FEATURE_QUEUED_DIRECT_IO)
CHSC_SB(chsc_rsp10->general_char,41); /* Adapter Int Fac */
CHSC_SB(chsc_rsp10->chsc_char,1); /* 0x0002 Supported */
#if 0
CHSC_SB(chsc_rsp10->chsc_char,2); /* 0x0006 Supported */
#endif
CHSC_SB(chsc_rsp10->chsc_char,3); /* 0x0004 Supported */
CHSC_SB(chsc_rsp10->chsc_char,8); /* 0x0024 Supported */
if(FACILITY_ENABLED(QDIO_ASSIST, regs))
CHSC_SB(chsc_rsp10->general_char,61); /* QDIO Assist */
#endif /*defined(FEATURE_QUEUED_DIRECT_IO)*/
#if defined(_FEATURE_QDIO_TDD)
if(FACILITY_ENABLED(QDIO_TDD, regs))
CHSC_SB(chsc_rsp10->general_char,56); /* AIF Time Delay Dis */
#endif /*defined(_FEATURE_QDIO_TDD)*/
#if defined(_FEATURE_QEBSM)
if(FACILITY_ENABLED(QEBSM, regs))
{
CHSC_SB(chsc_rsp10->general_char,58); /* SQBS/EQBS Available */
CHSC_SB(chsc_rsp10->general_char,66); /* SQBS/EQBS Interpret */
}
#endif /*defined(_FEATURE_QEBSM)*/
#if defined(_FEATURE_QDIO_THININT)
if(FACILITY_ENABLED(QDIO_THININT, regs))
{
CHSC_SB(chsc_rsp10->general_char,67); /* OSA/FCP Thin Ints */
CHSC_SB(chsc_rsp10->chsc_char,107); /* 0x0021 Supported */
}
#endif /*defined(_FEATURE_QDIO_THININT)*/
// CHSC_SB(chsc_rsp10->general_char,45); /* Multiple CSS */
// CHSC_SB(chsc_rsp10->general_char,64); /* QDIO Multiple CU */
// CHSC_SB(chsc_rsp10->general_char,65); /* OSA System Console */
// CHSC_SB(chsc_rsp10->general_char,82); /* CIB */
// CHSC_SB(chsc_rsp10->general_char,88); /* FCX */
// CHSC_SB(chsc_rsp10->chsc_char,84); /* SECM */
// CHSC_SB(chsc_rsp10->chsc_char,86); /* SCMC */
// CHSC_SB(chsc_rsp10->chsc_char,107); /* Set Channel Subsys Char */
// CHSC_SB(chsc_rsp10->chsc_char,108); /* Fast CHSCs */
/* Store request OK */
STORE_HW(chsc_rsp->rsp,CHSC_REQ_OK);
/* No reaon code */
STORE_FW(chsc_rsp->info,0);
return 0;
}
static int ARCH_DEP(chsc_get_ssqd) (CHSC_REQ *chsc_req, CHSC_RSP *chsc_rsp)
{
U16 req_len, sch, f_sch, l_sch, rsp_len, lcss;
CHSC_REQ24 *chsc_req24 = (CHSC_REQ24 *)(chsc_req);
CHSC_RSP24 *chsc_rsp24 = (CHSC_RSP24 *)(chsc_rsp+1);
FETCH_HW(f_sch,chsc_req24->first_sch);
FETCH_HW(l_sch,chsc_req24->last_sch);
FETCH_HW(lcss,chsc_req24->ssidfmt);
lcss &= CHSC_REQ24_SSID;
lcss >>= 4;
/* Fetch length of request field */
FETCH_HW(req_len, chsc_req24->length);
rsp_len = sizeof(CHSC_RSP) + ((1 + l_sch - f_sch) * sizeof(CHSC_RSP24));
if(l_sch < f_sch
|| rsp_len > (0x1000 - req_len)) {
/* Set response field length */
STORE_HW(chsc_rsp->length,sizeof(CHSC_RSP));
/* Store request error */
STORE_HW(chsc_rsp->rsp,CHSC_REQ_ERRREQ);
/* No reaon code */
STORE_FW(chsc_rsp->info,0);
return 0;
}
for(sch = f_sch; sch <= l_sch; sch++, chsc_rsp24++)
{
DEVBLK *dev;
memset(chsc_rsp24, 0, sizeof(CHSC_RSP24) );
if((dev = find_device_by_subchan((LCSS_TO_SSID(lcss) << 16)|sch)))
if(dev->hnd->ssqd)
(dev->hnd->ssqd)(dev, chsc_rsp24);
}
/* Store response length */
STORE_HW(chsc_rsp->length,rsp_len);
/* Store request OK */
STORE_HW(chsc_rsp->rsp,CHSC_REQ_OK);
/* No reaon code */
STORE_FW(chsc_rsp->info,0);
return 0;
}
#if 0
static int ARCH_DEP(chsc_enable_facility) (CHSC_REQ *chsc_req, CHSC_RSP *chsc_rsp)
{
U16 req_len, rsp_len, facility;
CHSC_REQ31* chsc_req31 = (CHSC_REQ31*) (chsc_req);
CHSC_RSP31* chsc_rsp31 = (CHSC_RSP31*) (chsc_rsp+1);
/* Fetch length of request field and validate */
FETCH_HW( req_len, chsc_req31->length );
/* Calculate response length */
rsp_len = sizeof(CHSC_RSP) + sizeof(CHSC_RSP31);
if (req_len < rsp_len) {
STORE_HW( chsc_rsp->length, sizeof(CHSC_RSP));
STORE_HW( chsc_rsp->rsp, CHSC_REQ_ERRREQ);
STORE_FW( chsc_rsp->info, 0);
return 0;
}
/* Prepare the response */
STORE_HW( chsc_rsp->length, rsp_len );
STORE_FW( chsc_rsp->info, 0);
memset(chsc_rsp31, 0, sizeof(CHSC_RSP31) );
// STORE_FW( chsc_rsp31->resv1, 0);
/* Fetch requested facility and enable it */
FETCH_HW( facility, chsc_req31->facility );
switch (facility)
{
case CHSC_REQ31_MSS:
// if(FACILITY_ENABLED_DEV(MCSS))
{
/* Enable Multiple Subchannel-Sets Facility */
STORE_HW( chsc_rsp->rsp, CHSC_REQ_OK );
}
default: /* Unknown Facility */
STORE_HW( chsc_rsp->rsp, CHSC_REQ_FACILITY );
break;
}
return 0; /* call success */
}
#endif
#if defined(_FEATURE_QDIO_THININT)
static int ARCH_DEP(chsc_set_sci) (CHSC_REQ *chsc_req, CHSC_RSP *chsc_rsp)
{
DEVBLK *dev;
U32 ssid;
int rc;
CHSC_REQ21 *chsc_req21 = (CHSC_REQ21 *)(chsc_req);
/* Fetch length of request field */
FETCH_FW(ssid, chsc_req21->ssid);
if((dev = find_device_by_subchan(ssid)))
if(dev->hnd->ssci)
if(!(rc = (dev->hnd->ssci)(dev, chsc_req21)))
{
/* Store response length */
STORE_HW(chsc_rsp->length,sizeof(CHSC_RSP));
/* Store request OK */
STORE_HW(chsc_rsp->rsp,CHSC_REQ_OK);
/* No reaon code */
STORE_FW(chsc_rsp->info,0);
return rc;
}
/* Store response length */
STORE_HW(chsc_rsp->length,sizeof(CHSC_RSP));
/* Store request OK */
// STORE_HW(chsc_rsp->rsp,CHSC_REQ_ERRREQ);
STORE_HW(chsc_rsp->rsp,CHSC_REQ_OK);
/* No reaon code */
STORE_FW(chsc_rsp->info,0);
return 0;
}
#endif /*defined(_FEATURE_QDIO_THININT)*/
static int ARCH_DEP(chsc_get_chp_desc) (CHSC_REQ *chsc_req, CHSC_RSP *chsc_rsp)
{
U16 req_len, rsp_len;
int chp;
CHSC_REQ2 *chsc_req2 = (CHSC_REQ2 *)(chsc_req);
CHSC_RSP2 *chsc_rsp2 = (CHSC_RSP2 *)(chsc_rsp+1);
CHSC_RSP2F1 *chsc_rsp2f1 = (CHSC_RSP2F1 *)(chsc_rsp+1);
/* Fetch length of request field */
FETCH_HW(req_len, chsc_req2->length);
rsp_len = sizeof(CHSC_RSP) + ((1 + chsc_req2->last_chpid - chsc_req2->first_chpid) * ((chsc_req2->flags & CHSC_REQ2_F1_C) ? sizeof(CHSC_RSP2F1) : sizeof(CHSC_RSP2)));
if(chsc_req2->first_chpid > chsc_req2->last_chpid
|| rsp_len > (0x1000 - req_len)) {
// ZZ || (chsc_req2->rfmt != 1 && chsc_req2->rfmt != 2)) {
/* Set response field length */
STORE_HW(chsc_rsp->length,sizeof(CHSC_RSP));
/* Store request error */
STORE_HW(chsc_rsp->rsp,CHSC_REQ_ERRREQ);
/* No reaon code */
STORE_FW(chsc_rsp->info,0);
return 0;
}
for(chp = chsc_req2->first_chpid; chp <= chsc_req2->last_chpid; chp++, chsc_rsp2++, chsc_rsp2f1++)
{
if(!(chsc_req2->flags & CHSC_REQ2_F1_C))
{
DEVBLK *dev;
memset(chsc_rsp2, 0, sizeof(CHSC_RSP2) );
chsc_rsp2->chpid = chp;
for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev)
if (dev->allocated
&& (dev->pmcw.chpid[0] == chp)
&& dev->chptype[0])
{
chsc_rsp2->flags = 0x80;
chsc_rsp2->chp_type = dev->chptype[0];
// chsc_rsp2->lsn = 0;
// chsc_rsp2->swla = 0;
// chsc_rsp2->chla = 0;
// chsc_rsp2->chpp = 0;
}
}
else
{
DEVBLK *dev;
memset(chsc_rsp2f1, 0, sizeof(CHSC_RSP2F1) );
chsc_rsp2f1->chpid = chp;
for (dev = sysblk.firstdev; dev != NULL; dev = dev->nextdev)
if (dev->allocated
&& (dev->pmcw.chpid[0] == chp)
&& dev->chptype[0])
{
chsc_rsp2f1->flags = 0x80;
chsc_rsp2f1->chp_type = dev->chptype[0];
// chsc_rsp2f1->lsn = 0;
// chsc_rsp2f1->chpp = 0;
// STORE_HW(chsc_rsp2f1->mdc,0x0000);
// STORE_HW(chsc_rsp2f1->flags2,0x0000);
}
}
}
/* Store response length */
STORE_HW(chsc_rsp->length,rsp_len);
/* Store request OK */
STORE_HW(chsc_rsp->rsp,CHSC_REQ_OK);
/* No reaon code */
STORE_FW(chsc_rsp->info,0);
return 0;
}
/*-------------------------------------------------------------------*/
/* B25F CHSC - Channel Subsystem Call [RRE] */
/*-------------------------------------------------------------------*/
DEF_INST(channel_subsystem_call)
{
int r1, r2; /* register values */
VADR n; /* Unsigned work */
BYTE *mn; /* Unsigned work */
U16 req_len; /* Length of request */
U16 req; /* Request code */
CHSC_REQ *chsc_req; /* Request structure */
CHSC_RSP *chsc_rsp; /* Response structure*/
RRE(inst, regs, r1, r2);
// ARCH_DEP(display_inst) (regs, inst);
PRIV_CHECK(regs);
SIE_INTERCEPT(regs);
PTT(PTT_CL_INF,"CHSC",regs->GR_L(r1),regs->GR_L(r2),regs->psw.IA_L);
n = regs->GR(r1) & ADDRESS_MAXWRAP(regs);
if(n & 0xFFF)
ARCH_DEP(program_interrupt) (regs, PGM_SPECIFICATION_EXCEPTION);
mn = MADDR(n, r1, regs, ACCTYPE_READ, regs->psw.pkey);
chsc_req = (CHSC_REQ*)(mn);
/* Fetch length of request field */
FETCH_HW(req_len, chsc_req->length);
chsc_rsp = (CHSC_RSP*)((BYTE*)chsc_req + req_len);
if((req_len < sizeof(CHSC_REQ))
|| (req_len > (0x1000 - sizeof(CHSC_RSP))))
ARCH_DEP(program_interrupt) (regs, PGM_OPERAND_EXCEPTION);
FETCH_HW(req,chsc_req->req);
ARCH_DEP(validate_operand) (n, r1, 0, ACCTYPE_WRITE, regs);
switch(req) {
case CHSC_REQ_CHPDESC: // 0x0002
regs->psw.cc = ARCH_DEP(chsc_get_chp_desc) (chsc_req, chsc_rsp);
break;
case CHSC_REQ_SCHDESC: // 0x0004
regs->psw.cc = ARCH_DEP(chsc_get_sch_desc) (chsc_req, chsc_rsp);
break;
#if 0
case CHSC_REQ_CUDESC: // 0x0006
regs->psw.cc = ARCH_DEP(chsc_get_cu_desc) (chsc_req, chsc_rsp);
break;
#endif
case CHSC_REQ_CSSINFO: // 0x0010
regs->psw.cc = ARCH_DEP(chsc_get_css_info) (regs, chsc_req, chsc_rsp);
break;
#if 0
case 0x0012: // 0x0012
regs->psw.cc = ARCH_DEP(chsc_get_conf_info) (chsc_req, chsc_rsp);
break;
#endif
#if defined(_FEATURE_QDIO_THININT)
case CHSC_REQ_SETSSSI: // 0x0021
if(FACILITY_ENABLED(QDIO_THININT, regs))
{
regs->psw.cc = ARCH_DEP(chsc_set_sci) (chsc_req, chsc_rsp);
break;
}
else
goto chsc_error;
/* Fall through to unkown request if thinint not supported */
#endif /*defined(_FEATURE_QDIO_THININT)*/
case CHSC_REQ_GETSSQD: // 0x0024
regs->psw.cc = ARCH_DEP(chsc_get_ssqd) (chsc_req, chsc_rsp);
break;
#if 0
case CHSC_REQ_ENFACIL: // 0x0031
regs->psw.cc = ARCH_DEP(chsc_enable_facility) (chsc_req, chsc_rsp);
break;
#endif
default:
chsc_error:
PTT(PTT_CL_ERR,"*CHSC",regs->GR_L(r1),regs->GR_L(r2),regs->psw.IA_L);
if( HDC3(debug_chsc_unknown_request, chsc_rsp, chsc_req, regs) )
break;
/* Set response field length */
STORE_HW(chsc_rsp->length,sizeof(CHSC_RSP));
/* Store unsupported command code */
STORE_HW(chsc_rsp->rsp,CHSC_REQ_INVALID);
/* No reaon code */
STORE_FW(chsc_rsp->info,0);
/* The instr. succeeds even if request does not? */
regs->psw.cc = 0;
}
}
#endif /*defined(FEATURE_CHSC)*/
#if !defined(_GEN_ARCH)
#if defined(_ARCHMODE2)
#define _GEN_ARCH _ARCHMODE2
#include "chsc.c"
#endif
#if defined(_ARCHMODE3)
#undef _GEN_ARCH
#define _GEN_ARCH _ARCHMODE3
#include "chsc.c"
#endif
#endif /*!defined(_GEN_ARCH)*/