]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
authorokuji <okuji@localhost>
Sat, 20 May 2006 14:54:45 +0000 (14:54 +0000)
committerokuji <okuji@localhost>
Sat, 20 May 2006 14:54:45 +0000 (14:54 +0000)
        * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
        duplication.
        (lba_mode): Use %eax more intensively to reduce the code size.

ChangeLog
boot/i386/pc/boot.S

index 97a720f5bf9349fa96ea90ff4d16f56ae952d973..29c9468b5ddc01a8528d7fb53d7ad46d26b01244 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
+
+       * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
+       duplication.
+       (lba_mode): Use %eax more intensively to reduce the code size.
+
 2006-05-20  Marco Gerards  <marco@gnu.org>
 
        * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
index 3e94d599e6342b1c529e81c1f3cee563f985f004..b630799305beecede1f345546e574e20e1bba83d 100644 (file)
@@ -176,6 +176,9 @@ real_start:
        cmpw    $0xaa55, %bx
        jne     chs_mode
 
+       /* set %si to the disk address packet */
+       movw    $ABS(disk_address_packet), %si
+       
        /* check if AH=0x42 is supported if FORCE_LBA is zero */
        MOV_MEM_TO_AL(ABS(force_lba))   /* movb ABS(force_lba), %al */
        testb   %al, %al
@@ -184,11 +187,13 @@ real_start:
        jz      chs_mode
        
 lba_mode:
-       /* set %si to the disk address packet */
-       movw    $ABS(disk_address_packet), %si
+       xorl    %eax, %eax
+       movw    %ax, 4(%si)
+       movl    %eax, 12(%si)
 
+       incw    %ax     
        /* set the mode to non-zero */
-       movb    $1, -1(%si)
+       movb    %al, -1(%si)
        
        movl    ABS(kernel_sector), %ebx
 
@@ -196,7 +201,7 @@ lba_mode:
        movw    $0x0010, (%si)
 
        /* the blocks */
-       movw    $1, 2(%si)
+       movw    %ax, 2(%si)
        
        /* the absolute address (low 32 bits) */
        movl    %ebx, 8(%si)
@@ -204,10 +209,6 @@ lba_mode:
        /* the segment of buffer address */
        movw    $GRUB_BOOT_MACHINE_BUFFER_SEG, 6(%si)
 
-       xorl    %eax, %eax
-       movw    %ax, 4(%si)
-       movl    %eax, 12(%si)
-       
 /*
  * BIOS call "INT 0x13 Function 0x42" to read sectors from disk into memory
  *     Call with       %ah = 0x42
@@ -245,9 +246,6 @@ chs_mode:
        jmp     hd_probe_error
 
 final_init:
-       
-       movw    $ABS(sectors), %si
-
        /* set the mode to zero */
        movb    $0, -1(%si)