[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

svn path=/trunk/; revision=55421
This commit is contained in:
Timo Kreuzer 2012-02-04 21:53:09 +00:00
parent 98a73736a6
commit cb837e18a1
3 changed files with 8 additions and 8 deletions

View file

@ -236,7 +236,7 @@ WinLdrpMapApic()
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 @@ Amd64SetupGdt(PVOID GdtBase, ULONG64 TssBase)
/* 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 @@ Amd64SetupIdt(PVOID IdtBase)
/* Set the new IDT */
__lidt(&IdtDesc.Limit);
DbgPrint("Idtr.Base = %p\n", IdtDesc.Base);
TRACE("Idtr.Base = %p\n", IdtDesc.Base);
}

View file

@ -91,7 +91,8 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
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 */

View file

@ -200,7 +200,7 @@ WinLdrSetupMemoryLayout(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock)
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 @@ WinLdrSetupMemoryLayout(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock)
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 @@ WinLdrSetupMemoryLayout(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock)
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 @@ WinLdrInsertDescriptor(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
return;
}