00044 :
00045
00046 This routine dispatches a v86 mode page fault to
the VDM monitor.
00047 It verifies that
the fault occurred below 1MB.
00048
00049
00050 Arguments:
00051 TrapFrame
00052 Mode - 0 -
if read
00053 1 -
if write
00054 FaultAddr - faulting address
00055
00056 Return Value:
00057
00058 True
if successfull, False otherwise
00059
00060 --*/
00061 {
00062
PVDM_TIB VdmTib;
00063
NTSTATUS Status = STATUS_SUCCESS;
00064 KIRQL OldIrql;
00065
00066
00067
PAGED_CODE();
00068
00069
00070
00071
00072
KeRaiseIrql(APC_LEVEL, &OldIrql);
00073
00074
Status =
VdmpGetVdmTib(&VdmTib, VDMTIB_KPROBE);
00075
if (!
NT_SUCCESS(Status)) {
00076
KeLowerIrql(OldIrql);
00077
return(
FALSE);
00078 }
00079
00080
00081
00082
00083
try {
00084
00085
00086
00087
00088
00089
00090
if ((TrapFrame->EFlags & EFLAGS_V86_MASK) ||
00091 (TrapFrame->SegCs != (KGDT_R3_CODE | RPL_MASK))) {
00092
00093
00094
00095
00096
if (FaultAddr < 0x100000) {
00097 VdmTib->
EventInfo.
Event =
VdmMemAccess;
00098 VdmTib->
EventInfo.
InstructionSize = 0;
00099 VdmTib->
EventInfo.FaultInfo.FaultAddr = FaultAddr;
00100 VdmTib->
EventInfo.FaultInfo.RWMode = Mode;
00101
VdmEndExecution(TrapFrame, VdmTib);
00102 }
00103
else {
00104
Status = STATUS_ILLEGAL_INSTRUCTION;
00105 }
00106 }
00107
00108 } except(EXCEPTION_EXECUTE_HANDLER) {
00109
Status = GetExceptionCode();
00110 }
00111
00112
KeLowerIrql(OldIrql);
00113
00114
if (!
NT_SUCCESS(Status)) {
00115
return FALSE;
00116 }
else {
00117
return TRUE;
00118 }
00119
00120 }
}