1 #------------------------------------------------------------------------------
3 # Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
5 # This program and the accompanying materials
6 # are licensed and made available under the terms and conditions of the BSD License
7 # which accompanies this distribution. The full text of the license may be found at
8 # http://opensource.org/licenses/bsd-license.php.
10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 #------------------------------------------------------------------------------
15 ASM_GLOBAL ASM_PFX(JumpToKernel)
17 #------------------------------------------------------------------------------
21 # VOID *KernelStart, // %rcx
22 # VOID *KernelBootParams // %rdx
24 #------------------------------------------------------------------------------
25 ASM_PFX(JumpToKernel):
27 // Set up for executing kernel. BP in %esi, entry point on the stack
28 // (64-bit when the 'ret' will use it as 32-bit, but we're little-endian)
32 // Jump into the compatibility mode CS
36 .byte 0x48, 0xcb // retfq
38 1: // Now in compatibility mode
52 // Disable long mode in EFER
53 movl $0x0c0000080, %ecx
63 // Zero registers and 'return' to kernel