/***************************************************************************/ /** **/ /** 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:38 by OpenVMS SDL V3.7 */ /* Source: 13-APR-2022 12:57:33 $1$DGA8345:[LIB_H.SRC]IOBDDEF.SDL;1 */ /********************************************************************************************************************************/ /*** MODULE $IOBDDEF ***/ #ifndef __IOBDDEF_LOADED #define __IOBDDEF_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 -- I/O Buffer Descriptor */ /* */ /* The IOBD structure is used to describe the physical address(es) of all */ /* buffers used in 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 IOBD$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 _iobd * IOBD_PQ; typedef struct _iobd ** IOBD_PPQ; #pragma __required_pointer_size __restore #else typedef unsigned __int64 IOBD_PQ; typedef unsigned __int64 IOBD_PPQ; #endif #define IOBD$M_INUSE 0x4 #define IOBD$M_AUX_EXTENTS 0x10 #define IOBD$M_AUX_INUSE 0x20 #define IOBD$M_REL_DEALLOC 0x80 #define IOBD$M_BY_PTE 0x400 #define IOBD$M_AUX_IOBD 0x800 #define IOBD$M_VALID_STORED_FLAGS 1172 #define IOBD$K_HDRLEN 48 /* IOBD header length (w/o extents) */ #define IOBD$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 IOBD$K_LENGTH 264 /* Size of fixed size IOBD including the fixed extents */ /* */ #define IOBD$M_NORESWAIT 1 /* No resource wait - return an error instead */ #define IOBD$M_EXT_IOBD 2 /* This is an external IOBD, not one which is */ /* embedded in an IRP. This flag is ignored on */ #define IOBD$M_INIT_IOBD 4 /* Initialize, do not validate, this IOBD. */ /* When using a stack IOBD it's possible for */ #define IOBD$M_PTE_STRIDE_1 8 /* When building the EXT list, step through the */ /* list of passed-in PTEs one by one no matter */ #define IOBD$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 _iobd { __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 *iobd$pq_extents; /* If the IOBD is INUSE, this pointer can */ #else unsigned __int64 iobd$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 _iobd *iobd$pq_aux_iobd; /* Pointer to a secondary IOBD structure */ #else unsigned __int64 iobd$pq_aux_iobd; #endif /* Valid if and only if IOBD$V_AUX_INUSE set */ } iobd$r_extents_aux_union; unsigned short int iobd$w_size; /* IOBD size in bytes */ unsigned char iobd$b_type; /* IOBD type, DYN$C_MISC */ unsigned char iobd$b_subtype; /* IOBD subtype, DYN$C_IOBD */ unsigned int iobd$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 iobd$il_byte_count; /* Total number of bytes described by */ /* the extents. */ unsigned int iobd$il_max_extent_count; /* Maximum number of extents */ unsigned int iobd$il_extent_count; /* Number of valid extents */ unsigned int iobd$il_extents_alloc_size; /* Number of bytes of pool allocated for */ /* the extents list - only valid if */ /* IOBD$IL_FLAGS.IOBD$M_AUX_EXTENTS */ /* is set. */ __union { unsigned int iobd$il_flags; /* Flag bits: */ __struct { unsigned iobd$v_fill_0 : 2; /* 01:00 Avoid common fill pattern bits */ unsigned iobd$v_inuse : 1; /* 02 This IOBD is in use */ unsigned iobd$v_fill_3 : 1; /* 03 Avoid common fill pattern bits */ unsigned iobd$v_aux_extents : 1; /* 04 IOBD$PQ_EXTENTS points to an auxiliary extents list */ unsigned iobd$v_aux_inuse : 1; /* ** IOBD$PS_AUX_IOBD points to secondary IOBD */ unsigned iobd$v_fill_5 : 1; /* 06:05 Avoid common fill pattern bits */ unsigned iobd$v_rel_dealloc : 1; /* 07 Deallocate this IOBD on release */ unsigned iobd$v_fill_8 : 2; /* 09:08 Avoid common fill pattern bits */ unsigned iobd$v_by_pte : 1; /* 10 IOBD was filled by PTE, not VA (BOFF is valid) */ unsigned iobd$v_aux_iobd : 1; /* ** This is an auxiliary IOBD */ unsigned iobd$v_fill_2_ : 4; } iobd$r_fill_1_; } iobd$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 iobd$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 *iobd$pq_va; /* VA mapped by the extents */ #else unsigned __int64 iobd$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 *iobd$pq_pte; /* PTE used to map */ #else unsigned __int64 iobd$pq_pte; #endif } iobd$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 IOBD extent count and maximum */ /* extent count fields, or use the IOBD 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 iobd$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 iobd$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 iobd$il_base_length_vector [4]; /* Vector of lengths */ } iobd$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 *iobd$pq_aux_pa_vector; #else unsigned __int64 iobd$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 *iobd$pq_aux_length_vector; #else unsigned __int64 iobd$pq_aux_length_vector; #endif } iobd$r_aux_extents; } iobd$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. */ } IOBD; #if !defined(__VAXC) #define iobd$pq_extents iobd$r_extents_aux_union.iobd$pq_extents #define iobd$pq_aux_iobd iobd$r_extents_aux_union.iobd$pq_aux_iobd #define iobd$il_flags iobd$r_fill_0_.iobd$il_flags #define iobd$v_inuse iobd$r_fill_0_.iobd$r_fill_1_.iobd$v_inuse #define iobd$v_aux_extents iobd$r_fill_0_.iobd$r_fill_1_.iobd$v_aux_extents #define iobd$v_aux_inuse iobd$r_fill_0_.iobd$r_fill_1_.iobd$v_aux_inuse #define iobd$v_rel_dealloc iobd$r_fill_0_.iobd$r_fill_1_.iobd$v_rel_dealloc #define iobd$v_by_pte iobd$r_fill_0_.iobd$r_fill_1_.iobd$v_by_pte #define iobd$v_aux_iobd iobd$r_fill_0_.iobd$r_fill_1_.iobd$v_aux_iobd #define iobd$pq_va iobd$r_va_pte_union.iobd$pq_va #define iobd$pq_pte iobd$r_va_pte_union.iobd$pq_pte #define iobd$r_fixed_extents iobd$r_extents_overlay.iobd$r_fixed_extents #define iobd$r_base_extents iobd$r_extents_overlay.iobd$r_base_extents #define iobd$iq_base_pa_vector iobd$r_base_extents.iobd$iq_base_pa_vector #define iobd$il_base_length_vector iobd$r_base_extents.iobd$il_base_length_vector #define iobd$r_aux_extents iobd$r_extents_overlay.iobd$r_aux_extents #define iobd$pq_aux_pa_vector iobd$r_aux_extents.iobd$pq_aux_pa_vector #define iobd$pq_aux_length_vector iobd$r_aux_extents.iobd$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 /* __IOBDDEF_LOADED */