1 /****^  ***********************************************************
  2         *                                                         *
  3         * Copyright, (C) Honeywell Bull Inc., 1987                *
  4         *                                                         *
  5         * Copyright, (C) Honeywell Information Systems Inc., 1982 *
  6         *                                                         *
  7         *********************************************************** */
  8 /* format: style3 */
  9 pc_signal:
 10      proc (Error_Type, Astep, Ptwp);
 11 
 12 /*  Program to build structures for the signaller when a signallable error
 13     is detected by Page Control.
 14 
 15     Written October 1982 by J. Bongiovanni
 16 */
 17 
 18 /*  Parameter  */
 19 
 20 dcl       Error_Type          fixed bin parameter;          /* Index of error */
 21 dcl       Astep               ptr unaligned parameter;      /* -> ASTE of interest */
 22 dcl       Ptwp                ptr unaligned parameter;      /* -> PTW of interest */
 23 
 24 /*  Automatic  */
 25 
 26 dcl       error_type          fixed bin;
 27 dcl       1 page_fault_error_code
 28                               aligned,                      /* Error code hack until info structure implemented */
 29             2 add             bit (18) unaligned,
 30             2 add_type        bit (4) unaligned,
 31             2 pad             bit (5) unaligned,
 32             2 pvtx            fixed bin (9) unsigned unaligned;
 33 dcl       ptwp                ptr;
 34 
 35 /*  Static  */
 36 
 37 dcl       SIGNAL_NAME         (0:3) char (32) internal static options (constant)
 38                               init ("record_quota_overflow", "page_fault_error", "invalid_page_fault",
 39                               "invalid_page_error");
 40 
 41 /*  Based  */
 42 
 43 dcl       1 Aste              aligned like aste based (Astep);
 44 dcl       1 Ptw               aligned like ptw based (Ptwp);
 45 
 46 /*  External  */
 47 
 48 dcl       1 pds$condition_name
 49                               aligned external,
 50             2 len             fixed bin (8) unaligned,
 51             2 chars           char (21) unaligned;
 52 dcl       1 pds$page_fault_data
 53                               aligned like mc external;
 54 dcl       1 pds$signal_data   aligned like mc external;
 55 dcl       sst$rqover          fixed bin (35) external;
 56 
 57 /*  Builtin  */
 58 
 59 dcl       bin                 builtin;
 60 dcl       bit                 builtin;
 61 dcl       length              builtin;
 62 dcl       rtrim               builtin;
 63 dcl       unspec              builtin;
 64 
 65 
 66 %page;
 67           if (Error_Type < 0) | (Error_Type > PAGE_ERROR_MAXTYPE)
 68           then error_type = PAGE_ERROR_INVERROR;
 69           else error_type = Error_Type;
 70 
 71           unspec (pds$signal_data) = unspec (pds$page_fault_data);
 72 
 73           pds$condition_name.len = length (rtrim (SIGNAL_NAME (error_type)));
 74           pds$condition_name.chars = rtrim (SIGNAL_NAME (error_type));
 75 
 76           goto TYPE_SPECIFIC (error_type);
 77 
 78 TYPE_SPECIFIC (0):                                          /* record quota overflow */
 79           pds$signal_data.fim_temp.fcode = bit (bin (record_quota_overflow_sct_index, 17), 17);
 80           pds$signal_data.errcode = sst$rqover;
 81           return;
 82 
 83 TYPE_SPECIFIC (1):                                          /* page I/O error */
 84           pds$signal_data.fim_temp.fcode = bit (bin (page_fault_error_sct_index, 17), 17);
 85           unspec (page_fault_error_code) = ""b;
 86           page_fault_error_code.add = Ptw.add;
 87           page_fault_error_code.add_type = Ptw.add_type;
 88           page_fault_error_code.pvtx = Aste.pvtx;
 89           unspec (pds$signal_data.errcode) = unspec (page_fault_error_code);
 90 
 91           return;
 92 
 93 TYPE_SPECIFIC (2):                                          /* bad machine conditions */
 94 TYPE_SPECIFIC (3):                                          /* Invalid error type */
 95           return;
 96 
 97 /* format: off */
 98 %page;  %include aste;
 99 %page;  %include mc;
100 %page;  %include page_error_types;
101 %page;  %include ptw;
102 %page;  %include static_handlers;
103 
104 end pc_signal;