efi_stub_64.S 540 B

123456789101112131415161718192021222324252627282930
  1. #include <asm/segment.h>
  2. #include <asm/msr.h>
  3. #include <asm/processor-flags.h>
  4. #include "../../platform/efi/efi_stub_64.S"
  5. #ifdef CONFIG_EFI_MIXED
  6. .code64
  7. .text
  8. ENTRY(efi64_thunk)
  9. push %rbp
  10. push %rbx
  11. subq $16, %rsp
  12. leaq efi_exit32(%rip), %rax
  13. movl %eax, 8(%rsp)
  14. leaq efi_gdt64(%rip), %rax
  15. movl %eax, 4(%rsp)
  16. movl %eax, 2(%rax) /* Fixup the gdt base address */
  17. leaq efi32_boot_gdt(%rip), %rax
  18. movl %eax, (%rsp)
  19. call __efi64_thunk
  20. addq $16, %rsp
  21. pop %rbx
  22. pop %rbp
  23. ret
  24. ENDPROC(efi64_thunk)
  25. #endif /* CONFIG_EFI_MIXED */