1 /* ----------------------------------------------------------------------- *
3 * Copyright 2013 Intel Corporation; author: Matt Fleming
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
8 * Boston MA 02110-1301, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
11 * ----------------------------------------------------------------------- */
15 #define MSR_EFER 0xc0000080
18 .type kernel_jump,@function
23 /* save the content of rsi (boot_param argument of kernel_jump function) */
30 /* need to perform a long jump to update cs
32 /* load absolute address of pm_code in jmp_address location */
33 lea (pm_code - base_address)(%rsi, 1), %rax
34 mov %eax, (jmp_address - base_address)(%rsi, 1)
36 ljmp *(jmp_address - base_address)(%rsi, 1)
40 .word 0x10 /* segment */
45 /* cs segment has been updated, now update the rest */
55 btr $CR0_PG_BIT, %eax /* PG in CR0 */
58 /* disable long mode. */
70 .globl efi_handover_32
71 .type efi_handover_32,@function
73 movl $38, errno(%rip) /* ENOSYS */
76 .globl efi_handover_64
78 .type efi_handover_64,@function
79 .type efi_handover,@function