Rev 1100 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1100 | Rev 1212 | ||
---|---|---|---|
Line 84... | Line 84... | ||
84 | # vectors starting at vector i. |
84 | # vectors starting at vector i. |
85 | # |
85 | # |
86 | # The handlers setup data segment registers |
86 | # The handlers setup data segment registers |
87 | # and call exc_dispatch(). |
87 | # and call exc_dispatch(). |
88 | # |
88 | # |
89 | #define INTERRUPT_ALIGN 64 |
89 | #define INTERRUPT_ALIGN 128 |
90 | .macro handler i n |
90 | .macro handler i n |
91 | 91 | ||
92 | .ifeq \i-0x30 # Syscall handler |
92 | .ifeq \i-0x30 # Syscall handler |
93 | push %ds |
93 | push %ds |
94 | push %es |
94 | push %es |
Line 106... | Line 106... | ||
106 | movw $16,%ax |
106 | movw $16,%ax |
107 | movw %ax,%ds |
107 | movw %ax,%ds |
108 | movw %ax,%es |
108 | movw %ax,%es |
109 | 109 | ||
110 | sti |
110 | sti |
- | 111 | cmp $2, %edi # Is this SYS_INT_CONTROL? |
|
- | 112 | je sys_int_ctrl |
|
- | 113 | ||
111 | call syscall_handler # syscall_handler(ax,cx,dx,si,di) |
114 | call syscall_handler # syscall_handler(ax,cx,dx,si,di) |
- | 115 | sysc_end: |
|
112 | cli |
116 | cli |
113 | addl $20, %esp # clean-up of parameters |
117 | addl $20, %esp # clean-up of parameters |
114 | 118 | ||
115 | pop %gs |
119 | pop %gs |
116 | pop %fs |
120 | pop %fs |
117 | pop %es |
121 | pop %es |
118 | pop %ds |
122 | pop %ds |
119 | 123 | ||
120 | CLEAR_NT_FLAG |
124 | CLEAR_NT_FLAG |
121 | iret |
125 | iret |
- | 126 | sys_int_ctrl: # Interrupt control |
|
- | 127 | mov %esp, %eax |
|
- | 128 | add $44, %eax |
|
- | 129 | mov %eax, 4(%esp) # Pointer to flags - 2nd argument |
|
- | 130 | call ddi_int_control |
|
- | 131 | jmp sysc_end |
|
122 | .else |
132 | .else |
123 | /* |
133 | /* |
124 | * This macro distinguishes between two versions of ia32 exceptions. |
134 | * This macro distinguishes between two versions of ia32 exceptions. |
125 | * One version has error word and the other does not have it. |
135 | * One version has error word and the other does not have it. |
126 | * The latter version fakes the error word on the stack so that the |
136 | * The latter version fakes the error word on the stack so that the |