ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
November 2010
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
16 participants
491 discussions
Start a n
N
ew thread
[jgardou] 49447: [CMAKE] Poor little gcc, forgotten by Timo
by jgardou@svn.reactos.org
Author: jgardou Date: Tue Nov 2 17:25:36 2010 New Revision: 49447 URL:
http://svn.reactos.org/svn/reactos?rev=49447&view=rev
Log: [CMAKE] Poor little gcc, forgotten by Timo Modified: branches/cmake-bringup/gcc.cmake Modified: branches/cmake-bringup/gcc.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=494…
============================================================================== --- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Tue Nov 2 17:25:36 2010 @@ -157,7 +157,7 @@ set(IDL_SERVER_ARG -s -S) #.c for server library set(IDL_CLIENT_ARG -c -C) #.c for stub client library -macro(add_importlib_def _def_file) +macro(add_importlib_target _def_file) # empty for now, while import libs are shipped endmacro()
14 years, 1 month
1
0
0
0
[akhaldi] 49446: [CMAKE] - Improve ncitool. By Timo.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Nov 2 17:04:44 2010 New Revision: 49446 URL:
http://svn.reactos.org/svn/reactos?rev=49446&view=rev
Log: [CMAKE] - Improve ncitool. By Timo. Modified: branches/cmake-bringup/tools/nci/ncitool.c Modified: branches/cmake-bringup/tools/nci/ncitool.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/tools/nci/ncitool…
============================================================================== --- branches/cmake-bringup/tools/nci/ncitool.c [iso-8859-1] (original) +++ branches/cmake-bringup/tools/nci/ncitool.c [iso-8859-1] Tue Nov 2 17:04:44 2010 @@ -83,17 +83,16 @@ * This stub calls KiSystemService directly with a fake INT2E stack. * Because EIP is pushed during the call, the handler will return here. */ -#if defined(__GNUC__) -#define KernelModeStub_x86 " movl $0x%x, %%eax\n" \ - " leal 4(%%esp), %%edx\n" \ - " pushfl\n" \ - " pushl $KGDT_R0_CODE\n" \ +#define KernelModeStub_x86 " mov eax, %d\n" \ + " lea edx, [esp + 4]\n" \ + " pushf\n" \ + " push KGDT_R0_CODE\n" \ " call _KiSystemService\n" \ - " ret $0x%x\n\n" - -#define KernelModeStub_amd64 " movl $0x%x, %%eax\n" \ + " ret %d\n\n" + +#define KernelModeStub_amd64 " mov eax, %d\n" \ " call KiSystemService\n" \ - " ret $0x%x\n\n" + " ret %d\n\n" /* For now, use the usermode stub. We'll optimize later */ #define KernelModeStub_ppc UserModeStub_ppc @@ -104,28 +103,6 @@ #define KernelModeStub_arm " mov ip, lr\n" \ " swi #0x%x\n" \ " bx ip\n\n" - -#elif defined(_MSC_VER) -#define KernelModeStub_x86 " mov eax, %xh\n" \ - " lea edx, [esp+4]\n" \ - " pushf\n" \ - " push KGDT_R0_CODE\n" \ - " call _KiSystemService\n" \ - " ret %xh\n" - -#define KernelModeStub_amd64 " mov eax, %xh\n" \ - " call KiSystemService\n" \ - " ret %xh\n\n" - -#define KernelModeStub_ppc " \n" - -#define KernelModeStub_mips " \n" - -#define KernelModeStub_arm " \n" - -#else -#error Unknown compiler for inline assembler -#endif /***** Arch Dependent Stuff ******/ struct ncitool_data_t { @@ -191,10 +168,12 @@ " * PROGRAMMER: Computer Generated File. See tools/nci/ncitool.c\n" " * REMARK: DO NOT EDIT OR COMMIT MODIFICATIONS TO THIS FILE\n" " */\n\n\n" + "#ifdef __ASM__\n" "#include <reactos/asm.h>\n" - "#include <ndk/asm.h>\n\n" - - ".code\n", + ".code\n" + "#endif\n" + "#include <ndk/asm.h>\n\n", + FileDescription, FileLocation); } @@ -776,3 +755,4 @@ return(0); } +
14 years, 1 month
1
0
0
0
[sir_richard] 49445: [NTOS]: Mark all initialization functions INIT_FUNCTION. [NTOS]: This will save ~280KB of RAM once we dump INIT from RAM in a future patch. [NTOS]: Display current free RAM at ...
by sir_richard@svn.reactos.org
Author: sir_richard Date: Tue Nov 2 16:29:06 2010 New Revision: 49445 URL:
http://svn.reactos.org/svn/reactos?rev=49445&view=rev
Log: [NTOS]: Mark all initialization functions INIT_FUNCTION. [NTOS]: This will save ~280KB of RAM once we dump INIT from RAM in a future patch. [NTOS]: Display current free RAM at certain checkpoints. Modified: trunk/reactos/ntoskrnl/cc/cacheman.c trunk/reactos/ntoskrnl/config/cmalloc.c trunk/reactos/ntoskrnl/config/cmboot.c trunk/reactos/ntoskrnl/config/cmconfig.c trunk/reactos/ntoskrnl/config/cmcontrl.c trunk/reactos/ntoskrnl/config/cmdata.c trunk/reactos/ntoskrnl/config/cmdelay.c trunk/reactos/ntoskrnl/config/cmhook.c trunk/reactos/ntoskrnl/config/cmkcbncb.c trunk/reactos/ntoskrnl/config/cmse.c trunk/reactos/ntoskrnl/config/cmsysini.c trunk/reactos/ntoskrnl/ex/handle.c trunk/reactos/ntoskrnl/ex/hdlsterm.c trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/ex/lookas.c trunk/reactos/ntoskrnl/ex/pushlock.c trunk/reactos/ntoskrnl/ex/xipdisp.c trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c trunk/reactos/ntoskrnl/inbv/inbv.c trunk/reactos/ntoskrnl/io/iomgr/arcname.c trunk/reactos/ntoskrnl/io/iomgr/driver.c trunk/reactos/ntoskrnl/io/iomgr/ramdisk.c trunk/reactos/ntoskrnl/io/iomgr/rawfs.c trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit.c trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c trunk/reactos/ntoskrnl/kd/kdinit.c trunk/reactos/ntoskrnl/kd/kdio.c trunk/reactos/ntoskrnl/kd64/kdinit.c trunk/reactos/ntoskrnl/kdbg/kdb.c trunk/reactos/ntoskrnl/ke/config.c trunk/reactos/ntoskrnl/ke/freeldr.c trunk/reactos/ntoskrnl/ke/i386/cpu.c trunk/reactos/ntoskrnl/ke/i386/kiinit.c trunk/reactos/ntoskrnl/ke/i386/mtrr.c trunk/reactos/ntoskrnl/ke/i386/patpge.c trunk/reactos/ntoskrnl/ke/krnlinit.c trunk/reactos/ntoskrnl/lpc/port.c trunk/reactos/ntoskrnl/mm/ARM3/expool.c trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c trunk/reactos/ntoskrnl/mm/ARM3/largepag.c trunk/reactos/ntoskrnl/mm/ARM3/mminit.c trunk/reactos/ntoskrnl/mm/ARM3/pool.c trunk/reactos/ntoskrnl/mm/ARM3/procsup.c trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c trunk/reactos/ntoskrnl/mm/ARM3/syspte.c trunk/reactos/ntoskrnl/mm/ARM3/zeropage.c trunk/reactos/ntoskrnl/mm/mminit.c trunk/reactos/ntoskrnl/ntoskrnl_i386.lnk trunk/reactos/ntoskrnl/ob/obname.c trunk/reactos/ntoskrnl/ob/obsdcach.c trunk/reactos/ntoskrnl/po/power.c trunk/reactos/ntoskrnl/ps/job.c trunk/reactos/ntoskrnl/ps/psmgr.c trunk/reactos/ntoskrnl/ps/quota.c trunk/reactos/ntoskrnl/se/semgr.c trunk/reactos/ntoskrnl/vdm/vdmmain.c Modified: trunk/reactos/ntoskrnl/cc/cacheman.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/cacheman.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/cc/cacheman.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/cc/cacheman.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -19,6 +19,7 @@ VOID NTAPI +INIT_FUNCTION CcPfInitializePrefetcher(VOID) { /* Notify debugger */ @@ -36,6 +37,7 @@ BOOLEAN NTAPI +INIT_FUNCTION CcInitializeCacheManager(VOID) { CcInitView(); Modified: trunk/reactos/ntoskrnl/config/cmalloc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmalloc.c?…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmalloc.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmalloc.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -25,6 +25,7 @@ VOID NTAPI +INIT_FUNCTION CmpInitCmPrivateAlloc(VOID) { /* Make sure we didn't already do this */ @@ -39,6 +40,7 @@ VOID NTAPI +INIT_FUNCTION CmpInitCmPrivateDelayAlloc(VOID) { /* Initialize the delay allocation list and lock */ Modified: trunk/reactos/ntoskrnl/config/cmboot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmboot.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmboot.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmboot.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -17,6 +17,7 @@ HCELL_INDEX NTAPI +INIT_FUNCTION CmpFindControlSet(IN PHHIVE SystemHive, IN HCELL_INDEX RootCell, IN PUNICODE_STRING SelectKeyName, @@ -126,6 +127,7 @@ ULONG NTAPI +INIT_FUNCTION CmpFindTagIndex(IN PHHIVE Hive, IN HCELL_INDEX TagCell, IN HCELL_INDEX GroupOrderCell, @@ -175,6 +177,7 @@ BOOLEAN NTAPI +INIT_FUNCTION CmpAddDriverToList(IN PHHIVE Hive, IN HCELL_INDEX DriverCell, IN HCELL_INDEX GroupOrderCell, @@ -341,6 +344,7 @@ BOOLEAN NTAPI +INIT_FUNCTION CmpIsLoadType(IN PHHIVE Hive, IN HCELL_INDEX Cell, IN SERVICE_LOAD_TYPE LoadType) @@ -371,6 +375,7 @@ BOOLEAN NTAPI +INIT_FUNCTION CmpFindDrivers(IN PHHIVE Hive, IN HCELL_INDEX ControlSet, IN SERVICE_LOAD_TYPE LoadType, @@ -465,6 +470,7 @@ BOOLEAN NTAPI +INIT_FUNCTION CmpDoSort(IN PLIST_ENTRY DriverListHead, IN PUNICODE_STRING OrderList) { @@ -521,6 +527,7 @@ BOOLEAN NTAPI +INIT_FUNCTION CmpSortDriverList(IN PHHIVE Hive, IN HCELL_INDEX ControlSet, IN PLIST_ENTRY DriverListHead) @@ -569,6 +576,7 @@ BOOLEAN NTAPI +INIT_FUNCTION CmpOrderGroup(IN PBOOT_DRIVER_NODE StartNode, IN PBOOT_DRIVER_NODE EndNode) { @@ -631,6 +639,7 @@ BOOLEAN NTAPI +INIT_FUNCTION CmpResolveDriverDependencies(IN PLIST_ENTRY DriverListHead) { PLIST_ENTRY NextEntry; Modified: trunk/reactos/ntoskrnl/config/cmconfig.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmconfig.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmconfig.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmconfig.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -16,6 +16,7 @@ NTSTATUS NTAPI +INIT_FUNCTION CmpInitializeRegistryNode(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry, IN HANDLE NodeHandle, OUT PHANDLE NewHandle, @@ -195,6 +196,7 @@ NTSTATUS NTAPI +INIT_FUNCTION CmpSetupConfigurationTree(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry, IN HANDLE ParentHandle, IN INTERFACE_TYPE InterfaceType, @@ -311,6 +313,7 @@ NTSTATUS NTAPI +INIT_FUNCTION CmpInitializeHardwareConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { NTSTATUS Status; @@ -390,8 +393,3 @@ NtClose(KeyHandle); return Status; } - - - - - Modified: trunk/reactos/ntoskrnl/config/cmcontrl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmcontrl.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmcontrl.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmcontrl.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -18,6 +18,7 @@ LANGID NTAPI +INIT_FUNCTION CmpConvertLangId(IN LPWSTR Name, IN ULONG NameLength) { @@ -68,6 +69,7 @@ HCELL_INDEX NTAPI +INIT_FUNCTION CmpWalkPath(IN PHHIVE SystemHive, IN HCELL_INDEX ParentCell, IN LPWSTR Path) @@ -98,6 +100,7 @@ VOID NTAPI +INIT_FUNCTION CmGetSystemControlValues(IN PVOID SystemHiveData, IN PCM_SYSTEM_CONTROL_VECTOR ControlVector) { Modified: trunk/reactos/ntoskrnl/config/cmdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmdata.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmdata.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmdata.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -65,7 +65,7 @@ HANDLE CmpRegistryRootHandle; -UNICODE_STRING CmClassName[MaximumClass + 1] = +INIT_FUNCTION UNICODE_STRING CmClassName[MaximumClass + 1] = { RTL_CONSTANT_STRING(L"System"), RTL_CONSTANT_STRING(L"Processor"), @@ -77,7 +77,7 @@ RTL_CONSTANT_STRING(L"Undefined") }; -UNICODE_STRING CmTypeName[MaximumType + 1] = +INIT_FUNCTION UNICODE_STRING CmTypeName[MaximumType + 1] = { RTL_CONSTANT_STRING(L"System"), RTL_CONSTANT_STRING(L"CentralProcessor"), @@ -123,7 +123,7 @@ RTL_CONSTANT_STRING(L"Undefined") }; -CMP_MF_TYPE CmpMultifunctionTypes[] = +INIT_FUNCTION CMP_MF_TYPE CmpMultifunctionTypes[] = { {"ISA", Isa, 0}, {"MCA", MicroChannel, 0}, @@ -136,7 +136,7 @@ {NULL, Internal, 0} }; -CM_SYSTEM_CONTROL_VECTOR CmControlVector[] = +INIT_FUNCTION CM_SYSTEM_CONTROL_VECTOR CmControlVector[] = { { L"Session Manager", Modified: trunk/reactos/ntoskrnl/config/cmdelay.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmdelay.c?…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmdelay.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmdelay.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -185,6 +185,7 @@ VOID NTAPI +INIT_FUNCTION CmpInitializeDelayedCloseTable(VOID) { @@ -259,6 +260,7 @@ VOID NTAPI +INIT_FUNCTION CmpInitDelayDerefKCBEngine(VOID) { /* Initialize lock and list */ Modified: trunk/reactos/ntoskrnl/config/cmhook.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmhook.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmhook.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmhook.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -34,6 +34,7 @@ VOID NTAPI +INIT_FUNCTION CmpInitCallback(VOID) { ULONG i; Modified: trunk/reactos/ntoskrnl/config/cmkcbncb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmkcbncb.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmkcbncb.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmkcbncb.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -22,6 +22,7 @@ VOID NTAPI +INIT_FUNCTION CmpInitializeCache(VOID) { ULONG Length, i; Modified: trunk/reactos/ntoskrnl/config/cmse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmse.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmse.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmse.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -18,6 +18,7 @@ PSECURITY_DESCRIPTOR NTAPI +INIT_FUNCTION CmpHiveRootSecurityDescriptor(VOID) { NTSTATUS Status; Modified: trunk/reactos/ntoskrnl/config/cmsysini.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -308,6 +308,7 @@ NTSTATUS NTAPI +INIT_FUNCTION CmpSetSystemValues(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { OBJECT_ATTRIBUTES ObjectAttributes; @@ -361,6 +362,7 @@ NTSTATUS NTAPI +INIT_FUNCTION CmpCreateControlSet(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { UNICODE_STRING ConfigName = RTL_CONSTANT_STRING(L"Control\\IDConfigDB"); @@ -689,6 +691,7 @@ BOOLEAN NTAPI +INIT_FUNCTION CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { PVOID HiveBase; @@ -817,6 +820,7 @@ NTSTATUS NTAPI +INIT_FUNCTION CmpCreateObjectTypes(VOID) { OBJECT_TYPE_INITIALIZER ObjectTypeInitializer; @@ -849,6 +853,7 @@ BOOLEAN NTAPI +INIT_FUNCTION CmpCreateRootNode(IN PHHIVE Hive, IN PCWSTR Name, OUT PHCELL_INDEX Index) @@ -909,6 +914,7 @@ BOOLEAN NTAPI +INIT_FUNCTION CmpCreateRegistryRoot(VOID) { UNICODE_STRING KeyName; @@ -1366,6 +1372,7 @@ BOOLEAN NTAPI +INIT_FUNCTION CmInitSystem1(VOID) { OBJECT_ATTRIBUTES ObjectAttributes; @@ -1577,6 +1584,7 @@ VOID NTAPI +INIT_FUNCTION CmpFreeDriverList(IN PHHIVE Hive, IN PLIST_ENTRY DriverList) { @@ -1625,6 +1633,7 @@ PUNICODE_STRING* NTAPI +INIT_FUNCTION CmGetSystemDriverList(VOID) { LIST_ENTRY DriverList; Modified: trunk/reactos/ntoskrnl/ex/handle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/handle.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/ex/handle.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/handle.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -23,6 +23,7 @@ VOID NTAPI +INIT_FUNCTION ExpInitializeHandleTables(VOID) { /* Initialize the list of handle tables and the lock */ Modified: trunk/reactos/ntoskrnl/ex/hdlsterm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/hdlsterm.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ex/hdlsterm.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/hdlsterm.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -69,6 +69,7 @@ VOID NTAPI +INIT_FUNCTION HeadlessInit( IN PLOADER_PARAMETER_BLOCK LoaderBlock ) Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=494…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -87,6 +87,7 @@ NTSTATUS NTAPI +INIT_FUNCTION ExpCreateSystemRootLink(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { UNICODE_STRING LinkName; @@ -198,6 +199,7 @@ VOID NTAPI +INIT_FUNCTION ExpInitNls(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { LARGE_INTEGER SectionSize; @@ -373,6 +375,7 @@ VOID NTAPI +INIT_FUNCTION ExpLoadInitialProcess(IN PINIT_BUFFER InitBuffer, OUT PRTL_USER_PROCESS_PARAMETERS *ProcessParameters, OUT PCHAR *ProcessEnvironment) @@ -593,6 +596,7 @@ ULONG NTAPI +INIT_FUNCTION ExComputeTickCountMultiplier(IN ULONG ClockIncrement) { ULONG MsRemainder = 0, MsIncrement; @@ -625,6 +629,7 @@ BOOLEAN NTAPI +INIT_FUNCTION ExpInitSystemPhase0(VOID) { /* Initialize EXRESOURCE Support */ @@ -647,6 +652,7 @@ BOOLEAN NTAPI +INIT_FUNCTION ExpInitSystemPhase1(VOID) { /* Initialize worker threads */ @@ -684,6 +690,7 @@ BOOLEAN NTAPI +INIT_FUNCTION ExInitSystem(VOID) { /* Check the initialization phase */ @@ -709,6 +716,7 @@ BOOLEAN NTAPI +INIT_FUNCTION ExpIsLoaderValid(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { PLOADER_PARAMETER_EXTENSION Extension; @@ -734,6 +742,7 @@ VOID NTAPI +INIT_FUNCTION ExpLoadBootSymbols(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { ULONG i = 0; @@ -826,6 +835,7 @@ VOID NTAPI +INIT_FUNCTION ExBurnMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN ULONG PagesToDestroy, IN TYPE_OF_MEMORY MemoryType) @@ -871,6 +881,7 @@ VOID NTAPI +INIT_FUNCTION ExpInitializeExecutive(IN ULONG Cpu, IN PLOADER_PARAMETER_BLOCK LoaderBlock) { @@ -1281,6 +1292,7 @@ VOID NTAPI +INIT_FUNCTION Phase1InitializationDiscard(IN PVOID Context) { PLOADER_PARAMETER_BLOCK LoaderBlock = Context; @@ -1899,6 +1911,7 @@ InbvUpdateProgressBar(90); /* Launch initial process */ + DPRINT1("Free non-cache pages: %lx\n", MmAvailablePages + MiMemoryConsumers[MC_CACHE].PagesUsed); ProcessInfo = &InitBuffer->ProcessInfo; ExpLoadInitialProcess(InitBuffer, &ProcessParameters, &Environment); @@ -1945,6 +1958,7 @@ /* Free the boot buffer */ ExFreePool(InitBuffer); + DPRINT1("Free non-cache pages: %lx\n", MmAvailablePages + MiMemoryConsumers[MC_CACHE].PagesUsed); } VOID Modified: trunk/reactos/ntoskrnl/ex/lookas.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/lookas.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/ex/lookas.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/lookas.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -31,6 +31,7 @@ VOID NTAPI +INIT_FUNCTION ExInitializeSystemLookasideList(IN PGENERAL_LOOKASIDE List, IN POOL_TYPE Type, IN ULONG Size, @@ -58,6 +59,7 @@ VOID NTAPI +INIT_FUNCTION ExInitPoolLookasidePointers(VOID) { ULONG i; @@ -87,6 +89,7 @@ VOID NTAPI +INIT_FUNCTION ExpInitLookasideLists() { ULONG i; Modified: trunk/reactos/ntoskrnl/ex/pushlock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/pushlock.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ex/pushlock.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/pushlock.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -41,6 +41,7 @@ *--*/ VOID NTAPI +INIT_FUNCTION ExpInitializePushLocks(VOID) { #ifdef CONFIG_SMP Modified: trunk/reactos/ntoskrnl/ex/xipdisp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/xipdisp.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ex/xipdisp.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/xipdisp.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -17,6 +17,7 @@ PMEMORY_ALLOCATION_DESCRIPTOR NTAPI +INIT_FUNCTION XIPpFindMemoryDescriptor(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { PLIST_ENTRY NextEntry; @@ -40,6 +41,7 @@ VOID NTAPI +INIT_FUNCTION XIPInit(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { PCHAR CommandLine, XipBoot, XipRom, XipMegs, XipVerbose, XipRam; Modified: trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -155,6 +155,7 @@ BOOLEAN NTAPI +INIT_FUNCTION FsRtlInitSystem(VOID) { ULONG i; Modified: trunk/reactos/ntoskrnl/inbv/inbv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/inbv/inbv.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/inbv/inbv.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/inbv/inbv.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -28,6 +28,7 @@ PVOID NTAPI +INIT_FUNCTION FindBitmapResource(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN ULONG ResourceId) { @@ -92,6 +93,7 @@ BOOLEAN NTAPI +INIT_FUNCTION InbvDriverInitialize(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN ULONG Count) { @@ -174,6 +176,7 @@ VOID NTAPI +INIT_FUNCTION InbvEnableBootDriver(IN BOOLEAN Enable) { /* Check if we're installed */ @@ -408,6 +411,7 @@ VOID NTAPI +INIT_FUNCTION InbvUpdateProgressBar(IN ULONG Progress) { ULONG FillCount, BoundedProgress; @@ -523,6 +527,7 @@ VOID NTAPI +INIT_FUNCTION InbvIndicateProgress(VOID) { ULONG Percentage; @@ -570,6 +575,7 @@ VOID NTAPI +INIT_FUNCTION DisplayBootBitmap(IN BOOLEAN SosMode) { PVOID Header, Band, Text, Screen; @@ -705,6 +711,7 @@ VOID NTAPI +INIT_FUNCTION FinalizeBootLogo(VOID) { /* Acquire lock and check the display state */ Modified: trunk/reactos/ntoskrnl/io/iomgr/arcname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/arcname.…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/arcname.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/arcname.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -785,6 +785,7 @@ NTSTATUS NTAPI +INIT_FUNCTION IopReassignSystemRoot(IN PLOADER_PARAMETER_BLOCK LoaderBlock, OUT PANSI_STRING NtBootPath) { Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -709,6 +709,7 @@ // NTSTATUS NTAPI +INIT_FUNCTION LdrProcessDriverModule(PLDR_DATA_TABLE_ENTRY LdrEntry, PUNICODE_STRING FileName, PLDR_DATA_TABLE_ENTRY *ModuleObject) @@ -784,6 +785,7 @@ NTSTATUS NTAPI +INIT_FUNCTION IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY LdrEntry) { PDEVICE_NODE DeviceNode; @@ -870,6 +872,7 @@ */ VOID FASTCALL +INIT_FUNCTION IopInitializeBootDrivers(VOID) { PLIST_ENTRY ListHead, NextEntry, NextEntry2; @@ -1061,6 +1064,7 @@ VOID FASTCALL +INIT_FUNCTION IopInitializeSystemDrivers(VOID) { PUNICODE_STRING *DriverList, *SavedList; Modified: trunk/reactos/ntoskrnl/io/iomgr/ramdisk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/ramdisk.…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/ramdisk.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/ramdisk.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -24,6 +24,7 @@ NTSTATUS NTAPI +INIT_FUNCTION IopStartRamdisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { PMEMORY_ALLOCATION_DESCRIPTOR MemoryDescriptor; Modified: trunk/reactos/ntoskrnl/io/iomgr/rawfs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/rawfs.c?…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/rawfs.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/rawfs.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -1076,6 +1076,7 @@ NTSTATUS NTAPI +INIT_FUNCTION RawFsDriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath) { Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpinit.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -44,6 +44,7 @@ NTSTATUS NTAPI +INIT_FUNCTION PiInitCacheGroupInformation(VOID) { HANDLE KeyHandle; @@ -355,6 +356,7 @@ NTSTATUS NTAPI +INIT_FUNCTION IopInitializePlugPlayServices(VOID) { NTSTATUS Status; Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -2606,6 +2606,7 @@ NTSTATUS NTAPI +INIT_FUNCTION IopUpdateRootKey(VOID) { UNICODE_STRING EnumU = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Enum"); Modified: trunk/reactos/ntoskrnl/kd/kdinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdinit.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/kd/kdinit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd/kdinit.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -44,6 +44,7 @@ PCHAR NTAPI +INIT_FUNCTION KdpGetDebugMode(PCHAR Currentp2) { PCHAR p2 = Currentp2; @@ -118,6 +119,7 @@ VOID NTAPI +INIT_FUNCTION KdpCallInitRoutine(ULONG BootPhase) { PLIST_ENTRY CurrentEntry; Modified: trunk/reactos/ntoskrnl/kd/kdio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdio.c?rev=494…
============================================================================== --- trunk/reactos/ntoskrnl/kd/kdio.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd/kdio.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -134,6 +134,7 @@ VOID NTAPI +INIT_FUNCTION KdpInitDebugLog(PKD_DISPATCH_TABLE DispatchTable, ULONG BootPhase) { Modified: trunk/reactos/ntoskrnl/kd64/kdinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdinit.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/kd64/kdinit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd64/kdinit.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -70,6 +70,7 @@ BOOLEAN NTAPI +INIT_FUNCTION KdInitSystem(IN ULONG BootPhase, IN PLOADER_PARAMETER_BLOCK LoaderBlock) { Modified: trunk/reactos/ntoskrnl/kdbg/kdb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb.c?rev=49…
============================================================================== --- trunk/reactos/ntoskrnl/kdbg/kdb.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kdbg/kdb.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -1695,6 +1695,7 @@ VOID NTAPI +INIT_FUNCTION KdbpGetCommandLineSettings( PCHAR p1) { Modified: trunk/reactos/ntoskrnl/ke/config.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/config.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/ke/config.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/config.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -19,6 +19,7 @@ */ PCONFIGURATION_COMPONENT_DATA NTAPI +INIT_FUNCTION KeFindConfigurationEntry(IN PCONFIGURATION_COMPONENT_DATA Child, IN CONFIGURATION_CLASS Class, IN CONFIGURATION_TYPE Type, @@ -39,6 +40,7 @@ */ PCONFIGURATION_COMPONENT_DATA NTAPI +INIT_FUNCTION KeFindConfigurationNextEntry(IN PCONFIGURATION_COMPONENT_DATA Child, IN CONFIGURATION_CLASS Class, IN CONFIGURATION_TYPE Type, Modified: trunk/reactos/ntoskrnl/ke/freeldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/freeldr.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -7,6 +7,8 @@ */ /* INCLUDES *****************************************************************/ + +#if !defined(_X86_) #include <ntoskrnl.h> #define NDEBUG @@ -1412,3 +1414,4 @@ /* Do general System Startup */ KiSystemStartup(NtLoaderBlock); } +#endif Modified: trunk/reactos/ntoskrnl/ke/i386/cpu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/cpu.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/cpu.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/cpu.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -120,6 +120,7 @@ VOID NTAPI +INIT_FUNCTION KiSetProcessorType(VOID) { ULONG EFlags, NewEFlags; @@ -186,6 +187,7 @@ ULONG NTAPI +INIT_FUNCTION KiGetCpuVendor(VOID) { PKPRCB Prcb = KeGetCurrentPrcb(); @@ -247,6 +249,7 @@ ULONG NTAPI +INIT_FUNCTION KiGetFeatureBits(VOID) { PKPRCB Prcb = KeGetCurrentPrcb(); @@ -472,6 +475,7 @@ VOID NTAPI +INIT_FUNCTION KiGetCacheInformation(VOID) { PKIPCR Pcr = (PKIPCR)KeGetPcr(); @@ -774,6 +778,7 @@ VOID NTAPI +INIT_FUNCTION KiSetCR0Bits(VOID) { ULONG Cr0; @@ -790,6 +795,7 @@ VOID NTAPI +INIT_FUNCTION KiInitializeTSS2(IN PKTSS Tss, IN PKGDTENTRY TssEntry OPTIONAL) { @@ -843,6 +849,7 @@ VOID FASTCALL +INIT_FUNCTION Ki386InitializeTss(IN PKTSS Tss, IN PKIDTENTRY Idt, IN PKGDTENTRY Gdt) @@ -1002,6 +1009,7 @@ VOID NTAPI +INIT_FUNCTION KiInitializeMachineType(VOID) { /* Set the Machine Type we got from NTLDR */ @@ -1010,6 +1018,7 @@ ULONG_PTR NTAPI +INIT_FUNCTION KiLoadFastSyscallMachineSpecificRegisters(IN ULONG_PTR Context) { /* Set CS and ESP */ @@ -1023,6 +1032,7 @@ VOID NTAPI +INIT_FUNCTION KiRestoreFastSyscallReturnState(VOID) { /* Check if the CPU Supports fast system call */ @@ -1056,6 +1066,7 @@ ULONG_PTR NTAPI +INIT_FUNCTION Ki386EnableDE(IN ULONG_PTR Context) { /* Enable DE */ @@ -1065,6 +1076,7 @@ ULONG_PTR NTAPI +INIT_FUNCTION Ki386EnableFxsr(IN ULONG_PTR Context) { /* Enable FXSR */ @@ -1074,6 +1086,7 @@ ULONG_PTR NTAPI +INIT_FUNCTION Ki386EnableXMMIExceptions(IN ULONG_PTR Context) { PKIDTENTRY IdtEntry; @@ -1096,6 +1109,7 @@ VOID NTAPI +INIT_FUNCTION KiI386PentiumLockErrataFixup(VOID) { KDESCRIPTOR IdtDescriptor; @@ -1187,6 +1201,7 @@ BOOLEAN NTAPI +INIT_FUNCTION KiIsNpxPresent(VOID) { ULONG Cr0; @@ -1227,6 +1242,7 @@ BOOLEAN NTAPI +INIT_FUNCTION KiIsNpxErrataPresent(VOID) { BOOLEAN ErrataPresent; Modified: trunk/reactos/ntoskrnl/ke/i386/kiinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kiinit.c?…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/kiinit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/kiinit.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -33,6 +33,7 @@ VOID NTAPI +INIT_FUNCTION KiInitMachineDependent(VOID) { ULONG CpuCount; @@ -325,6 +326,7 @@ VOID NTAPI +INIT_FUNCTION KiInitializePcr(IN ULONG ProcessorNumber, IN PKIPCR Pcr, IN PKIDTENTRY Idt, @@ -386,6 +388,7 @@ VOID NTAPI +INIT_FUNCTION KiInitializeKernel(IN PKPROCESS InitProcess, IN PKTHREAD InitThread, IN PVOID IdleStack, @@ -607,6 +610,7 @@ VOID FASTCALL +INIT_FUNCTION KiGetMachineBootPointers(IN PKGDTENTRY *Gdt, IN PKIDTENTRY *Idt, IN PKIPCR *Pcr, @@ -647,6 +651,7 @@ VOID NTAPI +INIT_FUNCTION KiSystemStartupBootStack(VOID) { PKTHREAD Thread; @@ -676,6 +681,7 @@ VOID NTAPI +INIT_FUNCTION KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { ULONG Cpu; @@ -689,10 +695,10 @@ /* Boot cycles timestamp */ BootCycles = __rdtsc(); - +#if !defined(_X86_) /* Check if we are being booted from FreeLDR */ if (!((ULONG_PTR)LoaderBlock & 0x80000000)) KiRosPrepareForSystemStartup((PROS_LOADER_PARAMETER_BLOCK)LoaderBlock); - +#endif /* Save the loader block and get the current CPU */ KeLoaderBlock = LoaderBlock; Cpu = KeNumberProcessors; Modified: trunk/reactos/ntoskrnl/ke/i386/mtrr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/mtrr.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/mtrr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/mtrr.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -18,6 +18,7 @@ VOID NTAPI +INIT_FUNCTION KiInitializeMTRR(IN BOOLEAN FinalCpu) { /* FIXME: Support this */ @@ -26,6 +27,7 @@ VOID NTAPI +INIT_FUNCTION KiAmdK6InitializeMTRR(VOID) { /* FIXME: Support this */ Modified: trunk/reactos/ntoskrnl/ke/i386/patpge.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/patpge.c?…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/patpge.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/patpge.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -16,6 +16,7 @@ ULONG_PTR NTAPI +INIT_FUNCTION Ki386EnableGlobalPage(IN volatile ULONG_PTR Context) { volatile PLONG Count = (PLONG)Context; @@ -52,6 +53,7 @@ VOID NTAPI +INIT_FUNCTION KiInitializePAT(VOID) { /* FIXME: Support this */ Modified: trunk/reactos/ntoskrnl/ke/krnlinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/krnlinit.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/krnlinit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/krnlinit.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -57,6 +57,7 @@ VOID NTAPI +INIT_FUNCTION KiInitSystem(VOID) { ULONG i; @@ -108,6 +109,7 @@ LARGE_INTEGER NTAPI +INIT_FUNCTION KiComputeReciprocal(IN LONG Divisor, OUT PUCHAR Shift) { @@ -171,6 +173,7 @@ VOID NTAPI +INIT_FUNCTION KiInitSpinLocks(IN PKPRCB Prcb, IN CCHAR Number) { @@ -276,6 +279,7 @@ BOOLEAN NTAPI +INIT_FUNCTION KeInitSystem(VOID) { /* Check if Threaded DPCs are enabled */ Modified: trunk/reactos/ntoskrnl/lpc/port.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/port.c?rev=49…
============================================================================== --- trunk/reactos/ntoskrnl/lpc/port.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/lpc/port.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -33,6 +33,7 @@ BOOLEAN NTAPI +INIT_FUNCTION LpcInitSystem(VOID) { OBJECT_TYPE_INITIALIZER ObjectTypeInitializer; Modified: trunk/reactos/ntoskrnl/mm/ARM3/expool.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/expool.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -288,6 +288,7 @@ VOID NTAPI +INIT_FUNCTION ExInitializePoolDescriptor(IN PPOOL_DESCRIPTOR PoolDescriptor, IN POOL_TYPE PoolType, IN ULONG PoolIndex, @@ -333,6 +334,7 @@ VOID NTAPI +INIT_FUNCTION InitializePool(IN POOL_TYPE PoolType, IN ULONG Threshold) { Modified: trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/i386/init…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -33,6 +33,7 @@ VOID NTAPI +INIT_FUNCTION MiComputeNonPagedPoolVa(IN ULONG FreePages) { IN PFN_NUMBER PoolPages; @@ -148,6 +149,7 @@ NTSTATUS NTAPI +INIT_FUNCTION MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { PLIST_ENTRY NextEntry; Modified: trunk/reactos/ntoskrnl/mm/ARM3/largepag.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/largepag.…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/largepag.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/largepag.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -31,6 +31,7 @@ VOID NTAPI +INIT_FUNCTION MiInitializeLargePageSupport(VOID) { #if _MI_PAGING_LEVELS > 2 @@ -50,6 +51,7 @@ VOID NTAPI +INIT_FUNCTION MiSyncCachedRanges(VOID) { ULONG i; @@ -64,6 +66,7 @@ VOID NTAPI +INIT_FUNCTION MiInitializeDriverLargePageList(VOID) { PWCHAR p, pp; Modified: trunk/reactos/ntoskrnl/mm/ARM3/mminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/mminit.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -365,6 +365,7 @@ PFN_NUMBER NTAPI +INIT_FUNCTION MxGetNextPage(IN PFN_NUMBER PageCount) { PFN_NUMBER Pfn; @@ -389,6 +390,7 @@ VOID NTAPI +INIT_FUNCTION MiComputeColorInformation(VOID) { ULONG L2Associativity; @@ -442,6 +444,7 @@ VOID NTAPI +INIT_FUNCTION MiInitializeColorTables(VOID) { ULONG i; @@ -491,6 +494,7 @@ BOOLEAN NTAPI +INIT_FUNCTION MiIsRegularMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PFN_NUMBER Pfn) { @@ -549,6 +553,7 @@ VOID NTAPI +INIT_FUNCTION MiMapPfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { ULONG FreePage, FreePageCount, PagesLeft, BasePage, PageCount; @@ -644,6 +649,7 @@ VOID NTAPI +INIT_FUNCTION MiBuildPfnDatabaseFromPages(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { PMMPDE PointerPde; @@ -752,6 +758,7 @@ VOID NTAPI +INIT_FUNCTION MiBuildPfnDatabaseZeroPage(VOID) { PMMPFN Pfn1; @@ -774,6 +781,7 @@ VOID NTAPI +INIT_FUNCTION MiBuildPfnDatabaseFromLoaderBlock(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { PLIST_ENTRY NextEntry; @@ -917,6 +925,7 @@ VOID NTAPI +INIT_FUNCTION MiBuildPfnDatabaseSelf(VOID) { PMMPTE PointerPte, LastPte; @@ -946,6 +955,7 @@ VOID NTAPI +INIT_FUNCTION MiInitializePfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { /* Scan memory and start setting up PFN entries */ @@ -963,6 +973,7 @@ VOID NTAPI +INIT_FUNCTION MiAdjustWorkingSetManagerParameters(IN BOOLEAN Client) { /* This function needs to do more work, for now, we tune page minimums */ @@ -977,6 +988,7 @@ VOID NTAPI +INIT_FUNCTION MiNotifyMemoryEvents(VOID) { /* Are we in a low-memory situation? */ @@ -1002,6 +1014,7 @@ NTSTATUS NTAPI +INIT_FUNCTION MiCreateMemoryEvent(IN PUNICODE_STRING Name, OUT PKEVENT *Event) { @@ -1096,6 +1109,7 @@ BOOLEAN NTAPI +INIT_FUNCTION MiInitializeMemoryEvents(VOID) { UNICODE_STRING LowString = RTL_CONSTANT_STRING(L"\\KernelObjects\\LowMemoryCondition"); @@ -1174,6 +1188,7 @@ VOID NTAPI +INIT_FUNCTION MiAddHalIoMappings(VOID) { PVOID BaseAddress; @@ -1401,6 +1416,7 @@ PPHYSICAL_MEMORY_DESCRIPTOR NTAPI +INIT_FUNCTION MmInitializeMemoryLimits(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PBOOLEAN IncludeType) { @@ -1537,6 +1553,7 @@ VOID NTAPI +INIT_FUNCTION MiBuildPagedPool(VOID) { PMMPTE PointerPte, PointerPde; @@ -1747,6 +1764,7 @@ VOID NTAPI +INIT_FUNCTION MiDbgDumpMemoryDescriptors(VOID) { PLIST_ENTRY NextEntry; @@ -1798,6 +1816,7 @@ BOOLEAN NTAPI +INIT_FUNCTION MmArmInitSystem(IN ULONG Phase, IN PLOADER_PARAMETER_BLOCK LoaderBlock) { Modified: trunk/reactos/ntoskrnl/mm/ARM3/pool.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pool.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/pool.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/pool.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -177,6 +177,7 @@ VOID NTAPI +INIT_FUNCTION MiInitializeNonPagedPoolThresholds(VOID) { PFN_NUMBER Size = MmMaximumNonPagedPoolInPages; @@ -193,6 +194,7 @@ VOID NTAPI +INIT_FUNCTION MiInitializePoolEvents(VOID) { KIRQL OldIrql; @@ -267,6 +269,7 @@ VOID NTAPI +INIT_FUNCTION MiInitializeNonPagedPool(VOID) { ULONG i; Modified: trunk/reactos/ntoskrnl/mm/ARM3/procsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/procsup.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -1023,6 +1023,7 @@ NTSTATUS NTAPI +INIT_FUNCTION MmInitializeHandBuiltProcess(IN PEPROCESS Process, IN PULONG_PTR DirectoryTableBase) { @@ -1044,6 +1045,7 @@ NTSTATUS NTAPI +INIT_FUNCTION MmInitializeHandBuiltProcess2(IN PEPROCESS Process) { /* Lock the VAD, ARM3-owned ranges away */ Modified: trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -563,6 +563,7 @@ VOID NTAPI +INIT_FUNCTION MiUpdateThunks(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PVOID OldBase, IN PVOID NewBase, @@ -1364,6 +1365,7 @@ VOID NTAPI +INIT_FUNCTION MiReloadBootLoadedDrivers(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { PLIST_ENTRY NextEntry; @@ -1552,6 +1554,7 @@ NTSTATUS NTAPI +INIT_FUNCTION MiBuildImportsForBootDrivers(VOID) { PLIST_ENTRY NextEntry, NextEntry2; @@ -1817,6 +1820,7 @@ VOID NTAPI +INIT_FUNCTION MiLocateKernelSections(IN PLDR_DATA_TABLE_ENTRY LdrEntry) { ULONG_PTR DllBase; @@ -1877,6 +1881,7 @@ BOOLEAN NTAPI +INIT_FUNCTION MiInitializeLoadedModuleList(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { PLDR_DATA_TABLE_ENTRY LdrEntry, NewEntry; Modified: trunk/reactos/ntoskrnl/mm/ARM3/syspte.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/syspte.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/syspte.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/syspte.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -366,6 +366,7 @@ VOID NTAPI +INIT_FUNCTION MiInitializeSystemPtes(IN PMMPTE StartingPte, IN ULONG NumberOfPtes, IN MMSYSTEM_PTE_POOL_TYPE PoolType) Modified: trunk/reactos/ntoskrnl/mm/ARM3/zeropage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/zeropage.…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/zeropage.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/zeropage.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -39,6 +39,7 @@ /* FIXME: Get the discardable sections to free them */ // MiFindInitializationCode(&StartAddress, &EndAddress); // if (StartAddress) MiFreeInitializationCode(StartAddress, EndAddress); + DPRINT1("Free non-cache pages: %lx\n", MmAvailablePages + MiMemoryConsumers[MC_CACHE].PagesUsed); /* Set our priority to 0 */ Thread->BasePriority = 0; Modified: trunk/reactos/ntoskrnl/mm/mminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mminit.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -231,6 +231,7 @@ VOID NTAPI +INIT_FUNCTION MiDbgDumpAddressSpace(VOID) { // @@ -312,6 +313,7 @@ NTSTATUS NTAPI +INIT_FUNCTION MmInitMpwThread(VOID) { KPRIORITY Priority; @@ -343,6 +345,7 @@ NTSTATUS NTAPI +INIT_FUNCTION MmInitBsmThread(VOID) { NTSTATUS Status; @@ -366,6 +369,7 @@ BOOLEAN NTAPI +INIT_FUNCTION MmInitSystem(IN ULONG Phase, IN PLOADER_PARAMETER_BLOCK LoaderBlock) { Modified: trunk/reactos/ntoskrnl/ntoskrnl_i386.lnk URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl_i386.lnk…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl_i386.lnk [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ntoskrnl_i386.lnk [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -19,12 +19,6 @@ *(.gcc_exc) __text_end__ = .; *(.gcc_except_table) - } - init BLOCK(__section_alignment__) : - { - __init_start__ = . ; - *(init) - __init_end__ = . ; } /* The Cygwin32 library uses a section to avoid copying certain data on fork. This used to be named ".data". The linker used @@ -101,5 +95,11 @@ { [ .stabstr ] } + INIT BLOCK(__section_alignment__) : + { + __init_start__ = . ; + *(INIT) + __init_end__ = . ; + } } Modified: trunk/reactos/ntoskrnl/ob/obname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obname.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obname.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ob/obname.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -33,6 +33,7 @@ NTSTATUS NTAPI +INIT_FUNCTION ObpCreateDosDevicesDirectory(VOID) { OBJECT_ATTRIBUTES ObjectAttributes; Modified: trunk/reactos/ntoskrnl/ob/obsdcach.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obsdcach.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obsdcach.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ob/obsdcach.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -57,6 +57,7 @@ NTSTATUS NTAPI +INIT_FUNCTION ObpInitSdCache(VOID) { ULONG i; Modified: trunk/reactos/ntoskrnl/po/power.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/po/power.c?rev=49…
============================================================================== --- trunk/reactos/ntoskrnl/po/power.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/po/power.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -127,6 +127,7 @@ BOOLEAN NTAPI +INIT_FUNCTION PoInitSystem(IN ULONG BootPhase) { PVOID NotificationEntry; @@ -216,6 +217,7 @@ VOID NTAPI +INIT_FUNCTION PoInitializePrcb(IN PKPRCB Prcb) { /* Initialize the Power State */ Modified: trunk/reactos/ntoskrnl/ps/job.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/job.c?rev=4944…
============================================================================== --- trunk/reactos/ntoskrnl/ps/job.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ps/job.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -72,6 +72,7 @@ VOID NTAPI +INIT_FUNCTION PspInitializeJobStructures(VOID) { InitializeListHead(&PsJobListHead); Modified: trunk/reactos/ntoskrnl/ps/psmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/psmgr.c?rev=49…
============================================================================== --- trunk/reactos/ntoskrnl/ps/psmgr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ps/psmgr.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -65,6 +65,7 @@ USHORT NTAPI +INIT_FUNCTION NameToOrdinal(IN PCHAR Name, IN PVOID DllBase, IN ULONG NumberOfNames, @@ -107,6 +108,7 @@ NTSTATUS NTAPI +INIT_FUNCTION LookupEntryPoint(IN PVOID DllBase, IN PCHAR Name, OUT PVOID *EntryPoint) @@ -158,6 +160,7 @@ NTSTATUS NTAPI +INIT_FUNCTION PspLookupSystemDllEntryPoint(IN PCHAR Name, IN PVOID *EntryPoint) { @@ -167,6 +170,7 @@ NTSTATUS NTAPI +INIT_FUNCTION PspLookupKernelUserEntryPoints(VOID) { NTSTATUS Status; @@ -239,6 +243,7 @@ NTSTATUS NTAPI +INIT_FUNCTION PspMapSystemDll(IN PEPROCESS Process, IN PVOID *DllBase, IN BOOLEAN UseLargePages) @@ -272,6 +277,7 @@ NTSTATUS NTAPI +INIT_FUNCTION PsLocateSystemDll(VOID) { OBJECT_ATTRIBUTES ObjectAttributes; @@ -357,6 +363,7 @@ NTSTATUS NTAPI +INIT_FUNCTION PspInitializeSystemDll(VOID) { NTSTATUS Status; @@ -389,6 +396,7 @@ BOOLEAN NTAPI +INIT_FUNCTION PspInitPhase1() { /* Initialize the System DLL and return status of operation */ @@ -398,6 +406,7 @@ BOOLEAN NTAPI +INIT_FUNCTION PspInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { NTSTATUS Status; @@ -616,6 +625,7 @@ BOOLEAN NTAPI +INIT_FUNCTION PsInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { /* Check the initialization phase */ Modified: trunk/reactos/ntoskrnl/ps/quota.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/quota.c?rev=49…
============================================================================== --- trunk/reactos/ntoskrnl/ps/quota.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ps/quota.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -98,6 +98,7 @@ VOID NTAPI +INIT_FUNCTION PsInitializeQuotaSystem(VOID) { RtlZeroMemory(&PspDefaultQuotaBlock, sizeof(PspDefaultQuotaBlock)); Modified: trunk/reactos/ntoskrnl/se/semgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/semgr.c?rev=49…
============================================================================== --- trunk/reactos/ntoskrnl/se/semgr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/semgr.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -86,6 +86,7 @@ BOOLEAN NTAPI +INIT_FUNCTION SepInitializationPhase0(VOID) { PAGED_CODE(); @@ -117,6 +118,7 @@ BOOLEAN NTAPI +INIT_FUNCTION SepInitializationPhase1(VOID) { NTSTATUS Status; @@ -139,6 +141,7 @@ BOOLEAN NTAPI +INIT_FUNCTION SeInitSystem(VOID) { /* Check the initialization phase */ @@ -168,6 +171,7 @@ BOOLEAN NTAPI +INIT_FUNCTION SeInitSRM(VOID) { OBJECT_ATTRIBUTES ObjectAttributes; Modified: trunk/reactos/ntoskrnl/vdm/vdmmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/vdm/vdmmain.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/vdm/vdmmain.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/vdm/vdmmain.c [iso-8859-1] Tue Nov 2 16:29:06 2010 @@ -15,11 +15,11 @@ /* GLOBALS *******************************************************************/ - /* PRIVATE FUNCTIONS *********************************************************/ VOID NTAPI +INIT_FUNCTION Ki386VdmEnablePentiumExtentions(IN BOOLEAN Enable) { ULONG EFlags, Cr4; @@ -38,6 +38,7 @@ VOID NTAPI +INIT_FUNCTION KeI386VdmInitialize(VOID) { NTSTATUS Status; @@ -84,6 +85,7 @@ NTSTATUS NTAPI +INIT_FUNCTION VdmpInitialize(PVOID ControlData) { OBJECT_ATTRIBUTES ObjectAttributes;
14 years, 1 month
1
0
0
0
[sir_richard] 49444: [NTOS]: Add page-tracking macro calls wherever needed. MI_TRACE_PFNS is still off, though, so this code won't be called.
by sir_richard@svn.reactos.org
Author: sir_richard Date: Tue Nov 2 15:16:22 2010 New Revision: 49444 URL:
http://svn.reactos.org/svn/reactos?rev=49444&view=rev
Log: [NTOS]: Add page-tracking macro calls wherever needed. MI_TRACE_PFNS is still off, though, so this code won't be called. Modified: trunk/reactos/ntoskrnl/cc/copy.c trunk/reactos/ntoskrnl/cc/view.c trunk/reactos/ntoskrnl/mm/ARM3/contmem.c trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c trunk/reactos/ntoskrnl/mm/ARM3/mminit.c trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c trunk/reactos/ntoskrnl/mm/ARM3/pool.c trunk/reactos/ntoskrnl/mm/ARM3/procsup.c trunk/reactos/ntoskrnl/mm/ARM3/section.c trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c trunk/reactos/ntoskrnl/mm/ARM3/zeropage.c trunk/reactos/ntoskrnl/mm/anonmem.c trunk/reactos/ntoskrnl/mm/freelist.c trunk/reactos/ntoskrnl/mm/i386/page.c trunk/reactos/ntoskrnl/mm/section.c trunk/reactos/ntoskrnl/ps/process.c Modified: trunk/reactos/ntoskrnl/cc/copy.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/copy.c?rev=494…
============================================================================== --- trunk/reactos/ntoskrnl/cc/copy.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/cc/copy.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -41,6 +41,8 @@ { NTSTATUS Status; + MI_SET_USAGE(MI_USAGE_CACHE); + //MI_SET_PROCESS2(PsGetCurrentProcess()->ImageFileName); Status = MmRequestPageMemoryConsumer(MC_SYSTEM, TRUE, &CcZeroPage); if (!NT_SUCCESS(Status)) { Modified: trunk/reactos/ntoskrnl/cc/view.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/view.c?rev=494…
============================================================================== --- trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -703,6 +703,18 @@ #endif /* Create a virtual mapping for this memory area */ + MI_SET_USAGE(MI_USAGE_CACHE); +#if MI_TRACE_PFNS + PWCHAR pos = NULL; + ULONG len = 0; + if ((Bcb->FileObject) && (Bcb->FileObject->FileName.Buffer)) + { + pos = wcsrchr(Bcb->FileObject->FileName.Buffer, '\\'); + len = wcslen(pos) * sizeof(WCHAR); + if (pos) snprintf(MI_PFN_CURRENT_PROCESS_NAME, min(16, len), "%S", pos); + } +#endif + MmMapMemoryArea(current->BaseAddress, Bcb->CacheSegmentSize, MC_CACHE, PAGE_READWRITE); Modified: trunk/reactos/ntoskrnl/mm/ARM3/contmem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/contmem.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/contmem.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/contmem.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -130,6 +130,8 @@ // // This PFN is now a used page, set it up // + MI_SET_USAGE(MI_USAGE_CONTINOUS_ALLOCATION); + MI_SET_PROCESS2("Kernel Driver"); MiUnlinkFreeOrZeroedPage(Pfn1); Pfn1->u3.e2.ReferenceCount = 1; Pfn1->u2.ShareCount = 1; Modified: trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/i386/init…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -531,6 +531,8 @@ OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); /* Allocate a page for hyperspace and create it */ + MI_SET_USAGE(MI_USAGE_PAGE_TABLE); + MI_SET_PROCESS2("Kernel"); PageFrameIndex = MiRemoveAnyPage(0); TempPde.u.Hard.PageFrameNumber = PageFrameIndex; TempPde.u.Hard.Global = FALSE; // Hyperspace is local! Modified: trunk/reactos/ntoskrnl/mm/ARM3/mminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/mminit.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -678,6 +678,10 @@ Pfn1->u3.e2.ReferenceCount = 1; Pfn1->u3.e1.PageLocation = ActiveAndValid; Pfn1->u3.e1.CacheAttribute = MiNonCached; +#if MI_TRACE_PFNS + Pfn1->PfnUsage = MI_USAGE_INIT_MEMORY; + memcpy(Pfn1->ProcessName, "Initial PDE", 16); +#endif } else { @@ -721,6 +725,10 @@ Pfn2->u3.e2.ReferenceCount = 1; Pfn2->u3.e1.PageLocation = ActiveAndValid; Pfn2->u3.e1.CacheAttribute = MiNonCached; +#if MI_TRACE_PFNS + Pfn2->PfnUsage = MI_USAGE_INIT_MEMORY; + memcpy(Pfn1->ProcessName, "Initial PTE", 16); +#endif } } } @@ -876,6 +884,9 @@ Pfn1->u3.e2.ReferenceCount = 1; Pfn1->u3.e1.PageLocation = ActiveAndValid; Pfn1->u3.e1.CacheAttribute = MiNonCached; +#if MI_TRACE_PFNS + Pfn1->PfnUsage = MI_USAGE_BOOT_DRIVER; +#endif /* Check for RAM disk page */ if (MdBlock->MemoryType == LoaderXIPRom) @@ -923,6 +934,9 @@ Pfn1 = MiGetPfnEntry(PointerPte->u.Hard.PageFrameNumber); Pfn1->u2.ShareCount = 1; Pfn1->u3.e2.ReferenceCount = 1; +#if MI_TRACE_PFNS + Pfn1->PfnUsage = MI_USAGE_PFN_DATABASE; +#endif } /* Next */ @@ -1222,17 +1236,46 @@ PCHAR Consumer = "Unknown"; KIRQL OldIrql; ULONG ActivePages = 0, FreePages = 0, OtherPages = 0; - +#if MI_TRACE_PFNS + ULONG UsageBucket[MI_USAGE_FREE_PAGE + 1] = {0}; + PCHAR MI_USAGE_TEXT[MI_USAGE_FREE_PAGE + 1] = + { + "Not set", + "Paged Pool", + "Nonpaged Pool", + "Nonpaged Pool Ex", + "Kernel Stack", + "Kernel Stack Ex", + "System PTE", + "VAD", + "PEB/TEB", + "Section", + "Page Table", + "Page Directory", + "Old Page Table", + "Driver Page", + "Contiguous Alloc", + "MDL", + "Demand Zero", + "Zero Loop", + "Cache", + "PFN Database", + "Boot Driver", + "Initial Memory", + "Free Page" + }; +#endif + // + // Loop the PFN database + // KeRaiseIrql(HIGH_LEVEL, &OldIrql); - - // - // Loop the PFN database - // for (i = 0; i <= MmHighestPhysicalPage; i++) { Pfn1 = MiGetPfnEntry(i); if (!Pfn1) continue; - +#if MI_TRACE_PFNS + ASSERT(Pfn1->PfnUsage <= MI_USAGE_FREE_PAGE); +#endif // // Get the page location // @@ -1243,12 +1286,18 @@ Consumer = "Active and Valid"; ActivePages++; break; - + + case ZeroedPageList: + + Consumer = "Zero Page List"; + FreePages++; + break;//continue; + case FreePageList: Consumer = "Free Page List"; FreePages++; - break; + break;//continue; default: @@ -1256,23 +1305,55 @@ OtherPages++; break; } - + +#if MI_TRACE_PFNS + /* Add into bucket */ + UsageBucket[Pfn1->PfnUsage]++; +#endif + // // Pretty-print the page // - DbgPrint("0x%08p:\t%20s\t(%02d.%02d) [%08p-%08p])\n", + if (!StatusOnly) + DbgPrint("0x%08p:\t%20s\t(%04d.%04d)\t[%16s - %16s])\n", i << PAGE_SHIFT, Consumer, Pfn1->u3.e2.ReferenceCount, - Pfn1->u2.ShareCount, - Pfn1->PteAddress, - Pfn1->u4.PteFrame); - } - - DbgPrint("Active: %d pages\t[%d KB]\n", ActivePages, (ActivePages << PAGE_SHIFT) / 1024); - DbgPrint("Free: %d pages\t[%d KB]\n", FreePages, (FreePages << PAGE_SHIFT) / 1024); - DbgPrint("Other: %d pages\t[%d KB]\n", OtherPages, (OtherPages << PAGE_SHIFT) / 1024); - + Pfn1->u2.ShareCount == LIST_HEAD ? 0xFFFF : Pfn1->u2.ShareCount, +#if MI_TRACE_PFNS + MI_USAGE_TEXT[Pfn1->PfnUsage], + Pfn1->ProcessName); +#else + "Page tracking", + "is disabled"); +#endif + } + + DbgPrint("Active: %5d pages\t[%6d KB]\n", ActivePages, (ActivePages << PAGE_SHIFT) / 1024); + DbgPrint("Free: %5d pages\t[%6d KB]\n", FreePages, (FreePages << PAGE_SHIFT) / 1024); + DbgPrint("-----------------------------------------\n"); +#if MI_TRACE_PFNS + OtherPages = UsageBucket[MI_USAGE_BOOT_DRIVER]; + DbgPrint("Boot Images: %5d pages\t[%6d KB]\n", OtherPages, (OtherPages << PAGE_SHIFT) / 1024); + OtherPages = UsageBucket[MI_USAGE_DRIVER_PAGE]; + DbgPrint("System Drivers: %5d pages\t[%6d KB]\n", OtherPages, (OtherPages << PAGE_SHIFT) / 1024); + OtherPages = UsageBucket[MI_USAGE_PFN_DATABASE]; + DbgPrint("PFN Database: %5d pages\t[%6d KB]\n", OtherPages, (OtherPages << PAGE_SHIFT) / 1024); + OtherPages = UsageBucket[MI_USAGE_PAGE_TABLE] + UsageBucket[MI_USAGE_LEGACY_PAGE_DIRECTORY]; + DbgPrint("Page Tables: %5d pages\t[%6d KB]\n", OtherPages, (OtherPages << PAGE_SHIFT) / 1024); + OtherPages = UsageBucket[MI_USAGE_NONPAGED_POOL] + UsageBucket[MI_USAGE_NONPAGED_POOL_EXPANSION]; + DbgPrint("NonPaged Pool: %5d pages\t[%6d KB]\n", OtherPages, (OtherPages << PAGE_SHIFT) / 1024); + OtherPages = UsageBucket[MI_USAGE_PAGED_POOL]; + DbgPrint("Paged Pool: %5d pages\t[%6d KB]\n", OtherPages, (OtherPages << PAGE_SHIFT) / 1024); + OtherPages = UsageBucket[MI_USAGE_KERNEL_STACK] + UsageBucket[MI_USAGE_KERNEL_STACK_EXPANSION]; + DbgPrint("Kernel Stack: %5d pages\t[%6d KB]\n", OtherPages, (OtherPages << PAGE_SHIFT) / 1024); + OtherPages = UsageBucket[MI_USAGE_INIT_MEMORY]; + DbgPrint("Init Memory: %5d pages\t[%6d KB]\n", OtherPages, (OtherPages << PAGE_SHIFT) / 1024); + OtherPages = UsageBucket[MI_USAGE_SECTION]; + DbgPrint("Sections: %5d pages\t[%6d KB]\n", OtherPages, (OtherPages << PAGE_SHIFT) / 1024); + OtherPages = UsageBucket[MI_USAGE_CACHE]; + DbgPrint("Cache: %5d pages\t[%6d KB]\n", OtherPages, (OtherPages << PAGE_SHIFT) / 1024); +#endif KeLowerIrql(OldIrql); } @@ -1565,6 +1646,8 @@ OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); /* Allocate a page and map the first paged pool PDE */ + MI_SET_USAGE(MI_USAGE_PAGED_POOL); + MI_SET_PROCESS2("Kernel"); PageFrameIndex = MiRemoveZeroPage(0); TempPte.u.Hard.PageFrameNumber = PageFrameIndex; MI_WRITE_VALID_PTE(PointerPde, TempPte); Modified: trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pagfault.…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -17,6 +17,10 @@ #include "../ARM3/miarm.h" /* GLOBALS ********************************************************************/ + +#if MI_TRACE_PFNS +BOOLEAN UserPdeFault = FALSE; +#endif /* PRIVATE FUNCTIONS **********************************************************/ @@ -256,6 +260,12 @@ /* Do we need a zero page? */ ASSERT(PointerPte->u.Hard.Valid == 0); +#if MI_TRACE_PFNS + if (UserPdeFault) MI_SET_USAGE(MI_USAGE_PAGE_TABLE); + if (!UserPdeFault) MI_SET_USAGE(MI_USAGE_DEMAND_ZERO); +#endif + if (Process) MI_SET_PROCESS2(Process->ImageFileName); + if (!Process) MI_SET_PROCESS2("Kernel Demand 0"); if ((NeedZero) && (Process)) { /* Try to get one, if we couldn't grab a free page and zero it */ @@ -892,6 +902,9 @@ MI_WRITE_INVALID_PTE(PointerPde, DemandZeroPde); /* And go dispatch the fault on the PDE. This should handle the demand-zero */ +#if MI_TRACE_PFNS + UserPdeFault = TRUE; +#endif Status = MiDispatchFault(TRUE, PointerPte, PointerPde, @@ -900,7 +913,9 @@ PsGetCurrentProcess(), TrapInformation, NULL); - +#if MI_TRACE_PFNS + UserPdeFault = FALSE; +#endif /* We should come back with APCs enabled, and with a valid PDE */ ASSERT(KeAreAllApcsDisabled() == TRUE); #if (_MI_PAGING_LEVELS >= 3) @@ -987,6 +1002,8 @@ OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); /* Try to get a zero page */ + MI_SET_USAGE(MI_USAGE_PEB_TEB); + MI_SET_PROCESS2(CurrentProcess->ImageFileName); Color = MI_GET_NEXT_PROCESS_COLOR(CurrentProcess); PageFrameIndex = MiRemoveZeroPageSafe(Color); if (!PageFrameIndex) Modified: trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -55,6 +55,10 @@ NULL, NULL }; + +ULONG MI_PFN_CURRENT_USAGE; +CHAR MI_PFN_CURRENT_PROCESS_NAME[16] = "None yet"; + /* FUNCTIONS ******************************************************************/ VOID @@ -204,6 +208,14 @@ { /* FIXME: Should wake up the MPW and working set manager, if we had one */ } + +#if MI_TRACE_PFNS + ASSERT(MI_PFN_CURRENT_USAGE != MI_USAGE_NOT_SET); + Entry->PfnUsage = MI_PFN_CURRENT_USAGE; + memcpy(Entry->ProcessName, MI_PFN_CURRENT_PROCESS_NAME, 16); +// MI_PFN_CURRENT_USAGE = MI_USAGE_NOT_SET; +// memcpy(MI_PFN_CURRENT_PROCESS_NAME, "Not Set", 16); +#endif } PFN_NUMBER @@ -320,6 +332,14 @@ { /* FIXME: Should wake up the MPW and working set manager, if we had one */ } + +#if MI_TRACE_PFNS + //ASSERT(MI_PFN_CURRENT_USAGE != MI_USAGE_NOT_SET); + Pfn1->PfnUsage = MI_PFN_CURRENT_USAGE; + memcpy(Pfn1->ProcessName, MI_PFN_CURRENT_PROCESS_NAME, 16); + //MI_PFN_CURRENT_USAGE = MI_USAGE_NOT_SET; + //memcpy(MI_PFN_CURRENT_PROCESS_NAME, "Not Set", 16); +#endif /* Return the page */ return PageIndex; @@ -576,6 +596,11 @@ MmZeroingPageThreadActive = TRUE; KeSetEvent(&MmZeroingPageEvent, IO_NO_INCREMENT, FALSE); } + +#if MI_TRACE_PFNS + Pfn1->PfnUsage = MI_USAGE_FREE_PAGE; + RtlZeroMemory(Pfn1->ProcessName, 16); +#endif } /* Note: This function is hardcoded only for the zeroed page list, for now */ @@ -691,6 +716,13 @@ /* One more paged on the colored list */ ColorHead->Count++; + +#if MI_TRACE_PFNS + //ASSERT(MI_PFN_CURRENT_USAGE == MI_USAGE_NOT_SET); + Pfn1->PfnUsage = MI_USAGE_FREE_PAGE; + MI_PFN_CURRENT_USAGE = MI_USAGE_NOT_SET; + RtlZeroMemory(Pfn1->ProcessName, 16); +#endif } VOID Modified: trunk/reactos/ntoskrnl/mm/ARM3/pool.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pool.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/pool.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/pool.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -476,11 +476,10 @@ ASSERT(PointerPde->u.Hard.Valid == 0); /* Request a page */ - DPRINT1("Requesting %d PDEs\n", i); + MI_SET_USAGE(MI_USAGE_PAGED_POOL); + MI_SET_PROCESS2("Kernel"); PageFrameNumber = MiRemoveAnyPage(MI_GET_NEXT_COLOR()); TempPde.u.Hard.PageFrameNumber = PageFrameNumber; - DPRINT1("We have a PDE: %lx\n", PageFrameNumber); - #if (_MI_PAGING_LEVELS >= 3) /* On PAE/x64 systems, there's no double-buffering */ ASSERT(FALSE); @@ -773,6 +772,8 @@ do { /* Allocate a page */ + MI_SET_USAGE(MI_USAGE_PAGED_POOL); + MI_SET_PROCESS2("Kernel"); PageFrameNumber = MiRemoveAnyPage(MI_GET_NEXT_COLOR()); /* Get the PFN entry for it and fill it out */ Modified: trunk/reactos/ntoskrnl/mm/ARM3/procsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/procsup.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -363,6 +363,8 @@ PointerPte++; /* Get a page and write the current invalid PTE */ + MI_SET_USAGE(MI_USAGE_KERNEL_STACK); + MI_SET_PROCESS2(PsGetCurrentProcess()->ImageFileName); PageFrameIndex = MiRemoveAnyPage(MI_GET_NEXT_COLOR()); MI_WRITE_INVALID_PTE(PointerPte, InvalidPte); @@ -447,6 +449,8 @@ while (LimitPte >= NewLimitPte) { /* Get a page and write the current invalid PTE */ + MI_SET_USAGE(MI_USAGE_KERNEL_STACK_EXPANSION); + MI_SET_PROCESS2(PsGetCurrentProcess()->ImageFileName); PageFrameIndex = MiRemoveAnyPage(MI_GET_NEXT_COLOR()); MI_WRITE_INVALID_PTE(LimitPte, InvalidPte); @@ -1074,6 +1078,7 @@ /* Get a zero page for the PDE, if possible */ Color = MI_GET_NEXT_PROCESS_COLOR(Process); + MI_SET_USAGE(MI_USAGE_PAGE_DIRECTORY); PdeIndex = MiRemoveZeroPageSafe(Color); if (!PdeIndex) { @@ -1087,6 +1092,7 @@ } /* Get a zero page for hyperspace, if possible */ + MI_SET_USAGE(MI_USAGE_PAGE_DIRECTORY); Color = MI_GET_NEXT_PROCESS_COLOR(Process); HyperIndex = MiRemoveZeroPageSafe(Color); if (!HyperIndex) Modified: trunk/reactos/ntoskrnl/mm/ARM3/section.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/section.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -339,6 +339,8 @@ if (SystemMapPde->u.Hard.Valid == 0) { /* Grab a page for it */ + MI_SET_USAGE(MI_USAGE_PAGE_TABLE); + MI_SET_PROCESS2(PsGetCurrentProcess()->ImageFileName); PageFrameIndex = MiRemoveZeroPage(MI_GET_NEXT_COLOR()); ASSERT(PageFrameIndex); TempPde.u.Hard.PageFrameNumber = PageFrameIndex; Modified: trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -166,12 +166,24 @@ /* The driver is here */ *ImageBase = DriverBase; + DPRINT1("Loading: %wZ at %p with %lx pages\n", FileName, DriverBase, PteCount); /* Loop the new driver PTEs */ TempPte = ValidKernelPte; while (PointerPte < LastPte) { /* Allocate a page */ + MI_SET_USAGE(MI_USAGE_DRIVER_PAGE); +#if MI_TRACE_PFNS + PWCHAR pos = NULL; + ULONG len = 0; + if (FileName->Buffer) + { + pos = wcsrchr(FileName->Buffer, '\\'); + len = wcslen(pos) * sizeof(WCHAR); + if (pos) snprintf(MI_PFN_CURRENT_PROCESS_NAME, min(16, len), "%S", pos); + } +#endif TempPte.u.Hard.PageFrameNumber = MiAllocatePfn(PointerPte, MM_EXECUTE); /* Write it */ @@ -1385,6 +1397,23 @@ (ULONG_PTR)LdrEntry->DllBase + LdrEntry->SizeOfImage, &LdrEntry->FullDllName); + /* Get the first PTE and the number of PTEs we'll need */ + PointerPte = StartPte = MiAddressToPte(LdrEntry->DllBase); + PteCount = ROUND_TO_PAGES(LdrEntry->SizeOfImage) >> PAGE_SHIFT; + LastPte = StartPte + PteCount; + +#if MI_TRACE_PFNS + /* Loop the PTEs */ + while (PointerPte < LastPte) + { + ULONG len; + ASSERT(PointerPte->u.Hard.Valid == 1); + Pfn1 = MiGetPfnEntry(PFN_FROM_PTE(PointerPte)); + len = wcslen(LdrEntry->BaseDllName.Buffer) * sizeof(WCHAR); + snprintf(Pfn1->ProcessName, min(16, len), "%S", LdrEntry->BaseDllName.Buffer); + PointerPte++; + } +#endif /* Skip kernel and HAL */ /* ROS HACK: Skip BOOTVID/KDCOM too */ i++; @@ -1424,12 +1453,8 @@ /* Remember the original address */ DllBase = LdrEntry->DllBase; - /* Get the first PTE and the number of PTEs we'll need */ - PointerPte = StartPte = MiAddressToPte(LdrEntry->DllBase); - PteCount = ROUND_TO_PAGES(LdrEntry->SizeOfImage) >> PAGE_SHIFT; - LastPte = StartPte + PteCount; - /* Loop the PTEs */ + PointerPte = StartPte; while (PointerPte < LastPte) { /* Mark the page modified in the PFN database */ Modified: trunk/reactos/ntoskrnl/mm/ARM3/zeropage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/zeropage.…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/zeropage.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/zeropage.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -71,6 +71,8 @@ PageIndex = MmFreePageListHead.Flink; ASSERT(PageIndex != LIST_HEAD); Pfn1 = MiGetPfnEntry(PageIndex); + MI_SET_USAGE(MI_USAGE_ZERO_LOOP); + MI_SET_PROCESS2("Kernel 0 Loop"); FreePage = MiRemoveAnyPage(MI_GET_PAGE_COLOR(PageIndex)); /* The first global free page should also be the first on its own list */ Modified: trunk/reactos/ntoskrnl/mm/anonmem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/anonmem.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/anonmem.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -367,6 +367,8 @@ /* * Try to allocate a page */ + MI_SET_USAGE(MI_USAGE_VAD); + MI_SET_PROCESS2(Process->ImageFileName); Status = MmRequestPageMemoryConsumer(MC_USER, FALSE, &Page); if (Status == STATUS_NO_MEMORY) { Modified: trunk/reactos/ntoskrnl/mm/freelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/freelist.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -230,6 +230,8 @@ while (PagesFound < PageCount) { /* Grab a page */ + MI_SET_USAGE(MI_USAGE_MDL); + MI_SET_PROCESS2("Kernel"); Page = MiRemoveAnyPage(0); if (Page == 0) { @@ -288,6 +290,8 @@ /* Remove the page from the free or zero list */ ASSERT(Pfn1->u3.e1.ReadInProgress == 0); + MI_SET_USAGE(MI_USAGE_MDL); + MI_SET_PROCESS2("Kernel"); MiUnlinkFreeOrZeroedPage(Pfn1); // Modified: trunk/reactos/ntoskrnl/mm/i386/page.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/i386/page.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -223,6 +223,9 @@ MmDeleteHyperspaceMapping(PageDir); return NULL; } + MI_SET_USAGE(MI_USAGE_LEGACY_PAGE_DIRECTORY); + if (Process) MI_SET_PROCESS2(Process->ImageFileName); + if (!Process) MI_SET_PROCESS2("Kernel Legacy"); Status = MmRequestPageMemoryConsumer(MC_SYSTEM, FALSE, &Pfn); if (!NT_SUCCESS(Status) || Pfn == 0) { @@ -258,6 +261,9 @@ { return NULL; } + MI_SET_USAGE(MI_USAGE_LEGACY_PAGE_DIRECTORY); + if (Process) MI_SET_PROCESS2(Process->ImageFileName); + if (!Process) MI_SET_PROCESS2("Kernel Legacy"); Status = MmRequestPageMemoryConsumer(MC_SYSTEM, FALSE, &Pfn); if (!NT_SUCCESS(Status) || Pfn == 0) { @@ -280,6 +286,9 @@ { return NULL; } + MI_SET_USAGE(MI_USAGE_LEGACY_PAGE_DIRECTORY); + if (Process) MI_SET_PROCESS2(Process->ImageFileName); + if (!Process) MI_SET_PROCESS2("Kernel Legacy"); Status = MmRequestPageMemoryConsumer(MC_SYSTEM, FALSE, &Pfn); if (!NT_SUCCESS(Status) || Pfn == 0) { Modified: trunk/reactos/ntoskrnl/mm/section.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -1193,6 +1193,8 @@ * Allocate a page, this is rather complicated by the possibility * we might have to move other things out of memory */ + MI_SET_USAGE(MI_USAGE_SECTION); + MI_SET_PROCESS2(PsGetCurrentProcess()->ImageFileName); Status = MmRequestPageMemoryConsumer(MC_USER, TRUE, Page); if (!NT_SUCCESS(Status)) { @@ -1486,6 +1488,9 @@ MmDeletePageFileMapping(Process, (PVOID)PAddress, &SwapEntry); MmUnlockAddressSpace(AddressSpace); + MI_SET_USAGE(MI_USAGE_SECTION); + if (Process) MI_SET_PROCESS2(Process->ImageFileName); + if (!Process) MI_SET_PROCESS2("Kernel Section"); Status = MmRequestPageMemoryConsumer(MC_USER, TRUE, &Page); if (!NT_SUCCESS(Status)) { @@ -1567,6 +1572,9 @@ if (Segment->Characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA) { MmUnlockSectionSegment(Segment); + MI_SET_USAGE(MI_USAGE_SECTION); + if (Process) MI_SET_PROCESS2(Process->ImageFileName); + if (!Process) MI_SET_PROCESS2("Kernel Section"); Status = MmRequestPageMemoryConsumer(MC_USER, FALSE, &Page); if (!NT_SUCCESS(Status)) { @@ -1621,6 +1629,9 @@ if ((Segment->Flags & MM_PAGEFILE_SEGMENT) || (Offset >= PAGE_ROUND_UP(Segment->RawLength) && Section->AllocationAttributes & SEC_IMAGE)) { + MI_SET_USAGE(MI_USAGE_SECTION); + if (Process) MI_SET_PROCESS2(Process->ImageFileName); + if (!Process) MI_SET_PROCESS2("Kernel Section"); Status = MmRequestPageMemoryConsumer(MC_USER, TRUE, &Page); if (!NT_SUCCESS(Status)) { @@ -1704,7 +1715,9 @@ MmUnlockSectionSegment(Segment); MmUnlockAddressSpace(AddressSpace); - + MI_SET_USAGE(MI_USAGE_SECTION); + if (Process) MI_SET_PROCESS2(Process->ImageFileName); + if (!Process) MI_SET_PROCESS2("Kernel Section"); Status = MmRequestPageMemoryConsumer(MC_USER, TRUE, &Page); if (!NT_SUCCESS(Status)) { @@ -1912,6 +1925,9 @@ /* * Allocate a page */ + MI_SET_USAGE(MI_USAGE_SECTION); + if (Process) MI_SET_PROCESS2(Process->ImageFileName); + if (!Process) MI_SET_PROCESS2("Kernel Section"); Status = MmRequestPageMemoryConsumer(MC_USER, TRUE, &NewPage); if (!NT_SUCCESS(Status)) { Modified: trunk/reactos/ntoskrnl/ps/process.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/process.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ps/process.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ps/process.c [iso-8859-1] Tue Nov 2 15:16:22 2010 @@ -669,6 +669,13 @@ } } +#if MI_TRACE_PFNS + /* Copy the process name now that we have it */ + memcpy(MiGetPfnEntry(Process->Pcb.DirectoryTableBase[0] >> PAGE_SHIFT)->ProcessName, Process->ImageFileName, 16); + if (Process->Pcb.DirectoryTableBase[1]) memcpy(MiGetPfnEntry(Process->Pcb.DirectoryTableBase[1] >> PAGE_SHIFT)->ProcessName, Process->ImageFileName, 16); + if (Process->WorkingSetPage) memcpy(MiGetPfnEntry(Process->WorkingSetPage)->ProcessName, Process->ImageFileName, 16); +#endif + /* Check if we have a section object and map the system DLL */ if (SectionObject) PspMapSystemDll(Process, NULL, FALSE);
14 years, 1 month
1
0
0
0
[sir_richard] 49443: [NTOS]: Define an array of MI_USAGE integers to track what a PFN is used for. [NTOS]: Extend the MMPFN structure for ReactOS-specific PFN tracing mechanism. [NTOS]: Add macros ...
by sir_richard@svn.reactos.org
Author: sir_richard Date: Tue Nov 2 15:05:37 2010 New Revision: 49443 URL:
http://svn.reactos.org/svn/reactos?rev=49443&view=rev
Log: [NTOS]: Define an array of MI_USAGE integers to track what a PFN is used for. [NTOS]: Extend the MMPFN structure for ReactOS-specific PFN tracing mechanism. [NTOS]: Add macros to track page usage and process/extra-data (not yet used). Modified: trunk/reactos/ntoskrnl/include/internal/mm.h Modified: trunk/reactos/ntoskrnl/include/internal/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Tue Nov 2 15:05:37 2010 @@ -294,6 +294,43 @@ #endif } MM_RMAP_ENTRY, *PMM_RMAP_ENTRY; + +#if MI_TRACE_PFNS +extern ULONG MI_PFN_CURRENT_USAGE; +extern CHAR MI_PFN_CURRENT_PROCESS_NAME[16]; +#define MI_SET_USAGE(x) MI_PFN_CURRENT_USAGE = x +#define MI_SET_PROCESS2(x) memcpy(MI_PFN_CURRENT_PROCESS_NAME, x, 16) +#else +#define MI_SET_USAGE(x) +#define MI_SET_PROCESS2(x) +#endif + +typedef enum _MI_PFN_USAGES +{ + MI_USAGE_NOT_SET = 0, + MI_USAGE_PAGED_POOL, + MI_USAGE_NONPAGED_POOL, + MI_USAGE_NONPAGED_POOL_EXPANSION, + MI_USAGE_KERNEL_STACK, + MI_USAGE_KERNEL_STACK_EXPANSION, + MI_USAGE_SYSTEM_PTE, + MI_USAGE_VAD, + MI_USAGE_PEB_TEB, + MI_USAGE_SECTION, + MI_USAGE_PAGE_TABLE, + MI_USAGE_PAGE_DIRECTORY, + MI_USAGE_LEGACY_PAGE_DIRECTORY, + MI_USAGE_DRIVER_PAGE, + MI_USAGE_CONTINOUS_ALLOCATION, + MI_USAGE_MDL, + MI_USAGE_DEMAND_ZERO, + MI_USAGE_ZERO_LOOP, + MI_USAGE_CACHE, + MI_USAGE_PFN_DATABASE, + MI_USAGE_BOOT_DRIVER, + MI_USAGE_INIT_MEMORY, + MI_USAGE_FREE_PAGE +} MI_PFN_USAGES; // // These two mappings are actually used by Windows itself, based on the ASSERTS @@ -362,6 +399,10 @@ ULONG_PTR MustBeCached:1; }; } u4; +#if MI_TRACE_PFNS + MI_PFN_USAGES PfnUsage; + CHAR ProcessName[16]; +#endif } MMPFN, *PMMPFN; extern PMMPFN MmPfnDatabase;
14 years, 1 month
1
0
0
0
[sir_richard] 49442: [NTOS]: CR3 should be PDE_BASE, not PTE_BASE! [NTOS]: Define DemandZeroPte.
by sir_richard@svn.reactos.org
Author: sir_richard Date: Tue Nov 2 15:02:41 2010 New Revision: 49442 URL:
http://svn.reactos.org/svn/reactos?rev=49442&view=rev
Log: [NTOS]: CR3 should be PDE_BASE, not PTE_BASE! [NTOS]: Define DemandZeroPte. Modified: trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c trunk/reactos/ntoskrnl/mm/ARM3/miarm.h Modified: trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/i386/init…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] Tue Nov 2 15:02:41 2010 @@ -24,6 +24,7 @@ /* Template PDE for a demand-zero page */ MMPDE DemandZeroPde = {.u.Long = (MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS)}; +MMPTE DemandZeroPte = {.u.Long = (MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS)}; /* Template PTE for prototype page */ MMPTE PrototypePte = {.u.Long = (MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS) | PTE_PROTOTYPE | (MI_PTE_LOOKUP_NEEDED << PAGE_SHIFT)}; @@ -196,7 +197,7 @@ // // Set CR3 for the system process // - PointerPte = MiAddressToPde(PTE_BASE); + PointerPte = MiAddressToPde(PDE_BASE); PageFrameIndex = PFN_FROM_PTE(PointerPte) << PAGE_SHIFT; PsGetCurrentProcess()->Pcb.DirectoryTableBase[0] = PageFrameIndex; 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] Tue Nov 2 15:02:41 2010 @@ -403,6 +403,7 @@ extern MMPDE ValidKernelPde; extern MMPTE ValidKernelPte; extern MMPDE DemandZeroPde; +extern MMPTE DemandZeroPte; extern MMPTE PrototypePte; extern BOOLEAN MmLargeSystemCache; extern BOOLEAN MmZeroPageFile;
14 years, 1 month
1
0
0
0
[sir_richard] 49441: [NTOS]: Misc typo and cleanup fixes.
by sir_richard@svn.reactos.org
Author: sir_richard Date: Tue Nov 2 14:58:39 2010 New Revision: 49441 URL:
http://svn.reactos.org/svn/reactos?rev=49441&view=rev
Log: [NTOS]: Misc typo and cleanup fixes. Modified: trunk/reactos/ntoskrnl/include/internal/mm.h trunk/reactos/ntoskrnl/kd/kdmain.c trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c trunk/reactos/ntoskrnl/mm/ARM3/mminit.c trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c trunk/reactos/ntoskrnl/mm/freelist.c Modified: trunk/reactos/ntoskrnl/include/internal/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Tue Nov 2 14:58:39 2010 @@ -1150,8 +1150,8 @@ VOID NTAPI -MmDumpPfnDatabase( - VOID +MmDumpArmPfnDatabase( + IN BOOLEAN StatusOnly ); PFN_NUMBER Modified: trunk/reactos/ntoskrnl/kd/kdmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdmain.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd/kdmain.c [iso-8859-1] Tue Nov 2 14:58:39 2010 @@ -72,8 +72,8 @@ DbgBreakPoint(); break; - case ThatsWhatSheSaid: - MmDumpPfnDatabase(); + case KdSpare3: + MmDumpArmPfnDatabase(FALSE); break; default: Modified: trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/i386/init…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] Tue Nov 2 14:58:39 2010 @@ -307,11 +307,10 @@ MiComputeColorInformation(); // - // Calculate the number of bytes for the PFN database, double it for ARM3, + // Calculate the number of bytes for the PFN database // then add the color tables and convert to pages // MxPfnAllocation = (MmHighestPhysicalPage + 1) * sizeof(MMPFN); - //MxPfnAllocation <<= 1; MxPfnAllocation += (MmSecondaryColors * sizeof(MMCOLOR_TABLES) * 2); MxPfnAllocation >>= PAGE_SHIFT; Modified: trunk/reactos/ntoskrnl/mm/ARM3/mminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/mminit.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] Tue Nov 2 14:58:39 2010 @@ -1215,7 +1215,7 @@ VOID NTAPI -MmDumpArmPfnDatabase(VOID) +MmDumpArmPfnDatabase(IN BOOLEAN StatusOnly) { ULONG i; PMMPFN Pfn1; Modified: trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pagfault.…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] Tue Nov 2 14:58:39 2010 @@ -594,13 +594,13 @@ PointerPte, Process, MM_NOIRQL); - ASSERT(KeAreAllApcsDisabled () == TRUE); + ASSERT(KeAreAllApcsDisabled() == TRUE); if (NT_SUCCESS(Status)) { // // Make sure we're returning in a sane state and pass the status down // - ASSERT(OldIrql == KeGetCurrentIrql ()); + ASSERT(OldIrql == KeGetCurrentIrql()); ASSERT(KeGetCurrentIrql() <= APC_LEVEL); return Status; } Modified: trunk/reactos/ntoskrnl/mm/freelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/freelist.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] Tue Nov 2 14:58:39 2010 @@ -381,14 +381,6 @@ VOID NTAPI -MmDumpPfnDatabase(VOID) -{ - /* Pretty useless for now, to be improved later */ - return; -} - -VOID -NTAPI MmSetRmapListHeadPage(PFN_NUMBER Pfn, PMM_RMAP_ENTRY ListHead) { KIRQL oldIrql;
14 years, 1 month
1
0
0
0
[sir_richard] 49440: [NTOS]: Fix a bug in the MDL Code which would dereference a completely bogus page frame index.
by sir_richard@svn.reactos.org
Author: sir_richard Date: Tue Nov 2 14:58:10 2010 New Revision: 49440 URL:
http://svn.reactos.org/svn/reactos?rev=49440&view=rev
Log: [NTOS]: Fix a bug in the MDL Code which would dereference a completely bogus page frame index. Modified: trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c [iso-8859-1] Tue Nov 2 14:58:10 2010 @@ -1343,7 +1343,7 @@ InterlockedExchangeAddSizeT(&MmSystemLockPagesCount, -1); /* Do the last dereference, we're done here */ - MiDecrementReferenceCount(Pfn1, *MdlPages); + MiDecrementReferenceCount(Pfn1, MiGetPfnEntryIndex(Pfn1)); } else {
14 years, 1 month
1
0
0
0
[sir_richard] 49439: [NTOS]: Fix a bug in MmFindGapBottomUp which could make it return an address lower than what the caller said should be the lowest address.
by sir_richard@svn.reactos.org
Author: sir_richard Date: Tue Nov 2 14:50:06 2010 New Revision: 49439 URL:
http://svn.reactos.org/svn/reactos?rev=49439&view=rev
Log: [NTOS]: Fix a bug in MmFindGapBottomUp which could make it return an address lower than what the caller said should be the lowest address. Modified: trunk/reactos/ntoskrnl/mm/marea.c Modified: trunk/reactos/ntoskrnl/mm/marea.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/marea.c?rev=49…
============================================================================== --- trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] Tue Nov 2 14:50:06 2010 @@ -492,13 +492,16 @@ break; AlignedAddress = MM_ROUND_UP(PreviousNode->EndingAddress, Granularity); - if (Node->StartingAddress > AlignedAddress && - (ULONG_PTR)Node->StartingAddress - (ULONG_PTR)AlignedAddress >= Length) - { - DPRINT("MmFindGapBottomUp: %p\n", AlignedAddress); - return AlignedAddress; - } - + if (AlignedAddress >= LowestAddress) + { + if (Node->StartingAddress > AlignedAddress && + (ULONG_PTR)Node->StartingAddress - (ULONG_PTR)AlignedAddress >= Length) + { + DPRINT("MmFindGapBottomUp: %p\n", AlignedAddress); + ASSERT(AlignedAddress >= LowestAddress); + return AlignedAddress; + } + } PreviousNode = Node; } @@ -508,6 +511,7 @@ (ULONG_PTR)HighestAddress - (ULONG_PTR)AlignedAddress >= Length) { DPRINT("MmFindGapBottomUp: %p\n", AlignedAddress); + ASSERT(AlignedAddress >= LowestAddress); return AlignedAddress; } @@ -517,6 +521,7 @@ (ULONG_PTR)FirstNode->StartingAddress - (ULONG_PTR)AlignedAddress >= Length) { DPRINT("MmFindGapBottomUp: %p\n", AlignedAddress); + ASSERT(AlignedAddress >= LowestAddress); return AlignedAddress; }
14 years, 1 month
1
0
0
0
[sir_richard] 49438: [NTOS]: You can't just set MDL_LOCKED_PAGES without actually... locking the page. Add a MmReferencePage when doing so, so when that a paging read/write IRP gets completed (and ...
by sir_richard@svn.reactos.org
Author: sir_richard Date: Tue Nov 2 14:46:46 2010 New Revision: 49438 URL:
http://svn.reactos.org/svn/reactos?rev=49438&view=rev
Log: [NTOS]: You can't just set MDL_LOCKED_PAGES without actually... locking the page. Add a MmReferencePage when doing so, so when that a paging read/write IRP gets completed (and MmUnlockPages is called), the page gets handled correctly. Can now boot with 64MB RAM without ASSERTs. [NTOS]: Fix one of the MDL code paths that isn't getting called frequently. Modified: trunk/reactos/ntoskrnl/mm/freelist.c trunk/reactos/ntoskrnl/mm/pagefile.c Modified: trunk/reactos/ntoskrnl/mm/freelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/freelist.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] Tue Nov 2 14:46:46 2010 @@ -246,12 +246,14 @@ // ASSERT(Pfn1->u3.e2.ReferenceCount == 0); - // - // Allocate it and mark it - // + /* Now setup the page and mark it */ + Pfn1->u3.e2.ReferenceCount = 1; + Pfn1->u2.ShareCount = 1; + MI_SET_PFN_DELETED(Pfn1); + Pfn1->u4.PteFrame = 0x1FFEDCB; Pfn1->u3.e1.StartOfAllocation = 1; Pfn1->u3.e1.EndOfAllocation = 1; - Pfn1->u3.e2.ReferenceCount = 1; + Pfn1->u4.VerifierAllocation = 0; // // Save it into the MDL @@ -370,7 +372,7 @@ } // - // We're done, mark the pages as locked (should we lock them, though???) + // We're done, mark the pages as locked // Mdl->Process = NULL; Mdl->MdlFlags |= MDL_PAGES_LOCKED; Modified: trunk/reactos/ntoskrnl/mm/pagefile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pagefile.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/mm/pagefile.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/pagefile.c [iso-8859-1] Tue Nov 2 14:46:46 2010 @@ -252,6 +252,7 @@ MmInitializeMdl(Mdl, NULL, PAGE_SIZE); MmBuildMdlFromPages(Mdl, &Page); + MmReferencePage(Page); Mdl->MdlFlags |= MDL_PAGES_LOCKED; file_offset.QuadPart = offset * PAGE_SIZE; @@ -313,6 +314,7 @@ MmInitializeMdl(Mdl, NULL, PAGE_SIZE); MmBuildMdlFromPages(Mdl, &Page); + MmReferencePage(Page); Mdl->MdlFlags |= MDL_PAGES_LOCKED; file_offset.QuadPart = offset * PAGE_SIZE;
14 years, 1 month
1
0
0
0
← Newer
1
...
41
42
43
44
45
46
47
...
50
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Results per page:
10
25
50
100
200