Author: tkreuzer
Date: Wed Mar 24 06:20:22 2010
New Revision: 46392
URL:
http://svn.reactos.org/svn/reactos?rev=46392&view=rev
Log:
[XDK]
- Add some amd64 related Mm variables
- Fix some _WIN2K_COMPAT_SLIST_USAGE definitions
- Add non-x86 spinlock functions
Modified:
branches/header-work/include/ddk/ntddk.h
branches/header-work/include/ddk/wdm.h
branches/header-work/include/xdk/amd64/ke.h
branches/header-work/include/xdk/amd64/mm.h
branches/header-work/include/xdk/exfuncs.h
branches/header-work/include/xdk/kefuncs.h
Modified: branches/header-work/include/ddk/ntddk.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntddk.h…
==============================================================================
--- branches/header-work/include/ddk/ntddk.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/ntddk.h [iso-8859-1] Wed Mar 24 06:20:22 2010
@@ -3209,6 +3209,10 @@
#define PDE_TOP 0xFFFFF6FB7FFFFFFFULL
#define PTE_TOP 0xFFFFF6FFFFFFFFFFULL
+extern NTKERNELAPI PVOID MmHighestUserAddress;
+extern NTKERNELAPI PVOID MmSystemRangeStart;
+extern NTKERNELAPI ULONG64 MmUserProbeAddress;
+
#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress
#define MM_SYSTEM_RANGE_START MmSystemRangeStart
#define MM_USER_PROBE_ADDRESS MmUserProbeAddress
@@ -4137,7 +4141,6 @@
#if (NTDDI_VERSION >= NTDDI_WIN2K)
-
NTKERNELAPI
VOID
NTAPI
@@ -4178,7 +4181,6 @@
IN ULONG BugCheckCode);
-
#if defined(SINGLE_GROUP_LEGACY_API)
@@ -4210,15 +4212,17 @@
#if (NTDDI_VERSION >= NTDDI_WS03)
+
+
NTKERNELAPI
BOOLEAN
NTAPI
KeInvalidateAllCaches(VOID);
-
#endif /* (NTDDI_VERSION >= NTDDI_WS03) */
#if (NTDDI_VERSION >= NTDDI_WS03SP1)
+
NTKERNELAPI
NTSTATUS
NTAPI
@@ -4242,6 +4246,7 @@
#if (NTDDI_VERSION >= NTDDI_VISTA)
+
#if defined(SINGLE_GROUP_LEGACY_API)
NTKERNELAPI
ULONG
@@ -4254,7 +4259,7 @@
NTAPI
KeQueryMaximumProcessorCount(VOID);
-#endif
+#endif /* SINGLE_GROUP_LEGACY_API */
#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
Modified: branches/header-work/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wdm.h?r…
==============================================================================
--- branches/header-work/include/ddk/wdm.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/wdm.h [iso-8859-1] Wed Mar 24 06:20:22 2010
@@ -7923,15 +7923,20 @@
return KfRaiseIrql(12); // SYNCH_LEVEL = IPI_LEVEL - 2
}
-#define KeAcquireSpinLock(SpinLock, OldIrql) \
- *(OldIrql) = KeAcquireSpinLockRaiseToDpc(SpinLock)
-
FORCEINLINE
PKTHREAD
KeGetCurrentThread(VOID)
{
return (struct _KTHREAD *)__readgsqword(0x188);
}
+
+/* VOID
+ * KeFlushIoBuffers(
+ * IN PMDL Mdl,
+ * IN BOOLEAN ReadOperation,
+ * IN BOOLEAN DmaOperation)
+ */
+#define KeFlushIoBuffers(_Mdl, _ReadOperation, _DmaOperation)
/* x86 and x64 performs a 0x2C interrupt */
#define DbgRaiseAssertionFailure __int2c
@@ -9677,7 +9682,6 @@
#if (NTDDI_VERSION >= NTDDI_WIN2K)
-
#if defined(_NTDDK_) || defined(_NTIFS_)
NTKERNELAPI
VOID
@@ -9726,7 +9730,6 @@
#endif /* defined(SINGLE_GROUP_LEGACY_API) */
#if !defined(_M_AMD64)
-
NTKERNELAPI
ULONGLONG
NTAPI
@@ -9737,8 +9740,37 @@
NTAPI
KeQuerySystemTime(
OUT PLARGE_INTEGER CurrentTime);
-
#endif /* !_M_AMD64 */
+
+#if !defined(_X86_)
+NTKERNELAPI
+KIRQL
+NTAPI
+KeAcquireSpinLockRaiseToDpc(
+ IN OUT PKSPIN_LOCK SpinLock);
+
+#define KeAcquireSpinLock(SpinLock, OldIrql) \
+ *(OldIrql) = KeAcquireSpinLockRaiseToDpc(SpinLock)
+
+NTKERNELAPI
+VOID
+NTAPI
+KeAcquireSpinLockAtDpcLevel(
+ IN OUT PKSPIN_LOCK SpinLock);
+
+NTKERNELAPI
+VOID
+NTAPI
+KeReleaseSpinLock(
+ IN OUT PKSPIN_LOCK SpinLock,
+ IN KIRQL NewIrql);
+
+NTKERNELAPI
+VOID
+NTAPI
+KeReleaseSpinLockFromDpcLevel(
+ IN OUT PKSPIN_LOCK SpinLock);
+#endif /* !_X86_ */
#if defined(_X86_) && (defined(_WDM_INCLUDED_) ||
defined(WIN9X_COMPAT_SPINLOCK))
NTKERNELAPI
@@ -10183,9 +10215,11 @@
KeTestSpinLock(
IN PKSPIN_LOCK SpinLock);
+
#endif /* (NTDDI_VERSION >= NTDDI_WS03) */
#if (NTDDI_VERSION >= NTDDI_WS03SP1)
+
NTKERNELAPI
BOOLEAN
@@ -10247,6 +10281,7 @@
#endif /* (NTDDI_VERSION >= NTDDI_WS03SP1) */
#if (NTDDI_VERSION >= NTDDI_VISTA)
+
NTKERNELAPI
VOID
FASTCALL
@@ -10290,7 +10325,7 @@
ULONG
NTAPI
KeQueryMaximumProcessorCount(VOID);
-#endif
+#endif /* SINGLE_GROUP_LEGACY_API */
#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
Modified: branches/header-work/include/xdk/amd64/ke.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/xdk/amd64/k…
==============================================================================
--- branches/header-work/include/xdk/amd64/ke.h [iso-8859-1] (original)
+++ branches/header-work/include/xdk/amd64/ke.h [iso-8859-1] Wed Mar 24 06:20:22 2010
@@ -92,9 +92,6 @@
{
return KfRaiseIrql(12); // SYNCH_LEVEL = IPI_LEVEL - 2
}
-
-#define KeAcquireSpinLock(SpinLock, OldIrql) \
- *(OldIrql) = KeAcquireSpinLockRaiseToDpc(SpinLock)
FORCEINLINE
PKTHREAD
@@ -225,6 +222,9 @@
ULONG64 LastExceptionFromRip;
} CONTEXT;
+#define PCR_MINOR_VERSION 1
+#define PCR_MAJOR_VERSION 1
+
typedef struct _KPCR
{
_ANONYMOUS_UNION union
Modified: branches/header-work/include/xdk/amd64/mm.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/xdk/amd64/m…
==============================================================================
--- branches/header-work/include/xdk/amd64/mm.h [iso-8859-1] (original)
+++ branches/header-work/include/xdk/amd64/mm.h [iso-8859-1] Wed Mar 24 06:20:22 2010
@@ -23,6 +23,10 @@
#define PDE_TOP 0xFFFFF6FB7FFFFFFFULL
#define PTE_TOP 0xFFFFF6FFFFFFFFFFULL
+extern NTKERNELAPI PVOID MmHighestUserAddress;
+extern NTKERNELAPI PVOID MmSystemRangeStart;
+extern NTKERNELAPI ULONG64 MmUserProbeAddress;
+
#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress
#define MM_SYSTEM_RANGE_START MmSystemRangeStart
#define MM_USER_PROBE_ADDRESS MmUserProbeAddress
Modified: branches/header-work/include/xdk/exfuncs.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/xdk/exfuncs…
==============================================================================
--- branches/header-work/include/xdk/exfuncs.h [iso-8859-1] (original)
+++ branches/header-work/include/xdk/exfuncs.h [iso-8859-1] Wed Mar 24 06:20:22 2010
@@ -216,6 +216,8 @@
ExInterlockedFlushSList(
IN OUT PSLIST_HEADER ListHead);
+#endif /* !defined(_WIN64) */
+
#if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_)
NTKERNELAPI
@@ -246,12 +248,14 @@
IN OUT PPAGED_LOOKASIDE_LIST Lookaside,
IN PVOID Entry);
-#else
-
+#else /* !_WIN2K_COMPAT_SLIST_USAGE */
+
+#if !defined(_WIN64)
#define ExInterlockedPopEntrySList(_ListHead, _Lock) \
InterlockedPopEntrySList(_ListHead)
#define ExInterlockedPushEntrySList(_ListHead, _ListEntry, _Lock) \
InterlockedPushEntrySList(_ListHead, _ListEntry)
+#endif
static __inline
PVOID
@@ -288,7 +292,6 @@
#endif /* _WIN2K_COMPAT_SLIST_USAGE */
-#endif /* !defined(_WIN64) */
/* ERESOURCE_THREAD
* ExGetCurrentResourceThread(
Modified: branches/header-work/include/xdk/kefuncs.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/xdk/kefuncs…
==============================================================================
--- branches/header-work/include/xdk/kefuncs.h [iso-8859-1] (original)
+++ branches/header-work/include/xdk/kefuncs.h [iso-8859-1] Wed Mar 24 06:20:22 2010
@@ -29,7 +29,6 @@
#if (NTDDI_VERSION >= NTDDI_WIN2K)
$if (_NTDDK_)
-
NTKERNELAPI
VOID
NTAPI
@@ -68,11 +67,9 @@
NTAPI
KeBugCheck(
IN ULONG BugCheckCode);
-
-$endif
-
-$if (_WDMDDK_)
-
+$endif /* _NTDDK_ */
+
+$if (_WDMDDK_)
#if defined(_NTDDK_) || defined(_NTIFS_)
NTKERNELAPI
VOID
@@ -91,7 +88,7 @@
IN SIZE_T Length,
IN ULONG Alignment);
-$endif
+$endif /* _WDMDDK_ */
#if defined(SINGLE_GROUP_LEGACY_API)
@@ -138,7 +135,6 @@
$if (_WDMDDK_)
#if !defined(_M_AMD64)
-
NTKERNELAPI
ULONGLONG
NTAPI
@@ -149,8 +145,37 @@
NTAPI
KeQuerySystemTime(
OUT PLARGE_INTEGER CurrentTime);
-
#endif /* !_M_AMD64 */
+
+#if !defined(_X86_)
+NTKERNELAPI
+KIRQL
+NTAPI
+KeAcquireSpinLockRaiseToDpc(
+ IN OUT PKSPIN_LOCK SpinLock);
+
+#define KeAcquireSpinLock(SpinLock, OldIrql) \
+ *(OldIrql) = KeAcquireSpinLockRaiseToDpc(SpinLock)
+
+NTKERNELAPI
+VOID
+NTAPI
+KeAcquireSpinLockAtDpcLevel(
+ IN OUT PKSPIN_LOCK SpinLock);
+
+NTKERNELAPI
+VOID
+NTAPI
+KeReleaseSpinLock(
+ IN OUT PKSPIN_LOCK SpinLock,
+ IN KIRQL NewIrql);
+
+NTKERNELAPI
+VOID
+NTAPI
+KeReleaseSpinLockFromDpcLevel(
+ IN OUT PKSPIN_LOCK SpinLock);
+#endif /* !_X86_ */
#if defined(_X86_) && (defined(_WDM_INCLUDED_) ||
defined(WIN9X_COMPAT_SPINLOCK))
NTKERNELAPI
@@ -555,15 +580,9 @@
NTAPI
KeFlushQueuedDpcs(VOID);
#endif /* (NTDDI_VERSION >= NTDDI_WINXPSP2) */
-$endif
+$endif /* _WDMDDK_ */
#if (NTDDI_VERSION >= NTDDI_WS03)
-$if (_NTDDK_)
-NTKERNELAPI
-BOOLEAN
-NTAPI
-KeInvalidateAllCaches(VOID);
-$endif
$if (_WDMDDK_)
NTKERNELAPI
@@ -612,11 +631,19 @@
FASTCALL
KeTestSpinLock(
IN PKSPIN_LOCK SpinLock);
-$endif
+$endif /* _WDMDDK_ */
+
+$if (_NTDDK_)
+NTKERNELAPI
+BOOLEAN
+NTAPI
+KeInvalidateAllCaches(VOID);
+$endif /* _NTDDK_ */
#endif /* (NTDDI_VERSION >= NTDDI_WS03) */
#if (NTDDI_VERSION >= NTDDI_WS03SP1)
+
$if (_NTDDK_)
NTKERNELAPI
NTSTATUS
@@ -635,7 +662,7 @@
VOID
NTAPI
KeLeaveGuardedRegion(VOID);
-$endif
+$endif /* _NTDDK_ */
$if (_WDMDDK_)
NTKERNELAPI
@@ -694,11 +721,12 @@
FASTCALL
KeTryToAcquireGuardedMutex(
IN OUT PKGUARDED_MUTEX GuardedMutex);
-$endif
+$endif /* _WDMDDK_ */
#endif /* (NTDDI_VERSION >= NTDDI_WS03SP1) */
#if (NTDDI_VERSION >= NTDDI_VISTA)
+
$if (_WDMDDK_)
NTKERNELAPI
VOID
@@ -718,7 +746,7 @@
NTAPI
KeQueryDpcWatchdogInformation(
OUT PKDPC_WATCHDOG_INFORMATION WatchdogInformation);
-$endif
+$endif /* _WDMDDK_ */
#if defined(SINGLE_GROUP_LEGACY_API)
$if (_NTDDK_)
@@ -732,7 +760,7 @@
ULONG
NTAPI
KeQueryMaximumProcessorCount(VOID);
-$endif
+$endif /* _NTDDK_ */
$if (_WDMDDK_)
NTKERNELAPI
@@ -757,8 +785,8 @@
ULONG
NTAPI
KeQueryMaximumProcessorCount(VOID);
-$endif
-#endif
+$endif /* _WDMDDK_ */
+#endif /* SINGLE_GROUP_LEGACY_API */
#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
@@ -776,7 +804,7 @@
IN PVOID CallbackHandle);
#endif /* (NTDDI_VERSION >= NTDDI_WS08) */
-$endif
+$endif /* _WDMDDK_ */
#if (NTDDI_VERSION >= NTDDI_WIN7)
@@ -862,7 +890,7 @@
OUT PHARDWARE_COUNTER CounterArray,
IN ULONG MaximumCount,
OUT PULONG Count);
-$endif
+$endif /* _NTDDK_ */
$if (_WDMDDK_)
ULONG64