TianoCore EDK2
master
Loading...
Searching...
No Matches
DisablePaging32.c
Go to the documentation of this file.
1
9
#include "
BaseLibInternals.h
"
10
41
__declspec
(naked)
42
VOID
43
EFIAPI
44
InternalX86DisablePaging32
(
45
IN
SWITCH_STACK_ENTRY_POINT
EntryPoint,
46
IN
VOID *Context1 OPTIONAL,
47
IN
VOID *Context2 OPTIONAL,
48
IN
VOID *NewStack
49
)
50
{
51
_asm {
52
push ebp
53
mov ebp, esp
54
mov ebx, EntryPoint
55
mov ecx, Context1
56
mov edx, Context2
57
pushfd
58
pop edi
// save EFLAGS to edi
59
cli
60
mov eax, cr0
61
btr eax, 31
62
mov esp, NewStack
63
mov cr0, eax
64
push edi
65
popfd
// restore EFLAGS from edi
66
push edx
67
push ecx
68
call ebx
69
jmp $
// EntryPoint() should not return
70
}
71
}
SWITCH_STACK_ENTRY_POINT
VOID(EFIAPI * SWITCH_STACK_ENTRY_POINT)(IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL)
Definition:
BaseLib.h:5019
BaseLibInternals.h
__declspec
__declspec(naked)
Definition:
DisablePaging32.c:41
IN
#define IN
Definition:
Base.h:279
InternalX86DisablePaging32
VOID EFIAPI InternalX86DisablePaging32(IN SWITCH_STACK_ENTRY_POINT EntryPoint, IN VOID *Context1 OPTIONAL, IN VOID *Context2 OPTIONAL, IN VOID *NewStack)
Definition:
Non-existing.c:92
MdePkg
Library
BaseLib
Ia32
DisablePaging32.c
Generated on Fri Nov 15 2024 18:01:17 for TianoCore EDK2 by
1.9.6