]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/Ia32/EnablePaging32.S
Import some basic libraries instances for Mde Packages.
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / EnablePaging32.S
CommitLineData
e1f414b6 1//\r
2// Include common header file for this module.\r
3//\r
4#include "CommonHeader.h"\r
5\r
6#------------------------------------------------------------------------------\r
7#\r
8# Copyright (c) 2006, Intel Corporation\r
9# All rights reserved. This program and the accompanying materials\r
10# are licensed and made available under the terms and conditions of the BSD License\r
11# which accompanies this distribution. The full text of the license may be found at\r
12# http://opensource.org/licenses/bsd-license.php\r
13#\r
14# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
15# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
16#\r
17# Module Name:\r
18#\r
19# EnablePaging32.Asm\r
20#\r
21# Abstract:\r
22#\r
23# InternalX86EnablePaging32 function\r
24#\r
25# Notes:\r
26#\r
27#------------------------------------------------------------------------------\r
28\r
29.globl ASM_PFX(InternalX86EnablePaging32)\r
30\r
31#------------------------------------------------------------------------------\r
32# VOID\r
33# EFIAPI\r
34# InternalX86EnablePaging32 (\r
35# IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
36# IN VOID *Context1, OPTIONAL\r
37# IN VOID *Context2, OPTIONAL\r
38# IN VOID *NewStack\r
39# );\r
40#------------------------------------------------------------------------------\r
41ASM_PFX(InternalX86EnablePaging32):\r
42 movl 4(%esp), %ebx\r
43 movl 8(%esp), %ecx\r
44 movl 12(%esp), %edx\r
45 pushfl\r
46 pop %edi\r
47 cli\r
48 movl %cr0, %eax\r
49 btsl $31, %eax\r
50 movl 16(%esp), %esp\r
51 movl %eax, %cr0\r
52 push %edi\r
53 popfl\r
54 push %edx\r
55 push %ecx\r
56 call *%ebx\r
57 jmp .\r