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