Author: tkreuzer
Date: Fri Sep 30 21:13:49 2011
New Revision: 53908
URL: http://svn.reactos.org/svn/reactos?rev=53908&view=rev
Log:
[FREELDR]
Remove DTEs for ntbootdd.sys and freeldr.sys after they are not used any longer. freeldr one will even point to invalid stack data. It only works currently, because the LoadOrderListHead is reset later. More fixes are coming.
Modified:
trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c
Modified: trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/disk/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c [iso-8859-1] Fri Sep 30 21:13:49 2011
@@ -1659,12 +1659,6 @@
FunctionTable[i] = (ULONG)((ULONG_PTR)ExportTable[i].Function - (ULONG_PTR)&ImageDosHeader);
}
- /* Add freeldr.sys to list of loaded executables */
- Status = WinLdrAllocateDataTableEntry(&LoaderBlock, "scsiport.sys",
- "FREELDR.SYS", &ImageDosHeader, &FreeldrDTE);
- if (!Status)
- return EIO;
-
/* Create full ntbootdd.sys path */
MachDiskGetBootPath(NtBootDdPath, sizeof(NtBootDdPath));
strcat(NtBootDdPath, "\\NTBOOTDD.SYS");
@@ -1677,12 +1671,28 @@
return ESUCCESS;
}
- /* Fix imports */
+ /* Allocate a DTE for ntbootdd */
Status = WinLdrAllocateDataTableEntry(&LoaderBlock, "ntbootdd.sys",
"NTBOOTDD.SYS", ImageBase, &BootDdDTE);
if (!Status)
return EIO;
+
+ /* Add freeldr.sys to list of loaded executables, it repaces scsiport.sys */
+ Status = WinLdrAllocateDataTableEntry(&LoaderBlock, "scsiport.sys",
+ "FREELDR.SYS", &ImageDosHeader, &FreeldrDTE);
+ if (!Status)
+ {
+ RemoveEntryList(&BootDdDTE->InLoadOrderLinks);
+ return EIO;
+ }
+
+ /* Fix imports */
Status = WinLdrScanImportDescriptorTable(&LoaderBlock, "", BootDdDTE);
+
+ /* Now unlinkt the DTEs, they won't be valid later */
+ RemoveEntryList(&BootDdDTE->InLoadOrderLinks);
+ RemoveEntryList(&FreeldrDTE->InLoadOrderLinks);
+
if (!Status)
return EIO;
Author: tkreuzer
Date: Fri Sep 30 07:39:48 2011
New Revision: 53901
URL: http://svn.reactos.org/svn/reactos?rev=53901&view=rev
Log:
[NTOSKRNL]
- Remove 2 amd64 hacks, remove unused variables, silence some DPRINTs
Modified:
trunk/reactos/ntoskrnl/ke/amd64/kiinit.c
Modified: trunk/reactos/ntoskrnl/ke/amd64/kiinit.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/kiinit.c…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] Fri Sep 30 07:39:48 2011
@@ -24,9 +24,6 @@
/* Spinlocks used only on X86 */
KSPIN_LOCK KiFreezeExecutionLock;
-/* BIOS Memory Map. Not NTLDR-compliant yet */
-extern ULONG KeMemoryMapRangeCount;
-extern ADDRESS_RANGE KeMemoryMap[64];
KIPCR KiInitialPcr;
@@ -46,28 +43,28 @@
if (KeFeatureBits & KF_LARGE_PAGE)
{
/* FIXME: Support this */
- DPRINT1("Large Page support detected but not yet taken advantage of!\n");
+ DPRINT("Large Page support detected but not yet taken advantage of!\n");
}
/* Check for global page support */
if (KeFeatureBits & KF_GLOBAL_PAGE)
{
/* FIXME: Support this */
- DPRINT1("Global Page support detected but not yet taken advantage of!\n");
+ DPRINT("Global Page support detected but not yet taken advantage of!\n");
}
/* Check if we have MTRR */
if (KeFeatureBits & KF_MTRR)
{
/* FIXME: Support this */
- DPRINT1("MTRR support detected but not yet taken advantage of!\n");
+ DPRINT("MTRR support detected but not yet taken advantage of!\n");
}
/* Check for PAT and/or MTRR support */
if (KeFeatureBits & KF_PAT)
{
/* FIXME: Support this */
- DPRINT1("PAT support detected but not yet taken advantage of!\n");
+ DPRINT("PAT support detected but not yet taken advantage of!\n");
}
/* Allocate the IOPM save area. */
@@ -344,9 +341,6 @@
FrLdrDbgPrint = LoaderBlock->u.I386.CommonDataArea;
FrLdrDbgPrint("Hello from KiSystemStartup!!!\n");
- /* HACK, because freeldr maps page 0 */
- MiAddressToPte((PVOID)0)->u.Hard.Valid = 0;
-
/* Save the loader block */
KeLoaderBlock = LoaderBlock;
@@ -403,12 +397,6 @@
/* Check for break-in */
if (KdPollBreakIn()) DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
-
- /* Hack! Wait for the debugger! */
-#ifdef _WINKD_x
- while (!KdPollBreakIn());
- DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
-#endif
}
DPRINT1("Pcr = %p, Gdt = %p, Idt = %p, Tss = %p\n",