Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sbin/fdisk/mbr_bootsel pullup 1.2->1.4 (fvdl)



details:   https://anonhg.NetBSD.org/src/rev/b955622ee745
branches:  netbsd-1-4
changeset: 468610:b955622ee745
user:      perry <perry%NetBSD.org@localhost>
date:      Sun May 02 21:32:50 1999 +0000

description:
pullup 1.2->1.4 (fvdl)

diffstat:

 sbin/fdisk/mbr_bootsel/mbr_bootsel.S |  33 +++++++++++++++++----------------
 1 files changed, 17 insertions(+), 16 deletions(-)

diffs (106 lines):

diff -r d1dd5e761049 -r b955622ee745 sbin/fdisk/mbr_bootsel/mbr_bootsel.S
--- a/sbin/fdisk/mbr_bootsel/mbr_bootsel.S      Sun May 02 21:30:36 1999 +0000
+++ b/sbin/fdisk/mbr_bootsel/mbr_bootsel.S      Sun May 02 21:32:50 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbr_bootsel.S,v 1.2.2.2 1999/04/18 00:18:50 fvdl Exp $ */
+/*     $NetBSD: mbr_bootsel.S,v 1.2.2.3 1999/05/02 21:32:50 perry Exp $        */
 
 
 /*-
@@ -179,6 +179,7 @@
  * or inactive. There may never be more because of space constraints.
  */
 #define BFL_SELACTIVE  0x01
+#define BFL_EXTINT13   0x02
 
 /*
  * Scan values for the various keys we use, as returned by the BIOS
@@ -192,7 +193,7 @@
  * Minimum and maximum drive number that is considered to be valid.
  */
 #define MINDRV         0x80
-#define MAXDRV         0x88
+#define MAXDRV         0x87
 
 /*
  * Error codes. Done this way to save space.
@@ -224,10 +225,10 @@
  * do this and pass garbage.
  */
 1:
-       cmpb $MINDRV,%dl
-       jb 2f
-       cmpb $MAXDRV,%dl
-       jbe 3f
+       cmpb    $MINDRV,%dl
+       jl      2f
+       cmpb    $MAXDRV,%dl
+       jle     3f
 2:
        movb $0x80,%dl
 3:
@@ -288,7 +289,7 @@
        subl    %edi,%edx
        movw_mem_ax(timeout)
        cmpl    %eax,%edx
-       jb      3b
+       jl      3b
        movb_mem_al(defkey)
        jmp     default
 4:
@@ -306,21 +307,21 @@
  */
        subb    $SCAN_F1,%al
        cmpb    $9,%al
-       ja      4b
+       jg      4b
        cmpb    $3,%al
-       jbe     5f
+       jle     5f
 /*
  * F5-F10 -> boot disk 0-5. Check if the requested disk isn't above
  * the number of disks actually in the system as stored in 0:0475 by
- * the BIOS.
+ * the BIOS. This is always sector 0, so never use int13 extensions.
  */
        subb    $4,%al
        cmpb_mem_reg(0x0475,AL)
-       jae     4b
+       jge     4b
        movw_imm_reg(fakeent,SI)
        addb    $0x80,%al
        movb    %al,%dl
-       jmp     boot2
+       jmp16(noext)
 5:
 /*
  * Check if the requested entry is actually active in the partition and
@@ -368,6 +369,10 @@
 boot:
        movb_mem_reg(drvno,DL)
 boot2:
+       movb_mem_al(flags)
+       testb   $BFL_EXTINT13,%al
+       jz      noext
+
        push    %esi
        push    %edx
        movw_imm_reg(0x55aa,BX)
@@ -404,8 +409,6 @@
 rderr:
        movb    $ERR_READ,%al
 errhang:
-       movw_imm_reg(err,SI)
-       call16(putasciz)
        call16(putc)
 hang:
        sti
@@ -468,8 +471,6 @@
        .asciz  "\r\n"
 prefix:
        .asciz  "F1: "
-err:
-       .asciz  "Err "
 /*
  * Fake partition entry used to boot from other disks. First byte is
  * overloaded, it's also used as storage for the drive number. We're



Home | Main Index | Thread Index | Old Index