Skip to content

Commit

Permalink
9652 loader.efi: use explicit lea in multiboot_tramp.S
Browse files Browse the repository at this point in the history
Reviewed by: Yuri Pankov <yuripv@yuripv.net>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Approved by: Robert Mustacchi <rm@joyent.com>
  • Loading branch information
tsoome authored and rmustacc committed Jul 17, 2018
1 parent 5a468b1 commit 3dd539e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions usr/src/boot/sys/boot/efi/loader/arch/amd64/multiboot_tramp.S
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@ multiboot_tramp:
movq %rax, %rbx /* MBI */
popq %rsi /* entry to rsi */
popq %rdi /* restore magic */
movq gdt@GOTPCREL(%rip), %rax
movq gdtaddr@GOTPCREL(%rip), %rdx
lea gdt(%rip), %rax
lea gdtaddr(%rip), %rdx
movq %rax, (%rdx)
movq gdtdesc@GOTPCREL(%rip), %rax
lea gdtdesc(%rip), %rax
lgdt (%rax)

/* record the address */
movq multiboot_tramp_2@GOTPCREL(%rip), %rcx
lea multiboot_tramp_2(%rip), %rcx
movq %rsp, %rax
pushq $SEL_SDATA
pushq %rax
pushf
pushq $SEL_SCODE
movq multiboot_tramp_1@GOTPCREL(%rip), %rax
lea multiboot_tramp_1(%rip), %rax
pushq %rax
iretq

Expand Down

0 comments on commit 3dd539e

Please sign in to comment.