Update the copyright notice format
[mirror_edk2.git] / UefiCpuPkg / ResetVector / Vtf0 / Ia32 / 32FlatTo64Flat.asm
CommitLineData
bc252e8e
EB
1;------------------------------------------------------------------------------\r
2; @file\r
3; Transition from 32 bit flat protected mode into 64 bit flat protected mode\r
4;\r
01a1c0fc
HT
5; Copyright (c) 2008 - 2009, Intel Corporation. All rights reserved.<BR>\r
6; This program and the accompanying materials\r
bc252e8e
EB
7; are licensed and made available under the terms and conditions of the BSD License\r
8; which accompanies this distribution. The full text of the license may be found at\r
9; http://opensource.org/licenses/bsd-license.php\r
10;\r
11; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13;\r
14;------------------------------------------------------------------------------\r
15\r
16BITS 32\r
17\r
18;\r
19; Modified: EAX\r
20;\r
21Transition32FlatTo64Flat:\r
22\r
23 mov eax, ((ADDR_OF_START_OF_RESET_CODE & ~0xfff) - 0x1000)\r
24 mov cr3, eax\r
25\r
26 mov eax, cr4\r
27 bts eax, 5 ; enable PAE\r
28 mov cr4, eax \r
29\r
30 mov ecx, 0xc0000080\r
31 rdmsr\r
32 bts eax, 8 ; set LME\r
33 wrmsr\r
34\r
35 mov eax, cr0\r
36 bts eax, 31 ; set PG\r
37 mov cr0, eax ; enable paging\r
38\r
39 jmp LINEAR_CODE64_SEL:ADDR_OF(jumpTo64BitAndLandHere)\r
40BITS 64\r
41jumpTo64BitAndLandHere:\r
42\r
43 debugShowPostCode POSTCODE_64BIT_MODE\r
44\r
45 OneTimeCallRet Transition32FlatTo64Flat\r
46\r