[Digital logo]
[HR]

OpenVMS System Services Reference Manual


Previous | Contents

The virtual address space must already exist.

length_64


OpenVMS usage: byte count
type: quadword (unsigned)
access: read only
mechanism: by value

Length of the virtual address space to be included in the buffer object. The specified length will be rounded up to a CPU-specific page boundary such that it includes all CPU-specific pages in the requested range.

acmode


OpenVMS usage: access_mode
type: longword (unsigned)
access: read only
mechanism: by value

Access mode on behalf of which the request is being made. The acmode argument is a longword containing the access mode.

The $PSLDEF macro in STARLET.MLB and the file PSLDEF.H in SYS$STARLET_C.TLB define the following symbols and their values for the four access modes:
Value Symbolic Name Access Mode
0 PSL$C_KERNEL Kernel
1 PSL$C_EXEC Executive
2 PSL$C_SUPER Supervisor
3 PSL$C_USER User

The most privileged access mode used is the access mode of the caller. For the $CREATE_BUFOBJ_64 service to complete successfully, the resultant access mode must be equal to or more privileged than the access mode already associated with the pages in the specified input range.

flags


OpenVMS usage: mask_longword
type: longword (unsigned)
access: read only
mechanism: by value

Flag mask specifying the request options. The flags argument is a longword bit vector in which each bit corresponds to a flag. The $CBODEF macro in STARLET.MLB and CBODEF.H file in SYS$STARLET_C.TLB define a symbolic name for each flag. The following table describes each flag that is valid for the $CREATE_BUFOBJ_64 service:
Flag Value Description
CBO$M_RETSVA 1 If set, returns the system virtual address in the return_va_64 argument instead of the process virtual address range. (Valid for inner mode callers only.)
CBO$M_SVA_32 4 If set, creates the buffer object window in 32-bit S0/S1 space. (By default, this service creates the window in 64-bit S2 space.)

return_va_64


OpenVMS usage: address
type: quadword address
access: write only
mechanism: by 32- or 64-bit reference

The lowest process virtual address of the pages in the buffer object. The return_va_64 argument is the 32- or 64-bit virtual address of a naturally aligned quadword into which the service returns the virtual address.

return_length_64


OpenVMS usage: byte count
type: quadword (unsigned)
access: write only
mechanism: by 32- or 64-bit reference

The length of the virtual address range in the buffer object. 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 virtual address range in bytes.

buffer_handle_64


OpenVMS usage: handle
type: quadword (unsigned)
access: write only
mechanism: by 32- or 64-bit reference

The 32- or 64-bit virtual address of a naturally aligned quadword into which a buffer handle is returned to be used when referencing the created buffer object.

DESCRIPTION

The Create Buffer Object service creates a buffer object for use by the I/O subsystem. The pages that constitute the buffer object are permanently locked into physical memory (but not the process's working set) and double mapped into system space. The net effect is the following:

If the condition value SS$_ACCVIO is returned by this service, a value cannot be returned in the memory locations pointed to by the return_va_64, return_length_64, and buffer_handle_64 arguments.

If a condition value other than SS$_ACCVIO is returned, the returned address and returned length indicate the pages that were successfully made part of the buffer object before the error occurred. If no pages were made part of the buffer object, the return_va_64 argument will contain the value -1, and a value is not returned in the memory location pointed to by the return_length_64 argument.

Required Privileges

No privileges are required if calling $CREATE_BUFOBJ_64 from an inner mode. If calling from user mode, the process must hold the rights identifier VMS$BUFFER_OBJECT_USER at the time of the call. This identifier is normally granted by the system administrator via the Authorize utility.

Required Quota

No process quota is charged but the pages are charged against a systemwide limit, system parameter MAXBOBMEM.

Related Services

$CRETVA_64, $DELETE_BUFOBJ, $EXPREG_64


Condition Values Returned

SS$_NORMAL The service completed successfully.
SS$_ACCVIO The return_va_64, return_length_64, or buffer_handle_64 argument cannot be written by the caller.
SS$_BADPARAM Invalid flags options specified.
SS$_EXBUFOBJLM Buffer object cannot be created because it would bring the total number of buffer object pages above the systemwide limit MAXBOBMEM.
SS$_INSFMEM Insufficient dynamic memory.
SS$_INSFSPTS Insufficient system page table entries.
SS$_NOBUFOBJID The process attempted to create a buffer object from user mode but was not holding required rights identifier VMS$BUFFER_OBJECT_USER.
SS$_NOPRIV Valid flag options were specified but from user mode.
SS$_PAGNOTWRITE A page within the address range is not writable.
SS$_PAGOWNVIO The pages could not be put into the buffer object because the access mode associated with the call to $CREATE_BUFOBJ_64 was less privileged than the access mode associated with the pages.

$CREATE_GDZRO (Alpha Only)

On Alpha systems, creates a permanent, memory-resident, global demand-zero section to which processes can map. Shared page table sections can also be created.

This service accepts 64-bit addresses.


Format

SYS$CREATE_GDZRO gs_name_64 ,ident_64 ,prot ,length_64 ,acmode ,flags [,reserved_length_64]


C Prototype

int sys$create_gdzro (void *gs_name_64, struct _secid *ident_64, unsigned int prot, unsigned __int64 length_64, unsigned int acmode, unsigned int flags,...);


ARGUMENTS

gs_name_64


OpenVMS usage: section_name
type: character-coded text string
access: read only
mechanism: by 32- or 64-bit descriptor--fixed-length string descriptor

Name of the global section. The gs_name_64 argument is the 32- or 64-bit virtual address of a naturally aligned 32- or 64-bit string descriptor pointing to this name string.

ident_64


OpenVMS usage: section_id
type: quadword (unsigned)
access: read only
mechanism: by 32- or 64-bit reference

Identification value specifying the version number of the global section. The ident_64 argument is a quadword containing three fields. The ident_64 argument is the 32- or 64-bit virtual address of a naturally aligned quadword that contains the identification value.

The first longword specifies the matching criteria in its low-order 2 bits. Their meanings are as follows:
Value Symbolic Name Match Criteria
0 SEC$K_MATALL Match all versions of the section.
1 SEC$K_MATEQU Match only if major and minor identifications match.
2 SEC$K_MATLEQ Match if the major identifications are equal and the minor identification of the mapper is less than or equal to the minor identification of the global section.

If you specify the ident_64 argument as 0, the version number and match control fields default to 0.

The version number is in the second longword. The version number contains two fields: a minor identification in the low-order 24 bits and a major identification in the high-order 8 bits. You can assign values for these fields by installation convention to differentiate versions of global sections. If no version number is specified when a section is created, processes that specify a version number when mapping cannot access the global section.

prot


OpenVMS usage: file_protection
type: longword (unsigned)
access: read only
mechanism: by value

Protection to be applied to the global demand-zero section. The mask contains four 4-bit fields. Bits are read from right to left in each field. The following diagram depicts the mask:

Cleared bits indicate that read, write, execute, and delete access, in that order, are granted to the particular category of user. Only read, write, and execute access are meaningful for section protection. Delete access bits are ignored. Read access also grants execute access for those situations where execute access applies. If 0 is specified, read access and write access are granted to all users.

length_64


OpenVMS usage: byte count
type: quadword (unsigned)
access: read only
mechanism: by value

Length, in bytes, of the global demand-zero section to be created. The length_64 argument must be specified as a multiple of the CPU-specific page size. A length of 0 cannot be specified.

Note

Creating a memory-resident global section with shared page tables does not imply that the global section must have a length that is an even multiple of CPU-specific page table pages. The global section might not fully use the last shared page table page.

acmode


OpenVMS usage: access_mode
type: longword (unsigned)
access: read only
mechanism: by value

Access mode that is to be the owner of the pages created during the mapping. The acmode argument is a longword containing the access mode.

If the memory-resident global section is created with shared page tables, this is the access mode that is stored in the owner, read, and write fields of the corresponding shared page table entries (PTEs).

The $PSLDEF macro in STARLET.MLB and the file PSLDEF.H in SYS$STARLET_C.TLB define the following symbols and their values for the four access modes:
Value Symbolic Name Access Mode
0 PSL$C_KERNEL Kernel
1 PSL$C_EXEC Executive
2 PSL$C_SUPER Supervisor
3 PSL$C_USER User

flags


OpenVMS usage: mask_longword
type: longword (unsigned)
access: read only
mechanism: by value

Flag mask specifying the type of global section to be created as well as its characteristics. The flags argument is a longword bit vector in which each bit corresponds to a flag. The $SECDEF macro and the SECDEF.H file 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_GDZRO service:
Flag Description
SEC$M_DZRO Pages are demand-zero pages. By default, this flag is always present in this service and cannot be disabled.
SEC$M_GBL Pages form a global section. By default, this flag is always present in this service and cannot be disabled.
SEC$M_PERM Global section is permanent. By default, this flag is always present in this service and cannot be disabled.
SEC$M_SYSGBL Pages form a system global section. By default, pages form a group global section.
SEC$M_MRES Pages form a memory-resident section. By default, this flag is always present in this service and cannot be disabled.
SEC$M_WRT Pages form a read/write section. By default, this flag is always present in this service and cannot be disabled.

All other bits in the flags argument are reserved for future use by Digital and should be specified as 0. The condition value SS$_IVSECFLG is returned if any undefined bits are set.

reserved_length_64


OpenVMS usage: byte count
type: quadword (unsigned)
access: write only
mechanism: 32- or 64-bit reference

Length, in bytes, of the global section as currently registered in the Reserved Memory Registry. The reserved_length_64 argument is the 32- or 64-bit virtual address of a naturally aligned quadword into which the service returns the reserved length.

If reserved_length_64 is not specified or is specified as 0, no reserved length is returned to the caller.

If the memory-resident global section is not registered, reserved_length_64 is written with the value 0.


DESCRIPTION

The Create Permanent Global Demand Zero Section service allows a process to create a permanent, memory-resident, global demand-zero section. Global demand-zero sections contain demand-zero allocation pages that are writable and memory resident. All pages in the memory-resident global demand-zero section are shared by all processes that map to the global section.

The global demand-zero pages are always resident in memory and are not backed up by any file on any disk. The global pages are not charged against any page-file quota. To call this system service, the process must have the rights identifier VMS$MEM_RESIDENT_USER. The error status SS$_NOMEMRESID is returned if the caller has not been granted this identifier.

Memory-resident global pages are not placed into the process's working set list when the process maps to the global section and the virtual memory is referenced by the process. The pages are not charged against the process's working set quota.

If the global section is not registered in the Reserved Memory Registry, or if the /NOALLOCATE qualifier was specified when the global section was registered in the Reserved Memory Registry, invalid global PTEs are written to the global page table. When the global section is mapped, invalid page table entries are placed in the process page table. Physical memory is not allocated until the pages are referenced. If the global section is registered in the Reserved Memory Registry, the size of the global section need not match the reserved size. If the global section is not registered in the Reserved Memory Registry, or if the reserved size is smaller than the size of the global section, the error status SS$_INSFLPGS is returned if there are not enough fluid pages in the system to satisfy the request.

If the /ALLOCATE qualifier was specified when the global section was registered in the Reserved Memory Registry, contiguous, aligned, physical pages are preallocated during system initialization for this global section. Valid page table entries are placed in the global page table and when the global section is mapped, valid page table entries are placed in the process page table. With the proper virtual alignment, granularity hints (GH) are used to map to the global pages.

If the global section is not registered in the Reserved Memory Registry, or if the /PAGE_TABLES qualifier was specified when the global section was registered, shared page tables are created for the memory-resident global section.

If the /ALLOCATE and /PAGE_TABLE qualifiers were specified when the global section was registered in the Reserved Memory Registry, contiguous, aligned physical pages are preallocated during system initialization for this global section, and granularity hints are used to map to the shared page table sections.

The following table lists the factors affecting the creation of shared page tables for memory-resident global sections. The /ALLOCATE and the /PAGE_TABLES qualifiers pertain to the Reserved Memory Registry command RESERVED_MEMORY ADD entered for the memory-resident global section being created. For more information about using the SYSMAN utility to create entries to the Reserved Memory Registry, see the OpenVMS System Management Utilities Reference Manual.
/ALLOCATE /PAGE_TABLES Outcome
Not registered Not registered Shared page tables created.

Shared page tables cannot use GH.

Returns SS$_CREATED_SHPT.

No No No shared page tables created.

Returns SS$_CREATED.

No Yes Shared page tables created.

Shared page tables cannot use GH.

Returns SS$CREATED_SHPT.

Yes No No shared page tables created.

Returns SS$_CREATED.

Yes Yes Shared page tables created.

Shared page tables can use GH.

Returns SS$_CREATED_SHPT.

Shared page tables consume the same internal OpenVMS data structures as global sections. The system parameters GBLPAGES and GBLSECTIONS must account for the additional global pages and the additional global section.

To use the shared page tables associated with a memory-resident global section, a process must first create a shared page table region (with SYS$CREATE_REGION_64). Additionally, a subsequent request to map to the memory-resident global section must do the following:

If a shared page table region is not specified, process-private page tables are used to map to the global section.

If the service returns an error status value that is neither SS$_INSFLPGS nor SS$_MRES_PFNSMALL, a value is not returned in the reserved_length_64 argument.

If the service returns a successful condition value or if SS$_INSFLPGS or SS$_MRES_PFNSMALL is returned and the reserved_length_64 argument is specified as a non-zero address, the length in bytes of the global section as registered in the Reserved Memory Registry is returned in the reserved_length_64 argument.

Required Privileges

To create a permanent memory-resident global DZRO section, the process must have the following privileges or rights identifiers:

Required Quota

None

Related Services

$CRMPSC, $CRMPSC_GDZRO_64, $CRMPSC_GPFILE_64, $DGBLSC, $MGBLSC, $MGBLSC_64


Condition Values Returned

SS$_CREATED Global section has been created.
SS$_CREATED_SHPT Global section has been created with shared page tables.
SS$_ACCVIO The gs_name_64 descriptor cannot be read by the caller, or the reserved_length_64 argument was specified as a non-zero value and cannot be written by the caller.
SS$_DUPLNAM A global section of the same name already exists; a new global section was not created.
SS$_GPTFULL There is no more room in the system global page table to set up page table entries for the global section or for the shared page tables.
SS$_GSDFULL There is no more room in the system space allocated to maintain control information for global sections.
SS$_IVLOGNAM The specified global section name has a length of 0 or has more than 43 characters.
SS$_IVPROTECT The protection argument format is invalid.
SS$_IVSECFLG An invalid flag, a reserved flag, or an invalid combination of flags was specified.
SS$_IVSECIDCTL The match control field of the global section identification is invalid.
SS$_LEN_NOTPAGMULT The length_64 argument is not a multiple of CPU-specific pages.
SS$_MRES_PFNSMALL Preallocated, contiguous, aligned physical memory specified in the Reserved Memory Registry is smaller than the length specified for the global section by the length_64 argument.
SS$_NOMEMRESID The process attempted to create a memory-resident section but was not holding the correct identifier (VMS$MEM_RESIDENT_USER).
SS$_NOPRMGBL The process does not have the privileges to create or delete a permanent group global section (PRMGBL).
SS$_NOSYSGBL The process does not have the privileges to create or delete a system global section (SYSGBL).
SS$_SECTBLFUL There are no entries available in the system global section table for the global section or for the shared page tables.
SS$_TOOMANYLNAM The logical name translation of the gs_name_64 argument exceeded the allowed depth of 10.

$CREATE_GFILE (Alpha Only)

On Alpha systems, creates a permanent global disk file section to which processes can map.

This service accepts 64-bit addresses.


Format

SYS$CREATE_GFILE gs_name_64 ,ident_64 ,file_offset_64 ,length_64 ,chan ,acmode ,flags ,return_length_64 [,fault_cluster]


C Prototype

int sys$create_gfile (void *gs_nam_64, struct _secid *ident_64, unsigned __int64 file_offset_64, unsigned __int64 length_64, unsigned short int chan, unsigned int acmode, unsigned int flags, unsigned __int64 *return_length_64,...);


ARGUMENTS

gs_name_64


OpenVMS usage: section_name
type: character-coded text string
access: read only
mechanism: by 32- or 64-bit descriptor--fixed-length string descriptor

Name of the global section. The gs_name_64 argument is the 64-bit virtual address of a naturally aligned 32- or 64-bit string descriptor pointing to this name string.

ident_64


OpenVMS usage: section_id
type: quadword (unsigned)
access: read only
mechanism: by 32- or 64-bit reference

Identification value specifying the version number of a global section. The ident_64 argument is a quadword containing three fields. The ident_64 argument is the 32- or 64-bit virtual address of a naturally aligned quadword that contains the identification value.


Previous | Next | Contents | [Home] | [Comments] | [Ordering info] | [Help]

[HR]

  4527P010.HTM
  OSSG Documentation
  22-NOV-1996 12:58:56.71

Copyright © Digital Equipment Corporation 1996. All Rights Reserved.

Legal