+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
#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
/* 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 */
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)
#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: