diff options
| author | Robert Nordier <rnordier@FreeBSD.org> | 1998-09-15 13:26:23 +0000 |
|---|---|---|
| committer | Robert Nordier <rnordier@FreeBSD.org> | 1998-09-15 13:26:23 +0000 |
| commit | ec3009d3ecc33e6f07ff43d45cbb8c200b8490d8 (patch) | |
| tree | d78a9b227fef96eacb0a9d41ec5411aa2663f86a /sys/boot | |
| parent | d6c7028c12888c7e9ee03a17d5d6d28b848a9c01 (diff) | |
Notes
Diffstat (limited to 'sys/boot')
| -rw-r--r-- | sys/boot/i386/btx/btx/btx.S | 29 | ||||
| -rw-r--r-- | sys/boot/i386/btx/btx/btx.s | 29 |
2 files changed, 54 insertions, 4 deletions
diff --git a/sys/boot/i386/btx/btx/btx.S b/sys/boot/i386/btx/btx/btx.S index 522a3c4ca828..60f68566aba8 100644 --- a/sys/boot/i386/btx/btx/btx.S +++ b/sys/boot/i386/btx/btx/btx.S @@ -13,7 +13,7 @@ # purpose. # -# $Id: btx.s,v 1.1.1.1 1998/09/12 04:29:23 rnordier Exp $ +# $Id: btx.s,v 1.2 1998/09/13 13:27:03 rnordier Exp $ # # Memory layout. @@ -52,6 +52,11 @@ .set TSS_ESP1,0xc # PL 1 ESP .set TSS_MAP,0x66 # I/O bit map base # +# System calls. +# + .set SYS_EXIT,0x0 # Exit + .set SYS_EXEC,0x1 # Exec +# # V86 constants. # .set V86_FLG,0x208eff # V86 flag mask @@ -717,7 +722,27 @@ intusr.5: movl %eax,%ecx # XXX Save # # System Call. # -intx30: jmp exit # Just exit for now +intx30: cmpl $SYS_EXEC,%eax # Exec system call? + jne intx30.1 # No + pushl %ss # Set up + popl %es # all + pushl %es # segment + popl %ds # registers + pushl %ds # for the + popl %fs # program + pushl %fs # we're + popl %gs # invoking + movl $MEM_USR,%eax # User base address + addl 0xc(%esp,1),%eax # Change to user + leal 0x4(%eax),%esp # stack + movl %cr0,%eax # Turn + andl $~0x80000000,%eax # off + movl %eax,%cr0 # paging + xorl %eax,%eax # Flush + movl %eax,%cr3 # TLB + popl %eax # Call + call *%eax # program +intx30.1: jmp exit # Just exit # # Dump structure [EBX] to [EDI], using format string [ESI]. # diff --git a/sys/boot/i386/btx/btx/btx.s b/sys/boot/i386/btx/btx/btx.s index 522a3c4ca828..60f68566aba8 100644 --- a/sys/boot/i386/btx/btx/btx.s +++ b/sys/boot/i386/btx/btx/btx.s @@ -13,7 +13,7 @@ # purpose. # -# $Id: btx.s,v 1.1.1.1 1998/09/12 04:29:23 rnordier Exp $ +# $Id: btx.s,v 1.2 1998/09/13 13:27:03 rnordier Exp $ # # Memory layout. @@ -52,6 +52,11 @@ .set TSS_ESP1,0xc # PL 1 ESP .set TSS_MAP,0x66 # I/O bit map base # +# System calls. +# + .set SYS_EXIT,0x0 # Exit + .set SYS_EXEC,0x1 # Exec +# # V86 constants. # .set V86_FLG,0x208eff # V86 flag mask @@ -717,7 +722,27 @@ intusr.5: movl %eax,%ecx # XXX Save # # System Call. # -intx30: jmp exit # Just exit for now +intx30: cmpl $SYS_EXEC,%eax # Exec system call? + jne intx30.1 # No + pushl %ss # Set up + popl %es # all + pushl %es # segment + popl %ds # registers + pushl %ds # for the + popl %fs # program + pushl %fs # we're + popl %gs # invoking + movl $MEM_USR,%eax # User base address + addl 0xc(%esp,1),%eax # Change to user + leal 0x4(%eax),%esp # stack + movl %cr0,%eax # Turn + andl $~0x80000000,%eax # off + movl %eax,%cr0 # paging + xorl %eax,%eax # Flush + movl %eax,%cr3 # TLB + popl %eax # Call + call *%eax # program +intx30.1: jmp exit # Just exit # # Dump structure [EBX] to [EDI], using format string [ESI]. # |
