SVC TITLE 'DMTSVC (RSCS) VM/370 - RELEASE 6' 00001000
*. 00002000
* MODULE NAME - 00003000
* 00004000
* DMTSVC 00005000
* 00006000
* FUNCTION - 00007000
* 00008000
* THE DMTSVC MODULE IS THE MSUP SVC INTERRUPT 00009000
* HANDLER. DMTSVC RECEIVES CONTROL DIRECTLY ON AN 00010000
* SVC INTERRUPT. 00011000
* 00012000
* ATTRIBUTES - 00013000
* 00014000
* REUSABLE, EXECUTABLE DISABLED ONLY 00015000
* 00016000
* ENTRY POINTS - 00017000
* 00018000
* DMTSVC - DIRECTLY ON SVC INTERRUPT 00019000
* 00020000
* 00021000
* ENTRY CONDITIONS - 00022000
* 00023000
* ENTERED FROM DISPATCHED PROGRAMMING UPON EXECUTION 00024000
* OF A SVC INSTRUCTION. 00025000
* 00026000
* 00027000
* EXIT CONDITIONS - 00028000
* 00029000
* NORMAL - 00030000
* 00031000
* ON SVC C'F', CONTROL IS RETURNED TO THE INSTRUCTION 00032000
* FOLLOWING THE CALLING SVC INSTRUCTION WITH SYSTEM 00033000
* MASK DISABLED (EXCEPT FOR MACHINE CHECK). THE 00034000
* EXECUTING TASK HAS BEEN UNDISPATCHED, AND ITS TASK ELEMENT 00035000
* ADDRESS IS RETURNED IN GREG 14. 00036000
* 00037000
* ERROR - 00038000
* 00039000
* ON SVC OTHER THAN C'F', CONTROL IS RETURNED TO THE 00040000
* INSTRUCTION FOLLOWING THE CALLING SVC INSTRUCTION WITH 00041000
* SYSTEM STATUS UNMODIFIED. THE SVC IS AN EFFECTIVE NOP. 00042000
EJECT 00043000
* 00044000
* CALLS TO OTHER ROUTINES - 00045000
* 00046000
* NONE 00047000
* 00048000
* 00049000
* EXTERNAL REFERENCES - 00050000
* 00051000
* NONE 00052000
* 00053000
* 00054000
* TABLES / WORKAREAS - 00055000
* 00056000
* TAREA - INTERRUPTED TASK'S SAVE AREA, TO SAVE STATUS 00057000
* TASKE - TASK ELEMENT, TO LOCATE TAREA 00058000
* 00059000
* 00060000
* 00061000
* REGISTER USAGE - 00062000
* 00063000
* GPR13 = CALLER'S TASK ELEMENT BASE 00064000
* GPR14 = CALLER'S TASK SAVE AREA BASE 00065000
* GPR15 = DMTSVC BASE REGISTER 00066000
* 00067000
* NOTES - 00068000
* 00069000
* NONE 00070000
* 00071000
* OPERATION - 00072000
* 00073000
* 00074000
* THE ONLY FUNCTION OF SVC WITHIN THE RSCS SYSTEM IS 00075000
* TO "UNDISPATCH" (OR "FREEZE") AN EXECUTING TASK. 00076000
* SVC IS NECESSARY TO PERFORM THIS FUNCTION SINCE 00077000
* THE LEFT HALF OF THE ACTIVE PSW IS ACCESSABLE ONLY 00078000
* THROUGH STORAGE OF THE PSW ON AN INTERRUPT. THE 00079000
* SVC CODE IS NOT INSPECTED BY SUPEXT, AND IT 00080000
* CURRENTLY HAS NO MEANING (SEE BELOW). 00081000
* 00082000
* THE RUNNING TASK IS "UNDISPATCHED" ON AN SVC BY 00083000
* MOVING THE LEFT HALF OF THE SVC OLD PSW TO THE 00084000
* TASK SAVE AREA RESUME PSW FIELD, STORING THE 00085000
* REGISTER CONTENTS ON INTERRUPT IN THE TASK SAVE 00086000
* AREA, AND SETTING THE RESUME PSW ADDRESS FIELD TO 00087000
* THE CONTENTS OF REG.14 ON INTERRUPT. SUPSVC 00088000
* RETURNS CONTROL BY SETTING REG.14 TO THE ADDRESS 00089000
* OF THE TASK ELEMENT OF THE "UNDISPATCHED" TASK, 00090000
* AND LOADING A PSW WITH ALL MASK BITS SET OFF 00091000
* (EXCEPT MACHINE CHECK) AND EXECUTION ADDRESS AS 00092000
* STORED IN THE SVC OLD PSW. 00093000
* 00094000
* 00095000
*. 00096000
EJECT 00097000
DMTSVC CSECT 00098000
SPACE 00099000
* SUPERVISOR CALL INTERRUPT ENTRY POINT 00100000
USING SVECTORS,0 GET SVECTORS ADDRESSABILITY 00101000
USING TASKE,R13 GET TASK ELEMENT ADDRESSABILITY 00102000
SPACE 00103000
ST R15,SSAVE SAVE WORK REGS TEMPORARILY 00104000
L R15,NEWSVC+4 GET ADDRESS OF ENTRY POINT 00105000
USING DMTSVC,R15 DEFINE ADDRESSING FOR SVC HANDLER 00106000
CLI OLDSVC+3,C'F' IS IT A FREEZE REQUEST? 00107000
BNE SVCNOP NOP FUNCTION IF NOT 00108000
L R15,SSAVE ALL DONE WITH LOCAL ADDRESSING 00109000
STM R13,R14,SSAVE SAVE CONTENTS OF WORK REGISTERS 00110000
L R13,ACTIVE REG.13 = ADDRESS OF CALLER'S TASK ELEMENT 00111000
L R14,TASKSAVE REG.14 = ADDRESS OF CALLER'S TASK S/A 00112000
SPACE 00113000
USING TAREA,R14 DEFINE TASK SAVE AREA DSECT ADDRESSA 00114000
SPACE 00115000
MVC TPSW(4),OLDSVC SAVE LEFT HALF OF CALLER'S PSW 00116000
STM R0,R15,TGREG0 SAVE ALL OF THE CALLER'S REGISTERS 00117000
MVC TGREG13(8),SSAVE RESTORE REGS 13 & 14 TO CORRECT VALUES 00118000
MVC TPSW+4(4),TGREG14 SET REG.14 RETURN ADDR IN RESUME PSW 00119000
SPACE 00120000
MVI ACTIVE,X'00' RESET ACTIVE FLAG 00121000
SPACE 1 00122000
MVI NEWPSW,X'00' SET MASK OFF FOR PSW TO BE LOADED 00123000
MVI NEWPSW+1,X'04' KEY = 0, MACHINE CHECK ON, SUP MODE 00124000
MVC NEWPSW+5(3),OLDSVC+5 MOVE IN RETURN ADDRESS 00125000
LPSW NEWPSW RETURN WITH OLD MASK IN OLDSVC FOR CALLER 00126000
SPACE 00127000
SVCNOP EQU * 00128000
L R15,SSAVE RESTORE R15 00129000
LPSW OLDSVC RESTORE PRE-SVC STATUS - NOP 00130000
EJECT 00131000
COPY RSSEQU 00132000
EJECT 00133000
COPY SVECTORS 00134000
EJECT 00135000
COPY TAREA 00136000
EJECT 00137000
COPY TASKE 00138000
END 00139000