]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/EnablePaging32.asm
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / Ia32 / EnablePaging32.asm
CommitLineData
3eb9473e 1; Copyright (c) 2004, Intel Corporation \r
2; All rights reserved. This program and the accompanying materials \r
3; are licensed and made available under the terms and conditions of the BSD License \r
4; which accompanies this distribution. The full text of the license may be found at \r
5; http://opensource.org/licenses/bsd-license.php \r
6; \r
7; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
8; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
9;\r
10; Module Name:\r
11;\r
12; EnablePaging32.Asm\r
13;\r
14; Abstract:\r
15;\r
16; AsmEnablePaging32 function\r
17;\r
18; Notes:\r
19;\r
20;------------------------------------------------------------------------------\r
21\r
22 .386\r
23 .model flat,C\r
24 .code\r
25\r
26;------------------------------------------------------------------------------\r
27; VOID\r
28; EFIAPI\r
29; InternalX86EnablePaging32 (\r
30; IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
31; IN VOID *Context1, OPTIONAL\r
32; IN VOID *Context2, OPTIONAL\r
33; IN VOID *NewStack\r
34; );\r
35;------------------------------------------------------------------------------\r
36InternalX86EnablePaging32 PROC\r
37 mov ebx, [esp + 4]\r
38 mov ecx, [esp + 8]\r
39 mov edx, [esp + 12]\r
40 pushfd\r
41 pop edi ; save flags in edi\r
42 cli\r
43 mov eax, cr0\r
44 bts eax, 31\r
45 mov esp, [esp + 16]\r
46 mov cr0, eax\r
47 push edi\r
48 popfd ; restore flags\r
49 push edx\r
50 push ecx\r
51 call ebx\r
52 jmp $\r
53InternalX86EnablePaging32 ENDP\r
54\r
55 END\r