Matt Fleming | 0154416 | 2014-01-10 15:37:17 +0000 | [diff] [blame] | 1 | #include <asm/segment.h> |
| 2 | #include <asm/msr.h> |
| 3 | #include <asm/processor-flags.h> |
| 4 | |
Matt Fleming | 291f363 | 2011-12-12 21:27:52 +0000 | [diff] [blame] | 5 | #include "../../platform/efi/efi_stub_64.S" |
Matt Fleming | 0154416 | 2014-01-10 15:37:17 +0000 | [diff] [blame] | 6 | |
| 7 | #ifdef CONFIG_EFI_MIXED |
| 8 | .code64 |
| 9 | .text |
| 10 | ENTRY(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 |
| 29 | ENDPROC(efi64_thunk) |
| 30 | #endif /* CONFIG_EFI_MIXED */ |