--******************************************************************************************************************** -- Created: 30-Mar-2010 17:36:07 by OpenVMS SDL EV3-3 -- Source: 28-FEB-2007 17:05:15 $1$DGA7274:[LIB_ADA.LIS]SPLCODDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package SPLCODDEF is -- module $SPLCODDEF --+ -- -- SPINLOCK INDEX DEFINITIONS -- --- -- -- DEFINE THE HARDWARE LEVEL LOCKS (INDICES 0-F) -- SPL_C_EMB : constant := 32; -- EMB spinlock index SPL_C_MCHECK : constant := 33; -- Machine Check spinlock index SPL_C_MEGA : constant := 34; -- Kitchen sink of spinlocks SPL_C_HWCLK : constant := 36; -- HWCLK spinlock index SPL_C_INVALIDATE : constant := 38; -- INVALIDATE spinlock index SPL_C_PERFMON : constant := 40; -- PERFMON spinlock index SPL_C_POOL : constant := 42; -- POOL spinlock index SPL_C_MAILBOX : constant := 44; -- MAILBOX spinlock index SPL_C_IOLOCK11 : constant := 46; -- IPL 11 I/O spinlock index SPL_C_IOLOCK10 : constant := 47; -- IPL 10 I/O spinlock index SPL_C_IOLOCK9 : constant := 48; -- IPL 9 I/O spinlock index SPL_C_SCHED : constant := 50; -- SCHED spinlock index SPL_C_MMG : constant := 52; -- Memory management spinlock index SPL_C_IO_MISC : constant := 54; -- Miscellaneous short time I/O spinlock index SPL_C_PORT : constant := 55; -- Multiple device ports index SPL_C_TIMER : constant := 56; -- TIMER spinlock index SPL_C_TX_SYNCH : constant := 57; -- Transaction processing lock SPL_C_IOLOCK8 : constant := 58; -- IPL 8 I/O spinlock index SPL_C_LCKMGR : constant := 59; -- Lock Manager lock SPL_C_FILSYS : constant := 60; -- File system spinlock index SPL_C_QUEUEAST : constant := 62; -- QUEUEAST spinlock index SPL_C_SCS : constant := 58; -- SCS spinlock index -- Define dynamic spinlock symbol SPL_C_DYNAMIC : constant := 255; -- DYNAMIC spinlock non-index SPL_MIN_INDEX : constant := 32; -- Min spinlock index SPL_MAX_INDEX : constant := 62; -- Max spinlock index SPL_NUM_LOCKS : constant := 31; -- Max number of spinlocks (ever) -- -- Define some system-wide multiprocessing control flags -- SMP_M_ENABLED : constant := 16#00000001#; SMP_M_START_CPU : constant := 16#00000002#; SMP_M_CRASH_CPU : constant := 16#00000004#; SMP_M_TODR : constant := 16#00000008#; SMP_M_UNMOD_DRIVER : constant := 16#00000010#; SMP_M_TODR_ACK : constant := 16#00000020#; SMP_M_SYNCH : constant := 16#00000040#; SMP_M_BENIGN : constant := 16#00000080#; SMP_M_MINIMUM_ACQUIRE : constant := 16#00000100#; SMP_M_READ_SCC : constant := 16#00000200#; SMP_M_READ_SCC_ACK : constant := 16#00000400#; SMP_M_CLOCKS_SYNCH : constant := 16#00000800#; SMP_M_DISPLAY_TRANSITIONS : constant := 16#00001000#; SMP_M_FW_STATE_CHECK : constant := 16#00002000#; SMP_M_MULTIQUAD_NMSP : constant := 16#00004000#; SMP_M_OVERRIDE : constant := 16#00000001#; SMP_M_FOREVER : constant := 16#00000002#; SMP_M_FKB_FRU_CHANGE : constant := 16#00000001#; SMP_M_FKB_DOORBELL : constant := 16#00000002#; SMP_S_SMPDEF : constant := 4; -- Old size name, synonym for SMP$S_SMP SMP_M_PORTLOCK : constant := 16#00000001#; SMP_M_INIT_ONLY : constant := 16#00000002#; SMP_M_KNOWN_BY_SDA : constant := 16#00000004#; type SMP_FLAGS_TYPE is -- SMP$GL_FLAGS record ENABLED : BOOLEAN; -- SMP operation is enabled START_CPU : BOOLEAN; -- PRIMARY CPU has finished INIT CRASH_CPU : BOOLEAN; -- A CPU is initiating BUGCHECK TODR : BOOLEAN; -- SMP$GL_PROPOSED_TODR in use UNMOD_DRIVER : BOOLEAN; -- Unmodified driver is loaded TODR_ACK : BOOLEAN; -- SMP TODR operation complete SYNCH : BOOLEAN; -- SMP SYNCHRONIZATION IMAGE LOADED BENIGN : BOOLEAN; -- BENIGN STATE REQUESTED MINIMUM_ACQUIRE : BOOLEAN; -- Least overhead in acquisition READ_SCC : BOOLEAN; -- Request PRIMARY CPU to read its SCC READ_SCC_ACK : BOOLEAN; -- PRIMARY CPU has recorded its SCC value. CLOCKS_SYNCH : BOOLEAN; -- Clocks are synchronized....therefore -- soft affinity is supported on this system. DISPLAY_TRANSITIONS : BOOLEAN; -- Display verbose transition text FW_STATE_CHECK : BOOLEAN; -- Toggle 1-second timer check for migrations MULTIQUAD_NMSP : BOOLEAN; -- Bitmaps of more than 1 quadword needed for namespace FILLER_1 : BOOLEAN; end record; for SMP_FLAGS_TYPE use record ENABLED at 0 range 0 .. 0; START_CPU at 0 range 1 .. 1; CRASH_CPU at 0 range 2 .. 2; TODR at 0 range 3 .. 3; UNMOD_DRIVER at 0 range 4 .. 4; TODR_ACK at 0 range 5 .. 5; SYNCH at 0 range 6 .. 6; BENIGN at 0 range 7 .. 7; MINIMUM_ACQUIRE at 1 range 0 .. 0; READ_SCC at 1 range 1 .. 1; READ_SCC_ACK at 1 range 2 .. 2; CLOCKS_SYNCH at 1 range 3 .. 3; DISPLAY_TRANSITIONS at 1 range 4 .. 4; FW_STATE_CHECK at 1 range 5 .. 5; MULTIQUAD_NMSP at 1 range 6 .. 6; FILLER_1 at 1 range 7 .. 7; end record; for SMP_FLAGS_TYPE'SIZE use 16; SMP_FLAGS_TYPE_INIT : constant SMP_FLAGS_TYPE := (ENABLED => FALSE, START_CPU => FALSE, CRASH_CPU => FALSE, TODR => FALSE, UNMOD_DRIVER => FALSE, TODR_ACK => FALSE, SYNCH => FALSE, BENIGN => FALSE, MINIMUM_ACQUIRE => FALSE, READ_SCC => FALSE, READ_SCC_ACK => FALSE, CLOCKS_SYNCH => FALSE, DISPLAY_TRANSITIONS => FALSE, FW_STATE_CHECK => FALSE, MULTIQUAD_NMSP => FALSE, FILLER_1 => FALSE); type SMP_STOP_CPU_FLAGS_TYPE is -- Input to STOP/CPU record OVERRIDE : BOOLEAN; -- Skip checks before stopping CPU FOREVER : BOOLEAN; -- FOREVER means remove from -- available set after stopping. FILLER_1 : UNSIGNED_6; end record; for SMP_STOP_CPU_FLAGS_TYPE use record OVERRIDE at 0 range 0 .. 0; FOREVER at 0 range 1 .. 1; FILLER_1 at 0 range 2 .. 7; end record; for SMP_STOP_CPU_FLAGS_TYPE'SIZE use 8; SMP_STOP_CPU_FLAGS_TYPE_INIT : constant SMP_STOP_CPU_FLAGS_TYPE := (OVERRIDE => FALSE, FOREVER => FALSE, FILLER_1 => 0); type SMP_CFG_FKB_FLAGS_TYPE is record FKB_FRU_CHANGE : BOOLEAN; -- FKB to indicate config tree change in use FKB_DOORBELL : BOOLEAN; -- FKB for doorbell console callback in use FILLER_1 : UNSIGNED_6; end record; for SMP_CFG_FKB_FLAGS_TYPE use record FKB_FRU_CHANGE at 0 range 0 .. 0; FKB_DOORBELL at 0 range 1 .. 1; FILLER_1 at 0 range 2 .. 7; end record; for SMP_CFG_FKB_FLAGS_TYPE'SIZE use 8; SMP_CFG_FKB_FLAGS_TYPE_INIT : constant SMP_CFG_FKB_FLAGS_TYPE := (FKB_FRU_CHANGE => FALSE, FKB_DOORBELL => FALSE, FILLER_1 => 0); type SMP_CREATION_FLAGS_TYPE is -- input flag parameters for smp$create_spinlock() record PORTLOCK : BOOLEAN; -- set rank and subtype to portlock defaults INIT_ONLY : BOOLEAN; -- initialize spinlocks only--don't allocate memory KNOWN_BY_SDA : BOOLEAN; -- note that SDA already recognizes this spinlock FILLER_1 : UNSIGNED_5; end record; for SMP_CREATION_FLAGS_TYPE use record PORTLOCK at 0 range 0 .. 0; INIT_ONLY at 0 range 1 .. 1; KNOWN_BY_SDA at 0 range 2 .. 2; FILLER_1 at 0 range 3 .. 7; end record; for SMP_CREATION_FLAGS_TYPE'SIZE use 8; SMP_CREATION_FLAGS_TYPE_INIT : constant SMP_CREATION_FLAGS_TYPE := (PORTLOCK => FALSE, INIT_ONLY => FALSE, KNOWN_BY_SDA => FALSE, FILLER_1 => 0); type SMP_TYPE is record FLAGS : SMP_FLAGS_TYPE; -- SMP$GL_FLAGS STOP_CPU_FLAGS : SMP_STOP_CPU_FLAGS_TYPE; -- Input to STOP/CPU CFG_FKB_FLAGS : SMP_CFG_FKB_FLAGS_TYPE; CREATION_FLAGS : SMP_CREATION_FLAGS_TYPE; -- input flag parameters for smp$create_spinlock() end record; for SMP_TYPE use record FLAGS at 0 range 0 .. 15; STOP_CPU_FLAGS at 2 range 0 .. 7; CFG_FKB_FLAGS at 3 range 0 .. 7; CREATION_FLAGS at 4 range 0 .. 7; end record; for SMP_TYPE'SIZE use 40; SMP_TYPE_INIT : constant SMP_TYPE := ( FLAGS => SMP_FLAGS_TYPE_INIT, STOP_CPU_FLAGS => SMP_STOP_CPU_FLAGS_TYPE_INIT, CFG_FKB_FLAGS => SMP_CFG_FKB_FLAGS_TYPE_INIT, CREATION_FLAGS => SMP_CREATION_FLAGS_TYPE_INIT); end SPLCODDEF;