Subversion Repositories HelenOS-historic

Rev

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

Rev 257 Rev 332
Line 56... Line 56...
56
	
56
	
57
 
57
 
58
# THIS IS USERSPACE CODE
58
# THIS IS USERSPACE CODE
59
.global utext
59
.global utext
60
utext:
60
utext:
61
	xor %ax,%ax;
-
 
62
	mov %ax,%ds;
-
 
63
	mov %ax,%es;
-
 
64
	mov %ax,%fs;
-
 
65
	mov %ax,%gs;
-
 
66
0:
61
0:
67
	int $48
62
	int $48
68
	jmp 0b
63
	jmp 0b
69
	# not reached
64
	# not reached
70
utext_end:
65
utext_end:
Line 175... Line 170...
175
	pushq %rbp
170
	pushq %rbp
176
	movq %rsp,%rbp
171
	movq %rsp,%rbp
177
	
172
	
178
	push_all_gpr
173
	push_all_gpr
179
 
174
 
180
	# trap_dispatcher(i, stack)
-
 
181
	movq $(\i),%rdi   # %rdi - first parameter
175
	movq $(\i),%rdi   # %rdi - first parameter
182
	movq %rbp, %rsi
176
	movq %rbp, %rsi
183
	addq $8, %rsi     # %rsi - second parameter - original stack
177
	addq $8, %rsi     # %rsi - second parameter - original stack
184
	call trap_dispatcher
178
	call trap_dispatcher 	# trap_dispatcher(i, stack)
185
 
179
 
186
# Test if this is interrupt with error word or not
180
# Test if this is interrupt with error word or not
187
	mov $\i,%cl;
181
	mov $\i,%cl;
188
	movl $1,%eax;
182
	movl $1,%eax;
189
	test $0xe0,%cl;
183
	test $0xe0,%cl;
Line 214... Line 208...
214
.endm
208
.endm
215
	
209
	
216
interrupt_handlers:
210
interrupt_handlers:
217
h_start:
211
h_start:
218
	handler 0 IDT_ITEMS
212
	handler 0 IDT_ITEMS
219
#	handler 64 128	
-
 
220
#	handler 128 192
-
 
221
#	handler 192 256
-
 
222
h_end:
213
h_end:
223
	
214
	
224
	
215
	
225
.data
216
.data
226
.global interrupt_handler_size
217
.global interrupt_handler_size