Author: tkreuzer
Date: Tue Sep 13 13:12:38 2011
New Revision: 53701
URL:
http://svn.reactos.org/svn/reactos?rev=53701&view=rev
Log:
[NTOSKRNL]
Cleanup amd64/ke.h a bit, add KiUserTrap()
Modified:
trunk/reactos/ntoskrnl/include/internal/amd64/ke.h
Modified: trunk/reactos/ntoskrnl/include/internal/amd64/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] Tue Sep 13 13:12:38
2011
@@ -241,14 +241,21 @@
DbgPrint("KiEndInterrupt is unimplemented\n");
}
+BOOLEAN
+FORCEINLINE
+KiUserTrap(IN PKTRAP_FRAME TrapFrame)
+{
+ /* Anything else but Ring 0 is Ring 3 */
+ return !!(TrapFrame->SegCs & MODE_MASK);
+}
+
#define Ki386PerfEnd(x)
struct _KPCR;
-VOID
-FASTCALL
-KiInitializeTss(IN PKTSS Tss, IN UINT64 Stack);
-
+//VOID KiInitializeTss(IN PKTSS Tss, IN UINT64 Stack);
+
+VOID KiSwitchToBootStack(IN ULONG_PTR InitialStack);
VOID KiDivideErrorFault(VOID);
VOID KiDebugTrapOrFault(VOID);
VOID KiNmiInterrupt(VOID);
@@ -274,52 +281,21 @@
VOID KiDpcInterrupt(VOID);
VOID KiIpiInterrupt(VOID);
-VOID
-KiGdtPrepareForApplicationProcessorInit(ULONG Id);
-VOID
-Ki386InitializeLdt(VOID);
-VOID
-Ki386SetProcessorFeatures(VOID);
-
-VOID
-NTAPI
-KiGetCacheInformation(VOID);
-
-BOOLEAN
-NTAPI
-KiIsNpxPresent(
- VOID
-);
-
-BOOLEAN
-NTAPI
-KiIsNpxErrataPresent(
- VOID
-);
-
-VOID
-NTAPI
-KiSetProcessorType(VOID);
-
-ULONG
-NTAPI
-KiGetFeatureBits(VOID);
-
-VOID
-NTAPI
-KiInitializeCpuFeatures(VOID);
+VOID KiGdtPrepareForApplicationProcessorInit(ULONG Id);
+VOID Ki386InitializeLdt(VOID);
+VOID Ki386SetProcessorFeatures(VOID);
+VOID KiGetCacheInformation(VOID);
+VOID KiSetProcessorType(VOID);
+ULONG KiGetFeatureBits(VOID);
+VOID KiInitializeCpuFeatures(VOID);
ULONG KeAllocateGdtSelector(ULONG Desc[2]);
VOID KeFreeGdtSelector(ULONG Entry);
-VOID
-NtEarlyInitVdm(VOID);
-VOID
-KeApplicationProcessorInitDispatcher(VOID);
-VOID
-KeCreateApplicationProcessorIdleThread(ULONG Id);
-
-VOID
-NTAPI
+VOID NtEarlyInitVdm(VOID);
+VOID KeApplicationProcessorInitDispatcher(VOID);
+VOID KeCreateApplicationProcessorIdleThread(ULONG Id);
+
+VOID
Ke386InitThreadWithContext(PKTHREAD Thread,
PKSYSTEM_ROUTINE SystemRoutine,
PKSTART_ROUTINE StartRoutine,
@@ -330,7 +306,6 @@
#ifdef _NTOSKRNL_ /* FIXME: Move flags above to NDK instead of here */
VOID
-NTAPI
KiThreadStartup(PKSYSTEM_ROUTINE SystemRoutine,
PKSTART_ROUTINE StartRoutine,
PVOID StartContext,