2 * Copyright (C) 2014 Intel Corporation; author Matt Fleming
5 #include <linux/linkage.h>
6 #include <asm/page_types.h>
15 * Switch to 1:1 mapped 32-bit stack pointer.
17 movq %rsp, efi_saved_sp(%rip)
18 movq efi_scratch+25(%rip), %rsp
21 * Calculate the physical address of the kernel text.
23 movq $__START_KERNEL_map, %rax
24 subq phys_base(%rip), %rax
27 * Push some physical addresses onto the stack. This is easier
28 * to do now in a code64 section while the assembler can address
29 * 64-bit values. Note that all the addresses on the stack are
33 leaq efi_exit32(%rip), %rbx
36 leaq efi_gdt64(%rip), %rbx
40 leaq efi_gdt32(%rip), %rbx
45 leaq __efi64_thunk(%rip), %rbx
49 movq efi_saved_sp(%rip), %rsp
57 .word efi_gdt32_end - efi_gdt32
58 .long 0 /* Filled out above */
60 .quad 0x0000000000000000 /* NULL descriptor */
61 .quad 0x00cf9a000000ffff /* __KERNEL_CS */
62 .quad 0x00cf93000000ffff /* __KERNEL_DS */