1 " ***********************************************************
2 " * *
3 " * Copyright, C Honeywell Bull Inc., 1987 *
4 " * *
5 " * Copyright, C Honeywell Information Systems Inc., 1984 *
6 " * *
7 " * Copyright c 1972 by Massachusetts Institute of *
8 " * Technology and Honeywell Information Systems, Inc. *
9 " * *
10 " ***********************************************************
11
12 "
13 " SYSERR - Procedure to call syserr_real after setting up stack frame.
14 " Modified August 1975 by Larry Johnson to add binary and error_code entries
15 " Modified 3/76 by S. H. Webber for new reconfig
16 " Modified 12/80 by J. J. Bongiovanni for multiplexed ring-0 stacks
17 " Modified 4/81 by J. J. Bongiovanni to add checks for wired stack, interrupts masked
18 " Modified 10/83 by Keith Loepere for paged unpaged segments.
19 " Modified 12/21/84 by EJ Sharpe for multiple_binary
20
21 name syserr
22
23 entry syserr
24 entry binary
25 entry error_code
26 entry multiple_binary
27
28 bool die_offset,030000
29
30 " ^L
31
32 include ptw
33
34 " ^L
35
36 include sdw
37
38 " ^L
39
40 include stack_frame
41
42 " ^L
43
44 include stack_header
45 "^L
46 include unpaged_page_tables
47
48 "^L
49 " The main syserr entry is called by ring 0 procedures to type a message on the
50 " operator's console. Its main functions is to transfer this call to syserr_real.
51 " If all the conditions listed below are true then we will also adjust the current
52 " stack so the next frame will be at a high location in the stack. This is done so
53 " the stack history of the procedures which have just returned to the caller of syserr
54 " will not be destroyed. This stack history may be useful in analyzing a dump of
55 " the crash. The conditions which must all be met before the stack is changed are:
56 " 1. The syserr code must be 1. This => a fatal error.
57 " 2. The current stack must be the per-process stack.
58 " 3. The per-process stack must be paged.
59 " 4. The page table lock must NOT be locked.
60 " 5. The current stack must not be wired
61 " 6. Interrupts must not be masked
62
63 syserr:
64 ldx7 0,du set code to be syserr call
65 tra common
66 binary:
67 ldx7 1,du set code to be syserr$binary call
68 tra common
69 error_code:
70 ldx7 2,du set code to be syserr$error_code call
71 tra common
72
73 multiple_binary:
74 ldx7 3,du set code to be syserr$multiple_binary
75
76 common:
77 lda 1,dl check for kill call
78 cmpa ap|2,* ARG 1 = 1
79 tnz no_reset Not a kill call so don't reset
80
81 epaq sp|0 Ptr to stack to AQ
82 eax1 0,au Seg no to X1
83 cmpx1 <pds>|stack_0_ptr Are we on the per-process stack?
84 tnz no_reset
85
86 als 1 Segno * 2
87 ldaq <dseg>|0,au Get SDW of stack
88 arl sdw.add_shift abs addr of stack's page table
89
90 cmpa unpaged_page_tables$0+upt.sst_last_loc check if unpaged
91 tpl no_reset out of sst => unpaged
92 sba unpaged_page_tables$0+upt.sst_absloc offset of stack's PT in SST
93 tmi no_reset
94
95 lda sst$,al PTW for page 0 of stack
96 cana ptw.wired,dl is it wired
97 tnz no_reset yes
98
99 szn sst$ptl is page table locked?
100 tnz no_reset yes
101
102 inhibit on <+><+><+><+><+><+><+><+><+><+><+><+><+><+><+>
103 lxl1 prds$processor_tag
104 lprpab scs$mask_ptr,1
105 xec scs$read_mask,1 read current mask
106 cmpaq scs$sys_level are interrupts masked
107 tze no_reset yes
108 inhibit off <-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
109
110 ldaq sp|stack_frame.next_sp pick up foward ptr
111 staq sp|stack_frame.entry_ptr save a copy
112 ldq die_offset,du Next frame way up in stack.
113 stq sp|stack_frame.next_sp+1 Reset foward ptr
114 stq sb|stack_header.stack_end_ptr+1
115
116 no_reset:
117 tra *+1,7 transfer to correct syserr_real entry
118 tra <syserr_real>|syserr_real
119 tra <syserr_real>|binary
120 tra <syserr_real>|error_code
121 tra <syserr_real>|multiple_binary
122
123 end