Author: ros-arm-bringup
Date: Sun Jul 12 14:52:13 2009
New Revision: 41929
URL:
http://svn.reactos.org/svn/reactos?rev=41929&view=rev
Log:
Header fixes for ARM to deal with the header cleanup that was performed earlier this
year...
* ARMDDK is now rationed between user-mode and kernel-mode definitions and imported by
WINNT and WINDDK both (Since these don't include each others anymore)
Make the MDL flags crossarch instead of x86 only
The ARM tree now builds completely, except for the new ARM3 code in ntos... good job guys.
10/10. wasn't this supposed to make things --portable--?
Modified:
trunk/reactos/include/ddk/winddk.h
trunk/reactos/include/psdk/winnt.h
trunk/reactos/include/reactos/arm/armddk.h
Modified: trunk/reactos/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=4…
==============================================================================
--- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Sun Jul 12 14:52:13 2009
@@ -187,6 +187,7 @@
#if (_M_IX86)
#define KIP0PCRADDRESS 0xffdff000
+
#endif
#define KERNEL_STACK_SIZE 12288
@@ -5183,9 +5184,6 @@
#define MM_KSEG0_BASE MM_SYSTEM_RANGE_START
#define MM_SYSTEM_SPACE_END 0xFFFFFFFF
-#define MM_DONT_ZERO_ALLOCATION 0x00000001
-#define MM_ALLOCATE_FROM_LOCAL_NODE_ONLY 0x00000002
-
#elif defined(__x86_64__)
#define CONTEXT_AMD64 0x100000
@@ -5566,6 +5564,10 @@
#error Unknown architecture
#endif
+#define MM_DONT_ZERO_ALLOCATION 0x00000001
+#define MM_ALLOCATE_FROM_LOCAL_NODE_ONLY 0x00000002
+
+
#define EFLAG_SIGN 0x8000
#define EFLAG_ZERO 0x4000
#define EFLAG_SELECT (EFLAG_SIGN | EFLAG_ZERO)
@@ -5678,9 +5680,48 @@
#define KeGetDcacheFillSize() 1L
-#else // !defined (_X86_)
-
-FORCEINLINE
+#elif defined(_M_ARM) // !defined (_X86_)
+
+ NTHALAPI
+ KIRQL
+ FASTCALL
+ KfAcquireSpinLock(
+ IN PKSPIN_LOCK SpinLock);
+
+ NTHALAPI
+ VOID
+ FASTCALL
+ KfReleaseSpinLock(
+ IN PKSPIN_LOCK SpinLock,
+ IN KIRQL NewIrql);
+
+
+ NTKERNELAPI
+ VOID
+ FASTCALL
+ KefAcquireSpinLockAtDpcLevel(
+ IN PKSPIN_LOCK SpinLock);
+
+ NTKERNELAPI
+ VOID
+ FASTCALL
+ KefReleaseSpinLockFromDpcLevel(
+ IN PKSPIN_LOCK SpinLock);
+
+
+#define KeAcquireSpinLockAtDpcLevel(SpinLock) KefAcquireSpinLockAtDpcLevel(SpinLock)
+#define KeReleaseSpinLockFromDpcLevel(SpinLock) KefReleaseSpinLockFromDpcLevel(SpinLock)
+#define KeAcquireSpinLock(a,b) *(b) = KfAcquireSpinLock(a)
+#define KeReleaseSpinLock(a,b) KfReleaseSpinLock(a,b)
+
+ NTKERNELAPI
+ VOID
+ NTAPI
+ KeInitializeSpinLock(
+ IN PKSPIN_LOCK SpinLock);
+
+#else
+
VOID
NTAPI
KeInitializeSpinLock(
@@ -10691,6 +10732,13 @@
#define ExInterlockedExchangeUlong(Target, Value, Lock)
Exfi386InterlockedExchangeUlong(Target, Value)
#endif /* _X86_ */
+
+#ifdef _M_ARM
+//
+// NT-ARM is not documented
+//
+#include <armddk.h>
+#endif
#ifdef __cplusplus
}
Modified: trunk/reactos/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=4…
==============================================================================
--- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Sun Jul 12 14:52:13 2009
@@ -4863,7 +4863,6 @@
//
// NT-ARM is not documented
//
-#define KIRQL ULONG // Hack!
#include <armddk.h>
#elif defined (_M_AMD64)
Modified: trunk/reactos/include/reactos/arm/armddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/arm/armddk…
==============================================================================
--- trunk/reactos/include/reactos/arm/armddk.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/arm/armddk.h [iso-8859-1] Sun Jul 12 14:52:13 2009
@@ -1,6 +1,14 @@
#ifndef _ARMDDK_
#define _ARMDDK_
+//
+// Page size
+//
+#ifndef PAGE_SIZE
+#define PAGE_SIZE 0x1000
+#endif
+
+#ifndef _WINNT_H
//
// IRQLs
//
@@ -15,12 +23,6 @@
#define IPI_LEVEL 29
#define POWER_LEVEL 30
#define HIGH_LEVEL 31
-
-//
-// Page size
-//
-#ifndef PAGE_SIZE
-#define PAGE_SIZE 0x1000
#endif
//
@@ -31,6 +33,21 @@
#define USPCR 0x7FFF0000
#define PCR ((volatile KPCR * const)KIPCR)
#define USERPCR ((volatile KPCR * const)USPCR)
+#define KeGetPcr() PCR
+#ifndef _WINNT_H
+#define SharedUserData ((KUSER_SHARED_DATA * const)KI_USER_SHARED_DATA)
+
+//
+// Address space layout
+//
+extern PVOID MmHighestUserAddress;
+extern PVOID MmSystemRangeStart;
+extern ULONG_PTR MmUserProbeAddress;
+#define MM_HIGHEST_USER_ADDRESS MmHighestUserAddress
+#define MM_SYSTEM_RANGE_START MmSystemRangeStart
+#define MM_USER_PROBE_ADDRESS MmUserProbeAddress
+#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000
+#define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xC1400000
//
// Maximum IRQs
@@ -65,7 +82,6 @@
ULONG Reserved;
} KFLOATING_SAVE, *PKFLOATING_SAVE;
-#ifndef _WINNT_H
/* The following flags control the contents of the CONTEXT structure. */
#define CONTEXT_ARM 0x0000040
#define CONTEXT_CONTROL (CONTEXT_ARM | 0x00000001L)
@@ -127,7 +143,7 @@
{
ULONG MinorVersion;
ULONG MajorVersion;
- PKINTERRUPT_ROUTINE InterruptRoutine[MAXIMUM_VECTOR];
+ PKINTERRUPT_ROUTINE InterruptRoutine[32];
PVOID XcodeDispatch;
ULONG FirstLevelDcacheSize;
ULONG FirstLevelDcacheFillSize;
@@ -153,8 +169,8 @@
PVOID InstructionBusError;
ULONG CachePolicy;
ULONG AlignedCachePolicy;
- UCHAR IrqlMask[HIGH_LEVEL + 1];
- ULONG IrqlTable[HIGH_LEVEL + 1];
+ UCHAR IrqlMask[32];
+ ULONG IrqlTable[32];
UCHAR CurrentIrql;
KAFFINITY SetMember;
struct _KTHREAD *CurrentThread;
@@ -190,6 +206,7 @@
return (struct _TEB*)USERPCR->Teb;
}
+#ifndef _WINNT_H
//
// IRQL Support on ARM is similar to MIPS/ALPHA
//
@@ -228,5 +245,12 @@
HalSweepIcache(
VOID
);
-
-#endif
+#endif
+
+//
+// Intrinsics
+//
+#define InterlockedDecrement _InterlockedDecrement
+#define InterlockedIncrement _InterlockedIncrement
+#define InterlockedExchange _InterlockedExchange
+#endif