diff options
author | Robert Nordier <rnordier@FreeBSD.org> | 1998-10-03 18:05:12 +0000 |
---|---|---|
committer | Robert Nordier <rnordier@FreeBSD.org> | 1998-10-03 18:05:12 +0000 |
commit | 3948b979bac9ac0bb2dd10f0e2688d12c2038857 (patch) | |
tree | be6e25065cf7740a4da917716f8786c1c607776e /sys/boot/i386/btx/btx/btx.S | |
parent | ad43611cd0cf5bb3ae2a2c35ed0d9e59ccbbe521 (diff) | |
download | src-test2-3948b979bac9ac0bb2dd10f0e2688d12c2038857.tar.gz src-test2-3948b979bac9ac0bb2dd10f0e2688d12c2038857.zip |
Notes
Diffstat (limited to 'sys/boot/i386/btx/btx/btx.S')
-rw-r--r-- | sys/boot/i386/btx/btx/btx.S | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/sys/boot/i386/btx/btx/btx.S b/sys/boot/i386/btx/btx/btx.S index b731991e9261..732b901ddff6 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.3 1998/09/15 13:26:23 rnordier Exp $ +# $Id: btx.s,v 1.4 1998/10/03 14:33:06 rnordier Exp $ # # Memory layout. @@ -100,7 +100,7 @@ btx_hdr: .byte 0xeb # Machine ID .byte 0xe # Header size .ascii "BTX" # Magic .byte 0x0 # Major version - .byte 0x55 # Minor version + .byte 0x56 # Minor version .byte 0x0 # Flags .word PAG_CNT-MEM_ORG>>0xc # Paging control .word break-start # Text size @@ -237,7 +237,7 @@ init.9: pushb $0x0 # general # # Exit routine. # -exit: cld # String ops inc +exit: cli # Disable interrupts movl $MEM_ESP0,%esp # Clear stack # # Turn off paging. @@ -271,13 +271,11 @@ exit.2: xorl %eax,%eax # Real mode segment callwi(setpic) # IRQ offsets lidtwm(ivtdesc) # Set IVT # -# Prompt for reboot. +# Reboot or await reset. # sti # Enable interrupts - movwir(prompt,_si) # Display - callwi(puts16) # prompt - xorb %ah,%ah # BIOS: Get - int $0x16 # keypress + tstbim(0x1,btx_hdr+0x7) # Reboot? +exit.3: jz exit.3 # No int $0x19 # BIOS: Reboot # # Set IRQ offsets by reprogramming 8259A PICs. @@ -306,16 +304,6 @@ setpic: inb $0x21,%al # Save master outb %al,$0x21 # IMR ret # To caller # -# Display zero-terminated string [ESI] using BIOS. -# -puts16.0: movwir(0x7,_bx) # Page:attribute - movb $0xe,%ah # BIOS: Display - int $0x10 # char -puts16: lodsb # Load char - testb %al,%al # End of string? - jnz puts16.0 # No - ret # To caller -# # Initiate return from V86 mode to user mode. # inthlt: hlt # To supervisor mode @@ -737,7 +725,8 @@ intx30: cmpl $SYS_EXEC,%eax # Exec system call? movl %eax,%cr3 # TLB popl %eax # Call call *%eax # program -intx30.1: jmp exit # Just exit +intx30.1: incb %ss:btx_hdr+0x7 # Flag reboot + jmp exit # Exit # # Dump structure [EBX] to [EDI], using format string [ESI]. # @@ -904,7 +893,8 @@ idtctl: .byte 0x10, 0x8e # Int 0x0-0xf # # Dump format string. # -dmpfmt: .ascii "int" # "int=" +dmpfmt: .byte '\n' # "\n" + .ascii "int" # "int=" .byte 0x80|DMP_X32, 0x40 # "00000000 " .ascii "err" # "err=" .byte 0x80|DMP_X32, 0x44 # "00000000 " @@ -945,13 +935,9 @@ dmpfmt: .ascii "int" # "int=" .byte 0x80|DMP_MEM|DMP_EOL,0x48 # "00 00 ... 00 00\n" .ascii "ss:esp" # "ss:esp=" .byte 0x80|DMP_MEM|DMP_EOL,0x0 # "00 00 ... 00 00\n" - .byte 0x0 # End of string -# -# Messages. -# -prompt: .asciz "Press ENTER to reboot" + .asciz "System halted" # End # -# Start of user memory. +# End of BTX memory. # .p2align 4 break: |