--******************************************************************************************************************** -- Created: 30-Mar-2010 17:02:09 by OpenVMS SDL EV3-3 -- Source: 26-MAR-2003 10:42:00 $1$DGA7274:[STARLET_ADA.LIS]VADEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package VADEF is -- module $VADEF --+ -- VIRTUAL ADDRESS VIELDS --- VA_M_P1 : constant := 16#40000000#; VA_M_SYSTEM : constant := 16#80000000#; VA_M_BYTES_PER_PAGELET : constant := 16#000001FF#; VA_M_BYTE_IN_PAGELET : constant := 16#000001FF#; VA_M_VRN : constant := 16#00000000#; VA_C_VRN_SYSTEM : constant := 7; -- VRN for system space VA_C_REGION_COUNT : constant := 8; -- Number of virtual regions VA_M_VRNX : constant := 16#00000000#; VA_C_VRNX_SYSTEM : constant := 15; -- VRNX for system space VA_C_VRNX_COUNT : constant := 16; -- Number of virtual address spaces VA_S_VADEF : constant := 8; VA_C_PAGELET_SIZE : constant := 512; VA_C_PAGELET_SHIFT_SIZE : constant := 9; type VADEF_BITS0_TYPE is record FILLER_1 : UNSIGNED_30; P1 : BOOLEAN; -- P1 SPACE SYSTEM : BOOLEAN; -- SYSTEM SPACE end record; for VADEF_BITS0_TYPE use record FILLER_1 at 0 range 0 .. 29; P1 at 3 range 6 .. 6; SYSTEM at 3 range 7 .. 7; end record; for VADEF_BITS0_TYPE'SIZE use 32; VADEF_BITS0_TYPE_INIT : constant VADEF_BITS0_TYPE := (FILLER_1 => 0, P1 => FALSE, SYSTEM => FALSE); type VADEF_BITS2_TYPE is record BYTES_PER_PAGELET : UNSIGNED_9; -- BYTES PER PAGELET FILLER_1 : UNSIGNED_7; end record; for VADEF_BITS2_TYPE use record BYTES_PER_PAGELET at 0 range 0 .. 8; FILLER_1 at 1 range 1 .. 7; end record; for VADEF_BITS2_TYPE'SIZE use 16; VADEF_BITS2_TYPE_INIT : constant VADEF_BITS2_TYPE := (BYTES_PER_PAGELET => 0, FILLER_1 => 0); type VADEF_BITS3_TYPE is record BYTE_IN_PAGELET : UNSIGNED_9; -- BYTE IN PAGELET (common name) FILLER_1 : UNSIGNED_7; end record; for VADEF_BITS3_TYPE use record BYTE_IN_PAGELET at 0 range 0 .. 8; FILLER_1 at 1 range 1 .. 7; end record; for VADEF_BITS3_TYPE'SIZE use 16; VADEF_BITS3_TYPE_INIT : constant VADEF_BITS3_TYPE := (BYTE_IN_PAGELET => 0, FILLER_1 => 0); type VADEF_BITS4_TYPE is record FILLER_1 : BIT_ARRAY (0 .. 31); FILLER_2 : UNSIGNED_29; VRN : UNSIGNED_3; -- Virtual Region Number end record; for VADEF_BITS4_TYPE use record FILLER_1 at 0 range 0 .. 31; FILLER_2 at 4 range 0 .. 28; VRN at 7 range 5 .. 7; end record; for VADEF_BITS4_TYPE'SIZE use 64; VADEF_BITS4_TYPE_INIT : constant VADEF_BITS4_TYPE := (FILLER_1 => (others => FALSE), FILLER_2 => 0, VRN => 0); type VADEF_BITS5_TYPE is record FILLER_1 : BIT_ARRAY (0 .. 31); FILLER_2 : UNSIGNED_28; VRNX : UNSIGNED_4; -- Virtual Address Space end record; for VADEF_BITS5_TYPE use record FILLER_1 at 0 range 0 .. 31; FILLER_2 at 4 range 0 .. 27; VRNX at 7 range 4 .. 7; end record; for VADEF_BITS5_TYPE'SIZE use 64; VADEF_BITS5_TYPE_INIT : constant VADEF_BITS5_TYPE := (FILLER_1 => (others => FALSE), FILLER_2 => 0, VRNX => 0); type VADEF_UNION_TYPE is record QUAD : UNSIGNED_QUADWORD; ----Component(s) below are defined as comments since they ----overlap other fields ---- ----VADEF_BITS0 : VADEF_BITS0_TYPE; ----VADEF_BITS2 : VADEF_BITS2_TYPE; ----VADEF_BITS3 : VADEF_BITS3_TYPE; ----VADEF_BITS4 : VADEF_BITS4_TYPE; ----VADEF_BITS5 : VADEF_BITS5_TYPE; end record; for VADEF_UNION_TYPE use record QUAD at 0 range 0 .. 63; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----VADEF_BITS0 at 0 range 0 .. 31; ----VADEF_BITS2 at 0 range 0 .. 15; ----VADEF_BITS3 at 0 range 0 .. 15; ----VADEF_BITS4 at 0 range 0 .. 63; ----VADEF_BITS5 at 0 range 0 .. 63; end record; for VADEF_UNION_TYPE'SIZE use 64; VADEF_UNION_TYPE_INIT : constant VADEF_UNION_TYPE := (QUAD => (0, 0)); type VA_TYPE is record VADEF_UNION : VADEF_UNION_TYPE; end record; for VA_TYPE use record VADEF_UNION at 0 range 0 .. 63; end record; for VA_TYPE'SIZE use 64; VA_TYPE_INIT : constant VA_TYPE := ( VADEF_UNION => VADEF_UNION_TYPE_INIT ); --+ -- Process permanent region ids --- VA_C_P0 : constant := 0; -- Region id for 32-bit program region VA_C_P1 : constant := 1; -- Region id for control region VA_C_P2 : constant := 2; -- Region id for 64-bit program region VA_M_DESCEND : constant := 16#00000001#; VA_M_P0_SPACE : constant := 16#00000002#; VA_M_P1_SPACE : constant := 16#00000004#; VA_M_PERMANENT : constant := 16#00000008#; VA_M_EXPAND_ON_ACCVIO : constant := 16#00000010#; VA_M_SHARED_PTS : constant := 16#00000040#; VA_M_OWNER_MODE : constant := 16#0000000F#; VA_M_CREATE_MODE : constant := 16#000000F0#; VA_C_REGSUM_LENGTH : constant := 40; VA_REGSUM_BY_ID : constant := 0; VA_REGSUM_BY_VA : constant := 1; VA_NEXT_REGSUM_BY_VA : constant := 2; --+ VA_C_REGION_UCREATE_UOWN : constant := 51; VA_C_REGION_UCREATE_SOWN : constant := 50; VA_C_REGION_UCREATE_EOWN : constant := 49; VA_C_REGION_UCREATE_KOWN : constant := 48; VA_C_REGION_SCREATE_SOWN : constant := 34; VA_C_REGION_SCREATE_EOWN : constant := 33; VA_C_REGION_SCREATE_KOWN : constant := 32; VA_C_REGION_ECREATE_EOWN : constant := 17; VA_C_REGION_ECREATE_KOWN : constant := 16; VA_C_REGION_KCREATE_KOWN : constant := 0; type VA_FLAGS_TYPE is -- FLAGS longword record DESCEND : BOOLEAN; -- Region is descending P0_SPACE : BOOLEAN; -- Region is in P0 space P1_SPACE : BOOLEAN; -- Region is in P1 space PERMANENT : BOOLEAN; -- Region is permanent EXPAND_ON_ACCVIO : BOOLEAN; -- Expand within region on accvio FILLER_1 : BOOLEAN; -- Don't replicate this bit in the -- public interface. SHARED_PTS : BOOLEAN; -- Region is a shared PT region FILLER_2 : UNSIGNED_25; end record; for VA_FLAGS_TYPE use record DESCEND at 0 range 0 .. 0; P0_SPACE at 0 range 1 .. 1; P1_SPACE at 0 range 2 .. 2; PERMANENT at 0 range 3 .. 3; EXPAND_ON_ACCVIO at 0 range 4 .. 4; FILLER_1 at 0 range 5 .. 5; SHARED_PTS at 0 range 6 .. 6; FILLER_2 at 0 range 7 .. 31; end record; for VA_FLAGS_TYPE'SIZE use 32; VA_FLAGS_TYPE_INIT : constant VA_FLAGS_TYPE := (DESCEND => FALSE, P0_SPACE => FALSE, P1_SPACE => FALSE, PERMANENT => FALSE, EXPAND_ON_ACCVIO => FALSE, FILLER_1 => FALSE, SHARED_PTS => FALSE, FILLER_2 => 0); type VA_REGION_FIELDS_TYPE is record OWNER_MODE : UNSIGNED_4; -- Region owner mode CREATE_MODE : UNSIGNED_4; -- Region create mode end record; for VA_REGION_FIELDS_TYPE use record OWNER_MODE at 0 range 0 .. 3; CREATE_MODE at 0 range 4 .. 7; end record; for VA_REGION_FIELDS_TYPE'SIZE use 8; VA_REGION_FIELDS_TYPE_INIT : constant VA_REGION_FIELDS_TYPE := (OWNER_MODE => 0, CREATE_MODE => 0); type VA_REGSUM_TYPE is record REGION_ID : UNSIGNED_QUADWORD; -- Id of region FLAGS : VA_FLAGS_TYPE; -- FLAGS longword REGION_PROTECTION : INTEGER_32; ----Component(s) below are defined as comments since they ----overlap other fields ---- ----REGION_FIELDS : VA_REGION_FIELDS_TYPE; START_VA : UNSIGNED_QUADWORD; -- Lowest address in region ----Component(s) below are defined as comments since they ----overlap other fields ---- ----START_VA : ADDRESS; -- Lowest address in 32-bit region REGION_SIZE : UNSIGNED_QUADWORD; -- Size of region ----Component(s) below are defined as comments since they ----overlap other fields ---- ----REGION_SIZE : UNSIGNED_LONGWORD; -- Size of 32-bit region FIRST_FREE_VA : UNSIGNED_QUADWORD; -- First free VA in region ----Component(s) below are defined as comments since they ----overlap other fields ---- ----FIRST_FREE_VA : ADDRESS; -- First free VA in 32-bit region -- Region protection encodings -- - end record; for VA_REGSUM_TYPE use record REGION_ID at 0 range 0 .. 63; FLAGS at 8 range 0 .. 31; REGION_PROTECTION at 12 range 0 .. 31; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----REGION_FIELDS at 12 range 0 .. 7; START_VA at 16 range 0 .. 63; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----START_VA at 16 range 0 .. 31; REGION_SIZE at 24 range 0 .. 63; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----REGION_SIZE at 24 range 0 .. 31; FIRST_FREE_VA at 32 range 0 .. 63; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----FIRST_FREE_VA at 32 range 0 .. 31; end record; for VA_REGSUM_TYPE'SIZE use 320; VA_REGSUM_TYPE_INIT : constant VA_REGSUM_TYPE := (REGION_ID => (0, 0), FLAGS => VA_FLAGS_TYPE_INIT, REGION_PROTECTION => 0, START_VA => (0, 0), REGION_SIZE => (0, 0), FIRST_FREE_VA => (0, 0) ); --+ -- VA flags --- VA_M_NO_OVERMAP : constant := 16#00000001#; type VA_FLAGS_TYPE is record NO_OVERMAP : BOOLEAN; -- Do not overmap while creating pages FILLER_1 : UNSIGNED_7; end record; for VA_FLAGS_TYPE use record NO_OVERMAP at 0 range 0 .. 0; FILLER_1 at 0 range 1 .. 7; end record; for VA_FLAGS_TYPE'SIZE use 8; VA_FLAGS_TYPE_INIT : constant VA_FLAGS_TYPE := (NO_OVERMAP => FALSE, FILLER_1 => 0); --+ -- SETSTK_64 flags --- VA_M_SETSTK_REGISTER : constant := 16#00000001#; type VA_SETSTK_FLAGS_TYPE is record SETSTK_REGISTER : BOOLEAN; -- Set register stack limits FILLER_1 : UNSIGNED_7; end record; for VA_SETSTK_FLAGS_TYPE use record SETSTK_REGISTER at 0 range 0 .. 0; FILLER_1 at 0 range 1 .. 7; end record; for VA_SETSTK_FLAGS_TYPE'SIZE use 8; VA_SETSTK_FLAGS_TYPE_INIT : constant VA_SETSTK_FLAGS_TYPE := (SETSTK_REGISTER => FALSE, FILLER_1 => 0); end VADEF;