0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include <linux/linkage.h>
0023 #include <linux/objtool.h>
0024 #include <asm/page_types.h>
0025 #include <asm/segment.h>
0026 #include <asm/nospec-branch.h>
0027
0028 .text
0029 .code64
0030 SYM_FUNC_START(__efi64_thunk)
0031 STACK_FRAME_NON_STANDARD __efi64_thunk
0032 push %rbp
0033 push %rbx
0034
0035
0036
0037
0038 movq %rsp, %rax
0039 movq efi_mixed_mode_stack_pa(%rip), %rsp
0040 push %rax
0041
0042
0043
0044
0045 subq $0x24, %rsp
0046 movq 0x18(%rax), %rbp
0047 movq 0x20(%rax), %rbx
0048 movq 0x28(%rax), %rax
0049 movl %ebp, 0x18(%rsp)
0050 movl %ebx, 0x1c(%rsp)
0051 movl %eax, 0x20(%rsp)
0052
0053
0054
0055
0056 movq $__START_KERNEL_map, %rax
0057 subq phys_base(%rip), %rax
0058
0059 leaq 1f(%rip), %rbp
0060 leaq 2f(%rip), %rbx
0061 subq %rax, %rbp
0062 subq %rax, %rbx
0063
0064 movl %ebx, 0x0(%rsp)
0065 movl %esi, 0x4(%rsp)
0066 movl %edx, 0x8(%rsp)
0067 movl %ecx, 0xc(%rsp)
0068 movl %r8d, 0x10(%rsp)
0069 movl %r9d, 0x14(%rsp)
0070
0071
0072 pushq $__KERNEL32_CS
0073 pushq %rdi
0074 lretq
0075
0076 1: movq 0x20(%rsp), %rsp
0077 pop %rbx
0078 pop %rbp
0079 ANNOTATE_UNRET_SAFE
0080 ret
0081 int3
0082
0083 .code32
0084 2: pushl $__KERNEL_CS
0085 pushl %ebp
0086 lret
0087 SYM_FUNC_END(__efi64_thunk)
0088
0089 .bss
0090 .balign 8
0091 SYM_DATA(efi_mixed_mode_stack_pa, .quad 0)