r , I indicates how control is passed to Since DMSFRES IBALRI is a nucleus-resident routine, other nucleus-resident
L routines can branch directly to it, (TYPCALL=BALR) while
routines that are not nucleus-resident aust use SVC linkage (TYPCALL=SVC). ERROR CODES FROM DMSFRES, DMSFREE, AND DMSFRET A nonzero return code upon return from DMSFRES, DMSFREE, or DMSFRET indicates that the request could not be satisfied. Register 15 contains
this return code, indicating which error has occurred. The following
codes apply to the DMSFRES, DMSFREE, and DMSFRET macros.
2
3
Error (DMSFREE) Insufficient storage space is available to satisfy
the request for free storage. In the case of a variable
request, even the minimum request could not be satisfied. or DMSFRET) User storage pointers destroyed. (DMSFREE, DMSFRET, or DMSFRES) destroyed.
Nucleus storage pointers
4 (DMSFREE) An invalid size was requested. This error exit is
taken if the requested size is not greater than zero. In the
case of variable requests, this error exit is taken if the m1n1mua request is greater than the maximum request.
(However, the latter error is not detected if DMSFREE is able
5
to satisfy the maximum request.) (DMSFRET) An invalid size was passed to the
This error exit is taken if the specified
positive. DMSFRET macro.
length is not
6 (DMSFRET) The block of storage that is being released was never allocated by DMSFREE. Such an error is detected if one
of the following errors is found: The block does not lie entirely inside either the low storage free storage area or the user program area between FREELOVE and FREEUPPR. The block crosses a
allocated for USER NUCLEUS type storage.
page boundary
storage from that separates a page
a page allocated for The block overlaps another block already on the free
storage chain.
7 (DMSPRET) The address given for the tlock being released is
not doubleword aligned.
8 (DMSFRES) An invalid request code was passed to the DMSFRRS routine. Since all request codes are generated by the DMSPRES macro, this error code should never appear.
9 (DMSFREE, DMSFRET, or DMSFRES) Unexpected and unexplained
error in the free storage management routine.
2-24 IBM VM/310 System Logic and Program Determination--Voluae 2
CMS HANDLING OF PSW KEYS The purpose of the CMS Nucleus protection sche.e is to protect the CMS nucleus fro. inadvertent destruction by a user program. Without it, it
would be possible, for example, for a FORTRAN user who accidentally
assigns an incorrectly subscripted array element to destroy nucleus
code, wipe out a crucial table or constant area, or even destroy an
entire disk by destroying the contents of the master file directory.
In general, user programs and disk-resident CMS commands are executed
with a PSW key of X'E', while nucleus code is executed with a PSi key of 1'0'. There are, however, some exceptions to this rule. Certain
disk-resident CMS commands run with a PSW key of X'O', since they have a
constant need to modify nucleus pointers and storage. The nucleus
routines called by the GET, PUT, READ, and WRITE macros run with a user PSi key of X'E', to increase efficiency.
Two macros are available to any routine that wishes to change its PSi key for some special purpose. These are the DMSKEY macro and the DKSEXS .acro.
The DMSKEY macro .ay be used to change the PSi key to the user value
or the nucleus value. The DMSKEY NUCLEUS option causes the current PSi key to be placed in a stack, and a value of 0 to be placed in the PSW key. The DMSKEY USER option causes the current PSi key to be placed in
a stack, and a value of X'E' to be placed in the PSi key. The D5SKEY RESET option causes the top value in the DMSKEY stack to be removed and
re-inserted into the PSi. It is a requirement of the CMS system that when a routine terminates,
the DKSKEY stack must be empty. This .eans that a routine should
execute a DMSKEY RESET option for each DKSKEY NUCLEUS option and each DMSKEY USER option executed by the routine.
The DMSKEY key stack has a current maxi.u. depth of seven for each
routine. In this context, a "routine" is anything invoked by an SVC call.
The DMSKEY LASTUSER option causes the current PSi key to be placed in
the stack, and a new key inserted into the PSi, determined as follows:
the SVC system save area stack is searched in reverse order (top to
bottom) for the first save area corresponding to a user routine. The PSi key that was in effect in that routine is then taken for the new PSi key. (If no user routine is found in the search, then LISTUSER has the
same effect as USER.) This option is used ty as macro simulation
routines when they wish to enter a user-supplied exit routine; the exit
routine is entered with the PSW key of the last user routine on the SVC system save area stack.
The NOSTACK option of DMSKEY may be used with NUCLEUS, USER, or LASTUSER (as in, for example, DMSKEY NUCLEUS,NOSTACK) if the current key
is not to be placed on the DMSKEY stack. If this option is used, then
no corresponding DMSKEY RESET should be issued.
The DMSEXS ("execute in system mode") macro instruction is useful in
situations where a routine is being executed with a user protect key.
but wishes to execute a single instruction that, for example, sets a bit
in the NUCON area. The single instruction may be specified as the
argument to the DMSEXS macro, and that instruction will be executed with
a system PSi key. CMS Introduction 2-25
Previous Page Next Page