i386-pc/boot: Explicitly mark kernel_address[_high] as local.
Otherwise apple asm might try to make accesses relocatable.
This commit is contained in:
parent
bc29c6d019
commit
1998d63688
1 changed files with 11 additions and 11 deletions
|
@ -179,14 +179,14 @@ start:
|
||||||
* End of BIOS parameter block.
|
* End of BIOS parameter block.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
kernel_address:
|
LOCAL(kernel_address):
|
||||||
.word GRUB_BOOT_MACHINE_KERNEL_ADDR
|
.word GRUB_BOOT_MACHINE_KERNEL_ADDR
|
||||||
|
|
||||||
#ifndef HYBRID_BOOT
|
#ifndef HYBRID_BOOT
|
||||||
.org GRUB_BOOT_MACHINE_KERNEL_SECTOR
|
.org GRUB_BOOT_MACHINE_KERNEL_SECTOR
|
||||||
kernel_sector:
|
LOCAL(kernel_sector):
|
||||||
.long 1
|
.long 1
|
||||||
kernel_sector_high:
|
LOCAL(kernel_sector_high):
|
||||||
.long 0
|
.long 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ real_start:
|
||||||
andw $1, %cx
|
andw $1, %cx
|
||||||
jz LOCAL(chs_mode)
|
jz LOCAL(chs_mode)
|
||||||
|
|
||||||
lba_mode:
|
LOCAL(lba_mode):
|
||||||
xorw %ax, %ax
|
xorw %ax, %ax
|
||||||
movw %ax, 4(%si)
|
movw %ax, 4(%si)
|
||||||
|
|
||||||
|
@ -290,9 +290,9 @@ lba_mode:
|
||||||
movw $0x0010, (%si)
|
movw $0x0010, (%si)
|
||||||
|
|
||||||
/* the absolute address */
|
/* the absolute address */
|
||||||
movl kernel_sector, %ebx
|
movl LOCAL(kernel_sector), %ebx
|
||||||
movl %ebx, 8(%si)
|
movl %ebx, 8(%si)
|
||||||
movl kernel_sector_high, %ebx
|
movl LOCAL(kernel_sector_high), %ebx
|
||||||
movl %ebx, 12(%si)
|
movl %ebx, 12(%si)
|
||||||
|
|
||||||
/* the segment of buffer address */
|
/* the segment of buffer address */
|
||||||
|
@ -361,13 +361,13 @@ LOCAL(final_init):
|
||||||
|
|
||||||
setup_sectors:
|
setup_sectors:
|
||||||
/* load logical sector start (top half) */
|
/* load logical sector start (top half) */
|
||||||
movl kernel_sector_high, %eax
|
movl LOCAL(kernel_sector_high), %eax
|
||||||
|
|
||||||
orl %eax, %eax
|
orl %eax, %eax
|
||||||
jnz LOCAL(geometry_error)
|
jnz LOCAL(geometry_error)
|
||||||
|
|
||||||
/* load logical sector start (bottom half) */
|
/* load logical sector start (bottom half) */
|
||||||
movl kernel_sector, %eax
|
movl LOCAL(kernel_sector), %eax
|
||||||
|
|
||||||
/* zero %edx */
|
/* zero %edx */
|
||||||
xorl %edx, %edx
|
xorl %edx, %edx
|
||||||
|
@ -452,7 +452,7 @@ LOCAL(copy_buffer):
|
||||||
popa
|
popa
|
||||||
|
|
||||||
/* boot kernel */
|
/* boot kernel */
|
||||||
jmp *(kernel_address)
|
jmp *(LOCAL(kernel_address))
|
||||||
|
|
||||||
/* END OF MAIN LOOP */
|
/* END OF MAIN LOOP */
|
||||||
|
|
||||||
|
@ -512,9 +512,9 @@ LOCAL(message):
|
||||||
|
|
||||||
#ifdef HYBRID_BOOT
|
#ifdef HYBRID_BOOT
|
||||||
.org 0x1b0
|
.org 0x1b0
|
||||||
kernel_sector:
|
LOCAL(kernel_sector):
|
||||||
.long 1
|
.long 1
|
||||||
kernel_sector_high:
|
LOCAL(kernel_sector_high):
|
||||||
.long 0
|
.long 0
|
||||||
#endif
|
#endif
|
||||||
.org GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC
|
.org GRUB_BOOT_MACHINE_WINDOWS_NT_MAGIC
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue