Newer
Older
.set SEG_KDATA_SEL, 0x10 # selector for SEG_KDATA
pushl %fs
pushl %gs
pushal
# Set up data segments.
movl $SEG_KDATA_SEL, %eax
movw %ax,%ds
movw %ax,%es
# Call trap(tf), where tf=%esp
pushl %esp
call trap
popl %gs
popl %fs
# A forked process switches to user mode by calling
# forkret1(tf), where tf is the trap frame to use.
movl 4(%esp), %esp
jmp trapret