VMS Help
System Services, $CREATE REGION 64 (Alpha Only)
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
On Alpha systems, creates a virtual region within the process's
private address space.
This service accepts 64-bit addresses.
Format
SYS$CREATE_REGION_64 length_64 ,region_prot ,flags
,return_region_id_64 ,return_va_64
,return_length_64 [,start_va_64]
C Prototype
int sys$create_region_64 ( unsigned __int64 length_64,
unsigned int region_prot,
unsigned int flags, struct
_generic_64 *return_region_id, void
*(*(return_va_64)), unsigned __int64
*return_length_64,...);
length_64
OpenVMS usage:byte count
type: quadword (unsigned)
access: read only
mechanism: by value
Length of the virtual region to be created. The length specified
must be a multiple of CPU-specific pages. This length is fixed at
the time the region is created.
If the flag VA$M_SHARED_PTS is set, this length is rounded up to
include an even multiple of CPU-specific pages mapped by a page
table page.
region_prot
OpenVMS usage:region_protection
type: longword (unsigned)
access: read only
mechanism: by value
Region protection to be associated with the region to be created.
The region_prot argument is a longword containing the create and
owner mode.
The file VADEF.H in SYS$STARLET_C.TLB and the $VADEF macro in
STARLET.MLB define the following symbols for valid combinations
of create and owner modes:
Symbol Create and Owner Modes
VA$C_REGION_UCREATE_ User create mode and user owner mode
UOWN
VA$C_REGION_UCREATE_ User create mode and supervisor owner mode
SOWN
VA$C_REGION_UCREATE_ User create mode and executive owner mode
EOWN
VA$C_REGION_UCREATE_ User create mode and kernel owner mode
KOWN
VA$C_REGION_SCREATE_ Supervisor create mode and supervisor
SOWN owner mode
VA$C_REGION_SCREATE_ Supervisor create mode and executive owner
EOWN mode
VA$C_REGION_SCREATE_ Supervisor create mode and kernel owner
KOWN mode
VA$C_REGION_ECREATE_ Executive create mode and executive owner
EOWN mode
VA$C_REGION_ECREATE_ Executive create mode and kernel owner
KOWN mode
VA$C_REGION_KCREATE_ Kernel create mode and kernel owner mode
KOWN
For both create and owner mode, the $CREATE_REGION_64 service
uses whichever of the following two access modes is least
privileged:
o Access mode specified by the acmode argument
o Access mode of the caller
A subsequent call to any system service that created address
space within a region must be made from an access mode that is
the same or more privileged than the create mode associated with
the region.
A subsequent call to $DELETE_REGION_64 to delete the region must
be made from an access mode that is the same or more privileged
than the owner mode associated with the region.
All regions created by $CREATE_REGION_64 are automatically
deleted when the image is run down on image exit.
flags
OpenVMS usage:mask_longword
type: longword (unsigned)
access: read only
mechanism: by value
Flag mask specifying the characteristics of the region to
be created. The flags argument is a longword bit vector in
which each bit corresponds to a flag. The file VADEF.H in
SYS$STARLET_C.TLB and the $VADEF macro in STARLET.MLB define a
symbolic name for each flag. You construct the flags argument
by performing a logical OR operation on the symbol names for all
desired flags.
The following table describes the flags that are valid for the
$CREATE_REGION_64 service:
Flag Description
VA$M_DESCEND Created region is a descending region; that
is, allocation occurs toward decreasing virtual
addresses. If VA$M_DESCEND is not specified,
the region allocation occurs toward increasing
virtual addresses.
VA$M_SHARED_PTS Created region requires the virtual address
space created within it to be capable of
using shared page tables. If this flag is not
specified, the virtual address space created
within the region is mapped by process-private
page tables only. By default, the region does
not allow the use of shared page tables.
VA$M_P0_SPACE Create region in P0 space. This flag cannot be
set if VA$M_P1_SPACE is set.
VA$M_P1_SPACE Create region in P1 space. This flag cannot be
set if VA$M_P0_SPACE is set.
All other bits in the flags argument are reserved for future use
by Compaq. The condition value SS$_IVREGFLG is returned if any
undefined bits are set.
return_region_id_64
OpenVMS usage:region identifier
type: quadword (unsigned)
access: write only
mechanism: by 32- or 64-bit reference
The region ID associated with the created region. The
return_region_id_64 argument is the 32- or 64-bit virtual address
of a naturally aligned quadword into which the service returns
the region ID.
return_va_64
OpenVMS usage:return address
type: quadword address
access: write only
mechanism: by 32- or 64-bit reference
The lowest process virtual address of the region. The
return_va_64 argument is the 32- or 64-bit virtual address of
a naturally aligned quadword into which the service returns the
lowest virtual address of the region.
If the flag VA$M_SHARED_PTS is set, the returned virtual address
is aligned to a CPU-specific page table page boundary. If the
global section mapped by this shared page table region is large
enough that multiple page table pages are required to map the
global section, the page tables themselves can be mapped with
granularity hints; therefore, the alignment of the returned
virtual address can be even greater than that of a single CPU-
specific page table page boundary.
return_length_64
OpenVMS usage:byte count
type: quadword (unsigned)
access: write only
mechanism: by 32- or 64-bit reference
The length of the region actually created. The return_length_64
argument is the 32- or 64-bit virtual address of a naturally
aligned quadword into which the service returns the length of the
region in bytes.
If the flag VA$M_SHARED_PTS is set, the returned length is the
input length rounded up to an even multiple of bytes mapped by a
single CPU-specific page table page.
start_va_64
OpenVMS usage:address
type: quadword address
access: read only
mechanism: by value
The starting address for the created virtual region. The
specified virtual address must be a CPU-specific page aligned
address.
If the start_va_64 argument is not specified or is specified
as 0, the region can be created anywhere within the following
address spaces:
o P2 space (if the flags VA$M_P0_SPACE and VA$M_P1_SPACE are
clear)
o P0 space (if the flag VA$M_P0_SPACE is set and VA$M_P1_SPACE
is clear)
o P1 space (if the flag VA$M_P1_SPACE is set and VA$M_P0_SPACE
is clear)
If the flag VA$M_SHARED_PTS is set and this argument is
specified, the specified starting address must be aligned to a
natural page table page boundary or an error is returned.
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.