Subversion Repositories HelenOS-historic

Rev

Rev 1212 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1212 Rev 1278
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 128
89
#define INTERRUPT_ALIGN 64
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
	
114
	call syscall_handler   # syscall_handler(ax,cx,dx,si,di)
112
	call syscall_handler   # syscall_handler(ax,cx,dx,si,di)
115
sysc_end:		
-
 
116
	cli
113
	cli
117
	addl $20, %esp         # clean-up of parameters
114
	addl $20, %esp         # clean-up of parameters
118
	
115
	
119
	pop %gs
116
	pop %gs
120
	pop %fs
117
	pop %fs
121
	pop %es
118
	pop %es
122
	pop %ds
119
	pop %ds
123
	
120
	
124
	CLEAR_NT_FLAG
121
	CLEAR_NT_FLAG
125
	iret
122
	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
-
 
132
.else	
123
.else	
133
	/*
124
	/*
134
	 * This macro distinguishes between two versions of ia32 exceptions.
125
	 * This macro distinguishes between two versions of ia32 exceptions.
135
	 * One version has error word and the other does not have it.
126
	 * One version has error word and the other does not have it.
136
	 * The latter version fakes the error word on the stack so that the
127
	 * The latter version fakes the error word on the stack so that the