ReactOS
0.4.15-dev-1647-g91fceab
|
Go to the source code of this file.
Functions | |
void | NewInt31Handler (void) |
ULONG | HandleInDebuggerFault (FRAME *ptr, ULONG address) |
ULONG | HandlePageFault (FRAME *ptr) |
__asm__ ("\n\t \ NewIntEHandler:\n\t \ pushfl\n\t \ cli\n\t \ cld\n\t \ pushal\n\t \ pushl %ds\n\t \ \n\t \ // setup default data selectors\n\t \ movw %ss,%ax\n\t \ movw %ax,%ds\n\t \ \n\t \ /*\n\t \ * Load the PCR selector.\n\t \ */\n\t \ movl %fs, %eax\n\t \ movl %eax, _OLD_PCR\n\t \ movl _PCR_SEL, %eax\n\t \ movl %eax, %fs\n\t \ \n\t \ // get frame ptr\n\t \ lea 40(%esp),%eax\n\t \ pushl %eax\n\t \ call _HandlePageFault\n\t \ addl $4,%esp\n\t \ \n\t \ pushl %eax\n\t \ movl _OLD_PCR, %eax\n\t \ movl %eax, %fs\n\t \ popl %eax\n\t \ \n\t \ cmpl $0,%eax\n\t \ je call_old_inte_handler\n\t \ \n\t \ cmpl $2,%eax\n\t \ je call_handler_unknown_reason\n\t \ \n\t \ popl %ds\n\t \ popal\n\t \ popfl\n\t \ // remove error code. will be restored later when we call\n\t \ // original handler again.\n\t \ addl $4,%esp\n\t \ // call debugger loop\n\t \ pushl $" STR(REASON_PAGEFAULT) "\n\t \ jmp NewInt31Handler\n\t \ \n\t \ call_old_inte_handler:\n\t \ popl %ds\n\t \ popal\n\t \ popfl\n\t \ // chain to old handler\n\t \ .byte 0x2e\n\t \ jmp *_OldIntEHandler\n\t \ \n\t \ call_handler_unknown_reason:\n\t \ popl %ds\n\t \ popal\n\t \ popfl\n\t \ // remove error code. will be restored later when we call\n\t \ // original handler again.\n\t \ addl $4,%esp\n\t \ // call debugger loop\n\t \ pushl $" STR(REASON_INTERNAL_ERROR) "\n\t \ jmp NewInt31Handler\n\t \ ") | |
void | InstallIntEHook (void) |
void | DeInstallIntEHook (void) |
Variables | |
char | tempPageFault [1024] |
ULONG | OldIntEHandler =0 |
ULONG | error_code |
BOOLEAN | bInPageFaultHandler = FALSE |
static ULONG | PCR_SEL = PCR_SELECTOR |
static ULONG | OLD_PCR |
__asm__ | ( | "\n\t \NewIntEHandler:\n\t \ pushfl\n\t \ cli\n\t \ cld\n\t \ pushal\n\t \ pushl %ds\n\t \\n\t \ // setup default data selectors\n\t \ movw % | ss, |
%ax\n\t \ movw % | ax, | ||
%ds\n\t \\n\t \/*\n\t \ *Load the PCR selector.\n\t \ */\n\t \ movl % | fs, | ||
%eax\n\t \ movl % | eax, | ||
_OLD_PCR\n\t \ movl | _PCR_SEL, | ||
%eax\n\t \ movl % | eax, | ||
%fs\n\t \\n\t \//get frame ptr\n\t \ lea | 40%esp, | ||
%eax\n\t \ pushl %eax\n\t \ call _HandlePageFault\n\t \ addl | $4, | ||
%esp\n\t \\n\t \ pushl %eax\n\t \ movl | _OLD_PCR, | ||
%eax\n\t \ movl % | eax, | ||
%fs\n\t \ popl %eax\n\t \\n\t \ cmpl | $0, | ||
%eax\n\t \ je call_old_inte_handler\n\t \\n\t \ cmpl | $2, | ||
%eax\n\t \ je call_handler_unknown_reason\n\t \\n\t \ popl %ds\n\t \ popal\n\t \ popfl\n\t \//remove error code. will be restored later when we call\n\t \//original handler again.\n\t \ addl | $4, | ||
%esp\n\t \//call debugger loop\n\t \ pushl $" STR(REASON_PAGEFAULT) "\n\t \ jmp NewInt31Handler\n\t \\n\t \call_old_inte_handler:\n\t \ popl %ds\n\t \ popal\n\t \ popfl\n\t \//chain to old handler\n\t \ .byte 0x2e\n\t \ jmp *_OldIntEHandler\n\t \\n\t \call_handler_unknown_reason:\n\t \ popl %ds\n\t \ popal\n\t \ popfl\n\t \//remove error code. will be restored later when we call\n\t \//original handler again.\n\t \ addl | $4, | ||
%esp\n\t \//call debugger loop\n\t \ pushl $" STR(REASON_INTERNAL_ERROR) "\n\t \ jmp NewInt31Handler\n\t \ " | |||
) |
Referenced by HandleInDebuggerFault(), HandlePageFault(), and InstallIntEHook().
Definition at line 60 of file pgflt.c.
Referenced by HandlePageFault().
Definition at line 146 of file pgflt.c.
Definition at line 365 of file pgflt.c.
Referenced by InitPICE().
Definition at line 48 of file pgflt.c.
Referenced by HandleInDebuggerFault().
ULONG error_code |
Definition at line 47 of file pgflt.c.
Referenced by HandlePageFault().
ULONG OldIntEHandler =0 |
Definition at line 46 of file pgflt.c.
Referenced by DeInstallIntEHook(), and InstallIntEHook().