1
2
3
4
5
6
7
8
9
10
11
12
13 wired_plm: proc ();
14
15
16
17
18
19
20
21
22 dcl apt_ptr ptr parameter;
23
24 dcl rastep bit (18) aligned;
25 dcl i fixed bin;
26 dcl (astep, ap) ptr;
27 dcl sstp pointer;
28 dcl ptp pointer;
29
30 dcl 1 p based (ap),
31 2 a (0 : 1) bit (18) unaligned;
32
33 dcl page$pread entry (ptr, fixed bin, fixed bin (35));
34 dcl page$lock_ptl entry ();
35 dcl page$unlock_ptl entry ();
36
37 dcl pds$processid bit (36) aligned external static;
38 dcl pds$apt_ptr ptr external static;
39 dcl sst$astsize fixed bin external static;
40 dcl sst$astap pointer external static;
41 dcl sst$cmp pointer external static;
42 dcl sst$wired fixed bin external static;
43 dcl sys_info$system_type fixed bin external static;
44 dcl tcm$loading_page_waits fixed bin (35) external static;
45
46 dcl sst_seg$ external static;
47
48 dcl (addr, addrel, ptr, rel) builtin;
49
50
51
52
53
54
55 wired_plm$load: entry (apt_ptr);
56
57 aptep = apt_ptr;
58 sstp = addr (sst_seg$);
59 ap = addr (apte.asteps);
60
61 call page$lock_ptl;
62
63 do i = 0 to 1;
64 rastep = ap -> p.a (i);
65 if rastep then do;
66 astep = ptr (sstp, rastep);
67 ptp = addrel (astep, sst$astsize);
68
69 call load_this_page ();
70 end;
71 end;
72
73 call page$unlock_ptl;
74
75 return;
76
77
78
79 load_this_page: proc ();
80
81 dcl wired_bit bit (1) aligned;
82 dcl os_bit bit (1) aligned;
83 dcl valid_bit bit (1) aligned;
84 dcl wait_event fixed bin (35);
85
86
87 if sys_info$system_type = ADP_SYSTEM then do;
88 valid_bit = adp_ptw.valid;
89 os_bit = adp_ptw.os;
90 wired_bit = adp_ptw.wired;
91 end;
92
93 else do;
94 valid_bit = l68_ptw.valid;
95 os_bit = l68_ptw.os;
96 wired_bit = l68_ptw.wired;
97 end;
98
99 if ^wired_bit then do;
100 if sys_info$system_type = ADP_SYSTEM then
101 adp_ptw.wired = "1"b;
102 else l68_ptw.wired = "1"b;
103 sst$wired = sst$wired + 1;
104 end;
105
106 if ^valid_bit then do;
107 if os_bit then
108 wait_event = binary (rel (ptp), 18);
109 else call page$pread (astep, 0, wait_event);
110
111 if wait_event > 0 then
112 apte.wait_event = bit (bin (wait_event, 36), 36);
113
114 if wait_event > 262143 then;
115 else do;
116 if sys_info$system_type = ADP_SYSTEM then
117 cmep = addr (sst$cmp -> cma (adp_core_ptw.frame));
118 else cmep = addr (sst$cmp -> cma (l68_core_ptw.frame));
119 cme.notify_requested = "1"b;
120 end;
121
122
123
124 end;
125
126 return;
127 end load_this_page;
128
129 %page; %include apte;
130 %page; %include cmp;
131 %page; %include "ptw.l68";
132 %page; %include "ptw.adp";
133 %page; %include system_types;
134
135 end wired_plm;