Author: sginsberg
Date: Thu Jan 1 11:00:38 2009
New Revision: 38500
URL:
http://svn.reactos.org/svn/reactos?rev=38500&view=rev
Log:
- Only reserve APIC memory on x86
- Don't reserve 32 pages for VGA registers -- deprecated since 11917, 4 years ago
- Use KeNumberProcessors instead of MAXIMUM_PROCESSORS when mapping the PCRs
- Remove MmInitMemoryAreas, a nop since revision 1093, 8 years ago
- Remove unused KeMemoryMapRangeCount/KeMemoryMap
Modified:
trunk/reactos/ntoskrnl/include/internal/mm.h
trunk/reactos/ntoskrnl/ke/i386/kiinit.c
trunk/reactos/ntoskrnl/mm/marea.c
trunk/reactos/ntoskrnl/mm/mminit.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] Thu Jan 1 11:00:38 2009
@@ -392,10 +392,6 @@
NTSTATUS
NTAPI
-MmInitMemoryAreas(VOID);
-
-NTSTATUS
-NTAPI
MmCreateMemoryArea(
PMM_AVL_TABLE AddressSpace,
ULONG Type,
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] Thu Jan 1 11:00:38 2009
@@ -17,10 +17,6 @@
/* Spinlocks used only on X86 */
KSPIN_LOCK KiFreezeExecutionLock;
KSPIN_LOCK Ki486CompatibilityLock;
-
-/* BIOS Memory Map. Not NTLDR-compliant yet */
-extern ULONG KeMemoryMapRangeCount;
-extern ADDRESS_RANGE KeMemoryMap[64];
/* FUNCTIONS *****************************************************************/
Modified: trunk/reactos/ntoskrnl/mm/marea.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/marea.c?rev=38…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] Thu Jan 1 11:00:38 2009
@@ -703,21 +703,6 @@
}
}
-/**
- * @name MmInitMemoryAreas
- *
- * Initialize the memory area list implementation.
- */
-
-NTSTATUS
-INIT_FUNCTION
-NTAPI
-MmInitMemoryAreas(VOID)
-{
- DPRINT("MmInitMemoryAreas()\n");
- return(STATUS_SUCCESS);
-}
-
/**
* @name MmFreeMemoryArea
Modified: trunk/reactos/ntoskrnl/mm/mminit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mminit.c?rev=3…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] Thu Jan 1 11:00:38 2009
@@ -118,8 +118,6 @@
BoundaryAddressMultiple.QuadPart = 0;
- MmInitMemoryAreas();
-
DPRINT("NonPagedPool %x - %x, PagedPool %x - %x\n", MiNonPagedPoolStart,
(ULONG_PTR)MiNonPagedPoolStart + MiNonPagedPoolLength - 1,
MmPagedPoolBase, (ULONG_PTR)MmPagedPoolBase + MmPagedPoolSize - 1);
@@ -134,13 +132,14 @@
MmCreateMemoryArea(MmGetKernelAddressSpace(),
MEMORY_AREA_SYSTEM,
&BaseAddress,
- PAGE_SIZE * MAXIMUM_PROCESSORS,
+ PAGE_SIZE * KeNumberProcessors,
PAGE_READWRITE,
&MArea,
TRUE,
0,
BoundaryAddressMultiple);
+#if defined(_M_IX86)
/* Local APIC base */
BaseAddress = (PVOID)0xFEE00000;
MmCreateMemoryArea(MmGetKernelAddressSpace(),
@@ -164,17 +163,7 @@
TRUE,
0,
BoundaryAddressMultiple);
-
- BaseAddress = (PVOID)0xFF3A0000;
- MmCreateMemoryArea(MmGetKernelAddressSpace(),
- MEMORY_AREA_SYSTEM,
- &BaseAddress,
- 0x20000,
- PAGE_READWRITE,
- &MArea,
- TRUE,
- 0,
- BoundaryAddressMultiple);
+#endif
BaseAddress = MiNonPagedPoolStart;
MmCreateMemoryArea(MmGetKernelAddressSpace(),