/***************************************************************************/ /** **/ /** HPE CONFIDENTIAL. This software is confidential proprietary software **/ /** licensed by Hewlett-Packard Enterprise Development, LP, and is not **/ /** authorized to be used, duplicated OR disclosed to anyone without the **/ /** prior written permission of HPE. **/ /** © 2023 Copyright Hewlett-Packard Enterprise Development, LP **/ /** **/ /** VMS SOFTWARE, INC. CONFIDENTIAL. This software is confidential **/ /** proprietary software licensed by VMS Software, Inc., and is not **/ /** authorized to be used, duplicated or disclosed to anyone without **/ /** the prior written permission of VMS Software, Inc. **/ /** © 2023 Copyright VMS Software, Inc. **/ /** **/ /***************************************************************************/ /********************************************************************************************************************************/ /* Created: 9-Nov-2023 12:06:37 by OpenVMS SDL V3.7 */ /* Source: 13-APR-2022 12:56:44 $1$DGA8345:[LIB_H.SRC]DIOBDDEF.SDL;1 */ /********************************************************************************************************************************/ /*** MODULE $DIOBDDEF ***/ #ifndef __DIOBDDEF_LOADED #define __DIOBDDEF_LOADED 1 #pragma __nostandard /* This file uses non-ANSI-Standard features */ #pragma __member_alignment __save #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __save /* Save the previously-defined required ptr size */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif #ifdef __cplusplus extern "C" { #define __unknown_params ... #define __optional_params ... #else #define __unknown_params #define __optional_params ... #endif #ifndef __struct #if !defined(__VAXC) #define __struct struct #else #define __struct variant_struct #endif #endif #ifndef __union #if !defined(__VAXC) #define __union union #else #define __union variant_union #endif #endif /*+ */ /* IOBD--Direct I/O Buffer Descriptor */ /* */ /* The IOBD structure is used to describe the physical address(es) of all */ /* buffers used in direct I/O. For the I/O to succeed, the buffer must be */ /* locked in memory. */ /* */ /* There are two variants of the IOBD structure. The first is the primary */ /* IOBD structure, which may be embedded in an IRP. It contains room for */ /* exactly DIOBD$K_FIXED_EXTENT_CNT extents. If more extents are needed */ /* to describe the physical address range of the buffer, the IOBD will be */ /* given a larger auxiliary extent list. */ /* */ /* An IOBD can also be created by calling IOC$CREATE_IOBD - in this case, */ /* since the IOBD has to be allocated from pool anyway, its extent list */ /* is sized to hold as many extents as are needed for the specified buffer */ /* and no auxiliary extent list is needed. */ /* */ /* The IRP, IRPE, VCRP, and DCBE structures all contain an embedded fixed- */ /* size IOBD structure. */ /*- */ #include #ifdef __INITIAL_POINTER_SIZE #pragma __required_pointer_size __save #pragma __required_pointer_size __long typedef struct _diobd * DIOBD_PQ; typedef struct _diobd ** DIOBD_PPQ; #pragma __required_pointer_size __restore #else typedef unsigned __int64 DIOBD_PQ; typedef unsigned __int64 DIOBD_PPQ; #endif #define DIOBD$M_INUSE 0x4 #define DIOBD$M_AUX_EXTENTS 0x10 #define DIOBD$M_AUX_INUSE 0x20 #define DIOBD$M_REL_DEALLOC 0x80 #define DIOBD$M_BY_PTE 0x400 #define DIOBD$M_AUX_DIOBD 0x800 #define DIOBD$M_VALID_STORED_FLAGS 1172 #define DIOBD$K_HDRLEN 48 /* DIOBD header length (w/o extents) */ #define DIOBD$K_FIXED_EXTENT_CNT 4 /* Number of extents in the fixed-size IOBD. This */ /* value must keep the IOBD the same size as the DIOBM */ #define DIOBD$K_LENGTH 264 /* Size of fixed size DIOBD including the fixed extents */ /* */ #define DIOBD$M_NORESWAIT 1 /* No resource wait - return an error instead */ #define DIOBD$M_EXT_IOBD 2 /* This is an external IOBD, not one which is */ /* embedded in an IRP. This flag is ignored on */ #define DIOBD$M_INIT_IOBD 4 /* Initialize, do not validate, this IOBD. */ /* When using a stack IOBD it's possible for */ #define DIOBD$M_PTE_STRIDE_1 8 /* When building the EXT list, step through the */ /* list of passed-in PTEs one by one no matter */ #define DIOBD$M_VALID_PARAM_FLAGS 15 #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif typedef struct _diobd { __union { #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __long /* And set ptr size default to 64-bit pointers */ struct _ext *diobd$pq_extents; /* If the IOBD is INUSE, this pointer can */ #else unsigned __int64 diobd$pq_extents; #endif /* be used to find the extents mapped by */ /* this IOBD, whether they are embedded */ /* or auxiliary */ #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __long /* And set ptr size default to 64-bit pointers */ struct _diobd *diobd$pq_aux_diobd; /* Pointer to a secondary IOBD structure */ #else unsigned __int64 diobd$pq_aux_diobd; #endif /* Valid if and only if IOBD$V_AUX_INUSE set */ } diobd$r_extents_aux_union; unsigned short int diobd$w_size; /* IOBD size in bytes */ unsigned char diobd$b_type; /* IOBD type, DYN$C_MISC */ unsigned char diobd$b_subtype; /* IOBD subtype, DYN$C_IOBD */ unsigned int diobd$il_byte_offset; /* This field may be made obsolete soon, */ /* but it has been useful debugging IOBD */ /* problems. A buffer's byte offset is */ /* always included in the physical */ /* address in the 1st extent, but on */ /* architectures where PTEs are not used */ /* to describe a buffer and on which page */ /* size can vary, it's not very useful. */ unsigned int diobd$il_byte_count; /* Total number of bytes described by */ /* the extents. */ unsigned int diobd$il_max_extent_count; /* Maximum number of extents */ unsigned int diobd$il_extent_count; /* Number of valid extents */ unsigned int diobd$il_extents_alloc_size; /* Number of bytes of pool allocated for */ /* the extents list - only valid if */ /* DIOBD$IL_FLAGS.DIOBD$M_AUX_EXTENTS */ /* is set. */ __union { unsigned int diobd$il_flags; /* Flag bits: */ __struct { unsigned diobd$v_fill_0 : 2; /* 01:00 Avoid common fill pattern bits */ unsigned diobd$v_inuse : 1; /* 02 This IOBD is in use */ unsigned diobd$v_fill_3 : 1; /* 03 Avoid common fill pattern bits */ unsigned diobd$v_aux_extents : 1; /* 04 IOBD$PQ_EXTENTS points to an auxiliary extents list */ unsigned diobd$v_aux_inuse : 1; /* ** IOBD$PS_AUX_IOBD points to secondary IOBD */ unsigned diobd$v_fill_5 : 1; /* 06:05 Avoid common fill pattern bits */ unsigned diobd$v_rel_dealloc : 1; /* 07 Deallocate this IOBD on release */ unsigned diobd$v_fill_8 : 2; /* 09:08 Avoid common fill pattern bits */ unsigned diobd$v_by_pte : 1; /* 10 DIOBD was filled by PTE, not VA (BOFF is valid) */ unsigned diobd$v_aux_diobd : 1; /* ** This is an auxiliary DIOBD */ unsigned diobd$v_fill_2_ : 4; } diobd$r_fill_1_; } diobd$r_fill_0_; /* These flags are valid in IOBD$IL_FLAGS - they are not the same flags used in the FLAGS parameter (see below) */ unsigned int diobd$il_abcnt; /* Accumulated byte count */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif __union { #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __long /* And set ptr size default to 64-bit pointers */ void *diobd$pq_va; /* VA mapped by the extents */ #else unsigned __int64 diobd$pq_va; #endif #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __long /* And set ptr size default to 64-bit pointers */ struct _pte *diobd$pq_pte; /* PTE used to map */ #else unsigned __int64 diobd$pq_pte; #endif } diobd$r_va_pte_union; /* Number of extents in the fixed-size IOBD. */ /* There's no reason for this constant to be */ /* used outside of this module - code should */ /* use the DIOBD extent count and maximum */ /* extent count fields, or use the DIOBD size */ /* and HDRLEN to calculate a maximum extent */ /* count, but the management of guard extents */ /* makes extent management best left to the */ /* code in DIOBD.C. */ /* (or smaller), to avoids changes to the offsets of */ /* IRP fields which follow it. */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif __union { EXT diobd$r_fixed_extents [9]; /* + 1 for a guard extent */ #pragma __nomember_alignment __struct { #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif unsigned __int64 diobd$iq_base_pa_vector [4]; /* Vector of PAs */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __longword #else #pragma __nomember_alignment #endif unsigned int diobd$il_base_length_vector [4]; /* Vector of lengths */ } diobd$r_base_extents; #pragma __nomember_alignment __struct { #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __long /* And set ptr size default to 64-bit pointers */ unsigned __int64 *diobd$pq_aux_pa_vector; #else unsigned __int64 diobd$pq_aux_pa_vector; #endif #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __long /* And set ptr size default to 64-bit pointers */ unsigned int *diobd$pq_aux_length_vector; #else unsigned __int64 diobd$pq_aux_length_vector; #endif } diobd$r_aux_extents; } diobd$r_extents_overlay; /* Bits defined in the flags parameter to routines which take one */ /* */ /* NOSVAPTE platforms such as X86, and the IOBD */ /* will be filled regardless of its location - */ /* this bit is used to bypass sanity checks */ /* performed on SVAPTE platforms such as IA64 */ /* when filling a non-IRP-embedded IOBD. */ /* it to be reused as the routine which declares */ /* it is called repeatedly - the IOBD may retain */ /* enough context (type, subtype, size) to pass */ /* validation but still have been corrupted as */ /* other fields on the stack were used, maybe */ /* for a call to a different routine. */ /* what the value of the architecture-specific */ /* constant PTE$C_PAGE_INCR is set to. This is */ /* to support unusual PTE lists such as those */ /* built by the Modified Page Writer. */ /* These flags are valid when used in the flags parameter supported by some routines. */ } DIOBD; #if !defined(__VAXC) #define diobd$pq_extents diobd$r_extents_aux_union.diobd$pq_extents #define diobd$pq_aux_diobd diobd$r_extents_aux_union.diobd$pq_aux_diobd #define diobd$il_flags diobd$r_fill_0_.diobd$il_flags #define diobd$v_inuse diobd$r_fill_0_.diobd$r_fill_1_.diobd$v_inuse #define diobd$v_aux_extents diobd$r_fill_0_.diobd$r_fill_1_.diobd$v_aux_extents #define diobd$v_aux_inuse diobd$r_fill_0_.diobd$r_fill_1_.diobd$v_aux_inuse #define diobd$v_rel_dealloc diobd$r_fill_0_.diobd$r_fill_1_.diobd$v_rel_dealloc #define diobd$v_by_pte diobd$r_fill_0_.diobd$r_fill_1_.diobd$v_by_pte #define diobd$v_aux_diobd diobd$r_fill_0_.diobd$r_fill_1_.diobd$v_aux_diobd #define diobd$pq_va diobd$r_va_pte_union.diobd$pq_va #define diobd$pq_pte diobd$r_va_pte_union.diobd$pq_pte #define diobd$r_fixed_extents diobd$r_extents_overlay.diobd$r_fixed_extents #define diobd$r_base_extents diobd$r_extents_overlay.diobd$r_base_extents #define diobd$iq_base_pa_vector diobd$r_base_extents.diobd$iq_base_pa_vector #define diobd$il_base_length_vector diobd$r_base_extents.diobd$il_base_length_vector #define diobd$r_aux_extents diobd$r_extents_overlay.diobd$r_aux_extents #define diobd$pq_aux_pa_vector diobd$r_aux_extents.diobd$pq_aux_pa_vector #define diobd$pq_aux_length_vector diobd$r_aux_extents.diobd$pq_aux_length_vector #endif /* #if !defined(__VAXC) */ #pragma __member_alignment __restore #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __restore /* Restore the previously-defined required ptr size */ #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __DIOBDDEF_LOADED */