diff --git a/src/sys/boot/boot2/boot1.s b/src/sys/boot/boot2/boot1.s index 6cda6a2..6a05874 100644 --- a/src/sys/boot/boot2/boot1.s +++ b/src/sys/boot/boot2/boot1.s @@ -13,7 +13,7 @@ # purpose. # -# $Id$ +# $FreeBSD: src/sys/boot/i386/boot2/boot1.s,v 1.10.2.3 2001/08/14 22:55:29 jhb Exp $ # Memory Locations .set MEM_REL,0x700 # Relocation address @@ -28,7 +28,7 @@ # Partition Constants .set PRT_OFF,0x1be # Partition offset .set PRT_NUM,0x4 # Partitions - .set PRT_UBX,0x2A # Partition type + .set PRT_BSD,0xa5 # Partition type # Flag Bits .set FL_PACKET,0x80 # Packet mode @@ -115,11 +115,7 @@ # Setup the segment registers to flat addressing (segment 0) and setup the # stack to end just below the start of our code. # -main: -#mov $0x4f02,%ax -#mov $0x4103,%bx -#int $0x10 - cld # String ops inc +main: cld # String ops inc xor %cx,%cx # Zero mov %cx,%es # Address mov %cx,%ds # data @@ -136,9 +132,9 @@ movsw # code # # If we are on a hard drive, then load the MBR and look for the first -# UbixOS slice. We use the fake partition entry below that points to +# FreeBSD slice. We use the fake partition entry below that points to # the MBR when we call nread. The first pass looks for the first active -# UbixOS slice. The second pass looks for the first non-active UbixOS +# FreeBSD slice. The second pass looks for the first non-active FreeBSD # slice if the first one fails. # mov $part4,%si # Partition @@ -149,7 +145,7 @@ mov $0x1,%cx # Two passes main.1: mov $MEM_BUF+PRT_OFF,%si # Partition table movb $0x1,%dh # Partition -main.2: cmpb $PRT_UBX,0x4(%si) # Our partition type? +main.2: cmpb $PRT_BSD,0x4(%si) # Our partition type? jne main.3 # No jcxz main.5 # If second pass testb $0x80,(%si) # Active? @@ -161,10 +157,10 @@ dec %cx # Do two jcxz main.1 # passes # -# If we get here, we didn't find any UbixOS slices at all, so print an +# If we get here, we didn't find any FreeBSD slices at all, so print an # error message and die. # -#Ubu mov $msg_part,%si # Message + mov $msg_part,%si # Message jmp error # Error # # Floppies use partition 0 of drive 0. @@ -234,7 +230,7 @@ # by a prompt, wait for a keypress, and then reboot the machine. # error: callw putstr # Display message -# UBU mov $prompt,%si # Display + mov $prompt,%si # Display callw putstr # prompt xorb %ah,%ah # BIOS: Get int $0x16 # keypress @@ -327,13 +323,13 @@ read.6: retw # To caller read.7: testb $FL_PACKET,%cs:MEM_REL+flags-start # LBA support enabled? jz ereturn # No, so return an error - mov $0xbeba,%bx # Magic + mov $0x55aa,%bx # Magic push %dx # Save movb $0x41,%ah # BIOS: Check int $0x13 # extensions present pop %dx # Restore jc return # If error, return an error - cmp $0xbabe,%bx # Magic? + cmp $0xaa55,%bx # Magic? jne ereturn # No, so return an error testb $0x1,%cl # Packet interface? jz ereturn # No, so return an error @@ -357,8 +353,8 @@ .fill 0x30,0x1,0x0 part4: .byte 0x80, 0x00, 0x01, 0x00 - .byte 0x2A, 0xff, 0xff, 0xff + .byte 0xa5, 0xff, 0xff, 0xff .byte 0x00, 0x00, 0x00, 0x00 .byte 0x50, 0xc3, 0x00, 0x00 # 50000 sectors long, bleh - .word 0xbabe # Magic number + .word 0xaa55 # Magic number