mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
Used the kernel base address from the loader structure instead MmSystemRangeStart.
MmSystemRangeStart isn't the base address with the 3GB switch. svn path=/trunk/; revision=16597
This commit is contained in:
@@ -38,7 +38,7 @@ HalInitSystem (ULONG BootPhase,
|
||||
if (BootPhase == 0)
|
||||
{
|
||||
RtlZeroMemory(&HalpHooks, sizeof(HALP_HOOKS));
|
||||
HalpInitPhase0();
|
||||
HalpInitPhase0(LoaderBlock);
|
||||
}
|
||||
else if (BootPhase == 1)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ VOID HalpInitDma (VOID);
|
||||
PVOID HalpMapPhysMemory(ULONG PhysAddr, ULONG Size);
|
||||
|
||||
/* Non-generic initialization */
|
||||
VOID HalpInitPhase0 (VOID);
|
||||
VOID HalpInitPhase0 (PLOADER_PARAMETER_BLOCK LoaderBlock);
|
||||
|
||||
/* DMA Page Register Structure
|
||||
080 DMA RESERVED
|
||||
|
||||
@@ -83,6 +83,8 @@ CHAR *APstart, *APend;
|
||||
WRITE_PORT_UCHAR((PUCHAR)0x71, value); \
|
||||
})
|
||||
|
||||
extern ULONG_PTR KernelBase;
|
||||
|
||||
/* FUNCTIONS *********************************************************************/
|
||||
|
||||
extern ULONG Read8254Timer(VOID);
|
||||
@@ -1035,7 +1037,7 @@ HaliStartApplicationProcessor(ULONG Cpu, ULONG Stack)
|
||||
/* Write the page directory page */
|
||||
Ke386GetPageTableDirectory(Common->PageDirectory);
|
||||
/* Write the kernel entry point */
|
||||
Common->NtProcessStartup = (ULONG_PTR)RtlImageNtHeader(MmSystemRangeStart)->OptionalHeader.AddressOfEntryPoint + (ULONG_PTR)MmSystemRangeStart;
|
||||
Common->NtProcessStartup = (ULONG_PTR)RtlImageNtHeader((PVOID)KernelBase)->OptionalHeader.AddressOfEntryPoint + KernelBase;
|
||||
/* Write the state of the mae mode */
|
||||
Common->PaeModeEnabled = Ke386GetCr4() & X86_CR4_PAE ? 1 : 0;
|
||||
|
||||
|
||||
@@ -18,10 +18,11 @@
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
|
||||
extern BOOLEAN HaliFindSmpConfig(VOID);
|
||||
ULONG_PTR KernelBase;
|
||||
|
||||
/***************************************************************************/
|
||||
VOID
|
||||
HalpInitPhase0(VOID)
|
||||
HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||
|
||||
{
|
||||
static BOOLEAN MPSInitialized = FALSE;
|
||||
@@ -29,7 +30,7 @@ HalpInitPhase0(VOID)
|
||||
|
||||
/* Only initialize MP system once. Once called the first time,
|
||||
each subsequent call is part of the initialization sequence
|
||||
for an application processor. */
|
||||
for an application processor. */
|
||||
|
||||
DPRINT("HalpInitPhase0()\n");
|
||||
|
||||
@@ -45,6 +46,10 @@ HalpInitPhase0(VOID)
|
||||
{
|
||||
KEBUGCHECK(0);
|
||||
}
|
||||
|
||||
/* store the kernel base for later use */
|
||||
KernelBase = ((PLOADER_MODULE)LoaderBlock->ModsAddr)[0].ModStart;
|
||||
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
|
||||
VOID
|
||||
HalpInitPhase0(VOID)
|
||||
HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||
{
|
||||
HalpInitPICs();
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/* FUNCTIONS ***************************************************************/
|
||||
|
||||
VOID
|
||||
HalpInitPhase0(VOID)
|
||||
HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||
{
|
||||
HalpHooks.InitPciBus = HalpXboxInitPciBus;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user