 |
Upgrading Privileged-Code Applications on OpenVMS Alpha and
OpenVMS I64 Systems
B.18.1 CALL_UNLOCK Macro
The CALL_UNLOCK MACRO-32 macro facilitates the use of the MMG_STD$UNLOCK routine
by code that was originally written to use the JSB-interface counterpart MMG$UNLOCK.
The CALL_UNLOCK macro has implicit register inputs that correspond to the register
inputs and outputs of the JSB-interface for the MMG$UNLOCK routine.
This macro has been modified to use the full 64-bits of the R3 input which
contains the PTE address. The macro calls the new MMG_STD$IOUNLOCK_BUF routine
instead of MMG_STD$UNLOCK. In addition, the CALL_UNLOCK macro has been modified
to generate a suppressable interface warning at compile-time. The format of
the macro call is:
CALL_UNLOCK [ INTERFACE_WARNING=YES|NO ]
|
By default the interface warning is enabled and generates the following warning
at compile-time:
%AMAC-W-GENWARN, generated WARNING: 0 CALL_UNLOCK interface has changed for 64-bit virtual addressing; set INTERFACE_WARNING=NO to disable messages. %AMAC-W-GENWARN, generated WARNING: 0 CALL_UNLOCK uses the 64-bit PTE address in R3 %AMAC-W-GENWARN, generated WARNING: 0 CALL_UNLOCK does not unlock the page table pages %AMAC-W-GENWARN, generated WARNING: 0 A call to IOC_STD$RELEASE_DIOBM may be required to derive a SVAPTE
|
B.19 MMG_STD$SVAPTECHK, MMG$SVAPTECHK
The current versions of the MMG_STD$SVAPTECHK and MMG$SVAPTECHK routines compute
a 32-bitsvapte for either a process or system
space address. As of OpenVMS Alpha Version 7.0, these routines are be restricted
to an S0/S1 system space address and no longer accept an address in P0/P1 space.
The MMG_STD$SVAPTECHK and MMG$SVAPTECHK routines check the full 64 bits of
the input address and declare a bugcheck for an input address that is not in
S0/S1 space. For S0/S1 input addresses, these routines return a 32-bit system
virtual address of the PTE through the SPT window.
In releases prior to OpenVMS Alpha Version 7.0, the interface for this routine
was:
void mmg_std$svaptechk (void *va, PCB *pcb, PHD *phd, void **svapte_p);
|
The new interface for this routine is:
void mmg_std$svaptechk (VOID_PQ va, PCB *pcb, PHD *phd, PTE **svapte_p);
|
The majority of callers of this routine use it with an S0/S1 address and do
not need to change.
Appendix C
Kernel Threads Routines and Macros
This appendix describes the new routines and macros available implementing
for kernel threads.
In addition to a few new routines to convert a PID to a KTB address, the EXE$NAM_TO_PCB
routine is modified to return the KTB address in R2, which previously was a
scratch register. The new routines and macros all assume the caller is executing
in kernel mode.
EXE$CVT_IPID_TO_KTB Routine
Converts an internal PID to a KTB address.
Format
EXE$CVT_IPID_TO_KTB ipid ,ktb ,pcb
RETURNS
| OpenVMS usage |
cond_value |
| type |
longword (unsigned) |
| access |
write only |
| mechanism |
by value |
Status indicating the success or failure of the operation.
Arguments
ipid
| OpenVMS usage |
process_id |
| type |
longword (unsigned) |
| access |
read |
| mechanism |
by value |
This argument provides the internal PID to be converted.
ktb
| OpenVMS usage |
address |
| type |
quadword |
| access |
write |
| mechanism |
by reference |
This argument provides the KTB address.
pcb
| OpenVMS usage |
address |
| type |
quadword |
| access |
write |
| mechanism |
by reference |
This argument provides the PCB address.
Description
The EXE$CVT_IPID_TO_KTB routine converts an internal PID to a KTB
address.
Return Values
| SS$_NONEXPR |
The process does not exist. |
| SS$_NOSUCHTHREAD |
The process exists but the thread does not. |
EXE$CVT_EPID_TO_KTB Routine
Converts an external PID to a KTB address.
Format
EXE$CVT_EPID_TO_KTB epid ,ktb ,pcb
RETURNS
| OpenVMS usage |
cond_value |
| type |
longword (unsigned) |
| access |
write only |
| mechanism |
by value |
Status indicating the success or failure of the operation.
Arguments
epid
| OpenVMS usage |
process_id |
| type |
longword (unsigned) |
| access |
read |
| mechanism |
by value |
This argument provides the external PID to be converted.
ktb
| OpenVMS usage |
address |
| type |
quadword |
| access |
write |
| mechanism |
by reference |
This argument provides the KTB address.
pcb
| OpenVMS usage |
address |
| type |
quadword |
| access |
write |
| mechanism |
by reference |
This argument provides the PCB address.
Description
The EXE$CVT_EPID_TO_KTB routine converts an external PID to a KTB
address.
Return Values
| SS$_NONEXPR |
The process does not exist. |
| SS$_NOSUCHTHREAD |
The process exists but the thread does not. |
GET_CURKTB Macro
Obtains the current process or thread KTB address. Applicable to
BLISS, C, and MACRO-32. The following three command formats are for BLISS,
C, and MACRO-32, respectively.
Format
GET_CURKTB;
GET_CURKTB()
GET_CURKTB ktbreg , pcbreg, [preserve][test_multi=yes]
Arguments
ktbreg
This argument is the destination to return the KTB address. The default is
R14.
pcbreg
This argument is the register containing the address of the PCB. The default
is R14.
preserve
This argument is optional. The default is YES to preserve R0 and R1. Otherwise,
it is NO.
test_multi
This argument is optional. The default is YES to test and validate if there
is more than one KTB. If NO, it is assumed that the process is already known
to be multithreaded.
Description
The GET_CURKTB macro obtains the current process or thread KTB address.
|