Subversion Repositories HelenOS-historic

Rev

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

Rev 806 Rev 808
Line 33... Line 33...
33
	
33
	
34
#define ERROR_WORD_INTERRUPT_LIST 0x00027D00
34
#define ERROR_WORD_INTERRUPT_LIST 0x00027D00
35
 
35
 
36
#include <arch/pm.h>
36
#include <arch/pm.h>
37
#include <arch/context_offset.h>
37
#include <arch/context_offset.h>
-
 
38
#include <arch/mm/page.h>
38
	
39
	
39
.text
40
.text
40
.global interrupt_handlers
41
.global interrupt_handlers
41
.global syscall_entry
42
.global syscall_entry
42
.global panic_printf
43
.global panic_printf
Line 192... Line 193...
192
 
193
 
193
	
194
	
194
syscall_entry:
195
syscall_entry:
195
	# Switch to hidden gs	
196
	# Switch to hidden gs	
196
	swapgs
197
	swapgs
197
 
-
 
198
	# TODO:	I would like LEA instead of thes 2 instrs,
198
	# %gs:0 now points to pointer to stack page
199
	# why does not it work???
-
 
200
	mov %gs:0, %r10     # We have a stack in r10
199
	mov %gs:0, %r10     # We have a ptr to stack page in r10
201
	addq $0x0ff0, %r10
200
	addq $PAGE_SIZE-16, %r10 # We need some space to store old %sp
202
	
201
	
203
	movq %rsp, 0(%r10)  # Save old stack pointer to stack
202
	movq %rsp, 0(%r10)  # Save old stack pointer to stack
204
	movq %r10, %rsp     # Change to new stack
203
	movq %r10, %rsp     # Change to new stack
205
	pushq %rcx          # Return address
204
	pushq %rcx          # Return address
206
	pushq %r11          # Save flags
205
	pushq %r11          # Save flags