]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Apple assembly doesn't handle symbol arithmetic well. So instead
authorVladimir Serbinenko <phcoder@gmail.com>
Sun, 24 Nov 2013 05:13:45 +0000 (06:13 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sun, 24 Nov 2013 06:11:00 +0000 (07:11 +0100)
of getting addres of kernel_sector + 4 define kernel_sector_high.
It also makes code more readable.

ChangeLog
grub-core/boot/i386/pc/boot.S

index 32d7f09583f3eb7105dd9adf05ae727d0d0ce629..751c047745695a650ae760578f7d6357eab72228 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-24  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Apple assembly doesn't handle symbol arithmetic well. So instead
+       of getting addres of kernel_sector + 4 define kernel_sector_high.
+       It also makes code more readable.
+
 2013-11-24  Vladimir Serbinenko  <phcoder@gmail.com>
 
        With Apple assembly in .macro environvemnt you have to use $$ instead
index ee0b9d621705efd468270b5caf5d17108dde89b3..8338f87b0dc7091193a515bd724283104291729b 100644 (file)
@@ -181,7 +181,9 @@ kernel_address:
 #ifndef HYBRID_BOOT
        . = _start + GRUB_BOOT_MACHINE_KERNEL_SECTOR
 kernel_sector:
-       .long   1, 0
+       .long   1
+kernel_sector_high:
+       .long   0
 #endif
 
        . = _start + GRUB_BOOT_MACHINE_BOOT_DRIVE
@@ -286,7 +288,7 @@ lba_mode:
        /* the absolute address */
        movl    kernel_sector, %ebx
        movl    %ebx, 8(%si)
-       movl    kernel_sector + 4, %ebx
+       movl    kernel_sector_high, %ebx
        movl    %ebx, 12(%si)
 
        /* the segment of buffer address */
@@ -355,7 +357,7 @@ LOCAL(final_init):
 
 setup_sectors:
        /* load logical sector start (top half) */
-       movl    kernel_sector + 4, %eax
+       movl    kernel_sector_high, %eax
 
        orl     %eax, %eax
        jnz     LOCAL(geometry_error)
@@ -507,7 +509,9 @@ LOCAL(message):
 #ifdef HYBRID_BOOT
        . = _start + 0x1b0
 kernel_sector:
-       .long   1, 0
+       .long   1
+kernel_sector_high:
+       .long   0
 #endif
        . = _start + GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC
 nt_magic: