debuggers.hg

view xen/arch/x86/x86_64/entry.S @ 3668:d55d523078f7

bitkeeper revision 1.1159.212.77 (4202221693AFbvFZWeMHHIjQfbzTIQ)

More x86_64 prgress. Many more gaps filled in. Next step is DOM0
construction.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@scramble.cl.cam.ac.uk
date Thu Feb 03 13:07:34 2005 +0000 (2005-02-03)
parents 060c1ea52343
children bbe8541361dd 8c6281ec8860
line source
1 /*
2 * Hypercall and fault low-level handling routines.
3 *
4 * Copyright (c) 2005, K A Fraser
5 */
7 #include <xen/config.h>
8 #include <xen/errno.h>
9 #include <xen/softirq.h>
10 #include <asm/asm_defns.h>
11 #include <asm/apicdef.h>
12 #include <public/xen.h>
14 ENTRY(hypercall)
15 iret
17 ENTRY(ret_from_intr)
18 restore_all_xen:
19 popq %r15
20 popq %r14
21 popq %r13
22 popq %r12
23 popq %rbp
24 popq %rbx
25 popq %r11
26 popq %r10
27 popq %r9
28 popq %r8
29 popq %rax
30 popq %rcx
31 popq %rdx
32 popq %rsi
33 popq %rdi
34 addq $8,%rsp
35 iretq
37 error_code:
38 SAVE_ALL
39 movq %rsp,%rdi
40 movl XREGS_entry_vector(%rsp),%eax
41 leaq SYMBOL_NAME(exception_table)(%rip),%rdx
42 callq *(%rdx,%rax,8)
43 jmp restore_all_xen
45 ENTRY(divide_error)
46 pushq $0
47 movl $TRAP_divide_error,4(%rsp)
48 jmp error_code
50 ENTRY(coprocessor_error)
51 pushq $0
52 movl $TRAP_copro_error,4(%rsp)
53 jmp error_code
55 ENTRY(simd_coprocessor_error)
56 pushq $0
57 movl $TRAP_simd_error,4(%rsp)
58 jmp error_code
60 ENTRY(device_not_available)
61 pushq $0
62 movl $TRAP_no_device,4(%rsp)
63 jmp error_code
65 ENTRY(debug)
66 pushq $0
67 movl $TRAP_debug,4(%rsp)
68 jmp error_code
70 ENTRY(int3)
71 pushq $0
72 movl $TRAP_int3,4(%rsp)
73 jmp error_code
75 ENTRY(overflow)
76 pushq $0
77 movl $TRAP_overflow,4(%rsp)
78 jmp error_code
80 ENTRY(bounds)
81 pushq $0
82 movl $TRAP_bounds,4(%rsp)
83 jmp error_code
85 ENTRY(invalid_op)
86 pushq $0
87 movl $TRAP_invalid_op,4(%rsp)
88 jmp error_code
90 ENTRY(coprocessor_segment_overrun)
91 pushq $0
92 movl $TRAP_copro_seg,4(%rsp)
93 jmp error_code
95 ENTRY(invalid_TSS)
96 movl $TRAP_invalid_tss,4(%rsp)
97 jmp error_code
99 ENTRY(segment_not_present)
100 movl $TRAP_no_segment,4(%rsp)
101 jmp error_code
103 ENTRY(stack_segment)
104 movl $TRAP_stack_error,4(%rsp)
105 jmp error_code
107 ENTRY(general_protection)
108 movl $TRAP_gp_fault,4(%rsp)
109 jmp error_code
111 ENTRY(alignment_check)
112 movl $TRAP_alignment_check,4(%rsp)
113 jmp error_code
115 ENTRY(page_fault)
116 movl $TRAP_page_fault,4(%rsp)
117 jmp error_code
119 ENTRY(machine_check)
120 pushq $0
121 movl $TRAP_machine_check,4(%rsp)
122 jmp error_code
124 ENTRY(spurious_interrupt_bug)
125 pushq $0
126 movl $TRAP_spurious_int,4(%rsp)
127 jmp error_code
129 ENTRY(double_fault)
130 movl $TRAP_double_fault,4(%rsp)
131 jmp error_code
133 ENTRY(nmi)
134 iret
136 .data
138 ENTRY(exception_table)
139 .quad SYMBOL_NAME(do_divide_error)
140 .quad SYMBOL_NAME(do_debug)
141 .quad 0 # nmi
142 .quad SYMBOL_NAME(do_int3)
143 .quad SYMBOL_NAME(do_overflow)
144 .quad SYMBOL_NAME(do_bounds)
145 .quad SYMBOL_NAME(do_invalid_op)
146 .quad SYMBOL_NAME(math_state_restore)
147 .quad SYMBOL_NAME(do_double_fault)
148 .quad SYMBOL_NAME(do_coprocessor_segment_overrun)
149 .quad SYMBOL_NAME(do_invalid_TSS)
150 .quad SYMBOL_NAME(do_segment_not_present)
151 .quad SYMBOL_NAME(do_stack_segment)
152 .quad SYMBOL_NAME(do_general_protection)
153 .quad SYMBOL_NAME(do_page_fault)
154 .quad SYMBOL_NAME(do_spurious_interrupt_bug)
155 .quad SYMBOL_NAME(do_coprocessor_error)
156 .quad SYMBOL_NAME(do_alignment_check)
157 .quad SYMBOL_NAME(do_machine_check)
158 .quad SYMBOL_NAME(do_simd_coprocessor_error)