--******************************************************************************************************************** -- Created: 9-Mar-2021 22:28:17 by OpenVMS SDL EV3-3 -- Source: 18-SEP-2003 16:34:16 $1$DGA8085:[LIB_ADA.LIS]BTBDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package BTBDEF is -- module $BTBDEF BTB_K_VAX_SECTOR : constant := 0; -- address of VAX bootblock LBN BTB_K_ALPHA_SECTOR : constant := 0; -- address of Alpha bootblock LBN BTB_K_LENGTH_PART1 : constant := 480; -- Length of 1st part of boot block BTB_M_NOTCONTIG : constant := 16#00000001#; BTB_K_LENGTH : constant := 512; -- Length of a boot block BTB_S_BTBDEF : constant := 512; -- Old size name, synonym type BTB_LBN1_TYPE is -- Starting LBN of 1st boot file record HIGH_LBN : UNSIGNED_WORD; -- High 32-bits of LBN LOW_LBN : UNSIGNED_WORD; -- Low 32-bits of LBN end record; for BTB_LBN1_TYPE use record HIGH_LBN at 0 range 0 .. 15; LOW_LBN at 2 range 0 .. 15; end record; for BTB_LBN1_TYPE'SIZE use 32; BTB_LBN1_TYPE_INIT : constant BTB_LBN1_TYPE := (HIGH_LBN => 0, LOW_LBN => 0); type BTB_CODE_FIELDS_TYPE is record STUFF : INTEGER_32; -- MORE_STUFF : INTEGER_32; -- COMMENT : STRING(1 .. 20); -- end record; for BTB_CODE_FIELDS_TYPE use record STUFF at 0 range 0 .. 31; MORE_STUFF at 4 range 0 .. 31; COMMENT at 8 range 0 .. 159; end record; for BTB_CODE_FIELDS_TYPE'SIZE use 224; BTB_CODE_FIELDS_TYPE_INIT : constant BTB_CODE_FIELDS_TYPE := (STUFF => 0, MORE_STUFF => 0, COMMENT => (others => ASCII.NUL)); type BTB_SIZE2_TYPE is -- Size of 2nd boot file record LOW_SIZE2 : INTEGER_32; -- Low 32-bits of size HIGH_SIZE2 : INTEGER_32; -- High 32-bits of size end record; for BTB_SIZE2_TYPE use record LOW_SIZE2 at 0 range 0 .. 31; HIGH_SIZE2 at 4 range 0 .. 31; end record; for BTB_SIZE2_TYPE'SIZE use 64; BTB_SIZE2_TYPE_INIT : constant BTB_SIZE2_TYPE := (LOW_SIZE2 => 0, HIGH_SIZE2 => 0); type BTB_LBN2_TYPE is -- Starting LBN of 2nd boot file record LOW_LBN2 : INTEGER_32; -- Low 32-bits of LBN HIGH_LBN2 : INTEGER_32; -- High 32-bits of LBN end record; for BTB_LBN2_TYPE use record LOW_LBN2 at 0 range 0 .. 31; HIGH_LBN2 at 4 range 0 .. 31; end record; for BTB_LBN2_TYPE'SIZE use 64; BTB_LBN2_TYPE_INIT : constant BTB_LBN2_TYPE := (LOW_LBN2 => 0, HIGH_LBN2 => 0); type BTB_FLAG_FIELDS_TYPE is record NOTCONTIG : BOOLEAN; -- Bootstrap is not contiguous FILLER_1 : UNSIGNED_7; end record; for BTB_FLAG_FIELDS_TYPE use record NOTCONTIG at 0 range 0 .. 0; FILLER_1 at 0 range 1 .. 7; end record; for BTB_FLAG_FIELDS_TYPE'SIZE use 8; BTB_FLAG_FIELDS_TYPE_INIT : constant BTB_FLAG_FIELDS_TYPE := (NOTCONTIG => FALSE, FILLER_1 => 0); type BTB_FLAGS_TYPE is -- Boot block flags record LOW_FLAGS : UNSIGNED_LONGWORD; -- Low longword of flags HIGH_FLAGS : UNSIGNED_LONGWORD; -- High longword of flags ----Component(s) below are defined as comments since they ----overlap other fields ---- ----FLAG_FIELDS : BTB_FLAG_FIELDS_TYPE; end record; for BTB_FLAGS_TYPE use record LOW_FLAGS at 0 range 0 .. 31; HIGH_FLAGS at 4 range 0 .. 31; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----FLAG_FIELDS at 0 range 0 .. 7; end record; for BTB_FLAGS_TYPE'SIZE use 64; BTB_FLAGS_TYPE_INIT : constant BTB_FLAGS_TYPE := (LOW_FLAGS => 0, HIGH_FLAGS => 0); type BTB_CHECKSUM2_TYPE is -- Checksum of entire block record LOW_CHECK2 : INTEGER_32; -- Low 32-bits of checksum HIGH_CHECK2 : INTEGER_32; -- High 32-bits of checksum end record; for BTB_CHECKSUM2_TYPE use record LOW_CHECK2 at 0 range 0 .. 31; HIGH_CHECK2 at 4 range 0 .. 31; end record; for BTB_CHECKSUM2_TYPE'SIZE use 64; BTB_CHECKSUM2_TYPE_INIT : constant BTB_CHECKSUM2_TYPE := (LOW_CHECK2 => 0, HIGH_CHECK2 => 0); type BTB_TYPE is record NOP1 : UNSIGNED_BYTE; -- Contains NOP opcode BRB : UNSIGNED_BYTE; -- Contains BRB opcode BRB_OFFSET : UNSIGNED_BYTE; -- Contains PC relative offset of branch NOP2 : UNSIGNED_BYTE; -- Contains NOP opcode LBN1 : BTB_LBN1_TYPE; -- Starting LBN of 1st boot file FILLER_1 : UNSIGNED_LONGWORD; -- Filler VAX_BRB : UNSIGNED_BYTE; -- Contains BRB opcode (VAX) VAX_OFFSET : UNSIGNED_BYTE; -- Contains PC relative offset of branch FILLER_2 : UNSIGNED_BYTE; -- Filler PDP_BRB : UNSIGNED_BYTE; -- Contain BRB opcode (PDP) PDP_OFFSET : UNSIGNED_BYTE; -- Contains PC relative offset of branch FILLER_3 : UNSIGNED_BYTE; -- Filler FILLER_4 : UNSIGNED_LONGWORD; -- Filler FILLER_5 : UNSIGNED_WORD; -- Filler INST_SET : UNSIGNED_BYTE; -- Instruction set code (%x18=VAX) CTRL_TYPE : UNSIGNED_BYTE; -- Controller type FILE_STR : UNSIGNED_BYTE; -- File structure (ODS-II =2) COMP3 : UNSIGNED_BYTE; -- Complement of sum of previous 3 bytes FILLER_6 : UNSIGNED_BYTE; -- Filler VERSION : UNSIGNED_BYTE; -- Boot block version=1 FILLER_7 : UNSIGNED_WORD; -- Filler SIZE : UNSIGNED_LONGWORD; -- Size in LBNs of image LOAD_OFFSET : UNSIGNED_LONGWORD; -- Load offset into good memory START_OFFSET : UNSIGNED_LONGWORD; -- Offset to begin execution CHECKSUM : UNSIGNED_LONGWORD; -- Checksum of three previous longwords VAX_CODE : INTEGER_8_ARRAY (1 .. 92); -- VAX boot block code ----Component(s) below are defined as comments since they ----overlap other fields ---- ----CODE_FIELDS : BTB_CODE_FIELDS_TYPE; FILL8 : INTEGER_8_ARRAY (1 .. 340); -- Reserved for future use SIZE2 : BTB_SIZE2_TYPE; -- Size of 2nd boot file LBN2 : BTB_LBN2_TYPE; -- Starting LBN of 2nd boot file FLAGS : BTB_FLAGS_TYPE; -- Boot block flags CHECKSUM2 : BTB_CHECKSUM2_TYPE; -- Checksum of entire block end record; for BTB_TYPE use record NOP1 at 0 range 0 .. 7; BRB at 1 range 0 .. 7; BRB_OFFSET at 2 range 0 .. 7; NOP2 at 3 range 0 .. 7; LBN1 at 4 range 0 .. 31; FILLER_1 at 8 range 0 .. 31; VAX_BRB at 12 range 0 .. 7; VAX_OFFSET at 13 range 0 .. 7; FILLER_2 at 14 range 0 .. 7; PDP_BRB at 15 range 0 .. 7; PDP_OFFSET at 16 range 0 .. 7; FILLER_3 at 17 range 0 .. 7; FILLER_4 at 18 range 0 .. 31; FILLER_5 at 22 range 0 .. 15; INST_SET at 24 range 0 .. 7; CTRL_TYPE at 25 range 0 .. 7; FILE_STR at 26 range 0 .. 7; COMP3 at 27 range 0 .. 7; FILLER_6 at 28 range 0 .. 7; VERSION at 29 range 0 .. 7; FILLER_7 at 30 range 0 .. 15; SIZE at 32 range 0 .. 31; LOAD_OFFSET at 36 range 0 .. 31; START_OFFSET at 40 range 0 .. 31; CHECKSUM at 44 range 0 .. 31; VAX_CODE at 48 range 0 .. 735; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----CODE_FIELDS at 48 range 0 .. 223; FILL8 at 140 range 0 .. 2719; SIZE2 at 480 range 0 .. 63; LBN2 at 488 range 0 .. 63; FLAGS at 496 range 0 .. 63; CHECKSUM2 at 504 range 0 .. 63; end record; for BTB_TYPE'SIZE use 4096; BTB_TYPE_INIT : constant BTB_TYPE := (NOP1 => 0, BRB => 0, BRB_OFFSET => 0, NOP2 => 0, LBN1 => BTB_LBN1_TYPE_INIT, FILLER_1 => 0, VAX_BRB => 0, VAX_OFFSET => 0, FILLER_2 => 0, PDP_BRB => 0, PDP_OFFSET => 0, FILLER_3 => 0, FILLER_4 => 0, FILLER_5 => 0, INST_SET => 0, CTRL_TYPE => 0, FILE_STR => 0, COMP3 => 0, FILLER_6 => 0, VERSION => 0, FILLER_7 => 0, SIZE => 0, LOAD_OFFSET => 0, START_OFFSET => 0, CHECKSUM => 0, VAX_CODE => (others => 0), FILL8 => (others => 0), SIZE2 => BTB_SIZE2_TYPE_INIT, LBN2 => BTB_LBN2_TYPE_INIT, FLAGS => BTB_FLAGS_TYPE_INIT, CHECKSUM2 => BTB_CHECKSUM2_TYPE_INIT ); end BTBDEF;