Author: ros-arm-bringup
Date: Thu Feb 7 09:40:42 2008
New Revision: 32178
URL:
http://svn.reactos.org/svn/reactos?rev=32178&view=rev
Log:
We don't define types which are usually documented on "real" NT platforms in
the NDK aynmore, but instead in the ARMDDK.h. This also avoids many ndk-from-ddk
cross-header issues.
Added x86-only guards around certain structures and functions which are non-portable. Also
guarded certain inline functions.
Added some more ARM structures, and filled out the KPRCB.
Created ARM-specific headers when required.
We can now have a buildable ARM kernel, minus a couple of compile errors.
Added:
trunk/reactos/include/reactos/armddk.h (with props)
trunk/reactos/ntoskrnl/include/internal/arm/
trunk/reactos/ntoskrnl/include/internal/arm/ke.h (with props)
trunk/reactos/ntoskrnl/include/internal/arm/mm.h (with props)
Modified:
trunk/reactos/include/ddk/ntifs.h
trunk/reactos/include/ddk/winddk.h
trunk/reactos/include/ndk/arm/ketypes.h
trunk/reactos/include/ndk/kefuncs.h
trunk/reactos/include/psdk/winnt.h
trunk/reactos/ntoskrnl/include/internal/arch/intrin_i.h
trunk/reactos/ntoskrnl/include/internal/arch/ke.h
trunk/reactos/ntoskrnl/include/internal/arch/mm.h
trunk/reactos/ntoskrnl/include/internal/ke.h
trunk/reactos/ntoskrnl/include/internal/ke_x.h
trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h
Modified: trunk/reactos/include/ddk/ntifs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=32…
==============================================================================
--- trunk/reactos/include/ddk/ntifs.h (original)
+++ trunk/reactos/include/ddk/ntifs.h Thu Feb 7 09:40:42 2008
@@ -297,9 +297,6 @@
#ifdef _X86_
#define HARDWARE_PTE HARDWARE_PTE_X86
#define PHARDWARE_PTE PHARDWARE_PTE_X86
-#else
-#define HARDWARE_PTE ULONG
-#define PHARDWARE_PTE PULONG
#endif
#define IO_CHECK_CREATE_PARAMETERS 0x0200
Modified: trunk/reactos/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=3…
==============================================================================
--- trunk/reactos/include/ddk/winddk.h (original)
+++ trunk/reactos/include/ddk/winddk.h Thu Feb 7 09:40:42 2008
@@ -5570,9 +5570,9 @@
#elif defined(_M_ARM)
//
-// NT-ARM is not documented, need NDK
+// NT-ARM is not documented, need DDK-ARM
//
-#include <arm/ketypes.h>
+#include <armddk.h>
#else
#error Unknown architecture
Modified: trunk/reactos/include/ndk/arm/ketypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/arm/ketypes.h?…
==============================================================================
--- trunk/reactos/include/ndk/arm/ketypes.h (original)
+++ trunk/reactos/include/ndk/arm/ketypes.h Thu Feb 7 09:40:42 2008
@@ -22,19 +22,6 @@
//
// Dependencies
//
-
-//
-// IRQLs
-//
-#define PASSIVE_LEVEL 0
-#define LOW_LEVEL 0
-#define APC_LEVEL 1
-#define DISPATCH_LEVEL 2
-#define IPI_LEVEL 7
-#define POWER_LEVEL 7
-#define PROFILE_LEVEL 8
-#define HIGH_LEVEL 8
-#define SYNCH_LEVEL (IPI_LEVEL - 1)
//
// IPI Types
@@ -61,19 +48,6 @@
// Static Kernel-Mode Address start (use MM_KSEG0_BASE for actual)
//
#define KSEG0_BASE 0x80000000
-
-//
-// FIXME: mmtypes.h?
-//
-#define KIPCR 0xFFFFF000
-#define USPCR 0x7FFF0000
-#define PCR ((volatile KPCR * const)USPCR)
-#define USERPCR ((volatile KPCR * const)KIPCR)
-
-//
-// Synchronization-level IRQL
-//
-#define SYNCH_LEVEL DISPATCH_LEVEL
//
// Trap Frame Definition
@@ -106,75 +80,23 @@
ULONG FpExtra[8];
} KTRAP_FRAME, *PKTRAP_FRAME;
-//
-// Processor Control Region
-// On ARM, it's actually readable from user-mode, much like KUSER_SHARED_DATA
-//
-#ifdef NTOS_MODE_USER
-#define PKINTERRUPT_ROUTINE PVOID // Hack!
-#endif
-typedef struct _KPCR
-{
- ULONG MinorVersion;
- ULONG MajorVersion;
- PKINTERRUPT_ROUTINE InterruptRoutine[64];
- PVOID XcodeDispatch;
- ULONG FirstLevelDcacheSize;
- ULONG FirstLevelDcacheFillSize;
- ULONG FirstLevelIcacheSize;
- ULONG FirstLevelIcacheFillSize;
- ULONG SecondLevelDcacheSize;
- ULONG SecondLevelDcacheFillSize;
- ULONG SecondLevelIcacheSize;
- ULONG SecondLevelIcacheFillSize;
- struct _KPRCB *Prcb;
- struct _TEB *Teb;
- PVOID TlsArray;
- ULONG DcacheFillSize;
- ULONG IcacheAlignment;
- ULONG IcacheFillSize;
- ULONG ProcessorId;
- ULONG ProfileInterval;
- ULONG ProfileCount;
- ULONG StallExecutionCount;
- ULONG StallScaleFactor;
- CCHAR Number;
- PVOID DataBusError;
- PVOID InstructionBusError;
- ULONG CachePolicy;
- UCHAR IrqlMask[64];
- UCHAR IrqlTable[64];
- UCHAR CurrentIrql;
- KAFFINITY SetMember;
- struct _KTHREAD *CurrentThread;
- KAFFINITY NotMember;
- ULONG SystemReserved[6];
- ULONG DcacheAlignment;
- ULONG HalReserved[64];
- BOOLEAN FirstLevelActive;
- BOOLEAN DpcRoutineActive;
- ULONG CurrentPid;
- BOOLEAN OnInterruptStack;
- PVOID SavedInitialStack;
- PVOID SavedStackLimit;
- PVOID SystemServiceDispatchStart;
- PVOID SystemServiceDispatchEnd;
- PVOID InterruptStack;
- PVOID PanicStack;
- PVOID BadVaddr;
- PVOID InitialStack;
- PVOID StackLimit;
- ULONG QuantumEnd;
-} KPCR, *PKPCR;
-
#ifndef NTOS_MODE_USER
-//
-// Stub
-//
-typedef struct _KFLOATING_SAVE
-{
- ULONG Reserved;
-} KFLOATING_SAVE, *PKFLOATING_SAVE;
+
+//
+// Exception Frame Definition
+//
+typedef struct _KEXCEPTION_FRAME
+{
+ ULONG PlaceHolder;
+} KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;
+
+//
+// Processor State
+//
+typedef struct _KPROCESSOR_STATE
+{
+ struct _CONTEXT ContextFrame;
+} KPROCESSOR_STATE, *PKPROCESSOR_STATE;
//
// Processor Region Control Block
@@ -187,9 +109,110 @@
struct _KTHREAD *NextThread;
struct _KTHREAD *IdleThread;
UCHAR Number;
- //
- // TODO
- //
+ UCHAR Reserved;
+ USHORT BuildType;
+ KAFFINITY SetMember;
+ KPROCESSOR_STATE ProcessorState;
+ ULONG KernelReserved[16];
+ ULONG HalReserved[16];
+ KSPIN_LOCK_QUEUE LockQueue[LockQueueMaximumLock];
+ struct _KTHREAD *NpxThread;
+ ULONG InterruptCount;
+ ULONG KernelTime;
+ ULONG UserTime;
+ ULONG DpcTime;
+ ULONG DebugDpcTime;
+ ULONG InterruptTime;
+ ULONG AdjustDpcThreshold;
+ ULONG PageColor;
+ UCHAR SkipTick;
+ UCHAR DebuggerSavedIRQL;
+ UCHAR NodeColor;
+ UCHAR Spare1;
+ ULONG NodeShiftedColor;
+ struct _KNODE *ParentNode;
+ ULONG MultiThreadProcessorSet;
+ struct _KPRCB *MultiThreadSetMaster;
+ ULONG SecondaryColorMask;
+ LONG Sleeping;
+ ULONG CcFastReadNoWait;
+ ULONG CcFastReadWait;
+ ULONG CcFastReadNotPossible;
+ ULONG CcCopyReadNoWait;
+ ULONG CcCopyReadWait;
+ ULONG CcCopyReadNoWaitMiss;
+ ULONG KeAlignmentFixupCount;
+ ULONG SpareCounter0;
+ ULONG KeDcacheFlushCount;
+ ULONG KeExceptionDispatchCount;
+ ULONG KeFirstLevelTbFills;
+ ULONG KeIcacheFlushCount;
+ ULONG KeSecondLevelTbFills;
+ ULONG KeSystemCalls;
+ volatile ULONG IoReadOperationCount;
+ volatile ULONG IoWriteOperationCount;
+ volatile ULONG IoOtherOperationCount;
+ LARGE_INTEGER IoReadTransferCount;
+ LARGE_INTEGER IoWriteTransferCount;
+ LARGE_INTEGER IoOtherTransferCount;
+ PP_LOOKASIDE_LIST PPLookasideList[16];
+ PP_LOOKASIDE_LIST PPNPagedLookasideList[32];
+ PP_LOOKASIDE_LIST PPPagedLookasideList[32];
+ volatile ULONG PacketBarrier;
+ volatile ULONG ReverseStall;
+ PVOID IpiFrame;
+ volatile PVOID CurrentPacket[3];
+ volatile ULONG TargetSet;
+ volatile PKIPI_WORKER WorkerRoutine;
+ volatile ULONG IpiFrozen;
+ volatile ULONG RequestSummary;
+ volatile struct _KPRCB *SignalDone;
+ struct _KDPC_DATA DpcData[2];
+ PVOID DpcStack;
+ ULONG MaximumDpcQueueDepth;
+ ULONG DpcRequestRate;
+ ULONG MinimumDpcRate;
+ volatile UCHAR DpcInterruptRequested;
+ volatile UCHAR DpcThreadRequested;
+ volatile UCHAR DpcRoutineActive;
+ volatile UCHAR DpcThreadActive;
+ ULONG PrcbLock;
+ ULONG DpcLastCount;
+ volatile ULONG TimerHand;
+ volatile ULONG TimerRequest;
+ PVOID DpcThread;
+ KEVENT DpcEvent;
+ UCHAR ThreadDpcEnable;
+ volatile BOOLEAN QuantumEnd;
+ volatile UCHAR IdleSchedule;
+ LONG DpcSetEventRequest;
+ LONG TickOffset;
+ KDPC CallDpc;
+ LIST_ENTRY WaitListHead;
+ ULONG ReadySummary;
+ ULONG QueueIndex;
+ LIST_ENTRY DispatcherReadyListHead[32];
+ SINGLE_LIST_ENTRY DeferredReadyListHead;
+ PVOID ChainedInterruptList;
+ LONG LookasideIrpFloat;
+ volatile LONG MmPageFaultCount;
+ volatile LONG MmCopyOnWriteCount;
+ volatile LONG MmTransitionCount;
+ volatile LONG MmCacheTransitionCount;
+ volatile LONG MmDemandZeroCount;
+ volatile LONG MmPageReadCount;
+ volatile LONG MmPageReadIoCount;
+ volatile LONG MmCacheReadCount;
+ volatile LONG MmCacheIoCount;
+ volatile LONG MmDirtyPagesWriteCount;
+ volatile LONG MmDirtyWriteIoCount;
+ volatile LONG MmMappedPagesWriteCount;
+ volatile LONG MmMappedWriteIoCount;
+ CHAR VendorString[13];
+ ULONG MHz;
+ ULONG FeatureBits;
+ volatile LARGE_INTEGER IsrTime;
+ PROCESSOR_POWER_STATE PowerState;
} KPRCB, *PKPRCB;
//
Modified: trunk/reactos/include/ndk/kefuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/kefuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/kefuncs.h (original)
+++ trunk/reactos/include/ndk/kefuncs.h Thu Feb 7 09:40:42 2008
@@ -453,19 +453,21 @@
NTSTATUS
NTAPI
NtSetIntervalProfile(
- ULONG Interval,
- KPROFILE_SOURCE ClockSource
-);
-
+ IN ULONG Interval,
+ IN KPROFILE_SOURCE ClockSource
+);
+
+#ifdef _M_IX86
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetLdtEntries(
- ULONG Selector1,
- LDT_ENTRY LdtEntry1,
- ULONG Selector2,
- LDT_ENTRY LdtEntry2
-);
+ IN ULONG Selector1,
+ IN LDT_ENTRY LdtEntry1,
+ IN ULONG Selector2,
+ IN LDT_ENTRY LdtEntry2
+);
+#endif
NTSYSCALLAPI
NTSTATUS
@@ -659,19 +661,21 @@
NTSTATUS
NTAPI
ZwSetIntervalProfile(
- ULONG Interval,
- KPROFILE_SOURCE ClockSource
-);
-
+ IN ULONG Interval,
+ IN KPROFILE_SOURCE ClockSource
+);
+
+#ifdef _M_IX86
NTSYSAPI
NTSTATUS
NTAPI
ZwSetLdtEntries(
- ULONG Selector1,
- LDT_ENTRY LdtEntry1,
- ULONG Selector2,
- LDT_ENTRY LdtEntry2
-);
+ IN ULONG Selector1,
+ IN LDT_ENTRY LdtEntry1,
+ IN ULONG Selector2,
+ IN LDT_ENTRY LdtEntry2
+);
+#endif
NTSYSAPI
NTSTATUS
Modified: trunk/reactos/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=3…
==============================================================================
--- trunk/reactos/include/psdk/winnt.h (original)
+++ trunk/reactos/include/psdk/winnt.h Thu Feb 7 09:40:42 2008
@@ -4106,21 +4106,10 @@
#elif _M_ARM
//
-// NT-ARM is not documented, need NDK
+// NT-ARM is not documented
//
-#define NTOS_MODE_USER
-#include <arm/ketypes.h>
+#include <armddk.h>
-//
-// FIXME: Move _M_ARM stuff away from here
-// *** AND NOT IN THE NDK! NDK IS ONLY FOR OFFICIALLY OBTAINABLE/EXISTING NT
-//
-FORCEINLINE
-struct _TEB* NtCurrentTeb(VOID)
-{
- return (struct _TEB*)USERPCR->Teb;
-}
-
#else
static __inline__ struct _TEB * NtCurrentTeb(void)
{
Added: trunk/reactos/include/reactos/armddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/armddk.h?r…
==============================================================================
--- trunk/reactos/include/reactos/armddk.h (added)
+++ trunk/reactos/include/reactos/armddk.h Thu Feb 7 09:40:42 2008
@@ -1,0 +1,103 @@
+#ifndef _ARMDDK_
+#define _ARMDDK_
+
+//
+// IRQLs
+//
+#define PASSIVE_LEVEL 0
+#define LOW_LEVEL 0
+#define APC_LEVEL 1
+#define DISPATCH_LEVEL 2
+#define IPI_LEVEL 7
+#define POWER_LEVEL 7
+#define PROFILE_LEVEL 8
+#define HIGH_LEVEL 8
+#define SYNCH_LEVEL (IPI_LEVEL - 1)
+
+//
+// FIXME: mmtypes.h?
+//
+#define KIPCR 0xFFFFF000
+#define USPCR 0x7FFF0000
+#define PCR ((volatile KPCR * const)USPCR)
+#define USERPCR ((volatile KPCR * const)KIPCR)
+
+//
+// Stub
+//
+typedef struct _KFLOATING_SAVE
+{
+ ULONG Reserved;
+} KFLOATING_SAVE, *PKFLOATING_SAVE;
+
+//
+// Processor Control Region
+// On ARM, it's actually readable from user-mode, much like KUSER_SHARED_DATA
+//
+#ifdef _WINNT_H
+#define PKINTERRUPT_ROUTINE PVOID // Hack!
+#endif
+typedef struct _KPCR
+{
+ ULONG MinorVersion;
+ ULONG MajorVersion;
+ PKINTERRUPT_ROUTINE InterruptRoutine[64];
+ PVOID XcodeDispatch;
+ ULONG FirstLevelDcacheSize;
+ ULONG FirstLevelDcacheFillSize;
+ ULONG FirstLevelIcacheSize;
+ ULONG FirstLevelIcacheFillSize;
+ ULONG SecondLevelDcacheSize;
+ ULONG SecondLevelDcacheFillSize;
+ ULONG SecondLevelIcacheSize;
+ ULONG SecondLevelIcacheFillSize;
+ struct _KPRCB *Prcb;
+ struct _TEB *Teb;
+ PVOID TlsArray;
+ ULONG DcacheFillSize;
+ ULONG IcacheAlignment;
+ ULONG IcacheFillSize;
+ ULONG ProcessorId;
+ ULONG ProfileInterval;
+ ULONG ProfileCount;
+ ULONG StallExecutionCount;
+ ULONG StallScaleFactor;
+ CCHAR Number;
+ PVOID DataBusError;
+ PVOID InstructionBusError;
+ ULONG CachePolicy;
+ UCHAR IrqlMask[64];
+ UCHAR IrqlTable[64];
+ UCHAR CurrentIrql;
+ KAFFINITY SetMember;
+ struct _KTHREAD *CurrentThread;
+ KAFFINITY NotMember;
+ ULONG SystemReserved[6];
+ ULONG DcacheAlignment;
+ ULONG HalReserved[64];
+ BOOLEAN FirstLevelActive;
+ BOOLEAN DpcRoutineActive;
+ ULONG CurrentPid;
+ BOOLEAN OnInterruptStack;
+ PVOID SavedInitialStack;
+ PVOID SavedStackLimit;
+ PVOID SystemServiceDispatchStart;
+ PVOID SystemServiceDispatchEnd;
+ PVOID InterruptStack;
+ PVOID PanicStack;
+ PVOID BadVaddr;
+ PVOID InitialStack;
+ PVOID StackLimit;
+ ULONG QuantumEnd;
+} KPCR, *PKPCR;
+
+//
+// Get the current TEB
+//
+FORCEINLINE
+struct _TEB* NtCurrentTeb(VOID)
+{
+ return (struct _TEB*)USERPCR->Teb;
+}
+
+#endif
Propchange: trunk/reactos/include/reactos/armddk.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/include/reactos/armddk.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: trunk/reactos/ntoskrnl/include/internal/arch/intrin_i.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/arch/intrin_i.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/arch/intrin_i.h Thu Feb 7 09:40:42 2008
@@ -25,6 +25,10 @@
#include "../powerpc/intrin_i.h"
#elif defined(_M_MIPS)
#include "../mips/intrin_i.h"
+#elif defined(_M_ARM)
+//
+// Not sure we'll need ARM internal intrinsics
+//
#else
#error "Unknown processor"
#endif
Modified: trunk/reactos/ntoskrnl/include/internal/arch/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/arch/ke.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/arch/ke.h Thu Feb 7 09:40:42 2008
@@ -25,6 +25,8 @@
#include "../powerpc/ke.h"
#elif defined(_M_MIPS)
#include "../mips/ke.h"
+#elif defined(_M_ARM)
+#include "../arm/ke.h"
#else
#error "Unknown processor"
#endif
Modified: trunk/reactos/ntoskrnl/include/internal/arch/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/arch/mm.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/arch/mm.h Thu Feb 7 09:40:42 2008
@@ -22,9 +22,11 @@
#ifdef _M_IX86
#include <internal/i386/mm.h>
#elif defined(_M_PPC)
-#include <internal/powerpc/ke.h>
+#include <internal/powerpc/mm.h>
#elif defined(_M_MIPS)
-#include <internal/mips/ke.h>
+#include <internal/mips/mm.h>
+#elif defined(_M_ARM)
+#include <internal/arm/mm.h>
#else
#error "Unknown processor"
#endif
Added: trunk/reactos/ntoskrnl/include/internal/arm/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/arm/ke.h (added)
+++ trunk/reactos/ntoskrnl/include/internal/arm/ke.h Thu Feb 7 09:40:42 2008
@@ -1,0 +1,1 @@
+
Propchange: trunk/reactos/ntoskrnl/include/internal/arm/ke.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/ntoskrnl/include/internal/arm/ke.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: trunk/reactos/ntoskrnl/include/internal/arm/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/arm/mm.h (added)
+++ trunk/reactos/ntoskrnl/include/internal/arm/mm.h Thu Feb 7 09:40:42 2008
@@ -1,0 +1,1 @@
+
Propchange: trunk/reactos/ntoskrnl/include/internal/arm/mm.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/ntoskrnl/include/internal/arm/mm.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: trunk/reactos/ntoskrnl/include/internal/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ke.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/ke.h Thu Feb 7 09:40:42 2008
@@ -837,11 +837,16 @@
VOID
);
+//
+// We need to do major portability work
+//
+#ifdef _M_IX86
VOID
NTAPI
KiFlushNPXState(
IN FLOATING_SAVE_AREA *SaveArea
);
+#endif
VOID
NTAPI
Modified: trunk/reactos/ntoskrnl/include/internal/ke_x.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ke_x.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/ke_x.h Thu Feb 7 09:40:42 2008
@@ -350,6 +350,7 @@
VOID
KiRundownThread(IN PKTHREAD Thread)
{
+#if defined(_M_IX86) || defined(_M_AMD64)
/* Check if this is the NPX Thread */
if (KeGetCurrentPrcb()->NpxThread == Thread)
{
@@ -357,6 +358,7 @@
KeGetCurrentPrcb()->NpxThread = NULL;
KeArchFnInit();
}
+#endif
}
FORCEINLINE
@@ -1552,6 +1554,11 @@
/* Flush the TLB by resetting CR3 */
#ifdef _M_PPC
__asm__("sync\n\tisync\n\t");
+#elif _M_ARM
+ //
+ // We need to implement this!
+ //
+ ASSERTMSG("Need ARM flush routine\n", FALSE);
#else
__writecr3(__readcr3());
#endif
Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h Thu Feb 7 09:40:42 2008
@@ -280,7 +280,7 @@
* Use IsPointerOffset to test whether a pointer should be interpreted as an offset
* or as a pointer
*/
-#if defined(_X86_) || defined(_M_AMD64) || defined(_MIPS_) || defined(_PPC_)
+#if defined(_X86_) || defined(_M_AMD64) || defined(_MIPS_) || defined(_PPC_) ||
defined(_ARM_)
/* for x86 and x86-64 the MSB is 1 so we can simply test on that */
#define IsPointerOffset(Ptr) ((LONG_PTR)(Ptr) >= 0)
@@ -310,10 +310,10 @@
C_ASSERT(FIELD_OFFSET(KPROCESS, DirectoryTableBase) == KPROCESS_DIRECTORY_TABLE_BASE);
//C_ASSERT(FIELD_OFFSET(KPCR, Tib.ExceptionList) == KPCR_EXCEPTION_LIST);
//C_ASSERT(FIELD_OFFSET(KPCR, Self) == KPCR_SELF);
+#ifdef _M_IX86
C_ASSERT(FIELD_OFFSET(KPCR, IRR) == KPCR_IRR);
C_ASSERT(FIELD_OFFSET(KPCR, IDR) == KPCR_IDR);
C_ASSERT(FIELD_OFFSET(KPCR, Irql) == KPCR_IRQL);
-#ifdef _M_IX86
C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, CurrentThread) ==
KPCR_CURRENT_THREAD);
C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, NextThread) ==
KPCR_PRCB_NEXT_THREAD);
C_ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, NpxThread) ==
KPCR_NPX_THREAD);