COMPILATION LISTING OF SEGMENT syserr_log_daemon Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 0956.4 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 6* * * 7* *********************************************************** */ 8 syserr_log_daemon: 9 procedure (); 10 11 /* * SYSERR_LOG_DAEMON 12* * 13* * This is the procedure always run by the SyserrLogger.SysDaemon HPROC. 14* * It deals with copying between the wired syserr buffer and the log 15* * segments in the paged LOG partition. It is called once when the 16* * syserr daemon is created, and never returns. It is one of the 17* * few programs in the system to go blocked in ring zero. It sets up 18* * some automatic variables and then enters a block loop awaiting wakeups 19* * indicating that there may be something in the wired buffer to copy out 20* * into the paged log. It should be run only by the syserr logger HPROC. 21* * 22* * Modification history: 23* * 73-10-05, Bill Silver: Initial coding 24* * 74-06-09, Bill Silver: Added copy entry 25* * 74-11-12, Lee Scheffler: Log copying added 26* * 75-11-15, Larry Johnson: Moved most of the code in this module to 27* * a non-wired procedure (syserr_copy_paged) 28* * 76-01-10, Larry Johnson: Modified to lock paged syserr log 29* * 76-03-22, Steve Webber: Modified to use logger HPROC 30* * 79-05-03, Mike Grady: Modified for ring 0 stack sharing-- hproc has 31* * own stack and pxss$block now has no args. 32* * 84-08-24, W. Olin Sibert: Reorganized for new syserr log mechanism: 33* * use pmut$wire_and_mask instead of options (validate), use 34* * syserr_log_data for locking, handle conditions and restart, change 35* * name from syserr_logger to syserr_log_daemon. 36* * 1984-11-26, BIM: moved the guts of this to syserr_copy_wired_log, 37* which can be called outside the Daemon. 38* * 1985-01-25, Keith Loepere, to fix race in async log copying. 39* * 85-02-19, Keith Loepere, for making the paged syserr log the 40* highest paged lock. 41* */ 42 43 declare wire_arg bit (72) aligned; 44 declare wire_ptr pointer; 45 46 declare pmut$wire_and_mask entry (bit (72) aligned, pointer); 47 declare pmut$unwire_unmask entry (bit (72) aligned, pointer); 48 declare pxss$block entry; 49 declare syserr_copy_wired_log entry; 50 51 declare addr builtin; 52 53 /* */ 54 55 syserr_log_data_ptr = addr (syserr_log_data$); 56 sd_ptr = addr (syserr_data$syserr_area); 57 wlog_ptr = addr (syserr_data$wired_log_area); 58 59 /* This process remains wired and masked for all its life EXCEPT when it is 60* actually putting messages into the paged log (which it has already extracted 61* from the wired log). This is done in order to reduce the possibility that 62* it will be unable to operate; essentially, it eliminates all but the pages 63* of the paged log itself from consideration as sources of error. This is 64* not entirely true, since the stack is unwired whilst calling. */ 65 66 LOGGER_LOOP: 67 call pmut$wire_and_mask (wire_arg, wire_ptr); 68 69 do while ("1"b); 70 if ^syserr_log_data.test_mode then do; 71 call pxss$block (); /* wait for something to happen */ 72 end; 73 call pmut$unwire_unmask (wire_arg, wire_ptr);/* Permit faults to occur and be handled */ 74 75 call syserr_copy_wired_log; 76 77 call pmut$wire_and_mask (wire_arg, wire_ptr);/* Turn faults off again */ 78 79 if syserr_log_data.test_mode then 80 return; 81 end; 82 83 /* */ 84 85 86 /* */ 87 88 89 /* BEGIN INCLUDE FILE syserr_data.incl.pl1 */ 1 2 1 3 /* Created by Bill Silver on 01/03/73. */ 1 4 /* Modified September 1975 by Larry Johnson to add binary data */ 1 5 /* Modified March 1976 by Steve Webber for use with cds */ 1 6 /* Modified 1985-01-21 by EJ Sharpe: added wmess.process_id */ 1 7 /* Modified 1985-02-18 by Keith Loepere to break out headers. */ 1 8 1 9 /* This include file defines the syserr and log areas found in syserr_data.cds 1 10* There is one lock that coordinates the use of all the data found in 1 11* syserr_data.cds. NOTE, if this include file changes, syserr_data.cds 1 12* may also have to be changed. */ 1 13 1 14 dcl syserr_data$syserr_area char (1) aligned external, 1 15 syserr_data$wired_log_area char (1) aligned external; 1 16 1 17 dcl sd_ptr ptr, /* Pointer to beginning of syserr_area. */ 1 18 wlog_ptr ptr, /* Pointer to beginning of wired_log_area. */ 1 19 wmess_ptr ptr; /* Pointer to a message entry in the wired log. */ 1 20 1 21 dcl 1 sd based (sd_ptr) aligned, /* Overlay of syserr_data$syserr_area. */ 1 22 2 lock bit (36), /* Locks all the data in syserr_data. */ 1 23 2 log_flag bit (1) unal, /* ON => logging mechanism enabled. */ 1 24 2 char_type_flag bit (1) unal, /* ON => ASCII, OFF => BCD. */ 1 25 2 ocdcm_init_flag bit (1) unal, /* ON => ocdcm_ has been initialized. */ 1 26 2 pad bit (33) unal, 1 27 2 prev_text_written char (80); /* Text of last message written */ 1 28 1 29 dcl 1 wlog based (wlog_ptr) aligned, /* Overlay of syserr_data$wired_log_area. */ 1 30 2 head like wlog_header, /* Wired log header. */ 1 31 2 buffer (wlog.head.bsize) bit (36); /* Wired log buffer. */ 1 32 1 33 dcl 1 wlog_header based aligned, /* WIRED LOG HEADER */ 1 34 2 bsize fixed bin, /* Size of the wired log buffer in words. 1 35* Defined in syserr_data.cds. */ 1 36 2 count fixed bin, /* Num of message entries in wired log. */ 1 37 2 slog_ptr ptr, /* Pointer to the paged log segment: syserr_log. */ 1 38 2 seq_num fixed bin (35), /* Sequence number of last message logged. */ 1 39 2 next bit (18) unal, /* Offset relative to base syserr_data */ 1 40 /* Where next entry will go in wired log. */ 1 41 2 pad bit (18) unal; 1 42 1 43 1 44 /* This is an overlay of a message entry that goes into the wired log. Each message 1 45* entry corresponds to one syserr message. */ 1 46 1 47 dcl 1 wmess based (wmess_ptr) aligned, 1 48 2 header aligned like wmess_header, 1 49 2 text char (0 refer (wmess.text_len)), /* Text of expanded message - kept in ASCII. */ 1 50 2 data (0 refer (wmess.data_size)) bit (36); /* Binary data area */ 1 51 1 52 dcl 1 wmess_header based aligned, 1 53 2 seq_num fixed bin (35), /* Sequence number of this message. */ 1 54 2 time fixed bin (71) unal, /* Time message logged at */ 1 55 2 code fixed bin (11) unal, /* Syserr code associated with this message. */ 1 56 2 text_len fixed bin (11) unal, /* Length of message text in ASCII characters. */ 1 57 2 data_size fixed bin (11) unal, /* Size of binary data */ 1 58 2 data_code fixed bin (11) unal, /* Data code */ 1 59 2 pad bit (24) unal, 1 60 2 process_id bit (36); /* ID of process which wrote message */ 1 61 1 62 /* END INCLUDE FILE syserr_data.incl.pl1 */ 89 90 /* BEGIN INCLUDE FILE ... syserr_log_dcls.incl.pl1 ... 84-08-17 ... W. Olin Sibert */ 2 2 /* Modified 1984-12-10, BIM: changed to a fast lock, added error count. */ 2 3 2 4 /* The syserr_log_data segment, made reverse-deciduous in >sl1, overlays the 2 5* first page of the LOG partition, and contains control information about 2 6* the other syserr_log segments. */ 2 7 2 8 declare syserr_log_data$ fixed bin external static; 2 9 declare syserr_log_data_ptr pointer; 2 10 2 11 declare 1 syserr_log_data aligned based (syserr_log_data_ptr), 2 12 2 version char (8) unaligned, /* SYSERR_LOG_DATA_V1 */ 2 13 2 old_init_word char (4) unaligned, /* Overlays slog.head.init_word ("INIT") */ 2 14 2 pad003 bit (1) aligned, 2 15 2 16 2 live_log fixed bin, /* Identifier of live log (#1 or #2) */ 2 17 2 pad001 bit (1) aligned, 2 18 2 error_count fixed bin (35), /* errors copying the log */ 2 19 2 swap_time fixed bin (71), /* Time of last log swap; zero if other_log_empty */ 2 20 2 21 2 messages_copied fixed bin (35), /* A meter */ 2 22 2 messages_lost fixed bin (35), /* Messages not copied because logs full */ 2 23 2 24 2 log_start (2) fixed bin, /* Offset of each log segment in the partition */ 2 25 2 log_size (2) fixed bin, /* Number of pages in each log segment */ 2 26 2 27 2 per_bootload, /* Ramaining structure is reinitialized at each boot */ 2 28 3 log_ptr (2) pointer, /* Pointer to the three segments in the partition */ 2 29 2 30 3 log_name (2) char (32) unaligned, /* Current names of log segments (by syserr_seg_manager) */ 2 31 3 log_dir char (168) unaligned, /* Parent directory */ 2 32 2 33 3 lock aligned, 2 34 4 pid bit (36) aligned, /* Standard format wait lock, used when updating log */ 2 35 4 event_id fixed bin (35), 2 36 4 notify_requested 2 37 bit (1) unaligned, 2 38 4 pad bit (35) unaligned, 2 39 3 take_a_fault bit (1) aligned, /* Forces a fault if on, for testing fault recovery */ 2 40 3 test_mode bit (1) aligned, /* Running in outer-ring test mode */ 2 41 2 42 3 copy_disabled bit (1) aligned, /* No more messages being copied into live log */ 2 43 3 drop_severity_5 bit (1) aligned, /* No more severity 5 messages (log is 3/4 full) */ 2 44 3 wakeup_on_printable bit (1) aligned, /* Console recovery: send wakeup for printable message */ 2 45 2 46 3 copy_threshold fixed bin (18), /* How often to copy to outer ring log segments */ 2 47 3 copy_channel fixed bin (71), 2 48 3 copy_process_id bit (36) aligned, 2 49 2 50 2 pad fixed bin (71); /* Anything goes, as long as it's under a page */ 2 51 2 52 declare SYSERR_LOG_DATA_V1 char (8) internal static options (constant) init ("syserr01"); 2 53 2 54 /* END INCLUDE FILE ... syserr_log_dcls.incl.p1l */ 90 91 /* BEGIN INCLUDE FILE syserr_constants.incl.pl1 ... 11/11/80 W. Olin Sibert */ 3 2 /* 85-02-12, EJ Sharpe - Added sorting class constants, removed AIM_MESSAGE, added new action code names. */ 3 3 /* 85-04-24, G. Palter - Renamed SYSERR_UNUSED_10 to SYSERR_RING1_ERROR to reflect its actual use. */ 3 4 3 5 /* This include file has an ALM version. Keep 'em in sync! */ 3 6 3 7 dcl ( 3 8 3 9 /* The following constants define the message action codes. This indicates 3 10*how a message is to be handled. */ 3 11 3 12 SYSERR_CRASH_SYSTEM init (1), 3 13 CRASH init (1), /* Crash the system, and bleat plaintively. */ 3 14 3 15 SYSERR_TERMINATE_PROCESS init (2), 3 16 TERMINATE_PROCESS init (2), /* Terminate the process, print the message, and beep. */ 3 17 3 18 SYSERR_PRINT_WITH_ALARM init (3), 3 19 BEEP init (3), /* Beep and print the message on the console. */ 3 20 3 21 SYSERR_PRINT_ON_CONSOLE init (0), 3 22 ANNOUNCE init (0), /* Just print the message on the console. */ 3 23 3 24 SYSERR_LOG_OR_PRINT init (4), 3 25 LOG init (4), /* Log the message, or print it if it can't be logged */ 3 26 3 27 SYSERR_LOG_OR_DISCARD init (5), 3 28 JUST_LOG init (5), /* Just try to log the message, and discard it if it can't be */ 3 29 3 30 3 31 /* The following constants are added to the normal severities to indicate 3 32*different sorting classes of messages. */ 3 33 3 34 SYSERR_SYSTEM_ERROR init (00), /* indicates a standard level system error */ 3 35 SYSERR_RING1_ERROR init (10), /* indicates an error detected in ring 1 (mseg_, RCP) */ 3 36 SYSERR_COVERT_CHANNEL init (20), /* indicates covert channel audit trail message */ 3 37 SYSERR_UNSUCCESSFUL_ACCESS init (30), /* indicates access denial audit trail message */ 3 38 SYSERR_SUCCESSFUL_ACCESS init (40) /* indicates access grant audit trail message */ 3 39 ) fixed bin internal static options (constant); 3 40 3 41 /* END INCLUDE FILE syserr_constants.incl.pl1 */ 91 92 93 end syserr_log_daemon; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0839.1 syserr_log_daemon.pl1 >special_ldd>install>MR12.3-1114>syserr_log_daemon.pl1 89 1 03/08/85 0852.7 syserr_data.incl.pl1 >ldd>include>syserr_data.incl.pl1 90 2 01/06/85 1422.2 syserr_log_dcls.incl.pl1 >ldd>include>syserr_log_dcls.incl.pl1 91 3 05/17/85 0615.7 syserr_constants.incl.pl1 >ldd>include>syserr_constants.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. addr builtin function dcl 51 ref 55 56 57 per_bootload 20 based structure level 2 dcl 2-11 pmut$unwire_unmask 000012 constant entry external dcl 47 ref 73 pmut$wire_and_mask 000010 constant entry external dcl 46 ref 66 77 pxss$block 000014 constant entry external dcl 48 ref 71 sd_ptr 000104 automatic pointer dcl 1-17 set ref 56* syserr_copy_wired_log 000016 constant entry external dcl 49 ref 75 syserr_data$syserr_area 000020 external static char(1) dcl 1-14 set ref 56 syserr_data$wired_log_area 000022 external static char(1) dcl 1-14 set ref 57 syserr_log_data based structure level 1 dcl 2-11 syserr_log_data$ 000024 external static fixed bin(17,0) dcl 2-8 set ref 55 syserr_log_data_ptr 000110 automatic pointer dcl 2-9 set ref 55* 70 79 test_mode 122 based bit(1) level 3 dcl 2-11 ref 70 79 wire_arg 000100 automatic bit(72) dcl 43 set ref 66* 73* 77* wire_ptr 000102 automatic pointer dcl 44 set ref 66* 73* 77* wlog_header based structure level 1 dcl 1-33 wlog_ptr 000106 automatic pointer dcl 1-17 set ref 57* wmess_header based structure level 1 dcl 1-52 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ANNOUNCE internal static fixed bin(17,0) initial dcl 3-7 BEEP internal static fixed bin(17,0) initial dcl 3-7 CRASH internal static fixed bin(17,0) initial dcl 3-7 JUST_LOG internal static fixed bin(17,0) initial dcl 3-7 LOG internal static fixed bin(17,0) initial dcl 3-7 SYSERR_COVERT_CHANNEL internal static fixed bin(17,0) initial dcl 3-7 SYSERR_CRASH_SYSTEM internal static fixed bin(17,0) initial dcl 3-7 SYSERR_LOG_DATA_V1 internal static char(8) initial packed unaligned dcl 2-52 SYSERR_LOG_OR_DISCARD internal static fixed bin(17,0) initial dcl 3-7 SYSERR_LOG_OR_PRINT internal static fixed bin(17,0) initial dcl 3-7 SYSERR_PRINT_ON_CONSOLE internal static fixed bin(17,0) initial dcl 3-7 SYSERR_PRINT_WITH_ALARM internal static fixed bin(17,0) initial dcl 3-7 SYSERR_RING1_ERROR internal static fixed bin(17,0) initial dcl 3-7 SYSERR_SUCCESSFUL_ACCESS internal static fixed bin(17,0) initial dcl 3-7 SYSERR_SYSTEM_ERROR internal static fixed bin(17,0) initial dcl 3-7 SYSERR_TERMINATE_PROCESS internal static fixed bin(17,0) initial dcl 3-7 SYSERR_UNSUCCESSFUL_ACCESS internal static fixed bin(17,0) initial dcl 3-7 TERMINATE_PROCESS internal static fixed bin(17,0) initial dcl 3-7 sd based structure level 1 dcl 1-21 wlog based structure level 1 dcl 1-29 wmess based structure level 1 dcl 1-47 wmess_ptr automatic pointer dcl 1-17 NAMES DECLARED BY EXPLICIT CONTEXT. LOGGER_LOOP 000014 constant label dcl 66 syserr_log_daemon 000001 constant entry external dcl 8 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 206 234 70 216 Length 466 70 26 215 115 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME syserr_log_daemon 80 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME syserr_log_daemon 000100 wire_arg syserr_log_daemon 000102 wire_ptr syserr_log_daemon 000104 sd_ptr syserr_log_daemon 000106 wlog_ptr syserr_log_daemon 000110 syserr_log_data_ptr syserr_log_daemon THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. pmut$unwire_unmask pmut$wire_and_mask pxss$block syserr_copy_wired_log THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. syserr_data$syserr_area syserr_data$wired_log_area syserr_log_data$ LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 8 000000 55 000006 56 000010 57 000012 66 000014 70 000024 71 000027 73 000034 75 000045 77 000052 79 000063 81 000066 93 000067 ----------------------------------------------------------- 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