blob: 7ff3632806b18ec9a48bd0ae88bdc7a9e9dbe091 [file] [log] [blame]
Matt Fleming01544162014-01-10 15:37:17 +00001#include <asm/segment.h>
2#include <asm/msr.h>
3#include <asm/processor-flags.h>
4
Matt Fleming291f3632011-12-12 21:27:52 +00005#include "../../platform/efi/efi_stub_64.S"
Matt Fleming01544162014-01-10 15:37:17 +00006
7#ifdef CONFIG_EFI_MIXED
8 .code64
9 .text
10ENTRY(efi64_thunk)
11 push %rbp
12 push %rbx
13
14 subq $16, %rsp
15 leaq efi_exit32(%rip), %rax
16 movl %eax, 8(%rsp)
17 leaq efi_gdt64(%rip), %rax
18 movl %eax, 4(%rsp)
19 movl %eax, 2(%rax) /* Fixup the gdt base address */
20 leaq efi32_boot_gdt(%rip), %rax
21 movl %eax, (%rsp)
22
23 call __efi64_thunk
24
25 addq $16, %rsp
26 pop %rbx
27 pop %rbp
28 ret
29ENDPROC(efi64_thunk)
30#endif /* CONFIG_EFI_MIXED */