Author: tkreuzer
Date: Sun Apr 12 09:48:00 2015
New Revision: 67168
URL:
http://svn.reactos.org/svn/reactos?rev=67168&view=rev
Log:
[INCLUDE]
- Add missing KeMemoryBarrierWithoutFence, NUMBER_POOL_LOOKASIDE_LISTS,
MM_SHARED_USER_DATA_VA, MM_EMPTY_PTE_LIST, MM_EMPTY_LIST, P*E_PER_PAGE,
SESSION_POOL_LOOKASIDES, MiPdeToPte for ARM
- Fix KI_USER_SHARED_DATA for ARM based on native DDK
Modified:
trunk/reactos/include/ddk/wdm.h
trunk/reactos/include/ndk/arm/ketypes.h
trunk/reactos/include/ndk/arm/mmtypes.h
trunk/reactos/include/reactos/arm/armddk.h
trunk/reactos/include/xdk/arm/ke.h
trunk/reactos/ntoskrnl/include/internal/arm/mm.h
trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
Modified: trunk/reactos/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=6716…
==============================================================================
--- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Sun Apr 12 09:48:00 2015
@@ -8554,6 +8554,8 @@
#elif defined(_M_ARM)
#include <armddk.h>
+
+#define KeMemoryBarrierWithoutFence() _ReadWriteBarrier()
#else
#error Unknown Architecture
#endif
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 [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/arm/ketypes.h [iso-8859-1] Sun Apr 12 09:48:00 2015
@@ -80,6 +80,11 @@
// Static Kernel-Mode Address start (use MM_KSEG0_BASE for actual)
//
#define KSEG0_BASE 0x80000000
+
+//
+// Number of pool lookaside lists per pool in the PRCB
+//
+#define NUMBER_POOL_LOOKASIDE_LISTS 32
//
// Trap Frame Definition
Modified: trunk/reactos/include/ndk/arm/mmtypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/arm/mmtypes.h?…
==============================================================================
--- trunk/reactos/include/ndk/arm/mmtypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/arm/mmtypes.h [iso-8859-1] Sun Apr 12 09:48:00 2015
@@ -42,6 +42,11 @@
// User space range limit
//
#define MI_HIGHEST_USER_ADDRESS (PVOID)0x7FFEFFFF
+
+//
+// Address of the shared user page
+//
+#define MM_SHARED_USER_DATA_VA 0x7FFE0000
//
// Sanity checks for Paging Macros
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 Apr 12 09:48:00 2015
@@ -29,7 +29,7 @@
// FIXME: mmtypes.h?
//
#define KIP0PCRADDRESS 0xFFDFF000
-#define KI_USER_SHARED_DATA 0xFFDF0000
+#define KI_USER_SHARED_DATA 0xFFFF9000
#define USPCR 0x7FFF0000
#define PCR ((KPCR * const)KIP0PCRADDRESS)
#define USERPCR ((volatile KPCR * const)USPCR)
@@ -246,7 +246,7 @@
#define ASSERT_BREAKPOINT BREAKPOINT_COMMAND_STRING + 1
-#define DbgRaiseAssertionFailure() __break(ASSERT_BREAKPOINT)
+#define DbgRaiseAssertionFailure() __emit(0xdefc)
#define PCR_MINOR_VERSION 1
#define PCR_MAJOR_VERSION 1
Modified: trunk/reactos/include/xdk/arm/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/arm/ke.h?rev=6…
==============================================================================
--- trunk/reactos/include/xdk/arm/ke.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/arm/ke.h [iso-8859-1] Sun Apr 12 09:48:00 2015
@@ -1,3 +1,5 @@
$if (_WDMDDK_)
#include <armddk.h>
$endif
+
+#define KeMemoryBarrierWithoutFence() _ReadWriteBarrier()
Modified: 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 [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/arm/mm.h [iso-8859-1] Sun Apr 12 09:48:00
2015
@@ -15,6 +15,10 @@
//
#define CPT_SHIFT 10
#define CPT_SIZE (1 << CPT_SHIFT)
+
+/* MMPTE related defines */
+#define MM_EMPTY_PTE_LIST ((ULONG)0xFFFFF)
+#define MM_EMPTY_LIST ((ULONG_PTR)-1)
//
// Base Addresses
@@ -86,7 +90,7 @@
typedef struct _PAGE_DIRECTORY_ARM
{
- union
+ union
{
HARDWARE_PDE_ARMV6 Pde[4096];
HARDWARE_LARGE_PTE_ARMV6 Pte[4096];
@@ -108,8 +112,8 @@
PULONG MmGetPageDirectory(VOID);
#define MI_MAKE_LOCAL_PAGE(x) ((x)->u.Hard.NonGlobal = 1)
-#define MI_MAKE_DIRTY_PAGE(x)
-#define MI_MAKE_ACCESSED_PAGE(x)
+#define MI_MAKE_DIRTY_PAGE(x)
+#define MI_MAKE_ACCESSED_PAGE(x)
#define MI_MAKE_OWNER_PAGE(x) ((x)->u.Hard.Owner = 1)
#define MI_MAKE_WRITE_PAGE(x) ((x)->u.Hard.ReadOnly = 0)
#define MI_PAGE_DISABLE_CACHE(x) ((x)->u.Hard.Cached = 0)
@@ -144,7 +148,7 @@
/* Retrives the PDE entry for the given VA */
#define MiGetPdeAddress(x) ((PMMPDE)(PDE_BASE + (((ULONG)(x) >> 20) << 2)))
#define MiAddressToPde(x) MiGetPdeAddress(x)
-
+
/* Retrieves the PTE entry for the given VA */
#define MiGetPteAddress(x) ((PMMPTE)(PTE_BASE + (((ULONG)(x) >> 12) << 2)))
#define MiAddressToPte(x) MiGetPteAddress(x)
@@ -153,7 +157,7 @@
#define MiGetPdeOffset(x) (((ULONG)(x)) >> 20)
#define MiGetPteOffset(x) ((((ULONG)(x)) << 12) >> 24)
#define MiAddressToPteOffset(x) MiGetPteOffset(x)
-
+
/* Convert a PTE into a corresponding address */
#define MiPteToAddress(x) ((PVOID)((ULONG)(x) << 10))
#define MiPdeToAddress(x) ((PVOID)((ULONG)(x) << 18))
@@ -163,5 +167,5 @@
#define PAGE_TO_SECTION_PAGE_TABLE_OFFSET(x) \
((((x)) % (4*1024*1024)) / (4*1024))
-
+
#define MM_CACHE_LINE_SIZE 64
Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/miarm.h?r…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Sun Apr 12 09:48:00 2015
@@ -84,6 +84,9 @@
#define MiIsPteOnPdeBoundary(PointerPte) \
((((ULONG_PTR)PointerPte) & (PAGE_SIZE - 1)) == 0)
#elif _M_ARM
+#define PPE_PER_PAGE 1
+#define PDE_PER_PAGE 4096
+#define PTE_PER_PAGE 256
#define PD_COUNT 1
#define PDE_COUNT 4096
#define PTE_COUNT 256
@@ -311,6 +314,8 @@
#define SESSION_POOL_LOOKASIDES 21
#elif defined(_M_IX86)
#define SESSION_POOL_LOOKASIDES 26
+#elif defined(_M_ARM)
+#define SESSION_POOL_LOOKASIDES 26 // CHECKME
#else
#error Not Defined!
#endif
@@ -379,6 +384,11 @@
#define POOL_FREE_IRQL_INVALID 9
#define POOL_BILLED_PROCESS_INVALID 13
#define POOL_HEADER_SIZE_INVALID 32
+
+#ifdef _M_ARM
+#define MiPdeToPte(PDE) ((PMMPTE)MiPteToAddress(PDE))
+#endif
+
typedef struct _POOL_DESCRIPTOR
{