Apple fixes.
* grub-core/lib/i386/relocator16.S: Use correct __APPLE__ and not __APPLE_ * grub-core/lib/i386/relocator_common.S [__APPLE__]: Fix gdtdesc definition. * grub-core/lib/i386/relocator64.S [__APPLE__]: Assemble jmp manually.
This commit is contained in:
parent
9f3fc8835f
commit
489509f40e
4 changed files with 17 additions and 2 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2012-06-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Apple fixes.
|
||||||
|
|
||||||
|
* grub-core/lib/i386/relocator16.S: Use correct __APPLE__ and not
|
||||||
|
__APPLE_
|
||||||
|
* grub-core/lib/i386/relocator_common.S [__APPLE__]: Fix gdtdesc
|
||||||
|
definition.
|
||||||
|
* grub-core/lib/i386/relocator64.S [__APPLE__]: Assemble jmp manually.
|
||||||
|
|
||||||
2012-06-26 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-06-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Handle slash in HFS label.
|
Handle slash in HFS label.
|
||||||
|
|
|
@ -84,7 +84,7 @@ VARIABLE(grub_relocator16_start)
|
||||||
|
|
||||||
movl %esi, %eax
|
movl %esi, %eax
|
||||||
shrl $4, %eax
|
shrl $4, %eax
|
||||||
#ifdef __APPLE_
|
#ifdef __APPLE__
|
||||||
LOCAL(segment_offset) = LOCAL (segment) - LOCAL (base)
|
LOCAL(segment_offset) = LOCAL (segment) - LOCAL (base)
|
||||||
LOCAL(idt_offset) = LOCAL(relocator16_idt) - LOCAL (base)
|
LOCAL(idt_offset) = LOCAL(relocator16_idt) - LOCAL (base)
|
||||||
LOCAL(cont2_offset) = LOCAL (cont2) - LOCAL(base)
|
LOCAL(cont2_offset) = LOCAL (cont2) - LOCAL(base)
|
||||||
|
|
|
@ -109,7 +109,12 @@ VARIABLE(grub_relocator64_rdx)
|
||||||
payload and makes this implementation easier. */
|
payload and makes this implementation easier. */
|
||||||
cld
|
cld
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
.byte 0xff, 0x25
|
||||||
|
.quad 0
|
||||||
|
#else
|
||||||
jmp *LOCAL(jump_addr) (%rip)
|
jmp *LOCAL(jump_addr) (%rip)
|
||||||
|
#endif
|
||||||
|
|
||||||
LOCAL(jump_addr):
|
LOCAL(jump_addr):
|
||||||
VARIABLE(grub_relocator64_rip)
|
VARIABLE(grub_relocator64_rip)
|
||||||
|
|
|
@ -58,7 +58,7 @@ LOCAL(cont0):
|
||||||
LOCAL(jump_vector_offset) = LOCAL(jump_vector) - LOCAL(base)
|
LOCAL(jump_vector_offset) = LOCAL(jump_vector) - LOCAL(base)
|
||||||
LOCAL(gdt_offset) = LOCAL(gdt) - LOCAL(base)
|
LOCAL(gdt_offset) = LOCAL(gdt) - LOCAL(base)
|
||||||
LOCAL(gdt_addr_offset) = LOCAL(gdt_addr) - LOCAL(base)
|
LOCAL(gdt_addr_offset) = LOCAL(gdt_addr) - LOCAL(base)
|
||||||
LOCAL(gdtdesc_offset) = LOCAL(gdt_addr) - LOCAL(base)
|
LOCAL(gdtdesc_offset) = LOCAL(gdtdesc) - LOCAL(base)
|
||||||
|
|
||||||
lea LOCAL(cont1_offset) (RSI, 1), RAX
|
lea LOCAL(cont1_offset) (RSI, 1), RAX
|
||||||
movl %eax, LOCAL(jump_vector_offset) (RSI, 1)
|
movl %eax, LOCAL(jump_vector_offset) (RSI, 1)
|
||||||
|
|
Loading…
Reference in a new issue