[ros-diffs] [ros-arm-bringup] 41709: - Cleanup some debug-only debug prints. - Make the VA-range-printing debug prints match the same format as those in ReactOS Mm (MiDbgKernelLayout). - Add the appropriate number of spaces so that the layout appears continuous, even though it's coming from two source files. - This makes it easy to see the VA mappings at boot (but not all of them).
ros-arm-bringup at svn.reactos.org
ros-arm-bringup at svn.reactos.org
Tue Jun 30 12:38:52 CEST 2009
- Previous message: [ros-diffs] [ros-arm-bringup] 41708: - Rewrite MmAllocateNonCachedMemory and MmFreeNonCachedMemory to use the new functionality present in ARM3. - These functions now use the MDL routines to allocate their physical memory, since the constraints and requirements are identical as for a non-cached MDL mapping. - As for the virtual address space, it is guaranteed once again by System PTEs! - If it's not getting old already, optimizations to the System PTE code will, yet again, yield improvements here as well. - This is the last large kernel-facing memory allocator that needed updating to use System PTEs instead. - Only the pool allocator remains (which, for nonpaged pool, also uses System PTEs, present in the nonpaged pool expansion VA). - That effort will take significantly longer.
- Next message: [ros-diffs] [ros-arm-bringup] 41710: - Move MmIsThisAnNtSystem and MmQueryMemorySize to mmsup.c instead of randomly in mminit.c. - Cleanup some externs that were never referenced in mminit.c. - Remove MiShutdownMemoryManager since it was dead code. - There is no need to define the MiKseg0Start/End variables and loop through the memory descriptors to find the last kernel image. We already have this information through LoaderPagesSpanned saved in MmBootImageSize. - Removed these variables, code that depended on them, and MiGetLastKernelAddress, and switch to just using MmBootImageSize, which simplifies things a lot. - Also simplify the way that the initial memory latout is setup. Now the PFN database will always start after MmBootImageSize + KSEG0_BASE, instead of relying on the fact FreeLDR, on certain machines, may have had leftover space in the 6MB allocation that it makes (And worse, assuming FreeLDR on all architectures will allocate 6MB). - This standardizes the PFN database address and makes the code portable. - Same for the nonpaged pool address. - Should not call MmInitializeHandBuiltProcess for the idle process -- this will be called for the system process in PsCreateProcess. - The only thing we need, as the comment says, is the kernel MADDRESS_SPACE, so just initialize the lock for it. - Do not zero MmStats since the load-linker takes care of that for us since it's a global.
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ros-arm-bringup
Date: Tue Jun 30 14:38:51 2009
New Revision: 41709
URL: http://svn.reactos.org/svn/reactos?rev=41709&view=rev
Log:
- Cleanup some debug-only debug prints.
- Make the VA-range-printing debug prints match the same format as those in ReactOS Mm (MiDbgKernelLayout).
- Add the appropriate number of spaces so that the layout appears continuous, even though it's coming from two source files.
- This makes it easy to see the VA mappings at boot (but not all of them).
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/init.c
trunk/reactos/ntoskrnl/mm/ARM3/syspte.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/init.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/init.c?rev=41709&r1=41708&r2=41709&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/init.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/init.c [iso-8859-1] Tue Jun 30 14:38:51 2009
@@ -338,8 +338,8 @@
}
}
- DPRINT1("System PTE count has been tuned to %d (%d bytes)\n",
- MmNumberOfSystemPtes, MmNumberOfSystemPtes * PAGE_SIZE);
+ DPRINT("System PTE count has been tuned to %d (%d bytes)\n",
+ MmNumberOfSystemPtes, MmNumberOfSystemPtes * PAGE_SIZE);
//
// Check if this is a machine with less than 256MB of RAM, and no overide
@@ -443,8 +443,8 @@
MmSizeOfNonPagedPoolInBytes);
MmNonPagedPoolStart = (PVOID)PAGE_ALIGN(MmNonPagedPoolStart);
NonPagedPoolExpansionVa = MmNonPagedPoolStart;
- DPRINT1("NP Pool has been tuned to: %d bytes and %d bytes\n",
- MmSizeOfNonPagedPoolInBytes, MmMaximumNonPagedPoolInBytes);
+ DPRINT("NP Pool has been tuned to: %d bytes and %d bytes\n",
+ MmSizeOfNonPagedPoolInBytes, MmMaximumNonPagedPoolInBytes);
//
// Now calculate the nonpaged system VA region, which includes the
@@ -488,9 +488,6 @@
//
// Non paged pool comes after the PFN database
//
- DPRINT1("System PTE VA starts at: %p\n", MmNonPagedSystemStart);
- DPRINT1("NP Expansion VA begins at: %p and ends at: %p\n",
- MmNonPagedPoolStart, MmNonPagedPoolEnd);
MmNonPagedPoolStart = (PVOID)((ULONG_PTR)MmArmPfnDatabase +
(MxPfnAllocation << PAGE_SHIFT));
@@ -505,14 +502,16 @@
BoundaryAddressMultiple,
FALSE);
ASSERT(PageFrameIndex != 0);
- DPRINT1("PFN DB VA begins at: %p and ends at: %p\n",
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
MmArmPfnDatabase,
- (ULONG_PTR)MmArmPfnDatabase + (MxPfnAllocation << PAGE_SHIFT));
- DPRINT1("PFN DB PA PFN begins at: %lx\n", PageFrameIndex);
- DPRINT1("NP VA begins at: %p and ends at: %p\n",
+ (ULONG_PTR)MmArmPfnDatabase + (MxPfnAllocation << PAGE_SHIFT),
+ "Shadow PFN Database");
+ DPRINT("PFN DB PA PFN begins at: %lx\n", PageFrameIndex);
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
MmNonPagedPoolStart,
- (ULONG_PTR)MmNonPagedPoolStart + MmSizeOfNonPagedPoolInBytes);
- DPRINT1("NP PA PFN begins at: %lx\n", PageFrameIndex + MxPfnAllocation);
+ (ULONG_PTR)MmNonPagedPoolStart + MmSizeOfNonPagedPoolInBytes,
+ "ARM Non Paged Pool");
+ DPRINT("NP PA PFN begins at: %lx\n", PageFrameIndex + MxPfnAllocation);
//
// Now we need some pages to create the page tables for the NP system VA
@@ -582,6 +581,12 @@
// Now remember where the expansion starts
//
MmNonPagedPoolExpansionStart = NonPagedPoolExpansionVa;
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
+ MmNonPagedSystemStart, MmNonPagedPoolExpansionStart,
+ "System PTE Space");
+ DPRINT1(" 0x%p - 0x%p\t%s\n",
+ MmNonPagedPoolExpansionStart, MmNonPagedPoolEnd,
+ "Non Paged Pool Expansion PTE Space");
//
// Last step is to actually map the nonpaged pool
@@ -650,8 +655,8 @@
MmNumberOfSystemPtes = MiAddressToPte(MmNonPagedPoolExpansionStart) -
PointerPte;
MmNumberOfSystemPtes--;
- DPRINT1("Final System PTE count: %d (%d bytes)\n",
- MmNumberOfSystemPtes, MmNumberOfSystemPtes * PAGE_SIZE);
+ DPRINT("Final System PTE count: %d (%d bytes)\n",
+ MmNumberOfSystemPtes, MmNumberOfSystemPtes * PAGE_SIZE);
//
// Create the system PTE space
@@ -691,7 +696,6 @@
//
MiFirstReservedZeroingPte = MiReserveSystemPtes(MI_ZERO_PTES,
SystemPteSpace);
- DPRINT1("ZERO PTEs are at: %p\n", MiFirstReservedZeroingPte);
RtlZeroMemory(MiFirstReservedZeroingPte, MI_ZERO_PTES * sizeof(MMPTE));
//
@@ -731,9 +735,9 @@
//
PPHYSICAL_MEMORY_RUN Run;
Run = &MmPhysicalMemoryBlock->Run[i];
- DPRINT1("PHYSICAL RAM [0x%08p to 0x%08p]\n",
- Run->BasePage << PAGE_SHIFT,
- (Run->BasePage + Run->PageCount) << PAGE_SHIFT);
+ DPRINT("PHYSICAL RAM [0x%08p to 0x%08p]\n",
+ Run->BasePage << PAGE_SHIFT,
+ (Run->BasePage + Run->PageCount) << PAGE_SHIFT);
}
}
Modified: trunk/reactos/ntoskrnl/mm/ARM3/syspte.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/syspte.c?rev=41709&r1=41708&r2=41709&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/syspte.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/syspte.c [iso-8859-1] Tue Jun 30 14:38:51 2009
@@ -339,8 +339,8 @@
MmSystemPteBase = (PVOID)PAGETABLE_MAP;
MmSystemPtesStart[PoolType] = StartingPte;
MmSystemPtesEnd[PoolType] = StartingPte + NumberOfPtes - 1;
- DPRINT1("System PTE space for %d starting at: %p and ending at: %p\n",
- PoolType, MmSystemPtesStart[PoolType], MmSystemPtesEnd[PoolType]);
+ DPRINT("System PTE space for %d starting at: %p and ending at: %p\n",
+ PoolType, MmSystemPtesStart[PoolType], MmSystemPtesEnd[PoolType]);
//
// Clear all the PTEs to start with
- Previous message: [ros-diffs] [ros-arm-bringup] 41708: - Rewrite MmAllocateNonCachedMemory and MmFreeNonCachedMemory to use the new functionality present in ARM3. - These functions now use the MDL routines to allocate their physical memory, since the constraints and requirements are identical as for a non-cached MDL mapping. - As for the virtual address space, it is guaranteed once again by System PTEs! - If it's not getting old already, optimizations to the System PTE code will, yet again, yield improvements here as well. - This is the last large kernel-facing memory allocator that needed updating to use System PTEs instead. - Only the pool allocator remains (which, for nonpaged pool, also uses System PTEs, present in the nonpaged pool expansion VA). - That effort will take significantly longer.
- Next message: [ros-diffs] [ros-arm-bringup] 41710: - Move MmIsThisAnNtSystem and MmQueryMemorySize to mmsup.c instead of randomly in mminit.c. - Cleanup some externs that were never referenced in mminit.c. - Remove MiShutdownMemoryManager since it was dead code. - There is no need to define the MiKseg0Start/End variables and loop through the memory descriptors to find the last kernel image. We already have this information through LoaderPagesSpanned saved in MmBootImageSize. - Removed these variables, code that depended on them, and MiGetLastKernelAddress, and switch to just using MmBootImageSize, which simplifies things a lot. - Also simplify the way that the initial memory latout is setup. Now the PFN database will always start after MmBootImageSize + KSEG0_BASE, instead of relying on the fact FreeLDR, on certain machines, may have had leftover space in the 6MB allocation that it makes (And worse, assuming FreeLDR on all architectures will allocate 6MB). - This standardizes the PFN database address and makes the code portable. - Same for the nonpaged pool address. - Should not call MmInitializeHandBuiltProcess for the idle process -- this will be called for the system process in PsCreateProcess. - The only thing we need, as the comment says, is the kernel MADDRESS_SPACE, so just initialize the lock for it. - Do not zero MmStats since the load-linker takes care of that for us since it's a global.
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Ros-diffs
mailing list