IEARBUP — RB update service

Description

IEARBUP allows you to request that the system update the instruction address in the PSW copy in the RB.

Environment

The requirements for the caller are:

Environmental factor Requirement
Minimum authorization: Supervisor state and PSW key 0.
Dispatchable unit mode: Task
Cross memory mode: PASN=HASN, any SASN
AMODE: 31-bit
ASC mode: Primary
Interrupt status: Enabled or disabled for I/O and external interrupts
Locks: No locks are required. The caller may hold a local lock, the CMS lock or the CPU lock.
Control parameters: Control parameters must be in the primary address space.

Programming requirements

The caller must include the CVT and IHAECVT mapping macros.

Restrictions

If the caller holds the CPU lock, the parameter list must be in fixed or DREF storage.

Input register information

Before issuing the IEARBUP macro, the caller does not have to place any information into any general purpose register (GPR) or access register (AR) unless using it in register notation for a particular parameter, or using it as a base register.

Output register information

When control returns to the caller, the GPRs contain:
Register
Contents
0-1
Used as work registers by the system
2-13
Unchanged
14
Used as a work register by the system
15
Return code
When control returns to the caller, the ARs contain:
Register
Contents
0-1
Used as work registers by the system.
2-13
Unchanged
14-15
Used as work registers by the system

Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control.

Performance implications

None.

Syntax

The IEARBUP macro is written as follows:

Syntax Description
   
   name name: symbol. Begin name in column 1.
   
One or more blanks must precede IEARBUP.
  IEARBUP
   
One or more blanks must follow IEARBUP.
   
WHICHRB=CURRENT  
WHICHRB=PREV  
WHICHRB=EXPLICIT  
   
  ,RB=xrb  
   
FUNCTION=UPDATE Default: FUNCTION=UPDATE
   
,PSWBYTE03=NO  
,PSWBYTE03=YES  
   
  ,ADDRTYPE=NO_CHANGE Default: ADDRTYPE=NO_CHANGE
  ,ADDRTYPE=INRBOPSWA  
  ,ADDRTYPE=ACTUAL  
   
   ,PSWADDR=pswaddr pswaddr: RS-type address or address in register (2) - (12)
   
   ,AMODE=UNCHANGED Default: AMODE=UNCHANGED
   ,AMODE=24  
   ,AMODE=31  
   ,AMODE=64  
   
  ,ADDRTYPE=DELTA  
  ,PSWDELTA=pswdelta pswdelta: RS-type address or address in register (2) - (12)
   
 FUNCTION=EXTRACTPSW  
   
  ,PSWG=xpswg  
   
,RETCODE=retcode retcode: RS-type address or register (2) - (12).
   
,RSNCODE=rsncode rsncode: RS-type address or register (2) - (12).
   
,PLISTVER=IMPLIED_VERSION Default: PLISTVER=IMPLIED_VERSION
,PLISTVER=MAX  
,PLISTVER=0  
   
  ,MF=S Default: MF=S
  ,MF=(L,list addr) list addr: RS-type address or register (1) - (12)
  ,MF=(L,list addr,attr)  
  ,MF=(L,list addr,0D)  
  ,MF=(E,list addr)  
  ,MF=(E,list addr,COMPLETE)  
   

Parameters

The parameters are explained as follows:

name
An optional symbol, starting in column 1, that is the name on the IEARBUP macro invocation. The name must conform to the rules for an ordinary assembler language symbol.
WHICHRB=
A required parameter that identifies the RB to be updated
WHICHRB=CURRENT
indicates to update the current RB.
WHICHRB=PREV
indicates to update the previous (older) RB.
WHICHRB=EXPLICIT
indicates to update the provided RB. The calling program must ensure that there is proper serialization to keep the provided RB valid for the duration of IEARBUP service processing.
RB=xrb
indicates the name (RS-type) or address in register (2)-(12) of a required character input that identifies the RB to be updated
FUNCTION=
indicates an optional keyword input that identifies the function to be performed
FUNCTION=UPDATE
indicates to update an RB
,PSWBYTE03=
A required parameter that indicates whether the user has updated the first 4 bytes (bytes 0 to 3) of RBOPSW. If so, the system should use those updated values.
,PSWBYTE03=NO
indicates that bytes 0 to 3 were not modified.
,PSWBYTE03=YES
indicates that bytes 0 to 3 were modified.
,ADDRTYPE=
An optional parameter that identifies the method by which the instruction address in the PSW is provided. The default is ADDRTYPE=NO_CHANGE.
,ADDRTYPE=NO_CHANGE
indicates that the instruction address has not been changed.
,ADDRTYPE=INRBOPSWA
indicates that the instruction address has been updated in RBOPSWA, along with the one or more AMODE indicators.
,ADDRTYPE=ACTUAL
indicates that the instruction address is to be used as is.
,ADDRTYPE=DELTA
indicates that the value provided is a delta to the existing address.
,PSWDELTA=pswdelta
When ADDRTYPE=DELTA is specified, a required input parameter that contains the delta to be added to the instruction address in the PSW copy stored in the RB. The value is treated as a signed quantity, so a value of X'FFFFFFFE' would be treated as negative two, resulting in subtracting two from the instruction address. The AMODE will remain unchanged.

To code: Specify the RS-type address, or address in register (2)-(12), of a fullword field.

,PSWADDR=pswaddr
When ADDRTYPE=ACTUAL is specified, a required input parameter that contains the address to be placed into the PSW stored in the RB. Start of changeThe high 33 bits must be zero, unless the result is to be AMODE 64.End of change

To code: Specify the RS-type address, or address in register (2)-(12), of an 8-byte field.

,AMODE=
When ADDRTYPE=ACTUAL is specified, a required parameter that identifies the resulting AMODE for the PSW
,AMODE=UNCHANGED
indicates not to change the AMODE.
,AMODE=24
indicates to set the AMODE to 24.
,AMODE=31
indicates to set the AMODE to 31.
,AMODE=64
indicates to set the AMODE to 64.
FUNCTION=EXTRACTPSW
indicates to extract the 128–bit PSW associated with this RB
PSWG=xpswg
indicates the name (RS-type) or address in register (2)-(12) of the required 16–character output that is to contain the 128–bit x/Architecture PSW.
Note: If running under ESA/390 architecture (ARCHLVL 1), the PSW is the 128–bit z/Architecture® analog of the 64–bit ESA/390 PSW.
,RETCODE=retcode
An optional output parameter into which the return code is to be copied from GPR 15.

To code: Specify the RS-type address of a fullword field, or register (2)-(12).

,RSNCODE=rsncode
An optional output parameter into which the reason code is to be copied from GPR 0.

To code: Specify the RS-type address of a fullword field, or register (2)-(12).

,PLISTVER=
An optional input parameter that specifies the version of the macro. PLISTVER determines which parameter list the system generates. PLISTVER is an optional input parameter on all forms of the macro, including the list form. When using PLISTVER, specify it on all macro forms used for a request and with the same value on all of the macro forms. The values are:
,PLISTERVER=IMPLIED_VERSION
indicates the lowest version that allows all parameters specified on the request to be processed. If you omit the PLISTVER parameter, IMPLIED_VERSION is the default.
,PLISTVER=MAX
indicates the parameter list will be the largest size currently possible. This size might grow from release to release and affect the amount of storage that your program needs.

If you can tolerate the size change, IBM® recommends that you always specify PLISTVER=MAX on the list form of the macro. Specifying MAX ensures that the list-form parameter list is always long enough to hold all the parameters you might specify on the execute form, when both are assembled with the same level of the system. In this way, MAX ensures that the parameter list does not overwrite nearby storage.

,PLISTVER=0
indicates that you want to use the currently available parameters.
,MF=
An optional input parameter that specifies the macro form.
,MF=S
Specifies the standard form of the macro, which builds an inline parameter list and generates the macro invocation to transfer control to the service. MF=S is the default.
,MF=L,list addr
Specifies the list form of the macro. Use the list form together with the execute form of the macro for applications that require reentrant code. The list form defines an area of storage that the execute form uses to store the parameters. Only the PLISTVER parameter may be coded with the list form of the macro.
,list addr
The name (RS-type) or address in register (1)-(12) of the storage area that contains the parameters.
,attr
An optional 1- to 60-byte input string that you use to force boundary alignment of the parameter list. Use a value of 0F to force the parameter list to a word boundary, or 0D to force the parameter list to a doubleword boundary. If you do not code attr, the system provides a value of 0D.
,MF=E,list addr,COMPLETE
Specifies the execute form of the macro. Use the execute form together with the list form of the macro for applications that require reentrant code. The execute form of the macro stores the parameters into the storage area defined by the list form, and generates the macro invocation to transfer control to the service.
,list addr
The name (RS-type) or address in register (1)-(12) of the storage area that contains the parameters.
COMPLETE
Specifies that the system is to check for required parameters and supply defaults for omitted optional parameters.

ABEND codes

The caller may get the following abend code:
0C2-02
The caller was not in supervisor state.
0C4-04
The caller was not in key 0.

Return and reason codes

When the IEARBUP macro returns control to your program:
  • GPR 15 (and retcode, when you code RETCODE) contains a return code.
  • When the value in GPR 15 is not zero, GPR 0 (and rsncode, when you code RSNCODE) contains a reason code.

Macro IEARBUPM provides equate symbols for the return and reason codes.

Table 1 identifies the hexadecimal return and reason codes and the equate symbol associated with each reason code. IBM support personnel may request the entire reason code, including the xxxx value.

Table 1. Return and Reason Codes for the IEARBUP Macro
Return Code Reason Code Equate Symbol, Meaning, and Action
0 Equate Symbol: IearbupRc_OK

Meaning: Iearbup request successful.

8 Equate Symbol: IearbupRc_InvParm

Meaning: Iearbup request specifies invalid parameters.

Action: Refer to the action provided with the specific reason code.

8 xxxx0801 Equate Symbol: IearbupRsnBadVersion

Meaning: The version field in the parameter list is not valid.

Action: Check for possible storage overlay.

8 xxxx0802 Equate Symbol: IearbupRsnBadAMODEField

Meaning: The amode field in the parameter list is not valid.

Action: Check for possible storage overlay.

8 xxxx0803 Equate Symbol: IearbupRsnBadAddress

Meaning: The address provided is not valid.

Action: Only provide an instruction address that is less than X'80000000'.

C Equate Symbol: IearbupRc_Env

Meaning: Environmental error

Action: Refer to the action provided with the specific reason code.

C xxxx0C01 Equate Symbol: IearbupRsnPrevRBNotFound

Meaning: RB=PREV was requested, but there is only one RB for the current task.

Action: Use RB=CURRENT when there is only one RB.

C xxxx0C02 Equate Symbol: IearbupRsnBadAMODE

Meaning: AMODE=64 was specified but the architecture level is not z/Architecture.

Action: Only request AMODE=64 when the architecture level is z/Architecture.

Example 1

Operation

  1. Update the instruction address in the PSW copy stored in the RB to the address provided in field P.
The code is as follows:
      IEARBUP ADDRTYPE=ACTUAL,PSWADDR=P,RETCODE=RC,MF=(E,MFL)
         ...
      IEARBUP MF=(L,MFL)
P     DS    XL8
RC    DS    F

Example 2

Operation:

  1. Decrement the instruction address in the PSW copy in the RB by 4
The code is as follows:
      IEARBUP ADDRTYPE=DELTA,PSWDELTA=PD,RETCODE=RC,MF=(E,MFL)
         ...
      IEARBUP MF=(L,MFL)
PD    DC    F'-4'
RC    DS    F