]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/Ia32/EnablePaging32.c
1. Remove #ifdef _MSC_EXTENSION_ from all source files
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / EnablePaging32.c
CommitLineData
23086ba8 1/** @file\r
2 AsmEnablePaging32 function\r
3\r
e5f461a8 4 Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
23086ba8 5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
23086ba8 15__declspec (naked)\r
16VOID\r
17EFIAPI\r
18InternalX86EnablePaging32 (\r
19 IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
20 IN VOID *Context1, OPTIONAL\r
21 IN VOID *Context2, OPTIONAL\r
22 IN VOID *NewStack\r
23 )\r
24{\r
25 _asm {\r
26 push ebp\r
27 mov ebp, esp\r
28 mov ebx, EntryPoint\r
29 mov ecx, Context1\r
30 mov edx, Context2\r
31 pushfd\r
32 pop edi\r
33 cli\r
34 mov eax, cr0\r
35 bts eax, 31\r
36 mov esp, NewStack\r
37 mov cr0, eax\r
38 push edi\r
39 popfd\r
40 push edx\r
41 push ecx\r
42 call ebx\r
43 jmp $\r
44 }\r
45}\r
46\r