This PreInit call is the same as 'call_sub' except the routine
is identified by its address, not its index in the PreInit table.
Syntax
>>-CALL--CELQPIPI--(--call_sub_addr--,--routine_addr--,--------->
>--function_pointer--,--token--,--parm_ptr--,--sub_ret_code--,-->
>--sub_reason_code--,--sub_feedback_code--)--------------------><
- call_sub_addr (input)
- A fullword function code (integer value = 10) containing the
call_sub request for a subroutine.
- routine_addr (input/output)
- A doubleword containing the address of the routine that should
be invoked. If this value is zero, then the function_pointer will
be used to invoke the routine.
- function_pointer (input/output)
- A 16 byte field used to invoke the routine directly. The first
time (and first time after enclave termination occurred) a routine
is called, this field must be zero. On subsequent calls to the same
routine, the value returned in this field should be used. This will
ensure that there is only one copy of writable static area for the
routine and that static constructors are only run once.
- token (input)
- A doubleword with the value of the token returned by (init_sub)
when the common run-time environment is initialized.
The token must identify
a previously preinitialized environment that is not active at the
time of the call.
Note: If the token pointing to the
previously preinitialized environment is a non-XPLINK environment and
the subprogram to be invoked is XPLINK, then a return code of 40 will
be returned because this is not valid.
- parm_ptr (input)
- A doubleword containing the address of the parameter list or
0 (zero). The parameter list is copied to the appropriate location
in the stack frame and general purpose registers 1, 2 and 3 are loaded
from the parameter list when the routine is executed.
The length
of the parameter list is determined from PPAs of the routine. If the
routine takes a variable length parameter list, the length of the
parameter list will be assumed to be 256 bytes
Floating point
and complex values can only be passed by reference.
- sub_ret_code (output)
- A fullword containing the subroutine return code. When a PreInit
call_sub ends normally, the sub_ret_code is set with the value of
R15 returned from the subroutine. If the enclave is terminated due
to an error or due to the routine explicitly invoking a language-specific
service that causes a stop or exit semantic, this contains the enclave
return code for termination.
- sub_reason_code (output)
- A fullword containing the subroutine return code. If the enclave
is terminated due to an error or due to the routine explicitly invoking
a language-specific service that causes a stop or exit semantic, this
contains the enclave return code for termination.
- sub_feedback_code (output)
- A 16-byte field containing the feedback code for enclave termination.
This is the CEE000 feedback code for normal subroutine returns. If
the enclave is terminated due to an error or due to the routine explicitly
invoking a language-specific service that causes a stop or exit semantic,
this contains the enclave feedback code for termination.