mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
- Rewrote (copied from ntdll) parts of the relocation and import fixup code.
- Don't load no-load sections at the end of the driver. - Don't relocate the relocation section itself. - Set the correct page protection for section which are executable. - Added a (dirty) fix for the fireport driver. - Fixed the detection of the noguiboot option. svn path=/trunk/; revision=11070
This commit is contained in:
parent
a2446b3408
commit
c8e0c372d9
3 changed files with 794 additions and 782 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: main.c,v 1.196 2004/09/23 18:00:29 royce Exp $
|
||||
/* $Id: main.c,v 1.197 2004/09/26 15:07:43 hbirr Exp $
|
||||
*
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: ntoskrnl/ke/main.c
|
||||
|
@ -338,27 +338,27 @@ ExpInitializeExecutive(VOID)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (!_strnicmp(p2, "NOGUIBOOT", 12))
|
||||
{
|
||||
p2 += 12;
|
||||
NoGuiBoot = TRUE;
|
||||
}
|
||||
else if (!_strnicmp(p2, "NOGUIBOOT", 9))
|
||||
{
|
||||
p2 += 12;
|
||||
NoGuiBoot = TRUE;
|
||||
}
|
||||
else if (!_strnicmp(p2, "CRASHDUMP", 9))
|
||||
{
|
||||
p2 += 9;
|
||||
if (*p2 == ':')
|
||||
{
|
||||
p2++;
|
||||
if (!_strnicmp(p2, "FULL", 4))
|
||||
{
|
||||
MmCoreDumpType = MM_CORE_DUMP_TYPE_FULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
MmCoreDumpType = MM_CORE_DUMP_TYPE_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
p2 += 9;
|
||||
if (*p2 == ':')
|
||||
{
|
||||
p2++;
|
||||
if (!_strnicmp(p2, "FULL", 4))
|
||||
{
|
||||
MmCoreDumpType = MM_CORE_DUMP_TYPE_FULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
MmCoreDumpType = MM_CORE_DUMP_TYPE_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
p1 = p2;
|
||||
}
|
||||
|
||||
|
@ -523,7 +523,6 @@ ExpInitializeExecutive(VOID)
|
|||
KdInit1();
|
||||
IoInit();
|
||||
PoInit();
|
||||
LdrInitModuleManagement();
|
||||
CmInitializeRegistry();
|
||||
NtInit();
|
||||
MmInit3();
|
||||
|
@ -977,13 +976,15 @@ _main (ULONG MultiBootMagic, PLOADER_PARAMETER_BLOCK _LoaderBlock)
|
|||
|
||||
HalBase = KeLoaderModules[1].ModStart;
|
||||
DriverBase = LastKernelAddress;
|
||||
LdrHalBase = (ULONG_PTR)DriverBase;
|
||||
|
||||
LdrInitModuleManagement();
|
||||
|
||||
/*
|
||||
* Process hal.dll
|
||||
*/
|
||||
LdrSafePEProcessModule((PVOID)HalBase, (PVOID)DriverBase, (PVOID)KERNEL_BASE, &DriverSize);
|
||||
|
||||
LdrHalBase = (ULONG_PTR)DriverBase;
|
||||
LastKernelAddress += PAGE_ROUND_UP(DriverSize);
|
||||
|
||||
/*
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
|||
/* $Id: mminit.c,v 1.68 2004/09/09 20:42:33 hbirr Exp $
|
||||
/* $Id: mminit.c,v 1.69 2004/09/26 15:07:44 hbirr Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -401,18 +401,7 @@ MmInit1(ULONG FirstKrnlPhysAddr,
|
|||
MmDeletePageTable(NULL, 0);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Create a trap for null pointer references and protect text
|
||||
* segment
|
||||
*/
|
||||
DPRINT("_text_start__ %x _init_end__ %x\n",(int)&_text_start__,(int)&_init_end__);
|
||||
for (i=PAGE_ROUND_DOWN(((int)&_text_start__));
|
||||
i<PAGE_ROUND_UP(((int)&_init_end__));i=i+PAGE_SIZE)
|
||||
{
|
||||
MmSetPageProtect(NULL,
|
||||
(PVOID)i,
|
||||
PAGE_EXECUTE_READ);
|
||||
}
|
||||
|
||||
|
||||
DPRINT("Invalidating between %x and %x\n",
|
||||
LastKernelAddress, 0xc0600000);
|
||||
|
|
Loading…
Reference in a new issue