]> CyberLeo.Net >> Repos - FreeBSD/releng/8.0.git/blob - sys/ia64/ia64/exception.S
Adjust to reflect 8.0-RELEASE.
[FreeBSD/releng/8.0.git] / sys / ia64 / ia64 / exception.S
1 /*-
2  * Copyright (c) 2003,2004 Marcel Moolenaar
3  * Copyright (c) 2000 Doug Rabson
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25  * SUCH DAMAGE.
26  */
27
28 #include <machine/asm.h>
29 __FBSDID("$FreeBSD$");
30
31 #include <opt_xtrace.h>
32
33 #include <machine/pte.h>
34 #include <assym.s>
35
36 /*
37  * ar.k7 = kernel memory stack
38  * ar.k6 = kernel register stack
39  * ar.k5 = EPC gateway page
40  * ar.k4 = PCPU data
41  */
42
43 #ifdef EXCEPTION_TRACING
44
45         .data
46         .global xtrace, xhead
47 xtrace: .space  1024*5*8
48 xhead:  data8   xtrace
49
50 #define XTRACE(offset)                          \
51 {       .mmi ;                                  \
52         mov     r24=ar.itc ;                    \
53         mov     r25=cr.iip ;                    \
54         mov     r27=offset ;                    \
55 } ;                                             \
56 {       .mlx ;                                  \
57         mov     r28=cr.ifa ;                    \
58         movl    r29=xhead ;;                    \
59 } ;                                             \
60 {       .mmi ;                                  \
61         ld8     r29=[r29] ;;                    \
62         st8     [r29]=r24,8 ;                   \
63         nop     0 ;;                            \
64 } ;                                             \
65 {       .mmi ;                                  \
66         st8     [r29]=r27,8 ;;                  \
67         mov     r24=cr.isr ;                    \
68         add     r27=8,r29 ;;                    \
69 } ;                                             \
70 {       .mmi ;                                  \
71         st8     [r29]=r25,16 ;;                 \
72         st8     [r27]=r28,16 ;                  \
73         mov     r25=pr ;;                       \
74 } ;                                             \
75 {       .mlx ;                                  \
76         st8     [r29]=r24 ;                     \
77         movl    r28=xhead ;;                    \
78 } ;                                             \
79 {       .mii ;                                  \
80         cmp.eq  p15,p0=r27,r28 ;                \
81         addl    r29=1024*5*8,r0 ;;              \
82 (p15)   sub     r27=r28,r29 ;;                  \
83 } ;                                             \
84 {       .mib ;                                  \
85         st8     [r28]=r27 ;                     \
86         mov     pr=r25,0x1ffff ;                \
87         nop     0 ;;                            \
88 }
89
90 #else
91
92 #define XTRACE(offset)
93
94 #endif
95
96         .text
97
98 /*
99  * exception_save: save interrupted state
100  *
101  * Arguments:
102  *      r16     address of bundle that contains the branch. The
103  *              return address will be the next bundle.
104  *      r17     the value to save as ifa in the trapframe. This
105  *              normally is cr.ifa, but some interruptions set
106  *              set cr.iim and not cr.ifa.
107  *
108  * Returns:
109  *      p15     interrupted from user stack
110  *      p14     interrupted from kernel stack
111  *      p13     interrupted from user backing store
112  *      p12     interrupted from kernel backing store
113  *      p11     interrupts were enabled
114  *      p10     interrupts were disabled
115  */
116 ENTRY_NOPROFILE(exception_save, 0)
117 {       .mii
118         mov             r20=ar.unat
119         extr.u          r31=sp,61,3
120         mov             r18=pr
121         ;;
122 }
123 {       .mmi
124         cmp.le          p14,p15=5,r31
125         ;;
126 (p15)   mov             r23=ar.k7               // kernel memory stack
127 (p14)   mov             r23=sp
128         ;;
129 }
130 {       .mii
131         mov             r21=ar.rsc
132         add             r30=-SIZEOF_TRAPFRAME,r23
133         ;;
134         dep             r30=0,r30,0,10
135         ;;
136 }
137 {       .mmi
138         mov             ar.rsc=0
139         sub             r19=r23,r30
140         add             r31=8,r30
141         ;;
142 }
143 {       .mlx
144         mov             r22=cr.iip
145         movl            r26=exception_save_restart
146         ;;
147 }
148
149         /*
150          * We have a 1KB aligned trapframe, pointed to by sp. If we write
151          * to the trapframe, we may trigger a data nested TLB fault. By
152          * aligning the trapframe on a 1KB boundary, we guarantee that if
153          * we get a data nested TLB fault, it will be on the very first
154          * write. Since the data nested TLB fault does not preserve any
155          * state, we have to be careful what we clobber. Consequently, we
156          * have to be careful what we use here. Below a list of registers
157          * that are currently alive:
158          *      r16,r17=arguments
159          *      r18=pr, r19=length, r20=unat, r21=rsc, r22=iip, r23=TOS
160          *      r26=restart point
161          *      r30,r31=trapframe pointers
162          *      p14,p15=memory stack switch
163          */
164 exception_save_restart:
165 {       .mmi
166         st8             [r30]=r19,16            // length
167         st8             [r31]=r0,16             // flags
168         add             r19=16,r19
169         ;;
170 }
171 {       .mmi
172         st8.spill       [r30]=sp,16             // sp
173         st8             [r31]=r20,16            // unat
174         sub             sp=r23,r19
175         ;;
176 }
177 {       .mmi
178         mov             r19=ar.rnat
179         mov             r20=ar.bspstore
180         mov             r23=rp
181         ;;
182 }
183         // r18=pr, r19=rnat, r20=bspstore, r21=rsc, r22=iip, r23=rp
184 {       .mmi
185         st8             [r30]=r23,16            // rp
186         st8             [r31]=r18,16            // pr
187         mov             r24=ar.pfs
188         ;;
189 }
190 {       .mmb
191         st8             [r30]=r24,16            // pfs
192         st8             [r31]=r20,16            // bspstore
193         cover
194         ;;
195 }
196 {       .mmi
197         mov             r18=ar.fpsr
198         mov             r23=cr.ipsr
199         extr.u          r24=r20,61,3
200         ;;
201 }
202         // r18=fpsr, r19=rnat, r20=bspstore, r21=rsc, r22=iip, r23=ipsr
203 {       .mmi
204         st8             [r30]=r19,16            // rnat
205         st8             [r31]=r0,16             // __spare
206         cmp.le          p12,p13=5,r24
207         ;;
208 }
209 {       .mmi
210         st8.spill       [r30]=r13,16            // tp
211         st8             [r31]=r21,16            // rsc
212         tbit.nz         p11,p10=r23,14          // p11=interrupts enabled
213         ;;
214 }
215 {       .mmi
216 (p13)   mov             r21=ar.k6               // kernel register stack
217         ;;
218         st8             [r30]=r18,16            // fpsr
219 (p13)   dep             r20=r20,r21,0,9         // align dirty registers
220         ;;
221 }
222         // r20=bspstore, r22=iip, r23=ipsr
223 {       .mmi
224         st8             [r31]=r23,16            // psr
225 (p13)   mov             ar.bspstore=r20
226         nop             0
227         ;;
228 }
229 {       .mmi
230         mov             r18=ar.bsp
231         ;;
232         mov             r19=cr.ifs
233         sub             r18=r18,r20
234         ;;
235 }
236 {       .mmi
237         st8.spill       [r30]=gp,16             // gp
238         st8             [r31]=r18,16            // ndirty
239         nop             0
240         ;;
241 }
242         // r19=ifs, r22=iip
243 {       .mmi
244         st8             [r30]=r19,16            // cfm
245         st8             [r31]=r22,16            // iip
246         nop             0
247         ;;
248 }
249 {       .mmi
250         st8             [r30]=r17               // ifa
251         mov             r18=cr.isr
252         add             r29=16,r30
253         ;;
254 }
255 {       .mmi
256         st8             [r31]=r18               // isr
257         add             r30=8,r29
258         add             r31=16,r29
259         ;;
260 }
261 {       .mmi
262         .mem.offset     0,0
263         st8.spill       [r30]=r2,16             // r2
264         .mem.offset     8,0
265         st8.spill       [r31]=r3,16             // r3
266         add             r2=9*8,r29
267         ;;
268 }
269 {       .mmi
270         .mem.offset     0,0
271         st8.spill       [r30]=r8,16             // r8
272         .mem.offset     8,0
273         st8.spill       [r31]=r9,16             // r9
274         add             r3=8,r2
275         ;;
276 }
277 {       .mmi
278         .mem.offset     0,0
279         st8.spill       [r30]=r10,16            // r10
280         .mem.offset     8,0
281         st8.spill       [r31]=r11,16            // r11
282         add             r8=16,r16
283         ;;
284 }
285 {       .mmi
286         .mem.offset     0,0
287         st8.spill       [r30]=r14               // r14
288         .mem.offset     8,0
289         st8.spill       [r31]=r15               // r15
290         mov             r9=r29
291 }
292 {       .mmb
293         mov             r10=ar.csd
294         mov             r11=ar.ssd
295         bsw.1
296         ;;
297 }
298 {       .mmi
299         .mem.offset     0,0
300         st8.spill       [r2]=r16,16             // r16
301         .mem.offset     8,0
302         st8.spill       [r3]=r17,16             // r17
303         mov             r14=b6
304         ;;
305 }
306 {       .mmi
307         .mem.offset     0,0
308         st8.spill       [r2]=r18,16             // r18
309         .mem.offset     8,0
310         st8.spill       [r3]=r19,16             // r19
311         mov             r15=b7
312         ;;
313 }
314 {       .mmi
315         .mem.offset     0,0
316         st8.spill       [r2]=r20,16             // r20
317         .mem.offset     8,0
318         st8.spill       [r3]=r21,16             // r21
319         mov             b7=r8
320         ;;
321 }
322 {       .mmi
323         .mem.offset     0,0
324         st8.spill       [r2]=r22,16             // r22
325         .mem.offset     8,0
326         st8.spill       [r3]=r23,16             // r23
327         ;;
328 }
329
330         .mem.offset     0,0
331         st8.spill       [r2]=r24,16             // r24
332         .mem.offset     8,0
333         st8.spill       [r3]=r25,16             // r25
334         ;;
335         .mem.offset     0,0
336         st8.spill       [r2]=r26,16             // r26
337         .mem.offset     8,0
338         st8.spill       [r3]=r27,16             // r27
339         ;;
340         .mem.offset     0,0
341         st8.spill       [r2]=r28,16             // r28
342         .mem.offset     8,0
343         st8.spill       [r3]=r29,16             // r29
344         ;;
345         .mem.offset     0,0
346         st8.spill       [r2]=r30,16             // r30
347         .mem.offset     8,0
348         st8.spill       [r3]=r31,16             // r31
349         ;;
350
351 {       .mmi
352         st8             [r2]=r14,16             // b6
353         mov             r17=ar.unat
354         nop             0
355         ;;
356 }
357 {       .mmi
358         st8             [r3]=r15,16             // b7
359         mov             r16=ar.ccv
360         nop             0
361         ;;
362 }
363 {       .mmi
364         st8             [r2]=r16,16             // ccv
365         st8             [r3]=r10,16             // csd
366         nop             0
367         ;;
368 }
369 {       .mmi
370         st8             [r2]=r11,24             // ssd
371         st8             [r9]=r17
372         nop             0
373         ;;
374 }
375
376         stf.spill       [r3]=f6,32              // f6
377         stf.spill       [r2]=f7,32              // f7
378         ;;
379         stf.spill       [r3]=f8,32              // f8
380         stf.spill       [r2]=f9,32              // f9
381         ;;
382         stf.spill       [r3]=f10,32             // f10
383         stf.spill       [r2]=f11,32             // f11
384         ;;
385         stf.spill       [r3]=f12,32             // f12
386         stf.spill       [r2]=f13,32             // f13
387         ;;
388         stf.spill       [r3]=f14                // f14
389         stf.spill       [r2]=f15                // f15
390         ;;
391 {       .mmi
392         mov             ar.rsc=3
393         mov             r13=ar.k4
394         nop             0
395         ;;
396 }
397 {       .mlx
398         ssm             psr.ic|psr.dfh
399         movl            gp=__gp
400         ;;
401 }
402 {       .mfb
403         srlz.d
404         nop             0
405         br.sptk         b7
406         ;;
407 }
408 END(exception_save)
409
410 /*
411  * exception_restore:   restore interrupted state
412  *
413  * Arguments:
414  *      sp+16   trapframe pointer
415  */
416 ENTRY_NOPROFILE(exception_restore, 0)
417 {       .mmi
418         rsm             psr.i
419         add             r3=SIZEOF_TRAPFRAME-16,sp
420         add             r2=SIZEOF_TRAPFRAME,sp
421         ;;
422 }
423 {       .mmi
424         srlz.d
425         add             r8=SIZEOF_SPECIAL+32,sp
426         nop             0
427         ;;
428 }
429         // The next load can trap. Let it be...
430         ldf.fill        f15=[r2],-32            // f15
431         ldf.fill        f14=[r3],-32            // f14
432         add             sp=16,sp
433         ;;
434         ldf.fill        f13=[r2],-32            // f13
435         ldf.fill        f12=[r3],-32            // f12
436         ;;
437         ldf.fill        f11=[r2],-32            // f11
438         ldf.fill        f10=[r3],-32            // f10
439         ;;
440         ldf.fill        f9=[r2],-32             // f9
441         ldf.fill        f8=[r3],-32             // f8
442         ;;
443         ldf.fill        f7=[r2],-24             // f7
444         ldf.fill        f6=[r3],-16             // f6
445         ;;
446
447 {       .mmi
448         ld8             r8=[r8]                 // unat (after)
449         ;;
450         mov             ar.unat=r8
451         nop             0
452         ;;
453 }
454
455         ld8             r10=[r2],-16            // ssd
456         ld8             r11=[r3],-16            // csd
457         ;;
458         mov             ar.ssd=r10
459         mov             ar.csd=r11
460
461         ld8             r14=[r2],-16            // ccv
462         ld8             r15=[r3],-16            // b7
463         ;;
464
465 {       .mmi
466         mov             ar.ccv=r14
467         ld8             r8=[r2],-16             // b6
468         mov             b7=r15
469         ;;
470 }
471 {       .mmi
472         ld8.fill        r31=[r3],-16            // r31
473         ld8.fill        r30=[r2],-16            // r30
474         mov             b6=r8
475         ;;
476 }
477
478         ld8.fill        r29=[r3],-16            // r29
479         ld8.fill        r28=[r2],-16            // r28
480         ;;
481         ld8.fill        r27=[r3],-16            // r27
482         ld8.fill        r26=[r2],-16            // r26
483         ;;
484         ld8.fill        r25=[r3],-16            // r25
485         ld8.fill        r24=[r2],-16            // r24
486         ;;
487         ld8.fill        r23=[r3],-16            // r23
488         ld8.fill        r22=[r2],-16            // r22
489         ;;
490         ld8.fill        r21=[r3],-16            // r21
491         ld8.fill        r20=[r2],-16            // r20
492         ;;
493         ld8.fill        r19=[r3],-16            // r19
494         ld8.fill        r18=[r2],-16            // r18
495         ;;
496
497 {       .mmb
498         ld8.fill        r17=[r3],-16            // r17
499         ld8.fill        r16=[r2],-16            // r16
500         bsw.0
501         ;;
502 }
503 {       .mmi
504         ld8.fill        r15=[r3],-16            // r15
505         ld8.fill        r14=[r2],-16            // r14
506         add             r31=16,sp
507         ;;
508 }
509 {       .mmi
510         ld8             r16=[sp]                // tf_length
511         ld8.fill        r11=[r3],-16            // r11
512         add             r30=24,sp
513         ;;
514 }
515 {       .mmi
516         ld8.fill        r10=[r2],-16            // r10
517         ld8.fill        r9=[r3],-16             // r9
518         add             r16=r16,sp              // ar.k7
519         ;;
520 }
521 {       .mmi
522         ld8.fill        r8=[r2],-16             // r8
523         ld8.fill        r3=[r3]                 // r3
524         ;;
525 }
526         // We want nested TLB faults from here on...
527         rsm             psr.ic|psr.i
528         ld8.fill        r2=[r2]                 // r2
529         nop             0
530         ;;
531         srlz.d
532         ld8.fill        sp=[r31],16             // sp
533         nop             0
534         ;;
535
536         ld8             r17=[r30],16            // unat
537         ld8             r29=[r31],16            // rp
538         ;;
539         ld8             r18=[r30],16            // pr
540         ld8             r28=[r31],16            // pfs
541         mov             rp=r29
542         ;;
543         ld8             r20=[r30],24            // bspstore
544         ld8             r21=[r31],24            // rnat
545         mov             ar.pfs=r28
546         ;;
547         ld8.fill        r29=[r30],16            // tp
548         ld8             r22=[r31],16            // rsc
549         ;;
550 {       .mmi
551         ld8             r23=[r30],16            // fpsr
552         ld8             r24=[r31],16            // psr
553         extr.u          r28=r20,61,3
554         ;;
555 }
556 {       .mmi
557         ld8.fill        r1=[r30],16             // gp
558         ld8             r25=[r31],16            // ndirty
559         cmp.le          p14,p15=5,r28
560         ;;
561 }
562 {       .mmb
563         ld8             r26=[r30]               // cfm
564         ld8             r19=[r31]               // ip
565         nop             0
566         ;;
567 }
568 {       .mib
569         // Switch register stack
570         alloc           r30=ar.pfs,0,0,0,0      // discard current frame
571         shl             r31=r25,16              // value for ar.rsc
572         nop             0
573         ;;
574 }
575         // The loadrs can fault if the backing store is not currently
576         // mapped. We assured forward progress by getting everything we
577         // need from the trapframe so that we don't care if the CPU
578         // purges that translation when it needs to insert a new one for
579         // the backing store.
580 {       .mmi
581         mov             ar.rsc=r31              // setup for loadrs
582         mov             ar.k7=r16
583 (p15)   mov             r13=r29
584         ;;
585 }
586 exception_restore_restart:
587 {       .mmi
588         mov             r30=ar.bspstore
589         ;;
590         loadrs                                  // load user regs
591         nop             0
592         ;;
593 }
594 {       .mmi
595         mov             r31=ar.bspstore
596         ;;
597         mov             ar.bspstore=r20
598         dep             r31=0,r31,0,13          // 8KB aligned
599         ;;
600 }
601 {       .mmb
602         mov             ar.k6=r31
603         mov             ar.rnat=r21
604         nop             0
605         ;;
606 }
607 {       .mmb
608         mov             ar.unat=r17
609         mov             cr.iip=r19
610         nop             0
611 }
612 {       .mmi
613         mov             cr.ipsr=r24
614         mov             cr.ifs=r26
615         mov             pr=r18,0x1ffff
616         ;;
617 }
618 {       .mmb
619         mov             ar.rsc=r22
620         mov             ar.fpsr=r23
621         rfi
622         ;;
623 }
624 END(exception_restore)
625
626 /*
627  * Call exception_save_regs to preserve the interrupted state in a
628  * trapframe. Note that we don't use a call instruction because we
629  * must be careful not to lose track of the RSE state. We then call
630  * trap() with the value of _n_ as an argument to handle the
631  * exception. We arrange for trap() to return to exception_restore
632  * which will restore the interrupted state before executing an rfi to
633  * resume it.
634  */
635 #define CALL(_func_, _n_, _ifa_)                \
636 {       .mib ;                                  \
637         mov             r17=_ifa_ ;             \
638         mov             r16=ip ;                \
639         br.sptk         exception_save ;;       \
640 } ;                                             \
641 {       .mmi ;                                  \
642         alloc           r15=ar.pfs,0,0,2,0 ;;   \
643 (p11)   ssm             psr.i ;                 \
644         mov             out0=_n_ ;;             \
645 } ;                                             \
646 {       .mib ;                                  \
647 (p11)   srlz.d ;                                \
648         add             out1=16,sp ;            \
649         br.call.sptk    rp=_func_ ;;            \
650 } ;                                             \
651 {       .mfb ;                                  \
652         nop             0 ;                     \
653         nop             0 ;                     \
654         br.sptk         exception_restore ;;    \
655 }
656
657 #define IVT_ENTRY(name, offset)                 \
658         .org    ia64_vector_table + offset;     \
659         .global ivt_##name;                     \
660         .proc   ivt_##name;                     \
661         .prologue;                              \
662         .unwabi @svr4, 'I';                     \
663         .save   rp, r0;                         \
664         .body;                                  \
665 ivt_##name:                                     \
666         XTRACE(offset)
667
668 #define IVT_END(name)                           \
669         .endp   ivt_##name
670
671 #ifdef COMPAT_IA32
672 #define IA32_TRAP       ia32_trap
673 #else
674 #define IA32_TRAP       trap
675 #endif
676
677 /*
678  * The IA64 Interrupt Vector Table (IVT) contains 20 slots with 64
679  * bundles per vector and 48 slots with 16 bundles per vector.
680  */
681
682         .section .text.ivt,"ax"
683
684         .align  32768
685         .global ia64_vector_table
686         .size   ia64_vector_table, 32768
687 ia64_vector_table:
688
689 IVT_ENTRY(VHPT_Translation, 0x0000)
690         CALL(trap, 0, cr.ifa)
691 IVT_END(VHPT_Translation)
692
693 IVT_ENTRY(Instruction_TLB, 0x0400)
694         mov     r16=cr.ifa
695         mov     r17=pr
696         ;;
697         thash   r18=r16
698         ttag    r19=r16
699         ;;
700         add     r21=16,r18              // tag
701         add     r20=24,r18              // collision chain
702         ;; 
703         ld8     r21=[r21]               // check VHPT tag
704         ld8     r20=[r20]               // bucket head
705         ;;
706         cmp.ne  p15,p0=r21,r19
707 (p15)   br.dpnt.few 1f
708         ;;
709         ld8     r21=[r18]               // read pte
710         ;;
711         itc.i   r21                     // insert pte
712         mov     pr=r17,0x1ffff
713         ;;
714         rfi                             // done
715         ;;
716 1:      rsm     psr.dt                  // turn off data translations
717         dep     r20=0,r20,61,3          // convert vhpt ptr to physical
718         ;;
719         srlz.d                          // serialize
720         ld8     r20=[r20]               // first entry
721         ;;
722 2:      cmp.eq  p15,p0=r0,r20           // done?
723 (p15)   br.cond.spnt.few 9f             // bail if done
724         ;;
725         add     r21=16,r20              // tag location
726         ;;
727         ld8     r21=[r21]               // read tag
728         ;;
729         cmp.ne  p15,p0=r21,r19          // compare tags
730 (p15)   br.cond.sptk.few 3f             // if not, read next in chain
731         ;;
732         ld8     r21=[r20]               // read pte
733         mov     r22=PTE_ACCESSED
734         ;;
735         or      r21=r21,r22
736         ;;
737         st8     [r20]=r21,8
738         ;; 
739         ld8     r22=[r20]               // read rest of pte
740         ;;
741         dep     r18=0,r18,61,3          // convert vhpt ptr to physical
742         ;;
743         add     r20=16,r18              // address of tag
744         ;;
745         ld8.acq r23=[r20]               // read old tag
746         ;;
747         dep     r23=-1,r23,63,1         // set ti bit
748         ;;
749         st8.rel [r20]=r23               // store old tag + ti
750         ;;
751         mf                              // make sure everyone sees
752         ;;
753         st8     [r18]=r21,8             // store pte
754         ;;
755         st8     [r18]=r22,8
756         ;;
757         st8.rel [r18]=r19               // store new tag
758         ;;
759         itc.i   r21                     // and place in TLB
760         ssm     psr.dt
761         ;; 
762         srlz.d
763         mov     pr=r17,0x1ffff          // restore predicates
764         rfi
765         ;;
766 3:      add     r20=24,r20              // next in chain
767         ;;
768         ld8     r20=[r20]               // read chain
769         br.cond.sptk.few 2b             // loop
770         ;;
771 9:      ssm     psr.dt
772         mov     pr=r17,0x1ffff          // restore predicates
773         ;;
774         srlz.d
775         ;; 
776         CALL(trap, 20, cr.ifa)          // Page Not Present trap
777 IVT_END(Instruction_TLB)
778
779 IVT_ENTRY(Data_TLB, 0x0800)
780         mov     r16=cr.ifa
781         mov     r17=pr
782         ;;
783         thash   r18=r16
784         ttag    r19=r16
785         ;;
786         add     r21=16,r18              // tag
787         add     r20=24,r18              // collision chain
788         ;; 
789         ld8     r21=[r21]               // check VHPT tag
790         ld8     r20=[r20]               // bucket head
791         ;;
792         cmp.ne  p15,p0=r21,r19
793 (p15)   br.dpnt.few 1f
794         ;;
795         ld8     r21=[r18]               // read pte
796         ;;
797         itc.d   r21                     // insert pte
798         mov     pr=r17,0x1ffff
799         ;;
800         rfi                             // done
801         ;;
802 1:      rsm     psr.dt                  // turn off data translations
803         dep     r20=0,r20,61,3          // convert vhpt ptr to physical
804         ;; 
805         srlz.d                          // serialize
806         ld8     r20=[r20]               // first entry
807         ;;
808 2:      cmp.eq  p15,p0=r0,r20           // done?
809 (p15)   br.cond.spnt.few 9f             // bail if done
810         ;;
811         add     r21=16,r20              // tag location
812         ;;
813         ld8     r21=[r21]               // read tag
814         ;;
815         cmp.ne  p15,p0=r21,r19          // compare tags
816 (p15)   br.cond.sptk.few 3f             // if not, read next in chain
817         ;;
818         ld8     r21=[r20]               // read pte
819         mov     r22=PTE_ACCESSED
820         ;;
821         or      r21=r21,r22
822         ;;
823         st8     [r20]=r21,8
824         ;; 
825         ld8     r22=[r20]               // read rest of pte
826         ;;
827         dep     r18=0,r18,61,3          // convert vhpt ptr to physical
828         ;;
829         add     r20=16,r18              // address of tag
830         ;;
831         ld8.acq r23=[r20]               // read old tag
832         ;;
833         dep     r23=-1,r23,63,1         // set ti bit
834         ;;
835         st8.rel [r20]=r23               // store old tag + ti
836         ;;
837         mf                              // make sure everyone sees
838         ;;
839         st8     [r18]=r21,8             // store pte
840         ;;
841         st8     [r18]=r22,8
842         ;;
843         st8.rel [r18]=r19               // store new tag
844         ;;
845         itc.d   r21                     // and place in TLB
846         ssm     psr.dt
847         ;; 
848         srlz.d
849         mov     pr=r17,0x1ffff          // restore predicates
850         rfi
851         ;;
852 3:      add     r20=24,r20              // next in chain
853         ;;
854         ld8     r20=[r20]               // read chain
855         br.cond.sptk.few 2b             // loop
856         ;;
857 9:      ssm     psr.dt
858         mov     pr=r17,0x1ffff          // restore predicates
859         ;;
860         srlz.d
861         ;; 
862         CALL(trap, 20, cr.ifa)          // Page Not Present trap
863 IVT_END(Data_TLB)
864
865 IVT_ENTRY(Alternate_Instruction_TLB, 0x0c00)
866         mov     r16=cr.ifa              // where did it happen
867         mov     r18=pr                  // save predicates
868         ;;
869         extr.u  r17=r16,61,3            // get region number
870         ;;
871         cmp.ge  p13,p0=5,r17            // RR0-RR5?
872         cmp.eq  p15,p14=7,r17           // RR7->p15, RR6->p14
873 (p13)   br.spnt 9f
874         ;;
875 (p15)   movl    r17=PTE_PRESENT+PTE_MA_WB+PTE_ACCESSED+PTE_DIRTY+PTE_PL_KERN+ \
876                         PTE_AR_RX+PTE_ED
877 (p14)   movl    r17=PTE_PRESENT+PTE_MA_UC+PTE_ACCESSED+PTE_DIRTY+PTE_PL_KERN+ \
878                         PTE_AR_RX
879         ;;
880         dep     r16=0,r16,50,14         // clear bits above PPN
881         ;;
882         dep     r16=r17,r16,0,12        // put pte bits in 0..11
883         ;;
884         itc.i   r16
885         mov     pr=r18,0x1ffff          // restore predicates
886         ;;
887         rfi
888         ;;
889 9:      mov     pr=r18,0x1ffff          // restore predicates
890         CALL(trap, 3, cr.ifa)
891 IVT_END(Alternate_Instruction_TLB)
892
893 IVT_ENTRY(Alternate_Data_TLB, 0x1000)
894         mov     r16=cr.ifa              // where did it happen
895         mov     r18=pr                  // save predicates
896         ;;
897         extr.u  r17=r16,61,3            // get region number
898         ;;
899         cmp.ge  p13,p0=5,r17            // RR0-RR5?
900         cmp.eq  p15,p14=7,r17           // RR7->p15, RR6->p14
901 (p13)   br.spnt 9f
902         ;;
903 (p15)   movl    r17=PTE_PRESENT+PTE_MA_WB+PTE_ACCESSED+PTE_DIRTY+PTE_PL_KERN+ \
904                         PTE_AR_RW+PTE_ED
905 (p14)   movl    r17=PTE_PRESENT+PTE_MA_UC+PTE_ACCESSED+PTE_DIRTY+PTE_PL_KERN+ \
906                         PTE_AR_RW
907         ;;
908         dep     r16=0,r16,50,14         // clear bits above PPN
909         ;;
910         dep     r16=r17,r16,0,12        // put pte bits in 0..11
911         ;;
912         itc.d   r16
913         mov     pr=r18,0x1ffff          // restore predicates
914         ;;
915         rfi
916         ;;
917 9:      mov     pr=r18,0x1ffff          // restore predicates
918         CALL(trap, 4, cr.ifa)
919 IVT_END(Alternate_Data_TLB)
920
921 IVT_ENTRY(Data_Nested_TLB, 0x1400)
922         // See exception_save_restart and exception_restore_restart for the
923         // contexts that may cause a data nested TLB. We can only use the
924         // banked general registers and predicates, but don't use:
925         //      p14 & p15       -       Set in exception save
926         //      r16 & r17       -       Arguments to exception save
927         //      r30             -       Faulting address (modulo page size)
928         // We assume r30 has the virtual addresses that relate to the data
929         // nested TLB fault. The address does not have to be exact, as long
930         // as it's in the same page. We use physical addressing to avoid
931         // double nested faults. Since all virtual addresses we encounter
932         // here are direct mapped region 7 addresses, we have no problem
933         // constructing physical addresses.
934 {       .mlx
935         rsm             psr.dt
936         movl            r27=ia64_kptdir
937         ;;
938 }
939 {       .mii
940         srlz.d
941         dep             r27=0,r27,61,3
942         ;;
943         extr.u          r28=r30,3*PAGE_SHIFT-8, PAGE_SHIFT-3    // dir L0 index
944 }
945 {       .mii
946         ld8             r27=[r27]                               // dir L0 page
947         extr.u          r29=r30,2*PAGE_SHIFT-5, PAGE_SHIFT-3    // dir L1 index
948         ;;
949         dep             r27=0,r27,61,3
950         ;;
951 }
952 {       .mmi
953         shladd          r27=r28,3,r27
954         ;;
955         ld8             r27=[r27]                               // dir L1 page
956         extr.u          r28=r30,PAGE_SHIFT,PAGE_SHIFT-5         // pte index
957         ;;
958 }
959 {       .mmi
960         shladd          r27=r29,3,r27
961         ;;
962         mov             r29=rr[r30]
963         dep             r27=0,r27,61,3
964         ;;
965 }
966 {       .mii
967         ld8             r27=[r27]                               // pte page
968         shl             r28=r28,5
969         dep             r29=0,r29,0,2
970         ;;
971 }
972 {       .mmi
973         add             r27=r28,r27
974         ;;
975         mov             cr.ifa=r30
976         dep             r27=0,r27,61,3
977         ;;
978 }
979 {       .mmi
980         ld8             r28=[r27]               // pte
981         ;;
982         mov             cr.itir=r29
983         or              r28=PTE_DIRTY+PTE_ACCESSED,r28
984         ;;
985 }
986 {       .mlx
987         st8             [r27]=r28
988         movl            r29=exception_save_restart
989         ;;
990 }
991 {       .mmi
992         itc.d           r28
993         ;;
994         ssm             psr.dt
995         cmp.eq          p12,p13=r26,r29
996         ;;
997 }
998 {       .mbb
999         srlz.d
1000 (p12)   br.sptk         exception_save_restart
1001 (p13)   br.sptk         exception_restore_restart
1002         ;;
1003 }
1004 IVT_END(Data_Nested_TLB)
1005
1006 IVT_ENTRY(Instruction_Key_Miss, 0x1800)
1007         CALL(trap, 6, cr.ifa)
1008 IVT_END(Instruction_Key_Miss)
1009
1010 IVT_ENTRY(Data_Key_Miss, 0x1c00)
1011         CALL(trap, 7, cr.ifa)
1012 IVT_END(Data_Key_Miss)
1013
1014 IVT_ENTRY(Dirty_Bit, 0x2000)
1015         mov     r16=cr.ifa
1016         mov     r17=pr
1017         ;;
1018         thash   r18=r16
1019         ;;
1020         ttag    r19=r16
1021         add     r20=24,r18              // collision chain
1022         ;; 
1023         ld8     r20=[r20]               // bucket head
1024         ;;
1025         rsm     psr.dt                  // turn off data translations
1026         dep     r20=0,r20,61,3          // convert vhpt ptr to physical
1027         ;;
1028         srlz.d                          // serialize
1029         ld8     r20=[r20]               // first entry
1030         ;;
1031 1:      cmp.eq  p15,p0=r0,r20           // done?
1032 (p15)   br.cond.spnt.few 9f             // bail if done
1033         ;;
1034         add     r21=16,r20              // tag location
1035         ;;
1036         ld8     r21=[r21]               // read tag
1037         ;;
1038         cmp.ne  p15,p0=r21,r19          // compare tags
1039 (p15)   br.cond.sptk.few 2f             // if not, read next in chain
1040         ;;
1041         ld8     r21=[r20]               // read pte
1042         mov     r22=PTE_DIRTY+PTE_ACCESSED
1043         ;;
1044         or      r21=r22,r21             // set dirty & access bit
1045         ;;
1046         st8     [r20]=r21,8             // store back
1047         ;; 
1048         ld8     r22=[r20]               // read rest of pte
1049         ;;
1050         dep     r18=0,r18,61,3          // convert vhpt ptr to physical
1051         ;;
1052         add     r20=16,r18              // address of tag
1053         ;;
1054         ld8.acq r23=[r20]               // read old tag
1055         ;;
1056         dep     r23=-1,r23,63,1         // set ti bit
1057         ;;
1058         st8.rel [r20]=r23               // store old tag + ti
1059         ;;
1060         mf                              // make sure everyone sees
1061         ;;
1062         st8     [r18]=r21,8             // store pte
1063         ;;
1064         st8     [r18]=r22,8
1065         ;;
1066         st8.rel [r18]=r19               // store new tag
1067         ;;
1068         itc.d   r21                     // and place in TLB
1069         ssm     psr.dt
1070         ;; 
1071         srlz.d
1072         mov     pr=r17,0x1ffff          // restore predicates
1073         rfi
1074         ;;
1075 2:      add     r20=24,r20              // next in chain
1076         ;;
1077         ld8     r20=[r20]               // read chain
1078         br.cond.sptk.few 1b             // loop
1079         ;;
1080 9:      ssm     psr.dt
1081         mov     pr=r17,0x1ffff          // restore predicates
1082         ;;
1083         srlz.d
1084         ;;
1085         CALL(trap, 8, cr.ifa)                   // die horribly
1086 IVT_END(Dirty_Bit)
1087
1088 IVT_ENTRY(Instruction_Access_Bit, 0x2400)
1089         mov     r16=cr.ifa
1090         mov     r17=pr
1091         ;;
1092         thash   r18=r16
1093         ;;
1094         ttag    r19=r16
1095         add     r20=24,r18              // collision chain
1096         ;; 
1097         ld8     r20=[r20]               // bucket head
1098         ;;
1099         rsm     psr.dt                  // turn off data translations
1100         dep     r20=0,r20,61,3          // convert vhpt ptr to physical
1101         ;;
1102         srlz.d                          // serialize
1103         ld8     r20=[r20]               // first entry
1104         ;;
1105 1:      cmp.eq  p15,p0=r0,r20           // done?
1106 (p15)   br.cond.spnt.few 9f             // bail if done
1107         ;;
1108         add     r21=16,r20              // tag location
1109         ;;
1110         ld8     r21=[r21]               // read tag
1111         ;;
1112         cmp.ne  p15,p0=r21,r19          // compare tags
1113 (p15)   br.cond.sptk.few 2f             // if not, read next in chain
1114         ;;
1115         ld8     r21=[r20]               // read pte
1116         mov     r22=PTE_ACCESSED
1117         ;;
1118         or      r21=r22,r21             // set accessed bit
1119         ;;
1120         st8     [r20]=r21,8             // store back
1121         ;;
1122         ld8     r22=[r20]               // read rest of pte
1123         ;;
1124         dep     r18=0,r18,61,3          // convert vhpt ptr to physical
1125         ;;
1126         add     r20=16,r18              // address of tag
1127         ;;
1128         ld8.acq r23=[r20]               // read old tag
1129         ;;
1130         dep     r23=-1,r23,63,1         // set ti bit
1131         ;;
1132         st8.rel [r20]=r23               // store old tag + ti
1133         ;;
1134         mf                              // make sure everyone sees
1135         ;;
1136         st8     [r18]=r21,8             // store pte
1137         ;;
1138         st8     [r18]=r22,8
1139         ;;
1140         st8.rel [r18]=r19               // store new tag
1141         ;;
1142         itc.i   r21                     // and place in TLB
1143         ssm     psr.dt
1144         ;; 
1145         srlz.d
1146         mov     pr=r17,0x1ffff          // restore predicates
1147         rfi                             // walker will retry the access
1148         ;;
1149 2:      add     r20=24,r20              // next in chain
1150         ;;
1151         ld8     r20=[r20]               // read chain
1152         br.cond.sptk.few 1b             // loop
1153         ;;
1154 9:      ssm     psr.dt
1155         mov     pr=r17,0x1ffff          // restore predicates
1156         ;;
1157         srlz.d
1158         ;;
1159         CALL(trap, 9, cr.ifa)
1160 IVT_END(Instruction_Access_Bit)
1161
1162 IVT_ENTRY(Data_Access_Bit, 0x2800)
1163         mov     r16=cr.ifa
1164         mov     r17=pr
1165         ;;
1166         thash   r18=r16
1167         ;;
1168         ttag    r19=r16
1169         add     r20=24,r18              // collision chain
1170         ;;
1171         ld8     r20=[r20]               // bucket head
1172         ;;
1173         rsm     psr.dt                  // turn off data translations
1174         dep     r20=0,r20,61,3          // convert vhpt ptr to physical
1175         ;;
1176         srlz.d                          // serialize
1177         ld8     r20=[r20]               // first entry
1178         ;;
1179 1:      cmp.eq  p15,p0=r0,r20           // done?
1180 (p15)   br.cond.spnt.few 9f             // bail if done
1181         ;;
1182         add     r21=16,r20              // tag location
1183         ;;
1184         ld8     r21=[r21]               // read tag
1185         ;;
1186         cmp.ne  p15,p0=r21,r19          // compare tags
1187 (p15)   br.cond.sptk.few 2f             // if not, read next in chain
1188         ;;
1189         ld8     r21=[r20]               // read pte
1190         mov     r22=PTE_ACCESSED
1191         ;;
1192         or      r21=r22,r21             // set accessed bit
1193         ;;
1194         st8     [r20]=r21,8             // store back
1195         ;; 
1196         ld8     r22=[r20]               // read rest of pte
1197         ;;
1198         dep     r18=0,r18,61,3          // convert vhpt ptr to physical
1199         ;;
1200         add     r20=16,r18              // address of tag
1201         ;;
1202         ld8.acq r23=[r20]               // read old tag
1203         ;;
1204         dep     r23=-1,r23,63,1         // set ti bit
1205         ;;
1206         st8.rel [r20]=r23               // store old tag + ti
1207         ;;
1208         mf                              // make sure everyone sees
1209         ;;
1210         st8     [r18]=r21,8             // store pte
1211         ;;
1212         st8     [r18]=r22,8
1213         ;;
1214         st8.rel [r18]=r19               // store new tag
1215         ;;
1216         itc.d   r21                     // and place in TLB
1217         ssm     psr.dt
1218         ;; 
1219         srlz.d
1220         mov     pr=r17,0x1ffff          // restore predicates
1221         rfi                             // walker will retry the access
1222         ;;
1223 2:      add     r20=24,r20              // next in chain
1224         ;;
1225         ld8     r20=[r20]               // read chain
1226         br.cond.sptk.few 1b             // loop
1227         ;;
1228 9:      ssm     psr.dt
1229         mov     pr=r17,0x1ffff          // restore predicates
1230         ;;
1231         srlz.d
1232         ;;
1233         CALL(trap, 10, cr.ifa)
1234 IVT_END(Data_Access_Bit)
1235
1236 IVT_ENTRY(Break_Instruction, 0x2c00)
1237 {       .mib
1238         mov             r17=cr.iim
1239         mov             r16=ip
1240         br.sptk         exception_save
1241         ;;
1242 }
1243 {       .mmi
1244         alloc           r15=ar.pfs,0,0,2,0
1245         ;;
1246 (p11)   ssm             psr.i
1247         mov             out0=11
1248         ;;
1249 }
1250 {       .mmi
1251         flushrs
1252         ;;
1253 (p11)   srlz.d
1254         add             out1=16,sp
1255 }
1256 {       .mfb
1257         nop             0
1258         nop             0
1259         br.call.sptk    rp=trap
1260         ;;
1261 }
1262 {       .mfb
1263         nop             0
1264         nop             0
1265         br.sptk         exception_restore
1266         ;;
1267 }
1268 IVT_END(Break_Instruction)
1269
1270 IVT_ENTRY(External_Interrupt, 0x3000)
1271 {       .mib
1272         mov             r17=cr.ivr      // Put the vector in the trap frame.
1273         mov             r16=ip
1274         br.sptk         exception_save
1275         ;;
1276 }
1277 {       .mfb
1278         alloc           r15=ar.pfs,0,0,1,0
1279         nop             0
1280         nop             0
1281         ;;
1282 }
1283 {       .mfb
1284         add             out0=16,sp
1285         nop             0
1286         br.call.sptk    rp=interrupt
1287         ;;
1288 }
1289 {       .mfb
1290         nop             0
1291         nop             0
1292         br.sptk         exception_restore
1293         ;;
1294 }
1295 IVT_END(External_Interrupt)
1296
1297 IVT_ENTRY(Reserved_3400, 0x3400)
1298         CALL(trap, 13, cr.ifa)
1299 IVT_END(Reserved_3400)
1300
1301 IVT_ENTRY(Reserved_3800, 0x3800)
1302         CALL(trap, 14, cr.ifa)
1303 IVT_END(Reserved_3800)
1304
1305 IVT_ENTRY(Reserved_3c00, 0x3c00)
1306         CALL(trap, 15, cr.ifa)
1307 IVT_END(Reserved_3c00)
1308
1309 IVT_ENTRY(Reserved_4000, 0x4000)
1310         CALL(trap, 16, cr.ifa)
1311 IVT_END(Reserved_4000)
1312
1313 IVT_ENTRY(Reserved_4400, 0x4400)
1314         CALL(trap, 17, cr.ifa)
1315 IVT_END(Reserved_4400)
1316
1317 IVT_ENTRY(Reserved_4800, 0x4800)
1318         CALL(trap, 18, cr.ifa)
1319 IVT_END(Reserved_4800)
1320
1321 IVT_ENTRY(Reserved_4c00, 0x4c00)
1322         CALL(trap, 19, cr.ifa)
1323 IVT_END(Reserved_4c00)
1324
1325 IVT_ENTRY(Page_Not_Present, 0x5000)
1326         CALL(trap, 20, cr.ifa)
1327 IVT_END(Page_Not_Present)
1328
1329 IVT_ENTRY(Key_Permission, 0x5100)
1330         CALL(trap, 21, cr.ifa)
1331 IVT_END(Key_Permission)
1332
1333 IVT_ENTRY(Instruction_Access_Rights, 0x5200)
1334         CALL(trap, 22, cr.ifa)
1335 IVT_END(Instruction_Access_Rights)
1336
1337 IVT_ENTRY(Data_Access_Rights, 0x5300)
1338         CALL(trap, 23, cr.ifa)
1339 IVT_END(Data_Access_Rights)
1340
1341 IVT_ENTRY(General_Exception, 0x5400)
1342         CALL(trap, 24, cr.ifa)
1343 IVT_END(General_Exception)
1344
1345 IVT_ENTRY(Disabled_FP_Register, 0x5500)
1346         CALL(trap, 25, cr.ifa)
1347 IVT_END(Disabled_FP_Register)
1348
1349 IVT_ENTRY(NaT_Consumption, 0x5600)
1350         CALL(trap, 26, cr.ifa)
1351 IVT_END(NaT_Consumption)
1352
1353 IVT_ENTRY(Speculation, 0x5700)
1354         CALL(trap, 27, cr.iim)
1355 IVT_END(Speculation)
1356
1357 IVT_ENTRY(Reserved_5800, 0x5800)
1358         CALL(trap, 28, cr.ifa)
1359 IVT_END(Reserved_5800)
1360
1361 IVT_ENTRY(Debug, 0x5900)
1362         CALL(trap, 29, cr.ifa)
1363 IVT_END(Debug)
1364
1365 IVT_ENTRY(Unaligned_Reference, 0x5a00)
1366         CALL(trap, 30, cr.ifa)
1367 IVT_END(Unaligned_Reference)
1368
1369 IVT_ENTRY(Unsupported_Data_Reference, 0x5b00)
1370         CALL(trap, 31, cr.ifa)
1371 IVT_END(Unsupported_Data_Reference)
1372
1373 IVT_ENTRY(Floating_Point_Fault, 0x5c00)
1374         CALL(trap, 32, cr.ifa)
1375 IVT_END(Floating_Point_Fault)
1376
1377 IVT_ENTRY(Floating_Point_Trap, 0x5d00)
1378         CALL(trap, 33, cr.ifa)
1379 IVT_END(Floating_Point_Trap)
1380
1381 IVT_ENTRY(Lower_Privilege_Transfer_Trap, 0x5e00)
1382         CALL(trap, 34, cr.ifa)
1383 IVT_END(Lower_Privilege_Transfer_Trap)
1384
1385 IVT_ENTRY(Taken_Branch_Trap, 0x5f00)
1386         CALL(trap, 35, cr.ifa)
1387 IVT_END(Taken_Branch_Trap)
1388
1389 IVT_ENTRY(Single_Step_Trap, 0x6000)
1390         CALL(trap, 36, cr.ifa)
1391 IVT_END(Single_Step_Trap)
1392
1393 IVT_ENTRY(Reserved_6100, 0x6100)
1394         CALL(trap, 37, cr.ifa)
1395 IVT_END(Reserved_6100)
1396
1397 IVT_ENTRY(Reserved_6200, 0x6200)
1398         CALL(trap, 38, cr.ifa)
1399 IVT_END(Reserved_6200)
1400
1401 IVT_ENTRY(Reserved_6300, 0x6300)
1402         CALL(trap, 39, cr.ifa)
1403 IVT_END(Reserved_6300)
1404
1405 IVT_ENTRY(Reserved_6400, 0x6400)
1406         CALL(trap, 40, cr.ifa)
1407 IVT_END(Reserved_6400)
1408
1409 IVT_ENTRY(Reserved_6500, 0x6500)
1410         CALL(trap, 41, cr.ifa)
1411 IVT_END(Reserved_6500)
1412
1413 IVT_ENTRY(Reserved_6600, 0x6600)
1414         CALL(trap, 42, cr.ifa)
1415 IVT_END(Reserved_6600)
1416
1417 IVT_ENTRY(Reserved_6700, 0x6700)
1418         CALL(trap, 43, cr.ifa)
1419 IVT_END(Reserved_6700)
1420
1421 IVT_ENTRY(Reserved_6800, 0x6800)
1422         CALL(trap, 44, cr.ifa)
1423 IVT_END(Reserved_6800)
1424
1425 IVT_ENTRY(IA_32_Exception, 0x6900)
1426         CALL(IA32_TRAP, 45, cr.ifa)
1427 IVT_END(IA_32_Exception)
1428
1429 IVT_ENTRY(IA_32_Intercept, 0x6a00)
1430         CALL(IA32_TRAP, 46, cr.iim)
1431 IVT_END(IA_32_Intercept)
1432
1433 IVT_ENTRY(IA_32_Interrupt, 0x6b00)
1434         CALL(IA32_TRAP, 47, cr.ifa)
1435 IVT_END(IA_32_Interrupt)
1436
1437 IVT_ENTRY(Reserved_6c00, 0x6c00)
1438         CALL(trap, 48, cr.ifa)
1439 IVT_END(Reserved_6c00)
1440
1441 IVT_ENTRY(Reserved_6d00, 0x6d00)
1442         CALL(trap, 49, cr.ifa)
1443 IVT_END(Reserved_6d00)
1444
1445 IVT_ENTRY(Reserved_6e00, 0x6e00)
1446         CALL(trap, 50, cr.ifa)
1447 IVT_END(Reserved_6e00)
1448
1449 IVT_ENTRY(Reserved_6f00, 0x6f00)
1450         CALL(trap, 51, cr.ifa)
1451 IVT_END(Reserved_6f00)
1452
1453 IVT_ENTRY(Reserved_7000, 0x7000)
1454         CALL(trap, 52, cr.ifa)
1455 IVT_END(Reserved_7000)
1456
1457 IVT_ENTRY(Reserved_7100, 0x7100)
1458         CALL(trap, 53, cr.ifa)
1459 IVT_END(Reserved_7100)
1460
1461 IVT_ENTRY(Reserved_7200, 0x7200)
1462         CALL(trap, 54, cr.ifa)
1463 IVT_END(Reserved_7200)
1464
1465 IVT_ENTRY(Reserved_7300, 0x7300)
1466         CALL(trap, 55, cr.ifa)
1467 IVT_END(Reserved_7300)
1468
1469 IVT_ENTRY(Reserved_7400, 0x7400)
1470         CALL(trap, 56, cr.ifa)
1471 IVT_END(Reserved_7400)
1472
1473 IVT_ENTRY(Reserved_7500, 0x7500)
1474         CALL(trap, 57, cr.ifa)
1475 IVT_END(Reserved_7500)
1476
1477 IVT_ENTRY(Reserved_7600, 0x7600)
1478         CALL(trap, 58, cr.ifa)
1479 IVT_END(Reserved_7600)
1480
1481 IVT_ENTRY(Reserved_7700, 0x7700)
1482         CALL(trap, 59, cr.ifa)
1483 IVT_END(Reserved_7700)
1484
1485 IVT_ENTRY(Reserved_7800, 0x7800)
1486         CALL(trap, 60, cr.ifa)
1487 IVT_END(Reserved_7800)
1488
1489 IVT_ENTRY(Reserved_7900, 0x7900)
1490         CALL(trap, 61, cr.ifa)
1491 IVT_END(Reserved_7900)
1492
1493 IVT_ENTRY(Reserved_7a00, 0x7a00)
1494         CALL(trap, 62, cr.ifa)
1495 IVT_END(Reserved_7a00)
1496
1497 IVT_ENTRY(Reserved_7b00, 0x7b00)
1498         CALL(trap, 63, cr.ifa)
1499 IVT_END(Reserved_7b00)
1500
1501 IVT_ENTRY(Reserved_7c00, 0x7c00)
1502         CALL(trap, 64, cr.ifa)
1503 IVT_END(Reserved_7c00)
1504
1505 IVT_ENTRY(Reserved_7d00, 0x7d00)
1506         CALL(trap, 65, cr.ifa)
1507 IVT_END(Reserved_7d00)
1508
1509 IVT_ENTRY(Reserved_7e00, 0x7e00)
1510         CALL(trap, 66, cr.ifa)
1511 IVT_END(Reserved_7e00)
1512
1513 IVT_ENTRY(Reserved_7f00, 0x7f00)
1514         CALL(trap, 67, cr.ifa)
1515 IVT_END(Reserved_7f00)