151 |
No need to switch stacks or load segment registers. */ |
No need to switch stacks or load segment registers. */ |
152 |
|
|
153 |
_trap_from_kernel: |
_trap_from_kernel: |
154 |
#if 0 |
#if 1 |
155 |
movl %cr2, %eax |
movl %cr2, %eax |
156 |
movl %eax, R_CR2(%esp) |
movl %eax, R_CR2(%esp) |
157 |
#endif |
#endif |
339 |
pushl %esi |
pushl %esi |
340 |
pushl %edi /* save registers */ |
pushl %edi /* save registers */ |
341 |
|
|
342 |
movl 8+4(%esp),%esi /* get user start address */ |
movl 8+8(%esp),%esi /* get user start address */ |
343 |
movl 8+8(%esp),%edi /* get kernel destination address */ |
movl 8+4(%esp),%edi /* get kernel destination address */ |
344 |
movl 8+12(%esp),%edx /* get count */ |
movl 8+12(%esp),%edx /* get count */ |
345 |
|
|
346 |
movl $KERNEL_DS, %eax |
movl $KERNEL_DS, %eax |
520 |
idttable: |
idttable: |
521 |
|
|
522 |
/* type exception id */ |
/* type exception id */ |
523 |
#if 0 |
#if 1 |
524 |
exception (TRAP_DIVIDE_ERROR); |
exception (TRAP_DIVIDE_ERROR); |
525 |
exception (TRAP_DEBUG_EXCEPTION); |
exception (TRAP_DEBUG_EXCEPTION); |
526 |
exception_user (TRAP_BREAKPOINT); |
exception_user (TRAP_BREAKPOINT); |