--******************************************************************************************************************** -- Created: 9-Mar-2021 22:28:25 by OpenVMS SDL EV3-3 -- Source: 20-AUG-2001 06:43:08 $1$DGA8085:[LIB_ADA.LIS]FPDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package FPDEF is -- module $FPDEF -- -- Define the I/O Fastpath Function codes -- FP_K_BALANCE_PORTS : constant := 1; FP_K_CPU_CONFIGURED : constant := 2; FP_K_CPU_STARTING : constant := 3; FP_K_CPU_STOPPING : constant := 4; FP_K_CPU_STOP_FAILED : constant := 5; -- -- Define flags for call to exe$fp_select_hwint() -- HWINT_M_CPU_SELECTED : constant := 16#00000001#; HWINT_M_CPU_NOT_IN_RAD : constant := 16#00000002#; HWINT_M_PRIMARY : constant := 16#00000004#; type HWINT_BITS_TYPE is record CPU_SELECTED : BOOLEAN; CPU_NOT_IN_RAD : BOOLEAN; PRIMARY : BOOLEAN; FILLER_1 : BOOLEAN; FILLER_2 : UNSIGNED_4; end record; for HWINT_BITS_TYPE use record CPU_SELECTED at 0 range 0 .. 0; CPU_NOT_IN_RAD at 0 range 1 .. 1; PRIMARY at 0 range 2 .. 2; FILLER_1 at 0 range 3 .. 3; FILLER_2 at 0 range 4 .. 7; end record; for HWINT_BITS_TYPE'SIZE use 8; HWINT_BITS_TYPE_INIT : constant HWINT_BITS_TYPE := (CPU_SELECTED => FALSE, CPU_NOT_IN_RAD => FALSE, PRIMARY => FALSE, FILLER_1 => FALSE, FILLER_2 => 0); type HWINT_OVERLAY_TYPE is record FLAGS : UNSIGNED_LONGWORD; ----Component(s) below are defined as comments since they ----overlap other fields ---- ----BITS : HWINT_BITS_TYPE; end record; for HWINT_OVERLAY_TYPE use record FLAGS at 0 range 0 .. 31; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----BITS at 0 range 0 .. 7; end record; for HWINT_OVERLAY_TYPE'SIZE use 32; HWINT_OVERLAY_TYPE_INIT : constant HWINT_OVERLAY_TYPE := (FLAGS => 0); type HWINT_FLAGS_TYPE is record OVERLAY : HWINT_OVERLAY_TYPE; FILLER_1 : UNSIGNED_BYTE_ARRAY (0 .. 3); end record; for HWINT_FLAGS_TYPE use record OVERLAY at 0 range 0 .. 31; FILLER_1 at 4 range 0 .. 31; end record; for HWINT_FLAGS_TYPE'SIZE use 64; HWINT_FLAGS_TYPE_INIT : constant HWINT_FLAGS_TYPE := ( OVERLAY => HWINT_OVERLAY_TYPE_INIT, FILLER_1 => (others => 0)); -- -- This structure maintains parameters required for each RAD (Resource -- Affinity Domain). The FP struct maintains a pointer to an array of -- this structure and the number of these structures in the array. -- An array of this structure will be allocated at FP init time -- for the number of RADs in the system. The minimum number of RADs -- in any system is 1. -- type FPRAD_TYPE is record CURRENT_FP_CPU : INTEGER_32; CURRENT_HWINT_CPU : INTEGER_32; RADMASK : INTEGER_32; FILLER_1 : UNSIGNED_BYTE_ARRAY (0 .. 3); end record; for FPRAD_TYPE use record CURRENT_FP_CPU at 0 range 0 .. 31; CURRENT_HWINT_CPU at 4 range 0 .. 31; RADMASK at 8 range 0 .. 31; FILLER_1 at 12 range 0 .. 31; end record; for FPRAD_TYPE'SIZE use 128; FPRAD_TYPE_INIT : constant FPRAD_TYPE := (CURRENT_FP_CPU => 0, CURRENT_HWINT_CPU => 0, RADMASK => 0, FILLER_1 => (others => 0)); -- -- FP - I/O Fastpath block -- FP_M_SPL_HOLD : constant := 16#00000001#; FP_K_LENGTH : constant := 96; -- Length of FP_BLK FP_C_LENGTH : constant := 96; -- Length of FP_BLK type FP_FLAGS_BITS_TYPE is record SPL_HOLD : BOOLEAN; -- set if already holding FP SPinLock FILLER_1 : BOOLEAN; FILLER_2 : UNSIGNED_6; end record; for FP_FLAGS_BITS_TYPE use record SPL_HOLD at 0 range 0 .. 0; FILLER_1 at 0 range 1 .. 1; FILLER_2 at 0 range 2 .. 7; end record; for FP_FLAGS_BITS_TYPE'SIZE use 8; FP_FLAGS_BITS_TYPE_INIT : constant FP_FLAGS_BITS_TYPE := (SPL_HOLD => FALSE, FILLER_1 => FALSE, FILLER_2 => 0); type FP_TYPE is record DLCK : ADDRESS; -- pointer to spinlock DIPL : INTEGER_32; -- device ipl MBO : UNSIGNED_WORD; -- must-be-one field TYP : UNSIGNED_BYTE; -- structure type SUBTYP : UNSIGNED_BYTE; -- structure sub-type FLAGS : UNSIGNED_LONGWORD; ----Component(s) below are defined as comments since they ----overlap other fields ---- ----FLAGS_BITS : FP_FLAGS_BITS_TYPE; SIZE : UNSIGNED_QUADWORD; -- structure size -- pointer to mask of available CPUs USEABLE_CPUS : UNSIGNED_QUADWORD; -- Pointer to mask which tries as much as possible to favor -- the CPUs in the RAD in which the IO port lives. FAVORED_CPUS : UNSIGNED_QUADWORD; -- cells to support assignable ports: PORTS_LINK : ADDRESS; -- link to SUD NUM_PORTS : INTEGER_32; -- total number of assignable ports NUM_USER_PORTS : INTEGER_32; -- total number of user-assigned ports -- cells to support distributed hardware interrupts: HWINT_PORTS_LINK : ADDRESS; -- link to SUD -- Total number of distributed hardware interrupt ports. NUM_HWINT_PORTS : INTEGER_32; -- Total number of distributed hardware interrupt ports with -- user-assigned interrupt CPU targets. NUM_USER_HWINT_PORTS : INTEGER_32; -- Last hardware interrupt CPU assigned, absolute number, not a mask. LAST_HWINT_CPU_ASSIGNED : INTEGER_32; -- Pointer to array of FPRAD structures for RAD housekeeping FPRAD : ADDRESS; -- The number of RADs in this system, which determines the size of the -- array of FPRAD structures. The minimum is 1. RAD_COUNT : INTEGER_32; -- Unique Identifier of FP spinlock owner. This field is used to prevent -- any routine other than the spinlock owner from clearing the lock. SPL_OWNER : INTEGER_32; -- Contingency/debug cells: SPARE1 : INTEGER_32; SPARE2 : INTEGER_32; SPARE3 : INTEGER_32; SPARE4 : INTEGER_32; end record; for FP_TYPE use record DLCK at 0 range 0 .. 31; DIPL at 4 range 0 .. 31; MBO at 8 range 0 .. 15; TYP at 10 range 0 .. 7; SUBTYP at 11 range 0 .. 7; FLAGS at 12 range 0 .. 31; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----FLAGS_BITS at 12 range 0 .. 7; SIZE at 16 range 0 .. 63; USEABLE_CPUS at 24 range 0 .. 63; FAVORED_CPUS at 32 range 0 .. 63; PORTS_LINK at 40 range 0 .. 31; NUM_PORTS at 44 range 0 .. 31; NUM_USER_PORTS at 48 range 0 .. 31; HWINT_PORTS_LINK at 52 range 0 .. 31; NUM_HWINT_PORTS at 56 range 0 .. 31; NUM_USER_HWINT_PORTS at 60 range 0 .. 31; LAST_HWINT_CPU_ASSIGNED at 64 range 0 .. 31; FPRAD at 68 range 0 .. 31; RAD_COUNT at 72 range 0 .. 31; SPL_OWNER at 76 range 0 .. 31; SPARE1 at 80 range 0 .. 31; SPARE2 at 84 range 0 .. 31; SPARE3 at 88 range 0 .. 31; SPARE4 at 92 range 0 .. 31; end record; for FP_TYPE'SIZE use 768; FP_TYPE_INIT : constant FP_TYPE := (DLCK => ADDRESS_ZERO, DIPL => 0, MBO => 0, TYP => 0, SUBTYP => 0, FLAGS => 0, SIZE => (0, 0), USEABLE_CPUS => (0, 0), FAVORED_CPUS => (0, 0), PORTS_LINK => ADDRESS_ZERO, NUM_PORTS => 0, NUM_USER_PORTS => 0, HWINT_PORTS_LINK => ADDRESS_ZERO, NUM_HWINT_PORTS => 0, NUM_USER_HWINT_PORTS => 0, LAST_HWINT_CPU_ASSIGNED => 0, FPRAD => ADDRESS_ZERO, RAD_COUNT => 0, SPL_OWNER => 0, SPARE1 => 0, SPARE2 => 0, SPARE3 => 0, SPARE4 => 0); end FPDEF;