Author: tkreuzer
Date: Sat Feb 4 21:53:09 2012
New Revision: 55421
URL:
http://svn.reactos.org/svn/reactos?rev=55421&view=rev
Log:
[FREELDR]
- Don't map the low 1 MB into kernel space, it's pointless and leads to
inconsistencies between reported memory type and what is found in the page tables. On x86
it works, because it uses an overcomplicated pfn initialization wih redundent checks.
Anyway this memory, containing freeldr and real mode code, was simply wasted.
- Silence some debug prints
- Fix warnings
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/amd64/winldr.c
trunk/reactos/boot/freeldr/freeldr/windows/winldr.c
trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/amd64/winldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/amd64/winldr.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/amd64/winldr.c [iso-8859-1] Sat Feb 4
21:53:09 2012
@@ -236,7 +236,7 @@
BOOLEAN
WinLdrMapSpecialPages()
{
- PHARDWARE_PTE PpeBase, PdeBase, PteBase;
+ PHARDWARE_PTE PpeBase, PdeBase;
/* Map the PCR page */
if (!MempMapSinglePage(KIP0PCRADDRESS, PcrBasePage * PAGE_SIZE))
@@ -308,7 +308,7 @@
/* Set the new Gdt */
__lgdt(&GdtDesc.Limit);
- DbgPrint("Gdtr.Base = %p, num = %ld\n", GdtDesc.Base, NUM_GDT);
+ TRACE("Gdtr.Base = %p, num = %ld\n", GdtDesc.Base, NUM_GDT);
}
@@ -329,7 +329,7 @@
/* Set the new IDT */
__lidt(&IdtDesc.Limit);
- DbgPrint("Idtr.Base = %p\n", IdtDesc.Base);
+ TRACE("Idtr.Base = %p\n", IdtDesc.Base);
}
Modified: trunk/reactos/boot/freeldr/freeldr/windows/winldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] Sat Feb 4 21:53:09
2012
@@ -91,7 +91,8 @@
CHAR HalPath[] = "\\";
CHAR ArcBoot[256];
CHAR MiscFiles[256];
- ULONG i, PathSeparator;
+ ULONG i;
+ ULONG_PTR PathSeparator;
PLOADER_PARAMETER_EXTENSION Extension;
/* Construct SystemRoot and ArcBoot from SystemPath */
Modified: trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c [iso-8859-1] Sat Feb 4 21:53:09
2012
@@ -200,7 +200,7 @@
PPAGE_LOOKUP_TABLE_ITEM MemoryMap;
ULONG NoEntries;
//PKTSS Tss;
- BOOLEAN Status;
+ //BOOLEAN Status;
//
// Creating a suitable memory map for the Windows can be tricky, so let's
@@ -241,7 +241,7 @@
MemoryMapSizeInPages = (NoEntries * sizeof(PAGE_LOOKUP_TABLE_ITEM) + MM_PAGE_SIZE - 1) /
MM_PAGE_SIZE;
TRACE("Got memory map with %d entries\n", NoEntries);
-
+#if 0
// Always contiguously map low 1Mb of memory
Status = MempSetupPaging(0, 0x100, FALSE);
if (!Status)
@@ -249,7 +249,7 @@
ERR("Error during MempSetupPaging of low 1Mb\n");
return FALSE;
}
-
+#endif
// Construct a good memory map from what we've got,
// but mark entries which the memory allocation bitmap takes
// as free entries (this is done in order to have the ability
@@ -412,4 +412,3 @@
return;
}
-