Author: jgardou
Date: Sun Jul 25 16:44:57 2010
New Revision: 48255
URL:
http://svn.reactos.org/svn/reactos?rev=48255&view=rev
Log:
sync with trunk (r48253)
Modified:
branches/reactos-yarotows/ (props changed)
branches/reactos-yarotows/base/applications/network/ipconfig/ipconfig.c
branches/reactos-yarotows/base/setup/usetup/inffile.c
branches/reactos-yarotows/base/setup/usetup/inffile.h
branches/reactos-yarotows/base/setup/usetup/usetup.h
branches/reactos-yarotows/dll/win32/jscript/jscript_Si.rc (props changed)
branches/reactos-yarotows/include/psdk/ntdef.h
branches/reactos-yarotows/include/psdk/winnt.h
branches/reactos-yarotows/include/psdk/wspiapi.h
branches/reactos-yarotows/lib/3rdparty/mingw/tlsmcrt.c
branches/reactos-yarotows/lib/drivers/oskittcp/include/freebsd/src/sys/sys/kernel.h
branches/reactos-yarotows/lib/inflib/infget.c
branches/reactos-yarotows/lib/inflib/infpriv.h
branches/reactos-yarotows/lib/inflib/infros.h
branches/reactos-yarotows/lib/inflib/infrosget.c
branches/reactos-yarotows/lib/newinflib/infget.c
branches/reactos-yarotows/lib/newinflib/infhost.h
branches/reactos-yarotows/lib/newinflib/infhostget.c
branches/reactos-yarotows/lib/newinflib/infpriv.h
branches/reactos-yarotows/lib/newinflib/infros.h
branches/reactos-yarotows/lib/newinflib/infrosget.c
branches/reactos-yarotows/lib/sdk/crt/time/asctime.c
branches/reactos-yarotows/ntoskrnl/include/internal/amd64/mm.h
branches/reactos-yarotows/ntoskrnl/include/internal/i386/mm.h
branches/reactos-yarotows/ntoskrnl/include/internal/lpc_x.h
branches/reactos-yarotows/ntoskrnl/mm/ARM3/largepag.c
branches/reactos-yarotows/ntoskrnl/mm/ARM3/miarm.h
branches/reactos-yarotows/ntoskrnl/mm/ARM3/mmsup.c
branches/reactos-yarotows/ntoskrnl/mm/ARM3/procsup.c
branches/reactos-yarotows/ntoskrnl/mm/amd64/page.c
branches/reactos-yarotows/ntoskrnl/mm/i386/page.c
branches/reactos-yarotows/subsystems/win32/csrss/win32csr/ (props changed)
Propchange: branches/reactos-yarotows/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jul 25 16:44:57 2010
@@ -1,4 +1,4 @@
/branches/header-work:45691-47721
/branches/ros-amd64-bringup:36852
-/branches/ros-amd64-bringup/reactos:34711-34712,34741,34743,34770,34780-34782,34803,34812,34839,34842,34864,34870,34874,34877,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35655,35683,35739,35746,35762,35771,35777,35781,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36011-36013,36172,36360,36380,36388-36389,36393,36397,36445,36475,36502-36503,36505,36570,36614,36852,36898-36899,36930,36936,36949,36951,36958,36961,36964,36969,36972,36987-36988,36990,36992,37019,37322-37323,37333-37334,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38092,38100,38148-38151,38264-38265,38268,38355,39151,39333,39335,39345,39639,40120,40122-40123,40125,40127-40128,40155,40247,40324,40608,40753,40926-40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41070,41082-41086,41097-41098,41101,41449,41479-41480,41484-41485,41499-41500,41502,41531,41536,41540,41546-41547,41549,43080,43426,43451,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43836,43838-43840,43852,43857-43858,43860,43905-43907,43952,43954,43965,43969,43979,43981,43992,44002,44036-44037,44039-44040,44044-44045,44053,44065,44095,44123,44143-44144,44205,44238,44257,44259,44294,44338-44339,44385,44389,44391,44426,44460,44467-44468,44470-44471,44499,44501,44503-44504,44506,44510-44512,44521,44523-44526,44530,44540,44601,44634,44639,44772,44818,45124,45126-45127,45430,46394,46404,46478,46511,46523-46524,46526,46534-46535,46537-46539,46589,46805,46868,47472,47846-47847,47878,47882
-/trunk/reactos:45219-48237
+/branches/ros-amd64-bringup/reactos:34711-34712,34741,34743,34770,34780-34782,34803,34812,34839,34842,34864,34870,34874,34877,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35655,35683,35739,35746,35762,35771,35777,35781,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36011-36013,36172,36360,36380,36388-36389,36393,36397,36443,36445,36475,36502-36503,36505,36570,36614,36852,36898-36899,36930,36936,36949,36951,36958,36961,36964,36969,36972,36987-36988,36990,36992,37019,37322-37323,37333-37334,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38092,38100,38148-38151,38264-38265,38268,38355,39151,39333,39335,39345,39639,40120,40122-40123,40125,40127-40128,40155,40247,40324,40608,40753,40926-40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41070,41082-41086,41097-41098,41101,41449,41479-41480,41484-41485,41499-41500,41502,41531,41536,41540,41546-41547,41549,43080,43426,43451,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43836,43838-43840,43852,43857-43858,43860,43905-43907,43952,43954,43965,43969,43979,43981,43992,44002,44036-44037,44039-44040,44044-44045,44053,44065,44095,44123,44143-44144,44205,44238,44257,44259,44294,44338-44339,44385,44389,44391,44426,44460,44467-44468,44470-44471,44499,44501,44503-44504,44506,44510-44512,44521,44523-44526,44530,44540,44601,44634,44639,44772,44818,45124,45126-45127,45430,46394,46404,46478,46511,46523-46524,46526,46534-46535,46537-46539,46589,46805,46868,47472,47846-47847,47878,47882
+/trunk/reactos:45219-48253
Modified: branches/reactos-yarotows/base/applications/network/ipconfig/ipconfig.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/base/applicati…
==============================================================================
--- branches/reactos-yarotows/base/applications/network/ipconfig/ipconfig.c [iso-8859-1]
(original)
+++ branches/reactos-yarotows/base/applications/network/ipconfig/ipconfig.c [iso-8859-1]
Sun Jul 25 16:44:57 2010
@@ -359,6 +359,7 @@
VOID ShowInfo(BOOL bAll)
{
+ MIB_IFROW mibEntry;
PIP_ADAPTER_INFO pAdapterInfo = NULL;
PIP_ADAPTER_INFO pAdapter = NULL;
ULONG adaptOutBufLen = 0;
@@ -441,6 +442,9 @@
{
LPTSTR IntType, myConType;
+ mibEntry.dwIndex = pAdapter->Index;
+ GetIfEntry(&mibEntry);
+
IntType = GetInterfaceTypeName(pAdapter->Type);
myConType = GetConnectionType(pAdapter->AdapterName);
@@ -449,7 +453,7 @@
if (myConType != NULL) HeapFree(ProcessHeap, 0, myConType);
/* check if the adapter is connected to the media */
- if (_tcscmp(pAdapter->IpAddressList.IpAddress.String, "0.0.0.0") ==
0)
+ if (mibEntry.dwOperStatus != MIB_IF_OPER_STATUS_CONNECTED &&
mibEntry.dwOperStatus != MIB_IF_OPER_STATUS_OPERATIONAL)
{
_tprintf(_T("\tMedia State . . . . . . . . . . . : Media
disconnected\n"));
pAdapter = pAdapter->Next;
Modified: branches/reactos-yarotows/base/setup/usetup/inffile.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/base/setup/use…
==============================================================================
--- branches/reactos-yarotows/base/setup/usetup/inffile.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/base/setup/usetup/inffile.c [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -66,46 +66,6 @@
}
BOOL WINAPI
-InfpFindNextLine(
- IN PINFCONTEXT ContextIn,
- OUT PINFCONTEXT ContextOut)
-{
- return InfFindNextLine(ContextIn, ContextOut);
-}
-
-BOOL WINAPI
-InfpGetBinaryField(
- IN PINFCONTEXT Context,
- IN ULONG FieldIndex,
- IN OUT BYTE* ReturnBuffer,
- IN ULONG ReturnBufferSize,
- OUT PULONG RequiredSize)
-{
- return InfGetBinaryField(Context, FieldIndex, ReturnBuffer, ReturnBufferSize,
RequiredSize);
-}
-
-DWORD WINAPI
-InfpGetFieldCount(
- IN PINFCONTEXT Context)
-{
- return (DWORD)InfGetFieldCount(Context);
-}
-
-BOOL WINAPI
-InfpGetIntField(
- IN PINFCONTEXT Context,
- IN DWORD FieldIndex,
- OUT PINT IntegerValue)
-{
- LONG IntegerValueL;
- BOOL ret;
-
- ret = InfGetIntField(Context, FieldIndex, &IntegerValueL);
- *IntegerValue = (INT)IntegerValueL;
- return ret;
-}
-
-BOOL WINAPI
InfpGetMultiSzFieldW(
IN PINFCONTEXT Context,
IN ULONG FieldIndex,
Modified: branches/reactos-yarotows/base/setup/usetup/inffile.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/base/setup/use…
==============================================================================
--- branches/reactos-yarotows/base/setup/usetup/inffile.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/base/setup/usetup/inffile.h [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -36,10 +36,10 @@
#define SetupCloseInfFile InfpCloseInfFile
#define SetupFindFirstLineW InfpFindFirstLineW
-#define SetupFindNextLine InfpFindNextLine
-#define SetupGetBinaryField InfpGetBinaryField
-#define SetupGetFieldCount InfpGetFieldCount
-#define SetupGetIntField InfpGetIntField
+#define SetupFindNextLine InfFindNextLine
+#define SetupGetBinaryField InfGetBinaryField
+#define SetupGetFieldCount InfGetFieldCount
+#define SetupGetIntField InfGetIntField
#define SetupGetMultiSzFieldW InfpGetMultiSzFieldW
#define SetupGetStringFieldW InfpGetStringFieldW
#define SetupOpenInfFileW InfpOpenInfFileW
@@ -65,29 +65,6 @@
IN PCWSTR Section,
IN PCWSTR Key,
IN OUT PINFCONTEXT Context);
-
-BOOL WINAPI
-InfpFindNextLine(
- IN PINFCONTEXT ContextIn,
- OUT PINFCONTEXT ContextOut);
-
-BOOL WINAPI
-InfpGetBinaryField(
- IN PINFCONTEXT Context,
- IN ULONG FieldIndex,
- IN OUT BYTE* ReturnBuffer,
- IN ULONG ReturnBufferSize,
- OUT PULONG RequiredSize);
-
-DWORD WINAPI
-InfpGetFieldCount(
- IN PINFCONTEXT Context);
-
-BOOL WINAPI
-InfpGetIntField(
- IN PINFCONTEXT Context,
- IN DWORD FieldIndex,
- OUT PINT IntegerValue);
BOOL WINAPI
InfpGetMultiSzFieldW(
Modified: branches/reactos-yarotows/base/setup/usetup/usetup.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/base/setup/use…
==============================================================================
--- branches/reactos-yarotows/base/setup/usetup/usetup.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/base/setup/usetup/usetup.h [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -50,6 +50,7 @@
/* Internal Headers */
#include "interface/consup.h"
#include "partlist.h"
+#include "infros.h"
#include "inffile.h"
#include "inicache.h"
#include "progress.h"
Propchange: branches/reactos-yarotows/dll/win32/jscript/jscript_Si.rc
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jul 25 16:44:57 2010
@@ -2,4 +2,4 @@
/branches/reactos-yarotows/dll/win32/jscript/jscript_Si.rc:46848,46966,47800
/branches/ros-amd64-bringup/dll/win32/jscript/jscript_Si.rc:36852
/branches/ros-amd64-bringup/reactos/dll/win32/jscript/jscript_Si.rc:34711-34712,34741,34743,34780-34782,34803,34812,34839,34842,34864,34870,34874,34877,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35655,35683,35739,35746,35762,35771,35777,35781,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36011-36013,36172,36360,36380,36388-36389,36397,36445,36502-36503,36505,36570,36614,36898-36899,36930,36936,36949,36951,36958,36961,36964,36969,36972,36992,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38092,38100,38148-38151,38264-38265,38268,38355,39151,39333,39335,39345,39639,40122-40123,40125,40127-40128,40155,40247,40324,40608,40753,40927-40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41070,41082-41086,41097-41098,41101,41449,41479,41484-41485,41499-41500,41502,41531,41536,41540,41546-41547,41549,43080,43426,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43836,43838-43840,43857-43858,43860,43905-43907,43969,44002,44036-44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44238,44294,44338-44339,44389,44391,44426,44460,44467-44468,44470-44471,44499,44501,44503-44504,44506,44510-44512,44521,44523-44526,44530,44540,44601,44772,45124,45126-45127,46394,46478,46511,46523-46524,46526,46534-46535,46537-46539,46589,46805
-/trunk/reactos/dll/win32/jscript/jscript_Si.rc:47414-48237
+/trunk/reactos/dll/win32/jscript/jscript_Si.rc:47414-48253
Modified: branches/reactos-yarotows/include/psdk/ntdef.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/include/psdk/n…
==============================================================================
--- branches/reactos-yarotows/include/psdk/ntdef.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/include/psdk/ntdef.h [iso-8859-1] Sun Jul 25 16:44:57 2010
@@ -240,7 +240,7 @@
#elif (_MSC_VER)
#define FORCEINLINE __inline
#else
-#define FORCEINLINE static __inline__ __attribute__((always_inline))
+#define FORCEINLINE extern __inline__ __attribute__((always_inline))
#endif
#endif
Modified: branches/reactos-yarotows/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/include/psdk/w…
==============================================================================
--- branches/reactos-yarotows/include/psdk/winnt.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/include/psdk/winnt.h [iso-8859-1] Sun Jul 25 16:44:57 2010
@@ -79,7 +79,7 @@
#elif (_MSC_VER)
#define FORCEINLINE __inline
#else
-#define FORCEINLINE static __inline__ __attribute__((always_inline))
+#define FORCEINLINE extern __inline__ __attribute__((always_inline))
#endif
#endif
@@ -5112,7 +5112,7 @@
#endif
#if defined(_M_IX86)
-static __inline__ struct _TEB * NtCurrentTeb(void)
+extern __inline__ struct _TEB * NtCurrentTeb(void)
{
struct _TEB *ret;
@@ -5137,12 +5137,12 @@
return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self));
}
#elif defined(_M_PPC)
-static __inline__ struct _TEB * NtCurrentTeb(void)
+extern __inline__ struct _TEB * NtCurrentTeb(void)
{
return __readfsdword_winnt(0x18);
}
#else
-static __inline__ struct _TEB * NtCurrentTeb(void)
+extern __inline__ struct _TEB * NtCurrentTeb(void)
{
return __readfsdword_winnt(0x18);
}
Modified: branches/reactos-yarotows/include/psdk/wspiapi.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/include/psdk/w…
==============================================================================
--- branches/reactos-yarotows/include/psdk/wspiapi.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/include/psdk/wspiapi.h [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -236,7 +236,7 @@
return 0;
}
-FORCEINLINE
+static __inline
void
WINAPI
WspiapiLegacyFreeAddrInfo(
@@ -252,7 +252,7 @@
}
}
-FORCEINLINE
+static __inline
int
WINAPI
WspiapiLegacyGetAddrInfo(
@@ -352,7 +352,7 @@
return (iError);
}
-FORCEINLINE
+static __inline
int
WINAPI
WspiapiLegacyGetNameInfo(
Modified: branches/reactos-yarotows/lib/3rdparty/mingw/tlsmcrt.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/lib/3rdparty/m…
==============================================================================
--- branches/reactos-yarotows/lib/3rdparty/mingw/tlsmcrt.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/lib/3rdparty/mingw/tlsmcrt.c [iso-8859-1] Sun Jul 25
16:44:57 2010
@@ -11,3 +11,34 @@
we do tls cleanup in runtime and _CRT_MT has value 2. */
int _CRT_MT = 2;
+// HACK around broken imports from libmingwex, until RosBE64 is updated
+#ifdef _M_AMD64
+
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+#include <stdlib.h>
+
+int __mingwthr_key_dtor (DWORD key, void (*dtor)(void *));
+int __mingwthr_remove_key_dtor (DWORD key);
+
+extern int ___w64_mingwthr_remove_key_dtor (DWORD key);
+extern int ___w64_mingwthr_add_key_dtor (DWORD key, void (*dtor)(void *));
+
+int
+__mingwthr_remove_key_dtor (DWORD key)
+{
+ return ___w64_mingwthr_remove_key_dtor (key);
+}
+
+int
+__mingwthr_key_dtor (DWORD key, void (*dtor)(void *))
+{
+ if (dtor)
+ return ___w64_mingwthr_add_key_dtor (key, dtor);
+
+ return 0;
+}
+#endif
+
Modified:
branches/reactos-yarotows/lib/drivers/oskittcp/include/freebsd/src/sys/sys/kernel.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/lib/drivers/os…
==============================================================================
--- branches/reactos-yarotows/lib/drivers/oskittcp/include/freebsd/src/sys/sys/kernel.h
[iso-8859-1] (original)
+++ branches/reactos-yarotows/lib/drivers/oskittcp/include/freebsd/src/sys/sys/kernel.h
[iso-8859-1] Sun Jul 25 16:44:57 2010
@@ -83,8 +83,13 @@
#ifdef _MSC_VER
#define MAKE_SET(set, sym, type)
#else
+#if defined(_M_AMD64)
+#define MAKE_SET(set, sym, type) \
+ asm(".stabs \"" #set "\", " #type ", 0, 0, "
#sym)
+#else
#define MAKE_SET(set, sym, type) \
asm(".stabs \"_" #set "\", " #type ", 0, 0, _"
#sym)
+#endif
#endif
#define TEXT_SET(set, sym) MAKE_SET(set, sym, 23)
#define DATA_SET(set, sym) MAKE_SET(set, sym, 25)
Modified: branches/reactos-yarotows/lib/inflib/infget.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/lib/inflib/inf…
==============================================================================
--- branches/reactos-yarotows/lib/inflib/infget.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/lib/inflib/infget.c [iso-8859-1] Sun Jul 25 16:44:57 2010
@@ -271,7 +271,7 @@
INFSTATUS
InfpGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
- PLONG IntegerValue)
+ INT* IntegerValue)
{
PINFCACHELINE CacheLine;
PINFCACHEFIELD CacheField;
Modified: branches/reactos-yarotows/lib/inflib/infpriv.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/lib/inflib/inf…
==============================================================================
--- branches/reactos-yarotows/lib/inflib/infpriv.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/lib/inflib/infpriv.h [iso-8859-1] Sun Jul 25 16:44:57 2010
@@ -115,7 +115,7 @@
PULONG RequiredSize);
extern INFSTATUS InfpGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
- PLONG IntegerValue);
+ INT* IntegerValue);
extern INFSTATUS InfpGetMultiSzField(PINFCONTEXT Context,
ULONG FieldIndex,
PTSTR ReturnBuffer,
Modified: branches/reactos-yarotows/lib/inflib/infros.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/lib/inflib/inf…
==============================================================================
--- branches/reactos-yarotows/lib/inflib/infros.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/lib/inflib/infros.h [iso-8859-1] Sun Jul 25 16:44:57 2010
@@ -48,7 +48,7 @@
PULONG RequiredSize);
extern BOOLEAN InfGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
- PLONG IntegerValue);
+ PINT IntegerValue);
extern BOOLEAN InfGetMultiSzField(PINFCONTEXT Context,
ULONG FieldIndex,
PWSTR ReturnBuffer,
Modified: branches/reactos-yarotows/lib/inflib/infrosget.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/lib/inflib/inf…
==============================================================================
--- branches/reactos-yarotows/lib/inflib/infrosget.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/lib/inflib/infrosget.c [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -84,7 +84,7 @@
BOOLEAN
InfGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
- PLONG IntegerValue)
+ PINT IntegerValue)
{
return INF_SUCCESS(InfpGetIntField(Context, FieldIndex, IntegerValue));
}
Modified: branches/reactos-yarotows/lib/newinflib/infget.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/lib/newinflib/…
==============================================================================
--- branches/reactos-yarotows/lib/newinflib/infget.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/lib/newinflib/infget.c [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -416,7 +416,7 @@
INFSTATUS
InfpGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
- PLONG IntegerValue)
+ INT *IntegerValue)
{
PINFCACHELINE CacheLine;
PINFCACHEFIELD CacheField;
Modified: branches/reactos-yarotows/lib/newinflib/infhost.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/lib/newinflib/…
==============================================================================
--- branches/reactos-yarotows/lib/newinflib/infhost.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/lib/newinflib/infhost.h [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -49,7 +49,7 @@
ULONG *RequiredSize);
extern int InfHostGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
- ULONG *IntegerValue);
+ INT *IntegerValue);
extern int InfHostGetMultiSzField(PINFCONTEXT Context,
ULONG FieldIndex,
WCHAR *ReturnBuffer,
Modified: branches/reactos-yarotows/lib/newinflib/infhostget.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/lib/newinflib/…
==============================================================================
--- branches/reactos-yarotows/lib/newinflib/infhostget.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/lib/newinflib/infhostget.c [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -138,11 +138,11 @@
int
InfHostGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
- ULONG *IntegerValue)
-{
- INFSTATUS Status;
-
- Status = InfpGetIntField(Context, FieldIndex, (PLONG)IntegerValue);
+ INT *IntegerValue)
+{
+ INFSTATUS Status;
+
+ Status = InfpGetIntField(Context, FieldIndex, IntegerValue);
if (INF_SUCCESS(Status))
{
return 0;
Modified: branches/reactos-yarotows/lib/newinflib/infpriv.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/lib/newinflib/…
==============================================================================
--- branches/reactos-yarotows/lib/newinflib/infpriv.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/lib/newinflib/infpriv.h [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -116,7 +116,7 @@
PULONG RequiredSize);
extern INFSTATUS InfpGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
- PLONG IntegerValue);
+ INT *IntegerValue);
extern INFSTATUS InfpGetMultiSzField(PINFCONTEXT Context,
ULONG FieldIndex,
PWSTR ReturnBuffer,
Modified: branches/reactos-yarotows/lib/newinflib/infros.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/lib/newinflib/…
==============================================================================
--- branches/reactos-yarotows/lib/newinflib/infros.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/lib/newinflib/infros.h [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -50,7 +50,7 @@
PULONG RequiredSize);
extern BOOLEAN InfGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
- PLONG IntegerValue);
+ INT *IntegerValue);
extern BOOLEAN InfGetMultiSzField(PINFCONTEXT Context,
ULONG FieldIndex,
PWSTR ReturnBuffer,
Modified: branches/reactos-yarotows/lib/newinflib/infrosget.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/lib/newinflib/…
==============================================================================
--- branches/reactos-yarotows/lib/newinflib/infrosget.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/lib/newinflib/infrosget.c [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -84,7 +84,7 @@
BOOLEAN
InfGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
- PLONG IntegerValue)
+ INT *IntegerValue)
{
return INF_SUCCESS(InfpGetIntField(Context, FieldIndex, IntegerValue));
}
Modified: branches/reactos-yarotows/lib/sdk/crt/time/asctime.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/lib/sdk/crt/ti…
==============================================================================
--- branches/reactos-yarotows/lib/sdk/crt/time/asctime.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/lib/sdk/crt/time/asctime.c [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -73,7 +73,7 @@
return u.char2;
}
-FORCEINLINE
+static __inline
void
FillBuf(timebuf_t *buf, const struct tm *ptm)
{
Modified: branches/reactos-yarotows/ntoskrnl/include/internal/amd64/mm.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/ntoskrnl/inclu…
==============================================================================
--- branches/reactos-yarotows/ntoskrnl/include/internal/amd64/mm.h [iso-8859-1]
(original)
+++ branches/reactos-yarotows/ntoskrnl/include/internal/amd64/mm.h [iso-8859-1] Sun Jul 25
16:44:57 2010
@@ -3,6 +3,8 @@
*/
#pragma once
+
+#define _MI_PAGING_LEVELS 4
/* Helper macros */
#define PAGE_MASK(x) ((x)&(~0xfff))
@@ -106,12 +108,17 @@
FORCEINLINE
MiAddressToPti(PVOID Address)
{
- ULONG64 Pti = (ULONG64)Address >> PTI_SHIFT;
- Pti &= PTI_MASK_AMD64;
- return Pti;
-}
-
-#define MiAddressToPteOffset(x) MiAddressToPti(x)
+ return ((((ULONG64)Address) >> PTI_SHIFT) & 0x1FF);
+}
+#define MiAddressToPteOffset(x) MiAddressToPti(x) // FIXME: bad name
+
+ULONG
+FORCEINLINE
+MiAddressToPxi(PVOID Address)
+{
+ return ((((ULONG64)Address) >> PXI_SHIFT) & 0x1FF);
+}
+
/* Convert a PTE into a corresponding address */
PVOID
Modified: branches/reactos-yarotows/ntoskrnl/include/internal/i386/mm.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/ntoskrnl/inclu…
==============================================================================
--- branches/reactos-yarotows/ntoskrnl/include/internal/i386/mm.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/ntoskrnl/include/internal/i386/mm.h [iso-8859-1] Sun Jul 25
16:44:57 2010
@@ -6,6 +6,12 @@
struct _EPROCESS;
PULONG MmGetPageDirectory(VOID);
+
+#ifdef _PAE_
+#define _MI_PAGING_LEVELS 3
+#else
+#define _MI_PAGING_LEVELS 2
+#endif
#define PAGE_MASK(x) ((x)&(~0xfff))
#define PAE_PAGE_MASK(x) ((x)&(~0xfffLL))
Modified: branches/reactos-yarotows/ntoskrnl/include/internal/lpc_x.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/ntoskrnl/inclu…
==============================================================================
--- branches/reactos-yarotows/ntoskrnl/include/internal/lpc_x.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/ntoskrnl/include/internal/lpc_x.h [iso-8859-1] Sun Jul 25
16:44:57 2010
@@ -95,7 +95,7 @@
//
// Allocates a new message
//
-FORCEINLINE
+static __inline
PLPCP_MESSAGE
LpcpAllocateFromPortZone(VOID)
{
Modified: branches/reactos-yarotows/ntoskrnl/mm/ARM3/largepag.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/ntoskrnl/mm/AR…
==============================================================================
--- branches/reactos-yarotows/ntoskrnl/mm/ARM3/largepag.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/ntoskrnl/mm/ARM3/largepag.c [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -34,7 +34,8 @@
MiInitializeLargePageSupport(VOID)
{
#if _MI_PAGING_LEVELS > 2
-#error "PAE/x64 Not Implemented"
+ DPRINT1("PAE/x64 Not Implemented\n");
+ ASSERT(FALSE);
#else
/* Initialize the large-page hyperspace PTE used for initial mapping */
MiLargePageHyperPte = MiReserveSystemPtes(1, SystemPteSpace);
Modified: branches/reactos-yarotows/ntoskrnl/mm/ARM3/miarm.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/ntoskrnl/mm/AR…
==============================================================================
--- branches/reactos-yarotows/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original)
+++ branches/reactos-yarotows/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -139,56 +139,9 @@
#else
#error Define these please!
#endif
-static const
-ULONG
-MmProtectToPteMask[32] =
-{
- //
- // These are the base MM_ protection flags
- //
- 0,
- PTE_READONLY | PTE_ENABLE_CACHE,
- PTE_EXECUTE | PTE_ENABLE_CACHE,
- PTE_EXECUTE_READ | PTE_ENABLE_CACHE,
- PTE_READWRITE | PTE_ENABLE_CACHE,
- PTE_WRITECOPY | PTE_ENABLE_CACHE,
- PTE_EXECUTE_READWRITE | PTE_ENABLE_CACHE,
- PTE_EXECUTE_WRITECOPY | PTE_ENABLE_CACHE,
- //
- // These OR in the MM_NOCACHE flag
- //
- 0,
- PTE_READONLY | PTE_DISABLE_CACHE,
- PTE_EXECUTE | PTE_DISABLE_CACHE,
- PTE_EXECUTE_READ | PTE_DISABLE_CACHE,
- PTE_READWRITE | PTE_DISABLE_CACHE,
- PTE_WRITECOPY | PTE_DISABLE_CACHE,
- PTE_EXECUTE_READWRITE | PTE_DISABLE_CACHE,
- PTE_EXECUTE_WRITECOPY | PTE_DISABLE_CACHE,
- //
- // These OR in the MM_DECOMMIT flag, which doesn't seem supported on x86/64/ARM
- //
- 0,
- PTE_READONLY | PTE_ENABLE_CACHE,
- PTE_EXECUTE | PTE_ENABLE_CACHE,
- PTE_EXECUTE_READ | PTE_ENABLE_CACHE,
- PTE_READWRITE | PTE_ENABLE_CACHE,
- PTE_WRITECOPY | PTE_ENABLE_CACHE,
- PTE_EXECUTE_READWRITE | PTE_ENABLE_CACHE,
- PTE_EXECUTE_WRITECOPY | PTE_ENABLE_CACHE,
- //
- // These OR in the MM_NOACCESS flag, which seems to enable WriteCombining?
- //
- 0,
- PTE_READONLY | PTE_WRITECOMBINED_CACHE,
- PTE_EXECUTE | PTE_WRITECOMBINED_CACHE,
- PTE_EXECUTE_READ | PTE_WRITECOMBINED_CACHE,
- PTE_READWRITE | PTE_WRITECOMBINED_CACHE,
- PTE_WRITECOPY | PTE_WRITECOMBINED_CACHE,
- PTE_EXECUTE_READWRITE | PTE_WRITECOMBINED_CACHE,
- PTE_EXECUTE_WRITECOPY | PTE_WRITECOMBINED_CACHE,
-};
-
+
+extern const ULONG MmProtectToPteMask[32];
+
//
// Assertions for session images, addresses, and PTEs
//
Modified: branches/reactos-yarotows/ntoskrnl/mm/ARM3/mmsup.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/ntoskrnl/mm/AR…
==============================================================================
--- branches/reactos-yarotows/ntoskrnl/mm/ARM3/mmsup.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/ntoskrnl/mm/ARM3/mmsup.c [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -64,22 +64,26 @@
NTAPI
MmIsAddressValid(IN PVOID VirtualAddress)
{
- //
- // Just check the Valid bit in the Address' PDE and PTE
- //
- if ((MiAddressToPde(VirtualAddress)->u.Hard.Valid == 0) ||
- (MiAddressToPte(VirtualAddress)->u.Hard.Valid == 0))
- {
- //
- // Attempting to access this page is guranteed to result in a page fault
- //
- return FALSE;
- }
+#if _MI_PAGING_LEVELS >= 4
+ /* Check if the PXE is valid */
+ if (MiAddressToPxe(VirtualAddress)->u.Hard.Valid == 0) return FALSE;
+#endif
- //
- // This address is valid now, but it will only stay so if the caller holds
- // the PFN lock
- //
+#if _MI_PAGING_LEVELS >= 3
+ /* Check if the PPE is valid */
+ if (MiAddressToPpe(VirtualAddress)->u.Hard.Valid == 0) return FALSE;
+#endif
+
+#if _MI_PAGING_LEVELS >= 2
+ /* Check if the PDE is valid */
+ if (MiAddressToPde(VirtualAddress)->u.Hard.Valid == 0) return FALSE;
+#endif
+
+ /* Check if the PTE is valid */
+ if (MiAddressToPte(VirtualAddress)->u.Hard.Valid == 0) return FALSE;
+
+ /* This address is valid now, but it will only stay so if the caller holds
+ * the PFN lock */
return TRUE;
}
Modified: branches/reactos-yarotows/ntoskrnl/mm/ARM3/procsup.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/ntoskrnl/mm/AR…
==============================================================================
--- branches/reactos-yarotows/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -1040,6 +1040,7 @@
return STATUS_SUCCESS;
}
+#ifdef _M_IX86
/* FIXME: Evaluate ways to make this portable yet arch-specific */
BOOLEAN
NTAPI
@@ -1131,6 +1132,7 @@
MiReleaseSystemPtes(PointerPte, 1, SystemPteSpace);
return TRUE;
}
+#endif
VOID
NTAPI
Modified: branches/reactos-yarotows/ntoskrnl/mm/amd64/page.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/ntoskrnl/mm/am…
==============================================================================
--- branches/reactos-yarotows/ntoskrnl/mm/amd64/page.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/ntoskrnl/mm/amd64/page.c [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -5,6 +5,7 @@
* PURPOSE: Low level memory managment manipulation
*
* PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org)
+ * ReactOS Portable Systems Group
*/
/* INCLUDES ***************************************************************/
@@ -12,6 +13,7 @@
#include <ntoskrnl.h>
#define NDEBUG
#include <debug.h>
+#include "../ARM3/miarm.h"
#undef InterlockedExchangePte
#define InterlockedExchangePte(pte1, pte2) \
@@ -25,6 +27,55 @@
/* GLOBALS *****************************************************************/
+const
+ULONG
+MmProtectToPteMask[32] =
+{
+ //
+ // These are the base MM_ protection flags
+ //
+ 0,
+ PTE_READONLY | PTE_ENABLE_CACHE,
+ PTE_EXECUTE | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_READ | PTE_ENABLE_CACHE,
+ PTE_READWRITE | PTE_ENABLE_CACHE,
+ PTE_WRITECOPY | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_READWRITE | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_WRITECOPY | PTE_ENABLE_CACHE,
+ //
+ // These OR in the MM_NOCACHE flag
+ //
+ 0,
+ PTE_READONLY | PTE_DISABLE_CACHE,
+ PTE_EXECUTE | PTE_DISABLE_CACHE,
+ PTE_EXECUTE_READ | PTE_DISABLE_CACHE,
+ PTE_READWRITE | PTE_DISABLE_CACHE,
+ PTE_WRITECOPY | PTE_DISABLE_CACHE,
+ PTE_EXECUTE_READWRITE | PTE_DISABLE_CACHE,
+ PTE_EXECUTE_WRITECOPY | PTE_DISABLE_CACHE,
+ //
+ // These OR in the MM_DECOMMIT flag, which doesn't seem supported on x86/64/ARM
+ //
+ 0,
+ PTE_READONLY | PTE_ENABLE_CACHE,
+ PTE_EXECUTE | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_READ | PTE_ENABLE_CACHE,
+ PTE_READWRITE | PTE_ENABLE_CACHE,
+ PTE_WRITECOPY | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_READWRITE | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_WRITECOPY | PTE_ENABLE_CACHE,
+ //
+ // These OR in the MM_NOACCESS flag, which seems to enable WriteCombining?
+ //
+ 0,
+ PTE_READONLY | PTE_WRITECOMBINED_CACHE,
+ PTE_EXECUTE | PTE_WRITECOMBINED_CACHE,
+ PTE_EXECUTE_READ | PTE_WRITECOMBINED_CACHE,
+ PTE_READWRITE | PTE_WRITECOMBINED_CACHE,
+ PTE_WRITECOPY | PTE_WRITECOMBINED_CACHE,
+ PTE_EXECUTE_READWRITE | PTE_WRITECOMBINED_CACHE,
+ PTE_EXECUTE_WRITECOPY | PTE_WRITECOMBINED_CACHE,
+};
/* PRIVATE FUNCTIONS *******************************************************/
@@ -489,46 +540,95 @@
return MmCreateVirtualMappingUnsafe(Process, Address, Protect, Pages, PageCount);
}
-NTSTATUS
-NTAPI
-MmInitializeHandBuiltProcess(IN PEPROCESS Process,
- IN PULONG_PTR DirectoryTableBase)
-{
- /* Share the directory base with the idle process */
- DirectoryTableBase[0] = PsGetCurrentProcess()->Pcb.DirectoryTableBase[0];
- DirectoryTableBase[1] = PsGetCurrentProcess()->Pcb.DirectoryTableBase[1];
-
- /* Initialize the Addresss Space */
- KeInitializeGuardedMutex(&Process->AddressCreationLock);
- Process->Vm.WorkingSetExpansionLinks.Flink = NULL;
- ASSERT(Process->VadRoot.NumberGenericTableElements == 0);
- Process->VadRoot.BalancedRoot.u1.Parent = &Process->VadRoot.BalancedRoot;
-
- /* The process now has an address space */
- Process->HasAddressSpace = TRUE;
- return STATUS_SUCCESS;
-}
-
BOOLEAN
NTAPI
MmCreateProcessAddressSpace(IN ULONG MinWs,
IN PEPROCESS Process,
- IN PULONG_PTR DirectoryTableBase)
-{
- UNIMPLEMENTED;
- return 0;
-}
-
-BOOLEAN
-NTAPI
-_MmIsAddressValid(IN PVOID VirtualAddress)
-{
- /* Check all four page table levels */
- return (MiAddressToPxe(VirtualAddress)->u.Hard.Valid != 0 &&
- MiAddressToPpe(VirtualAddress)->u.Hard.Valid != 0 &&
- MiAddressToPde(VirtualAddress)->u.Hard.Valid != 0 &&
- MiAddressToPte(VirtualAddress)->u.Hard.Valid != 0);
-}
-
+ OUT PULONG_PTR DirectoryTableBase)
+{
+ KIRQL OldIrql;
+ PFN_NUMBER TableBasePfn, HyperPfn;
+ PMMPTE PointerPte;
+ MMPTE TempPte, PdePte;
+ ULONG TableIndex;
+ PMMPTE SystemTable;
+
+ /* No page colors yet */
+ Process->NextPageColor = 0;
+
+ /* Setup the hyperspace lock */
+ KeInitializeSpinLock(&Process->HyperSpaceLock);
+
+ /* Lock PFN database */
+ OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
+
+ /* Get a page for the table base and for hyperspace */
+ TableBasePfn = MiRemoveAnyPage(0);
+ HyperPfn = MiRemoveAnyPage(0);
+
+ /* Release PFN lock */
+ KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql);
+
+ /* Zero both pages */
+ MiZeroPhysicalPage(TableBasePfn);
+ MiZeroPhysicalPage(HyperPfn);
+
+ /* Set the base directory pointers */
+ DirectoryTableBase[0] = TableBasePfn << PAGE_SHIFT;
+ DirectoryTableBase[1] = HyperPfn << PAGE_SHIFT;
+
+ /* Make sure we don't already have a page directory setup */
+ ASSERT(Process->Pcb.DirectoryTableBase[0] == 0);
+
+ /* Insert us into the Mm process list */
+ InsertTailList(&MmProcessList, &Process->MmProcessLinks);
+
+ /* Get a PTE to map the page directory */
+ PointerPte = MiReserveSystemPtes(1, SystemPteSpace);
+ ASSERT(PointerPte != NULL);
+
+ /* Build it */
+ MI_MAKE_HARDWARE_PTE_KERNEL(&PdePte,
+ PointerPte,
+ MM_READWRITE,
+ TableBasePfn);
+
+ /* Set it dirty and map it */
+ PdePte.u.Hard.Dirty = TRUE;
+ MI_WRITE_VALID_PTE(PointerPte, PdePte);
+
+ /* Now get the page directory (which we'll double map, so call it a page table
*/
+ SystemTable = MiPteToAddress(PointerPte);
+
+ /* Copy all the kernel mappings */
+ TableIndex = MiAddressToPxi(MmSystemRangeStart);
+
+ RtlCopyMemory(&SystemTable[TableIndex],
+ MiAddressToPxe(MmSystemRangeStart),
+ PAGE_SIZE - TableIndex * sizeof(MMPTE));
+
+ /* Now write the PTE/PDE entry for hyperspace itself */
+ TempPte = ValidKernelPte;
+ TempPte.u.Hard.PageFrameNumber = HyperPfn;
+ TableIndex = MiAddressToPxi(HYPER_SPACE);
+ SystemTable[TableIndex] = TempPte;
+
+ /* Sanity check */
+ ASSERT(MiAddressToPxi(MmHyperSpaceEnd) > TableIndex);
+
+ /* Now do the x86 trick of making the PDE a page table itself */
+ TableIndex = MiAddressToPxi(PTE_BASE);
+ TempPte.u.Hard.PageFrameNumber = TableBasePfn;
+ SystemTable[TableIndex] = TempPte;
+
+ /* Let go of the system PTE */
+ MiReleaseSystemPtes(PointerPte, 1, SystemPteSpace);
+
+ /* Switch to phase 1 initialization */
+ ASSERT(Process->AddressSpaceInitialized == 0);
+ Process->AddressSpaceInitialized = 1;
+
+ return TRUE;
+}
/* EOF */
Modified: branches/reactos-yarotows/ntoskrnl/mm/i386/page.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/ntoskrnl/mm/i3…
==============================================================================
--- branches/reactos-yarotows/ntoskrnl/mm/i386/page.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/ntoskrnl/mm/i386/page.c [iso-8859-1] Sun Jul 25 16:44:57
2010
@@ -12,6 +12,7 @@
#include <ntoskrnl.h>
#define NDEBUG
#include <debug.h>
+#include "../ARM3/miarm.h"
#if defined (ALLOC_PRAGMA)
#pragma alloc_text(INIT, MmInitGlobalKernelPageDirectory)
@@ -57,6 +58,56 @@
return dummy;
}
#endif
+
+const
+ULONG
+MmProtectToPteMask[32] =
+{
+ //
+ // These are the base MM_ protection flags
+ //
+ 0,
+ PTE_READONLY | PTE_ENABLE_CACHE,
+ PTE_EXECUTE | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_READ | PTE_ENABLE_CACHE,
+ PTE_READWRITE | PTE_ENABLE_CACHE,
+ PTE_WRITECOPY | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_READWRITE | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_WRITECOPY | PTE_ENABLE_CACHE,
+ //
+ // These OR in the MM_NOCACHE flag
+ //
+ 0,
+ PTE_READONLY | PTE_DISABLE_CACHE,
+ PTE_EXECUTE | PTE_DISABLE_CACHE,
+ PTE_EXECUTE_READ | PTE_DISABLE_CACHE,
+ PTE_READWRITE | PTE_DISABLE_CACHE,
+ PTE_WRITECOPY | PTE_DISABLE_CACHE,
+ PTE_EXECUTE_READWRITE | PTE_DISABLE_CACHE,
+ PTE_EXECUTE_WRITECOPY | PTE_DISABLE_CACHE,
+ //
+ // These OR in the MM_DECOMMIT flag, which doesn't seem supported on x86/64/ARM
+ //
+ 0,
+ PTE_READONLY | PTE_ENABLE_CACHE,
+ PTE_EXECUTE | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_READ | PTE_ENABLE_CACHE,
+ PTE_READWRITE | PTE_ENABLE_CACHE,
+ PTE_WRITECOPY | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_READWRITE | PTE_ENABLE_CACHE,
+ PTE_EXECUTE_WRITECOPY | PTE_ENABLE_CACHE,
+ //
+ // These OR in the MM_NOACCESS flag, which seems to enable WriteCombining?
+ //
+ 0,
+ PTE_READONLY | PTE_WRITECOMBINED_CACHE,
+ PTE_EXECUTE | PTE_WRITECOMBINED_CACHE,
+ PTE_EXECUTE_READ | PTE_WRITECOMBINED_CACHE,
+ PTE_READWRITE | PTE_WRITECOMBINED_CACHE,
+ PTE_WRITECOPY | PTE_WRITECOMBINED_CACHE,
+ PTE_EXECUTE_READWRITE | PTE_WRITECOMBINED_CACHE,
+ PTE_EXECUTE_WRITECOPY | PTE_WRITECOMBINED_CACHE,
+};
/* FUNCTIONS ***************************************************************/
Propchange: branches/reactos-yarotows/subsystems/win32/csrss/win32csr/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jul 25 16:44:57 2010
@@ -1,4 +1,4 @@
/branches/header-work/subsystems/win32/csrss/win32csr:45691-46463
/branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/win32csr:34711-34712,34741,34743,34780-34782,34803,34812,34839,34842,34864,34870,34874,34877,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35655,35683,35739,35746,35762,35771,35777,35781,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36011-36013,36172,36360,36380,36388-36389,36397,36445,36502-36503,36505,36570,36614,36898-36899,36930,36936,36949,36951,36958,36961,36964,36969,36972,36992,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38092,38100,38148-38151,38264-38265,38268,38355,39151,39333,39335,39345,39639,40122-40123,40125,40128,40155,40247,40324,40753,40927-40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41070,41082-41086,41097-41098,41101,41449,41479,41484-41485,41499-41500,41502,41531,41536,41540,41546-41547,41549,43080,43426,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43836,43838-43840,43857-43858,43860,43905-43907,43969,44002,44036-44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44238,44294,44338-44339,44389,44391,44426,44460,44467-44468,44470-44471,44499,44501,44503-44504,44506,44510-44512,44521,44523-44526,44530,44540,44601,44772,45124,45126-45127,46394,46478,46511,46524,46526,46534-46535,46537-46539,46589
/branches/ros-amd64-bringup/subsystems/win32/csrss/win32csr:36852
-/trunk/reactos/subsystems/win32/csrss/win32csr:45219-48237
+/trunk/reactos/subsystems/win32/csrss/win32csr:45219-48253