COMPILATION LISTING OF SEGMENT pvname_to_pvtx_ Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-04-17_1927.78_Mon_mdt Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 pvname_to_pvtx_: procedure (P_pvname, P_pvtx, P_pvid, P_code); 12 13 /* * Subroutine to translate pvname arguments (as to storage system 14* * maintenance commands) to the correct PVTX and PVNAME for calling 15* * hardcore interfaces. 16* * 17* * 06/02/81, W. Olin Sibert 18* * 03/20/82, J. Bongiovanni, for new PVTE 19* */ 20 21 dcl P_pvtx fixed bin parameter; 22 dcl P_pvname char (*) parameter; 23 dcl P_pvid bit (36) aligned parameter; 24 dcl P_code fixed bin (35) parameter; 25 26 dcl code fixed bin (35); 27 dcl pvname char (32); 28 dcl pvtx fixed bin; 29 dcl pvid bit (36) aligned; 30 31 dcl error_table_$pvid_not_found fixed bin (35) external static; 32 33 dcl ring0_get_$segptr entry (char (*), char (*), ptr, fixed bin (35)); 34 dcl ring_zero_peek_ entry (ptr, ptr, fixed bin (18), fixed bin (35)); 35 dcl mdc_$find_volname entry (bit (36) aligned, char (*), char (*), fixed bin (35)); 36 dcl mdc_$pvname_info entry (char (*), bit (36) aligned, char (*), bit (36) aligned, fixed bin, fixed bin (35)); 37 38 dcl (addr, ptr, rel, size) builtin; 39 40 /* */ 41 42 pvname = P_pvname; 43 44 call mdc_$pvname_info (pvname, pvid, (""), (""b), (0), P_code); 45 if P_code ^= 0 then return; /* can't do it -- probably bad volume */ 46 47 call lookup_pvid (pvid); 48 49 P_code = code; 50 P_pvid = pvid; 51 P_pvtx = pvtx; 52 53 return; 54 55 /* */ 56 57 pvname_to_pvtx_$pvid: entry (P_pvid, P_pvtx, P_pvname, P_code); 58 59 /* This entry converts a PVID to a PVTX and a PVNAME */ 60 61 pvid = P_pvid; 62 63 call lookup_pvid (pvid); /* Try to find it */ 64 65 if code = 0 then do; /* Find out its name, too */ 66 call mdc_$find_volname (pvid, pvname, (""), code); 67 P_pvname = pvname; 68 end; 69 70 P_code = code; 71 P_pvtx = pvtx; 72 73 return; /* done with pvid_to_pvtx entrypoint */ 74 75 /* */ 76 77 lookup_pvid: procedure (P_pvid); 78 79 /* * This procedure finds the pvts for the supplied pvid by peeking at the ring zero PVT */ 80 81 dcl P_pvid bit (36) aligned parameter; 82 83 dcl already_initialized bit (1) aligned internal static init ("0"b); 84 dcl r0_pvt_ptr pointer internal static init (null ()); 85 dcl 1 pvt_header aligned like pvt; /* temporary copy of PVT header */ 86 87 88 dcl 1 pvte_auto aligned like pvte automatic; /* temporary copy of each PVTE */ 89 90 91 if ^already_initialized then do; 92 call ring0_get_$segptr ("", "pvt", r0_pvt_ptr, code); 93 if code ^= 0 then return; /* Just return with an error */ 94 end; 95 96 call ring_zero_peek_ (r0_pvt_ptr, addr (pvt_header), size (pvt), code); 97 if code ^= 0 then return; /* With indicated error */ 98 pvt_arrayp = ptr (r0_pvt_ptr, rel (addr (r0_pvt_ptr -> pvt.array))); 99 100 pvtep = addr (pvte_auto); 101 do pvtx = 1 to addr (pvt_header) -> pvt.n_entries; 102 call ring_zero_peek_ (addr (pvt_arrayp -> pvt_array (pvtx)), pvtep, size (pvte), code); 103 if code ^= 0 then do; 104 pvtx = -1; /* Make sure it's not valid */ 105 return; /* With indicated error */ 106 end; 107 108 if pvte.used then 109 if pvte.storage_system then 110 if pvte.pvid = P_pvid then return; /* found it */ 111 end; /* of loop through pvtes */ 112 113 code = error_table_$pvid_not_found; /* didn't find it */ 114 pvtx = -1; /* Error indication */ 115 116 return; 117 end lookup_pvid; 118 119 /* BEGIN INCLUDE FILE ... pvt.incl.pl1 ... last modified January 1982 */ 1 2 1 3 1 4 /* The physical volume table (PVT) is a wired-down table. 1 5* It has one entry for each spindle present, be it for 1 6* Storage System or "I/O" use. 1 7**/ 1 8 1 9 dcl pvt$ ext, 1 10 pvtp ptr; 1 11 1 12 1 13 dcl 1 pvt based (pvtp) aligned, 1 14 1 15 2 n_entries fixed bin (17), /* number of PVT entries */ 1 16 2 max_n_entries fixed bin (17), /* max number of PVT entries */ 1 17 2 n_in_use fixed bin (17), /* number of PVT entries in use */ 1 18 2 rwun_pvtx fixed bin, /* rewind_unloading pvtx */ 1 19 2 shutdown_state fixed bin, /* state of previous shutdown */ 1 20 2 esd_state fixed bin, /* state of ESD, >0 iff in ESD */ 1 21 2 prev_shutdown_state fixed bin, /* shutdown state of previous bootload */ 1 22 2 prev_esd_state fixed bin, /* ESD state of previous bootload */ 1 23 1 24 2 time_of_bootload fixed bin (71), /* Time of bootload */ 1 25 2 root_lvid bit (36) aligned, /* Logical volume ID of Root Logical Volume (RLV) */ 1 26 2 root_pvid bit (36) aligned, /* Physical volume ID of Root Physical Volume (RPV) */ 1 27 2 root_pvtx fixed bin, /* Index to PVTE for Root Physical Volume (RPV) */ 1 28 2 root_vtocx fixed bin, /* VTOCE index for root (>) */ 1 29 2 disk_table_vtocx fixed bin, /* VTOCE index for disk table on RPV */ 1 30 2 disk_table_uid bit (36) aligned, /* File System UID for disk_table */ 1 31 1 32 2 rpvs_requested bit (1) aligned, /* RPVS keyword given on BOOT */ 1 33 2 rpv_needs_salv bit (1) aligned, /* RPV required (not requested) salvage */ 1 34 2 rlv_needs_salv bit (1) aligned, /* RLV required (not requested) salvage */ 1 35 2 volmap_lock_wait_constant bit (36) aligned,/* For constructing wait event: OR pvte_rel into lower */ 1 36 2 volmap_idle_wait_constant bit (36) aligned,/* For constructing wait event: OR pvte_rel into lower */ 1 37 2 vtoc_map_lock_wait_constant bit (36) aligned, /* For constructing wait event: OR pvte_rel into lower */ 1 38 2 n_volmap_locks_held fixed bin (17), /* Current number of volmap locks held */ 1 39 2 n_vtoc_map_locks_held fixed bin (17), /* Current number of VTOC Map locks held */ 1 40 1 41 2 last_volmap_time fixed bin (71), /* Time a volmap was last locked/unlocked */ 1 42 2 last_vtoc_map_time fixed bin (71), /* Time a VTOC Map was last locked/unlocked */ 1 43 2 total_volmap_lock_time fixed bin (71), /* Total time volmap's were locked (integral) */ 1 44 2 total_vtoc_map_lock_time fixed bin (71), /* Total time VTOC Maps were locked (integral) */ 1 45 1 46 2 n_volmap_locks fixed bin (35), /* Number times a volmap was locked */ 1 47 2 n_vtoc_map_locks fixed bin (35), /* Number times a vtoc_map was locked */ 1 48 2 volmap_lock_nowait_calls fixed bin (35), /* Number calls to lock volmap, no wait */ 1 49 2 volmap_lock_nowait_fails fixed bin (35), /* Number times lock failed */ 1 50 2 volmap_lock_wait_calls fixed bin (35), /* Number calls to lock volmap, wait */ 1 51 2 volmap_lock_wait_fails fixed bin (35), /* Number times lock failed */ 1 52 2 pad (2) bit (36) aligned, 1 53 1 54 2 array fixed bin (71); /* Array of PVTE's -- must be double-word aligned */ 1 55 1 56 1 57 1 58 /* END INCLUDE FILE ...pvt.incl.pl1 */ 119 120 /* START OF: pvte.incl.pl1 July 1982 * * * * * * * * * * * * * * * * */ 2 2 2 3 /* Added pc_vacating, Benson Margulies 84-10-17 */ 2 4 2 5 /****^ HISTORY COMMENTS: 2 6* 1) change(86-04-11,Fawcett), approve(86-04-11,MCR7383), 2 7* audit(86-05-29,GDixon), install(86-07-18,MR12.0-1098): 2 8* Add the support for subvolumes 2 9* 2) change(86-04-11,Lippard), approve(86-04-11,MCR7309), 2 10* audit(86-05-29,GDixon), install(86-07-18,MR12.0-1098): 2 11* Add root_lv flag to mount RLVs that do not have hardcore partitions. 2 12* 3) change(88-05-27,GWMay), approve(88-05-27,MCR7883), 2 13* audit(88-06-14,Beattie), install(88-07-19,MR12.2-1061): 2 14* Added inconsistent_dbm bit for determining the status of volume 2 15* dumper bit maps. 2 16* END HISTORY COMMENTS */ 2 17 2 18 dcl pvt$array aligned external; 2 19 dcl pvt$max_n_entries fixed bin external; 2 20 2 21 dcl pvt_arrayp ptr; 2 22 dcl pvtep ptr; 2 23 2 24 dcl 1 pvt_array (pvt$max_n_entries) aligned like pvte based (pvt_arrayp); 2 25 2 26 dcl 1 pvte based (pvtep) aligned, 2 27 2 28 2 pvid bit (36), /* physical volume ID */ 2 29 2 30 2 lvid bit (36), /* logical volume ID */ 2 31 2 32 2 dmpr_in_use (3) bit (1) unaligned, /* physical volume dumper interlock */ 2 33 2 is_sv bit (1) unaligned, /* true if this entry defines a subvolume */ 2 34 2 root_lv bit (1) unaligned, /* true if this is on the root LV */ 2 35 2 removable_pack bit (1) unaligned, /* true if packs are eremoveable */ 2 36 2 inconsistent_dbm bit (1) unaligned, /* true if trouble count is incremented */ 2 37 2 pad3 bit (2) unaligned, 2 38 2 brother_pvtx fixed bin (8) unaligned,/* next pvte in lv chain */ 2 39 2 skip_queue_count fixed bin (18) unsigned unaligned, /* number of times this pv skipped for per-proc allocation due to saturation */ 2 40 2 41 2 42 2 43 2 devname char (4), /* device name */ 2 44 2 45 (2 device_type fixed bin (8), /* device type */ 2 46 2 logical_area_number fixed bin (8), /* disk drive number */ 2 47 2 used bit (1), /* TRUE if this entry is used */ 2 48 2 storage_system bit (1), /* TRUE for storage system (vs io disk) */ 2 49 2 permanent bit (1), /* TRUE if cannot be demounted */ 2 50 2 testing bit (1), /* Protocol bit for read_disk$test */ 2 51 2 being_mounted bit (1), /* TRUE if the physical volume is being mounted */ 2 52 2 being_demounted bit (1), /* TRUE if the pysical volume is being demounted */ 2 53 2 check_read_incomplete bit (1), /* page control should check read incomplete */ 2 54 2 device_inoperative bit (1), /* TRUE if disk_control decides dev busted */ 2 55 2 rpv bit (1), /* TRUE if this is the root physical volume */ 2 56 2 scav_check_address 2 57 bit (1), /* TRUE is page control should check deposits/withdrawals against scavenger table */ 2 58 2 deposit_to_volmap bit (1), /* TRUE if deposits should got to volume map, not stock */ 2 59 2 being_demounted2 bit (1), /* No more vtoc I/O during demount */ 2 60 2 pc_vacating bit (1), /* No more withdraws from this volume -- for debugging */ 2 61 2 vacating bit (1), /* don't put new segs on this vol */ 2 62 2 hc_part_used bit (1), /* HC part set up by init_pvt */ 2 63 2 volmap_lock_notify bit (1) unal, /* TRUE if notify required when volmap lock is unlocked */ 2 64 2 volmap_idle_notify bit (1) unal, /* TRUE if notify required when volmap state is idle */ 2 65 2 vtoc_map_lock_notify bit (1) unal, /* TRUE if notify required when vtoc map lock is unlocked */ 2 66 2 67 2 68 2 n_free_vtoce fixed bin (17), /* number of free VTOC entries */ 2 69 2 vtoc_size fixed bin (17), /* size of the VTOC part of the disk - in records */ 2 70 2 71 2 dbmrp (2) bit (18), /* rel ptr to dumber bit maps for this volume */ 2 72 2 73 2 nleft fixed bin (17), /* number of records left */ 2 74 2 totrec fixed bin (17)) unaligned, /* Total records in this map */ 2 75 2 76 2 dim_info bit (36), /* Information peculiar to DIM */ 2 77 2 sv_num fixed bin, /* the number of this subvolume starting at 0 */ 2 78 2 num_of_svs fixed bin, /* number of subvolumes for this device */ 2 79 2 records_per_cyl fixed bin, 2 80 2 record_factor fixed bin, /* the record factor for logical to real seek calculation */ 2 81 2 sv_name char (2) aligned, 2 82 2 curn_dmpr_vtocx (3) fixed bin unaligned,/* current vtocx being dumped */ 2 83 2 n_vtoce fixed bin unaligned, /* number of vtoce on this volume */ 2 84 2 85 2 baseadd fixed bin (18) uns unaligned, /* Base of paging region */ 2 86 2 pad2 bit (18) unaligned, 2 87 2 88 2 pad_for_mod_2 fixed bin (35), /* Make volmap_seg_sdw double word aligned */ 2 89 2 90 2 volmap_seg_sdw fixed bin (71), /* SDW describing volmap_seg */ 2 91 2 92 2 volmap_astep ptr unal, /* Packed pointer to ASTE for volmap_seg */ 2 93 2 94 2 volmap_offset bit (18) unal, /* Offset in volmap_seg of volume map */ 2 95 2 vtoc_map_offset bit (18) unal, /* Offset in volmap_seg of VTOC map */ 2 96 2 97 2 98 2 volmap_lock bit (36) aligned, /* Lock on volume map operations */ 2 99 2 100 2 vtoc_map_lock bit (36) aligned, /* Lock on VTOC map operations */ 2 101 2 102 2 volmap_stock_ptr ptr unal, /* Packed pointer to record stock */ 2 103 2 104 2 vtoc_map_stock_ptr ptr unal, /* Packed pointer to VTOCE stock */ 2 105 2 106 2 volmap_async_state fixed bin (17) unaligned, /* Asynchronous update state of Volume Map */ 2 107 2 volmap_async_page fixed bin (17) unaligned, /* Page number for asynchronous update */ 2 108 2 109 2 vol_trouble_count fixed bin (17) unaligned, /* Count of inconsistencies since last salvage */ 2 110 2 scavenger_block_rel bit (18) unaligned; /* Offset to scavenger block, ^0 => scavenging */ 2 111 2 112 2 113 dcl (VOLMAP_ASYNC_IDLE init (0), /* for volmap_async_state */ 2 114 VOLMAP_ASYNC_READ init (1), 2 115 VOLMAP_ASYNC_WRITE init (2)) fixed bin int static options (constant); 2 116 2 117 2 118 /* END OF: pvte.incl.pl1 * * * * * * * * * * * * * * * * */ 120 121 122 end pvname_to_pvtx_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/17/00 1927.7 pvname_to_pvtx_.pl1 >udd>sm>ds>w>ml>pvname_to_pvtx_.pl1 119 1 05/27/82 1625.8 pvt.incl.pl1 >ldd>incl>pvt.incl.pl1 120 2 07/21/88 2136.0 pvte.incl.pl1 >ldd>incl>pvte.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. P_code parameter fixed bin(35,0) dcl 24 set ref 11 44* 45 49* 57 70* P_pvid parameter bit(36) dcl 81 in procedure "lookup_pvid" ref 77 108 P_pvid parameter bit(36) dcl 23 in procedure "pvname_to_pvtx_" set ref 11 50* 57 61 P_pvname parameter char packed unaligned dcl 22 set ref 11 42 57 67* P_pvtx parameter fixed bin(17,0) dcl 21 set ref 11 51* 57 71* addr builtin function dcl 38 ref 96 96 98 100 101 102 102 already_initialized constant bit(1) initial dcl 83 ref 91 array 50 based fixed bin(71,0) level 2 dcl 1-13 set ref 98 code 000100 automatic fixed bin(35,0) dcl 26 set ref 49 65 66* 70 92* 93 96* 97 102* 103 113* error_table_$pvid_not_found 000012 external static fixed bin(35,0) dcl 31 ref 113 mdc_$find_volname 000020 constant entry external dcl 35 ref 66 mdc_$pvname_info 000022 constant entry external dcl 36 ref 44 n_entries based fixed bin(17,0) level 2 dcl 1-13 ref 101 ptr builtin function dcl 38 ref 98 pvid 000112 automatic bit(36) dcl 29 in procedure "pvname_to_pvtx_" set ref 44* 47* 50 61* 63* 66* pvid based bit(36) level 2 in structure "pvte" dcl 2-26 in procedure "pvname_to_pvtx_" ref 108 pvname 000101 automatic char(32) packed unaligned dcl 27 set ref 42* 44* 66* 67 pvt based structure level 1 dcl 1-13 set ref 96 96 pvt_array based structure array level 1 dcl 2-24 set ref 102 102 pvt_arrayp 000114 automatic pointer dcl 2-21 set ref 98* 102 102 pvt_header 000134 automatic structure level 1 dcl 85 set ref 96 96 101 pvte based structure level 1 dcl 2-26 ref 102 102 pvte_auto 000206 automatic structure level 1 dcl 88 set ref 100 pvtep 000116 automatic pointer dcl 2-22 set ref 100* 102* 102 102 108 108 108 pvtp automatic pointer dcl 1-9 ref 96 96 pvtx 000111 automatic fixed bin(17,0) dcl 28 set ref 51 71 101* 102 102 104* 114* r0_pvt_ptr 000010 internal static pointer initial dcl 84 set ref 92* 96* 98 98 rel builtin function dcl 38 ref 98 ring0_get_$segptr 000014 constant entry external dcl 33 ref 92 ring_zero_peek_ 000016 constant entry external dcl 34 ref 96 102 size builtin function dcl 38 ref 96 96 102 102 storage_system 4(19) based bit(1) level 2 packed packed unaligned dcl 2-26 ref 108 used 4(18) based bit(1) level 2 packed packed unaligned dcl 2-26 ref 108 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. VOLMAP_ASYNC_IDLE internal static fixed bin(17,0) initial dcl 2-113 VOLMAP_ASYNC_READ internal static fixed bin(17,0) initial dcl 2-113 VOLMAP_ASYNC_WRITE internal static fixed bin(17,0) initial dcl 2-113 pvt$ external static fixed bin(17,0) dcl 1-9 pvt$array external static fixed bin(17,0) dcl 2-18 pvt$max_n_entries external static fixed bin(17,0) dcl 2-19 NAMES DECLARED BY EXPLICIT CONTEXT. lookup_pvid 000211 constant entry internal dcl 77 ref 47 63 pvname_to_pvtx_ 000016 constant entry external dcl 11 pvname_to_pvtx_$pvid 000123 constant entry external dcl 57 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 510 534 374 520 Length 740 374 24 167 114 2 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME pvname_to_pvtx_ 216 external procedure is an external procedure. lookup_pvid internal procedure shares stack frame of external procedure pvname_to_pvtx_. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 r0_pvt_ptr lookup_pvid STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME pvname_to_pvtx_ 000100 code pvname_to_pvtx_ 000101 pvname pvname_to_pvtx_ 000111 pvtx pvname_to_pvtx_ 000112 pvid pvname_to_pvtx_ 000114 pvt_arrayp pvname_to_pvtx_ 000116 pvtep pvname_to_pvtx_ 000134 pvt_header lookup_pvid 000206 pvte_auto lookup_pvid THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. mdc_$find_volname mdc_$pvname_info ring0_get_$segptr ring_zero_peek_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$pvid_not_found LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000011 42 000033 44 000043 45 000101 47 000104 49 000106 50 000111 51 000113 53 000115 57 000116 61 000140 63 000142 65 000144 66 000146 67 000173 70 000203 71 000206 73 000210 77 000211 91 000213 92 000215 93 000244 96 000247 97 000270 98 000273 100 000302 101 000304 102 000314 103 000337 104 000341 105 000343 108 000344 111 000360 113 000362 114 000365 116 000367 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved