/***************************************************************************/ /** **/ /** 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:51 by OpenVMS SDL V3.7 */ /* Source: 18-APR-2017 14:46:54 $1$DGA8345:[LIB_H.SRC]CRBDEF.SDL;1 */ /********************************************************************************************************************************/ /*** MODULE $CRBDEF ***/ #ifndef __CRBDEF_LOADED #define __CRBDEF_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 /*+ */ /* CRB - CHANNEL REQUEST BLOCK */ /* */ /* THERE IS ONE CHANNEL REQUEST BLOCK FOR EACH SET OF DEVICES WHOSE */ /* ACCESS TO A SET OF CONTROLLERS MUST BE SYNCHRONIZED. EACH CHANNEL */ /* CONTROL BLOCK ALLOWS UP TO FOUR CONTROLLERS TO WHICH THE INDIVIDUAL */ /* DEVICES CAN BE ATTACHED. */ /*- */ #define CRB$M_XZA_CHAN0 0x1 #define CRB$M_XZA_CHAN1 0x2 #define CRB$M_XZA_ADPERR 0x4 #define CRB$M_BSY 0x1 #define CRB$M_UNINIT 0x2 #define CRB$K_VEC1_OFFSET 112 /*Offset to first interrupt block */ #define CRB$K_LENGTH 128 /*LENGTH OF STANDARD CRB */ #define CRB$C_LENGTH 128 /*LENGTH OF STANDARD CRB */ #define CRB$K_SHR_FLINK_OFFSET 144 #define CRB$K_SHR_BLINK_OFFSET 148 #define CRB$M_SHARED_INT 0x1 #define CRB$M_DISABLE_INT 0x2 #define CRB$M_SHARED_QUEUE 0x4 #ifdef __cplusplus /* Define structure prototypes */ struct _fkb; struct _spl; #endif /* #ifdef __cplusplus */ #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 _crb { #pragma __nomember_alignment struct _fkb *crb$l_fqfl; /*FORK QUEUE FORWARD LINK */ struct _fkb *crb$l_fqbl; /*FORK QUEUE BACKWARD LINK */ unsigned short int crb$w_size; /*SIZE OF CRB IN BYTES */ unsigned char crb$b_type; /*STRUCTURE TYPE FOR CRB */ unsigned char crb$b_flck; /*FORK LOCK NUMBER */ void (*crb$l_fpc)(); /*FORK PC */ __int64 crb$q_fr3; /*FORK R3 */ __int64 crb$q_fr4; /*FORK R4 */ struct _fkb *crb$l_wqfl; /*WAIT QUEUE FORWARD LINK */ struct _fkb *crb$l_wqbl; /*WAIT QUEUE BACKWARD LINK */ __union { __union { unsigned char crb$b_tt_type; unsigned int crb$l_tt_type; /*controler type (DZ11, DZ32) */ } crb$r_tt_type_overlay; unsigned int crb$l_xza_sts; /*Coordination for XZA driver */ __struct { unsigned crb$v_xza_chan0 : 1; /*Channel 0 reinit flag */ unsigned crb$v_xza_chan1 : 1; /*Channel 1 reinit flag */ unsigned crb$v_xza_adperr : 1; /*XZA error/reset flag */ unsigned crb$v_fill_0_ : 5; } crb$r_xza_flags; } crb$r_tt_xza_sts; __union { unsigned int crb$l_refc; /*REFERENCE COUNT OF UCB'S */ unsigned short int crb$w_refc; } crb$r_refc_overlay; __union { unsigned char crb$b_mask; unsigned int crb$l_mask; /*CHANNEL ALLOCATION MASK */ __struct { unsigned crb$v_bsy : 1; /* CHANNEL IS BUSY (1=YES) */ unsigned crb$v_uninit : 1; /* GENBI CRB is uninitialized. (1=YES) */ unsigned crb$v_fill_1_ : 6; } crb$r_mask_bits; } crb$r_mask_overlay; void *crb$ps_busarray; /* Bus array for SCSI ports */ __union { __int64 crb$q_auxstruc; /*Auxiliary structure addr */ unsigned int crb$l_auxstruc; void *crb$ps_auxstruc; } crb$r_auxstruc_overlay; __union { __int64 crb$q_lan_struc; /*Auxiliary pointer for LAN drivers */ unsigned int crb$l_lan_struc; void *crb$ps_lan_struc; } crb$r_lan_struc_overlay; __union { /*Auxiliary pointer for SCS drivers */ __int64 crb$q_scs_struc; unsigned int crb$l_scs_struc; void *crb$ps_scs_struc; } crb$r_scs_struc_overlay; __union { struct _crb *crb$l_timelink; /*Thread of CRB's for periodic wakeup */ void *crb$l_tt_modem; /*modem control timer thread */ } crb$r_timelink_overlay; unsigned int crb$l_node; /*node number on bus */ __union { unsigned int crb$l_duetime; /*Due time for periodic wakeup */ void *crb$ps_sysg_dblk; /*workstation SLU port driver/DW interface */ } crb$r_duetime_overlay; __union { void (*crb$l_toutrout)(); /*Address of periodic wakeup routine */ unsigned int crb$l_tt_timrefc; /*lines with active modem timers */ } crb$r_toutrout_overlay; struct _spl *crb$ps_dlck; /*ADDRESS OF DEVICE SPINLOCK */ struct _crb *crb$ps_crb_link; /*pointer to next CRB on ADP */ __union { __int64 crb$q_ctrlr_shutdown; /*Address of controller shutdown routine */ int (*crb$ps_ctrlr_shutdown)(); } crb$r_ctrlr_shutdown_overlay; unsigned int crb$l_intd [4]; /*DEFAULT TRANSFER VECTOR START */ unsigned int crb$l_intd2 [4]; /*2ND DEFAULT TRANSFER VECTOR START */ /* Verified for X86, Dave Fairbanks */ /* */ /* **** NOTE **** */ /* The following field MUST BE quadword aligned. Any modifications to the */ /* fields above this point must not move this field out of quad alingment. */ /* This is a queue entry that will be managed using the interlocked queue */ /* instructions (see sys$pal_insqtil) which require the flink of the queue */ /* to be qud aligned. */ /* */ /* For Shared Interrupt support, CRBs whose devices must share an interrupt */ /* will be queued using the following fields. The interrupt dispatcher */ /* will walk the queue of CRBs, unpackaging each VEC to call each ISR. */ /* */ /* The offset constants are used to calculate the pointer to the top of */ /* the CRB structure to gain access to its other fields, since the FLINK */ /* and BLINK queue fields will only point to other FLINK and BLINK fields */ /* in the queue. */ /* */ #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 int crb$l_shr_flink; void *crb$ps_shr_flink; /* Forward Queue of Shared Interrupt CRBs. */ } crb$r_shr_flink_overlay; __union { int crb$l_shr_blink; void *crb$ps_shr_blink; /* Backward Queue of Shared Interrupt CRBs. */ } crb$r_shr_blink_overlay; __union { unsigned __int64 crb$q_flags; __struct { unsigned crb$v_shared_int : 1; /* Driver supports shared interrupts */ unsigned crb$v_disable_int : 1; /* Device Driver does not want to be disturbed */ unsigned crb$v_shared_queue : 1; /* CRB is in a shared interrupt queue */ unsigned crb$v_fill_2_ : 5; } crb$r_flag_bits; } crb$r_flags_overlay; } CRB; #if !defined(__VAXC) #define crb$b_tt_type crb$r_tt_xza_sts.crb$r_tt_type_overlay.crb$b_tt_type #define crb$l_tt_type crb$r_tt_xza_sts.crb$r_tt_type_overlay.crb$l_tt_type #define crb$l_xza_sts crb$r_tt_xza_sts.crb$l_xza_sts #define crb$v_xza_chan0 crb$r_tt_xza_sts.crb$r_xza_flags.crb$v_xza_chan0 #define crb$v_xza_chan1 crb$r_tt_xza_sts.crb$r_xza_flags.crb$v_xza_chan1 #define crb$v_xza_adperr crb$r_tt_xza_sts.crb$r_xza_flags.crb$v_xza_adperr #define crb$l_refc crb$r_refc_overlay.crb$l_refc #define crb$w_refc crb$r_refc_overlay.crb$w_refc #define crb$b_mask crb$r_mask_overlay.crb$b_mask #define crb$l_mask crb$r_mask_overlay.crb$l_mask #define crb$v_bsy crb$r_mask_overlay.crb$r_mask_bits.crb$v_bsy #define crb$v_uninit crb$r_mask_overlay.crb$r_mask_bits.crb$v_uninit #define crb$q_auxstruc crb$r_auxstruc_overlay.crb$q_auxstruc #define crb$l_auxstruc crb$r_auxstruc_overlay.crb$l_auxstruc #define crb$ps_auxstruc crb$r_auxstruc_overlay.crb$ps_auxstruc #define crb$q_lan_struc crb$r_lan_struc_overlay.crb$q_lan_struc #define crb$l_lan_struc crb$r_lan_struc_overlay.crb$l_lan_struc #define crb$ps_lan_struc crb$r_lan_struc_overlay.crb$ps_lan_struc #define crb$q_scs_struc crb$r_scs_struc_overlay.crb$q_scs_struc #define crb$l_scs_struc crb$r_scs_struc_overlay.crb$l_scs_struc #define crb$ps_scs_struc crb$r_scs_struc_overlay.crb$ps_scs_struc #define crb$l_timelink crb$r_timelink_overlay.crb$l_timelink #define crb$l_tt_modem crb$r_timelink_overlay.crb$l_tt_modem #define crb$l_duetime crb$r_duetime_overlay.crb$l_duetime #define crb$ps_sysg_dblk crb$r_duetime_overlay.crb$ps_sysg_dblk #define crb$l_toutrout crb$r_toutrout_overlay.crb$l_toutrout #define crb$l_tt_timrefc crb$r_toutrout_overlay.crb$l_tt_timrefc #define crb$q_ctrlr_shutdown crb$r_ctrlr_shutdown_overlay.crb$q_ctrlr_shutdown #define crb$ps_ctrlr_shutdown crb$r_ctrlr_shutdown_overlay.crb$ps_ctrlr_shutdown #define crb$l_shr_flink crb$r_shr_flink_overlay.crb$l_shr_flink #define crb$ps_shr_flink crb$r_shr_flink_overlay.crb$ps_shr_flink #define crb$l_shr_blink crb$r_shr_blink_overlay.crb$l_shr_blink #define crb$ps_shr_blink crb$r_shr_blink_overlay.crb$ps_shr_blink #define crb$q_flags crb$r_flags_overlay.crb$q_flags #define crb$v_shared_int crb$r_flags_overlay.crb$r_flag_bits.crb$v_shared_int #define crb$v_disable_int crb$r_flags_overlay.crb$r_flag_bits.crb$v_disable_int #define crb$v_shared_queue crb$r_flags_overlay.crb$r_flag_bits.crb$v_shared_queue #endif /* #if !defined(__VAXC) */ #define CRB$S_CRBDEF 160 /*OLD CRB SIZE FOR COMPATIBILITY */ #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 /* __CRBDEF_LOADED */