From a5a9986767a67bc9205909b3f593473d6349e25d Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Sat, 28 May 2005 07:32:23 +0000 Subject: [PATCH] Don't try to resolve user mode page faults in the very early boot phase. svn path=/trunk/; revision=15558 --- reactos/ntoskrnl/mm/mm.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/reactos/ntoskrnl/mm/mm.c b/reactos/ntoskrnl/mm/mm.c index 0bd5e39cdc5..5a54dbcb857 100644 --- a/reactos/ntoskrnl/mm/mm.c +++ b/reactos/ntoskrnl/mm/mm.c @@ -193,12 +193,12 @@ NTSTATUS MmAccessFault(KPROCESSOR_MODE Mode, if (KeGetCurrentIrql() >= DISPATCH_LEVEL) { - DbgPrint("Page fault at high IRQL was %d\n", KeGetCurrentIrql()); + CPRINT("Page fault at high IRQL was %d\n", KeGetCurrentIrql()); return(STATUS_UNSUCCESSFUL); } if (PsGetCurrentProcess() == NULL) { - DbgPrint("No current process\n"); + CPRINT("No current process\n"); return(STATUS_UNSUCCESSFUL); } @@ -316,7 +316,7 @@ NTSTATUS MmNotPresentFault(KPROCESSOR_MODE Mode, if (KeGetCurrentIrql() >= DISPATCH_LEVEL) { - DbgPrint("Page fault at high IRQL was %d\n", KeGetCurrentIrql()); + CPRINT("Page fault at high IRQL was %d, address %x\n", KeGetCurrentIrql(), Address); return(STATUS_UNSUCCESSFUL); } if (PsGetCurrentProcess() == NULL) @@ -324,8 +324,11 @@ NTSTATUS MmNotPresentFault(KPROCESSOR_MODE Mode, /* Allow this! It lets us page alloc much earlier! It won't be needed * after my init patch anyways */ - DbgPrint("No current process\n"); - //return(STATUS_UNSUCCESSFUL); + CPRINT("No current process\n"); + if (Address < KERNEL_BASE) + { + return(STATUS_UNSUCCESSFUL); + } } /* @@ -338,7 +341,7 @@ NTSTATUS MmNotPresentFault(KPROCESSOR_MODE Mode, */ if (Mode != KernelMode) { - DbgPrint("%s:%d\n",__FILE__,__LINE__); + CPRINT("Address: %x\n", Address); return(STATUS_UNSUCCESSFUL); } AddressSpace = MmGetKernelAddressSpace();