ReactOS  r76032
pgflt.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void InstallIntEHook (void)
 
void DeInstallIntEHook (void)
 

Variables

ULONG error_code
 

Function Documentation

void DeInstallIntEHook ( void  )

Definition at line 389 of file pgflt.c.

Referenced by CleanUpPICE().

390 {
391  ENTER_FUNC();
392 
393  MaskIrqs();
394  if(OldIntEHandler)
395  {
397  OldIntEHandler=0;
398  }
399  UnmaskIrqs();
400 
401  LEAVE_FUNC();
402 }
ULONG OldIntEHandler
Definition: pgflt.c:46
ULONG SetGlobalInt(ULONG dwInt, ULONG NewIntHandler)
Definition: hooks.c:95
#define LEAVE_FUNC()
Definition: debug.h:43
void MaskIrqs(void)
Definition: hooks.c:68
unsigned int ULONG
Definition: retypes.h:1
#define ENTER_FUNC()
Definition: debug.h:42
void UnmaskIrqs(void)
Definition: hooks.c:82
void InstallIntEHook ( void  )

Definition at line 365 of file pgflt.c.

Referenced by InitPICE().

366 {
367  ULONG LocalIntEHandler;
368 
369  ENTER_FUNC();
370 
371  MaskIrqs();
372  if(!OldIntEHandler)
373  {
374  __asm__ __volatile__("mov $NewIntEHandler,%0"
375  :"=r" (LocalIntEHandler)
376  :
377  :"eax");
378  OldIntEHandler=SetGlobalInt(0x0E,(ULONG)LocalIntEHandler);
379  }
380  UnmaskIrqs();
381  DPRINT((0,"OldIntE @ %x\n", OldIntEHandler));
382  LEAVE_FUNC();
383 }
ULONG OldIntEHandler
Definition: pgflt.c:46
ULONG SetGlobalInt(ULONG dwInt, ULONG NewIntHandler)
Definition: hooks.c:95
#define LEAVE_FUNC()
Definition: debug.h:43
void DPRINT(...)
Definition: polytest.cpp:61
void MaskIrqs(void)
Definition: hooks.c:68
__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 \ ")
unsigned int ULONG
Definition: retypes.h:1
#define ENTER_FUNC()
Definition: debug.h:42
void UnmaskIrqs(void)
Definition: hooks.c:82

Variable Documentation

ULONG error_code

Definition at line 47 of file pgflt.c.

Referenced by HandlePageFault().