Author: tkreuzer Date: Sun Sep 22 21:19:40 2013 New Revision: 60327
URL: http://svn.reactos.org/svn/reactos?rev=60327&view=rev Log: [DEBUG.H] Add a _WARN macro to emit compiler warning messages (also adds __STRLINE__ macro, being resolved to the current line number as a string token) [NTOSKRNL] Fix some x64 issues and warn about unimplemented session space stuff on x64
Modified: trunk/reactos/include/reactos/debug.h trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c
Modified: trunk/reactos/include/reactos/debug.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/debug.h?rev... ============================================================================== --- trunk/reactos/include/reactos/debug.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/debug.h [iso-8859-1] Sun Sep 22 21:19:40 2013 @@ -230,4 +230,18 @@ #define ASSERT_IRQL_EQUAL(x) ASSERT(KeGetCurrentIrql()==(x)) #define ASSERT_IRQL_LESS(x) ASSERT(KeGetCurrentIrql()<(x))
+#define __STRING2__(x) #x +#define __STRING__(x) __STRING2__(x) +#define __STRLINE__ __STRING__(__LINE__) + +#define __TOKENPASTE2__(x, y) x ## y +#define __TOKENPASTE__(x, y) __TOKENPASTE2__(x, y) + +#ifdef _MSC_VER +#define _WARN(msg) __pragma(message("WARNING! Line " __STRLINE__ ": " msg)) +#else +#define _WARN1(_func1, _func2, _msg) void __attribute__((warning (_msg))) _func1(void); void __attribute__((used)) _func2(void) { _func1(); } +#define _WARN(_msg) _WARN1(__TOKENPASTE__(__warn_func1__, __LINE__), __TOKENPASTE__(__warn_func2__, __LINE__), _msg) +#endif + #endif /* __INTERNAL_DEBUG */
Modified: trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c... ============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] Sun Sep 22 21:19:40 2013 @@ -32,7 +32,7 @@ PETHREAD CurrentThread = PsGetCurrentThread(); PTEB Teb = CurrentThread->Tcb.Teb; PVOID StackBase, DeallocationStack, NextStackAddress; - ULONG GuranteedSize; + SIZE_T GuranteedSize; NTSTATUS Status;
/* Do we own the address space lock? */ @@ -116,7 +116,7 @@ MiAccessCheck(IN PMMPTE PointerPte, IN BOOLEAN StoreInstruction, IN KPROCESSOR_MODE PreviousMode, - IN ULONG ProtectionCode, + IN ULONG_PTR ProtectionCode, IN PVOID TrapFrame, IN BOOLEAN LockHeld) { @@ -1496,7 +1496,7 @@ return STATUS_SUCCESS; } } - +#if (_MI_PAGING_LEVELS == 2) /* Check if this was a session PTE that needs to remap the session PDE */ if (MI_IS_SESSION_PTE(Address)) { @@ -1512,6 +1512,11 @@ 6); } } +#else + +_WARN("Session space stuff is not implemented yet!") + +#endif
/* Check for a fault on the page table or hyperspace */ if (MI_IS_PAGE_TABLE_OR_HYPER_ADDRESS(Address)) @@ -1970,7 +1975,7 @@ else { /* Get the protection code and check if this is a proto PTE */ - ProtectionCode = TempPte.u.Soft.Protection; + ProtectionCode = (ULONG)TempPte.u.Soft.Protection; if (TempPte.u.Soft.Prototype) { /* Do we need to go find the real PTE? */