2 * Function calling ABI conversion from Linux to EFI for x86_64
4 * Copyright (C) 2007 Intel Corp
5 * Bibo Mao <bibo.mao@intel.com>
6 * Huang Ying <ying.huang@intel.com>
9 #include <linux/linkage.h>
10 #include <asm/segment.h>
12 #include <asm/processor-flags.h>
13 #include <asm/page_types.h>
14 #include <asm/frame.h>
23 mov %rax, 0x8(%rsp); \
24 movaps %xmm0, 0x60(%rsp); \
25 movaps %xmm1, 0x50(%rsp); \
26 movaps %xmm2, 0x40(%rsp); \
27 movaps %xmm3, 0x30(%rsp); \
28 movaps %xmm4, 0x20(%rsp); \
29 movaps %xmm5, 0x10(%rsp)
32 movaps 0x60(%rsp), %xmm0; \
33 movaps 0x50(%rsp), %xmm1; \
34 movaps 0x40(%rsp), %xmm2; \
35 movaps 0x30(%rsp), %xmm3; \
36 movaps 0x20(%rsp), %xmm4; \
37 movaps 0x10(%rsp), %xmm5; \
38 mov 0x8(%rsp), %rsi; \
44 movq %r15, efi_scratch(%rip)
45 movq %r14, efi_scratch+8(%rip)
51 movq efi_scratch+8(%rip), %r14
52 movq efi_scratch(%rip), %r15
56 cmpb $0, efi_scratch+24(%rip)
58 movq %r15, efi_scratch(%rip) # r15
61 movq %r15, efi_scratch+8(%rip) # prev_cr3
62 movq efi_scratch+16(%rip), %r15 # EFI pgt
68 cmpb $0, efi_scratch+24(%rip)
70 movq efi_scratch+8(%rip), %r15
72 movq efi_scratch(%rip), %r15