--******************************************************************************************************************** -- Created: 9-Mar-2021 22:28:19 by OpenVMS SDL EV3-3 -- Source: 29-APR-1993 16:32:31 $1$DGA8085:[LIB_ADA.LIS]CTSIDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package CTSIDEF is -- module $CTSIDEF CTSI_K_REVISION : constant := 1; -- CTSI Revision 1 only. CTSI_C_REVISION : constant := 1; CTMD_K_SIZE : constant := 8; -- Size CTMD_C_SIZE : constant := 8; -- Size type CTMD_TYPE is -- Module descriptor in the CTSIA. record PGCOUNT : UNSIGNED_WORD; -- Module length in pages FILLER_1 : UNSIGNED_WORD; -- Padding BASEADDR : ADDRESS; -- Base physical addr. end record; for CTMD_TYPE use record PGCOUNT at 0 range 0 .. 15; FILLER_1 at 2 range 0 .. 15; BASEADDR at 4 range 0 .. 31; end record; for CTMD_TYPE'SIZE use 64; CTMD_TYPE_INIT : constant CTMD_TYPE := (PGCOUNT => 0, FILLER_1 => 0, BASEADDR => ADDRESS_ZERO); CTCB_K_SIZE : constant := 28; -- Length of channel block CTCB_C_SIZE : constant := 28; -- Length of channel block type CTCB_TYPE is -- Channel block in the CTSIA. record DVATR : UNSIGNED_BYTE; -- Device attributes CHATR : UNSIGNED_BYTE; -- Channel attributes STATESZ : UNSIGNED_WORD; -- State size PHY_ENTRY : ADDRESS; -- Physical entry point VIR_ENTRY : ADDRESS; -- Virtual entry point PHY_SEGMENT : ADDRESS; -- IO segment physical addr VIR_SEGMENT : ADDRESS; -- IO segment virtual addr PHY_EXTEND : ADDRESS; -- Extended state phys. addr VIR_EXTEND : ADDRESS; -- Extended state virt. addr end record; for CTCB_TYPE use record DVATR at 0 range 0 .. 7; CHATR at 1 range 0 .. 7; STATESZ at 2 range 0 .. 15; PHY_ENTRY at 4 range 0 .. 31; VIR_ENTRY at 8 range 0 .. 31; PHY_SEGMENT at 12 range 0 .. 31; VIR_SEGMENT at 16 range 0 .. 31; PHY_EXTEND at 20 range 0 .. 31; VIR_EXTEND at 24 range 0 .. 31; end record; for CTCB_TYPE'SIZE use 224; CTCB_TYPE_INIT : constant CTCB_TYPE := (DVATR => 0, CHATR => 0, STATESZ => 0, PHY_ENTRY => ADDRESS_ZERO, VIR_ENTRY => ADDRESS_ZERO, PHY_SEGMENT => ADDRESS_ZERO, VIR_SEGMENT => ADDRESS_ZERO, PHY_EXTEND => ADDRESS_ZERO, VIR_EXTEND => ADDRESS_ZERO); CTIOS_K_SIZE : constant := 8; -- Descriptor length CTIOS_C_SIZE : constant := 8; -- Descriptor length type CTIOS_SEGMENT_COUNT_TYPE is record SGMT_COUNT : UNSIGNED_WORD; -- # segments for channel FILLER_1 : UNSIGNED_WORD; BASE_SEGMENT : UNSIGNED_BYTE; -- Offset for first segment dx. end record; for CTIOS_SEGMENT_COUNT_TYPE use record SGMT_COUNT at 0 range 0 .. 15; FILLER_1 at 2 range 0 .. 15; BASE_SEGMENT at 4 range 0 .. 7; end record; for CTIOS_SEGMENT_COUNT_TYPE'SIZE use 40; CTIOS_SEGMENT_COUNT_TYPE_INIT : constant CTIOS_SEGMENT_COUNT_TYPE := (SGMT_COUNT => 0, FILLER_1 => 0, BASE_SEGMENT => 0); type CTIOS_COUNTED_ARRAY_TYPE is record PGCOUNT : UNSIGNED_WORD; -- Pages in this segment FILLER_1 : UNSIGNED_WORD; SEGMENT : ADDRESS; -- Physical Segment address ----Component(s) below are defined as comments since they ----overlap other fields ---- ----SEGMENT_COUNT : CTIOS_SEGMENT_COUNT_TYPE; end record; for CTIOS_COUNTED_ARRAY_TYPE use record PGCOUNT at 0 range 0 .. 15; FILLER_1 at 2 range 0 .. 15; SEGMENT at 4 range 0 .. 31; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----SEGMENT_COUNT at 0 range 0 .. 39; end record; for CTIOS_COUNTED_ARRAY_TYPE'SIZE use 64; CTIOS_COUNTED_ARRAY_TYPE_INIT : constant CTIOS_COUNTED_ARRAY_TYPE := (PGCOUNT => 0, FILLER_1 => 0, SEGMENT => ADDRESS_ZERO); type CTIOS_TYPE is record -- Console I/O segment array and descriptors COUNTED_ARRAY : CTIOS_COUNTED_ARRAY_TYPE; end record; for CTIOS_TYPE use record COUNTED_ARRAY at 0 range 0 .. 63; end record; for CTIOS_TYPE'SIZE use 64; CTIOS_TYPE_INIT : constant CTIOS_TYPE := ( COUNTED_ARRAY => CTIOS_COUNTED_ARRAY_TYPE_INIT ); CTSI_K_MODULE_COUNT : constant := 6; CTSI_C_MODULE_COUNT : constant := 6; CTSI_K_CHN_COUNT : constant := 6; CTSI_C_CHN_COUNT : constant := 6; CTSI_M_CMUSE : constant := 16#00000003#; CTSI_M_INUSE : constant := 16#00000004#; CTSI_M_CM : constant := 16#00000010#; CTSI_S_CTSIDEF : constant := 316; -- Old size name - synonym type CTSI_FLAGS_TYPE is -- Flags record CMUSE : UNSIGNED_2; INUSE : BOOLEAN; -- Routine in use SPARE0 : BOOLEAN; CM : BOOLEAN; -- Console mode FILLER_1 : UNSIGNED_3; end record; for CTSI_FLAGS_TYPE use record CMUSE at 0 range 0 .. 1; INUSE at 0 range 2 .. 2; SPARE0 at 0 range 3 .. 3; CM at 0 range 4 .. 4; FILLER_1 at 0 range 5 .. 7; end record; for CTSI_FLAGS_TYPE'SIZE use 8; CTSI_FLAGS_TYPE_INIT : constant CTSI_FLAGS_TYPE := (CMUSE => 0, INUSE => FALSE, SPARE0 => FALSE, CM => FALSE, FILLER_1 => 0); type CTSI_TYPE is record BASE : ADDRESS; -- Physical base address of CTSI SIZE : UNSIGNED_WORD; -- Size in bytes of CTSI IDENT : UNSIGNED_WORD; -- Indent string "CT" SPARE0 : UNSIGNED_BYTE; CHKSUM : UNSIGNED_BYTE; -- Checksum of first bytes FLAGS : CTSI_FLAGS_TYPE; -- Flags REVISN : UNSIGNED_BYTE; -- Console revision MODULE_DESC : UNSIGNED_QUADWORD_ARRAY (1 .. 6); -- Module descriptors CHNBLK : UNSIGNED_LONGWORD_ARRAY (1 .. 42); -- Channel blocks of size = (7 longs) SAVE : UNSIGNED_QUADWORD; -- Save ptrs RESTORE : UNSIGNED_QUADWORD; -- Restore pointers TRANS : UNSIGNED_QUADWORD; -- Translate ptrs GETCHR : UNSIGNED_QUADWORD; -- GET CHAR ptrs GETCHR_STATE : UNSIGNED_LONGWORD_ARRAY (1 .. 4); -- GET CHAR state PUTCHR : UNSIGNED_QUADWORD; -- PUT CHAR ptrs PUTCHR_STATE : UNSIGNED_LONGWORD_ARRAY (1 .. 4); -- PUT CHAR state PUTMSG : UNSIGNED_QUADWORD; -- Put message routine READPROMPT : UNSIGNED_QUADWORD; -- Read with prompt routine end record; for CTSI_TYPE use record BASE at 0 range 0 .. 31; SIZE at 4 range 0 .. 15; IDENT at 6 range 0 .. 15; SPARE0 at 8 range 0 .. 7; CHKSUM at 9 range 0 .. 7; FLAGS at 10 range 0 .. 7; REVISN at 11 range 0 .. 7; MODULE_DESC at 12 range 0 .. 383; CHNBLK at 60 range 0 .. 1343; SAVE at 228 range 0 .. 63; RESTORE at 236 range 0 .. 63; TRANS at 244 range 0 .. 63; GETCHR at 252 range 0 .. 63; GETCHR_STATE at 260 range 0 .. 127; PUTCHR at 276 range 0 .. 63; PUTCHR_STATE at 284 range 0 .. 127; PUTMSG at 300 range 0 .. 63; READPROMPT at 308 range 0 .. 63; end record; for CTSI_TYPE'SIZE use 2528; CTSI_TYPE_INIT : constant CTSI_TYPE := (BASE => ADDRESS_ZERO, SIZE => 0, IDENT => 0, SPARE0 => 0, CHKSUM => 0, FLAGS => CTSI_FLAGS_TYPE_INIT, REVISN => 0, MODULE_DESC => (others => (0, 0)), CHNBLK => (others => 0), SAVE => (0, 0), RESTORE => (0, 0), TRANS => (0, 0), GETCHR => (0, 0), GETCHR_STATE => (others => 0), PUTCHR => (0, 0), PUTCHR_STATE => (others => 0), PUTMSG => (0, 0), READPROMPT => (0, 0)); end CTSIDEF;