Merge 16597 (hbirr) from trunk:
Used the kernel base address from the loader structure instead
MmSystemRangeStart.
MmSystemRangeStart isn't the base address with the 3GB switch.
Modified: branches/ros-branch-0_2_7/reactos/hal/halx86/generic/halinit.c
Modified: branches/ros-branch-0_2_7/reactos/hal/halx86/include/halp.h
Modified: branches/ros-branch-0_2_7/reactos/hal/halx86/mp/apic.c
Modified: branches/ros-branch-0_2_7/reactos/hal/halx86/mp/halinit_mp.c
Modified: branches/ros-branch-0_2_7/reactos/hal/halx86/up/halinit_up.c
Modified:
branches/ros-branch-0_2_7/reactos/hal/halx86/xbox/halinit_xbox.c
_____
Modified: branches/ros-branch-0_2_7/reactos/hal/halx86/generic/halinit.c
--- branches/ros-branch-0_2_7/reactos/hal/halx86/generic/halinit.c
2005-08-03 17:05:36 UTC (rev 17009)
+++ branches/ros-branch-0_2_7/reactos/hal/halx86/generic/halinit.c
2005-08-03 17:07:01 UTC (rev 17010)
@@ -38,7 +38,7 @@
if (BootPhase == 0)
{
RtlZeroMemory(&HalpHooks, sizeof(HALP_HOOKS));
- HalpInitPhase0();
+ HalpInitPhase0(LoaderBlock);
}
else if (BootPhase == 1)
{
_____
Modified: branches/ros-branch-0_2_7/reactos/hal/halx86/include/halp.h
--- branches/ros-branch-0_2_7/reactos/hal/halx86/include/halp.h
2005-08-03 17:05:36 UTC (rev 17009)
+++ branches/ros-branch-0_2_7/reactos/hal/halx86/include/halp.h
2005-08-03 17:07:01 UTC (rev 17010)
@@ -38,7 +38,7 @@
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
_____
Modified: branches/ros-branch-0_2_7/reactos/hal/halx86/mp/apic.c
--- branches/ros-branch-0_2_7/reactos/hal/halx86/mp/apic.c
2005-08-03 17:05:36 UTC (rev 17009)
+++ branches/ros-branch-0_2_7/reactos/hal/halx86/mp/apic.c
2005-08-03 17:07:01 UTC (rev 17010)
@@ -83,6 +83,8 @@
WRITE_PORT_UCHAR((PUCHAR)0x71, value); \
})
+extern ULONG_PTR KernelBase;
+
/* FUNCTIONS
*********************************************************************/
extern ULONG Read8254Timer(VOID);
@@ -1035,7 +1037,7 @@
/* Write the page directory page */
Ke386GetPageTableDirectory(Common->PageDirectory);
/* Write the kernel entry point */
- Common->NtProcessStartup =
(ULONG_PTR)RtlImageNtHeader(MmSystemRangeStart)->OptionalHeader.AddressO
fEntryPoint + (ULONG_PTR)MmSystemRangeStart;
+ Common->NtProcessStartup =
(ULONG_PTR)RtlImageNtHeader((PVOID)KernelBase)->OptionalHeader.AddressOf
EntryPoint + KernelBase;
/* Write the state of the mae mode */
Common->PaeModeEnabled = Ke386GetCr4() & X86_CR4_PAE ? 1 : 0;
_____
Modified: branches/ros-branch-0_2_7/reactos/hal/halx86/mp/halinit_mp.c
--- branches/ros-branch-0_2_7/reactos/hal/halx86/mp/halinit_mp.c
2005-08-03 17:05:36 UTC (rev 17009)
+++ branches/ros-branch-0_2_7/reactos/hal/halx86/mp/halinit_mp.c
2005-08-03 17:07:01 UTC (rev 17010)
@@ -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 @@
/* 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 @@
{
KEBUGCHECK(0);
}
+
+ /* store the kernel base for later use */
+ KernelBase = ((PLOADER_MODULE)LoaderBlock->ModsAddr)[0].ModStart;
+
}
/* EOF */
_____
Modified: branches/ros-branch-0_2_7/reactos/hal/halx86/up/halinit_up.c
--- branches/ros-branch-0_2_7/reactos/hal/halx86/up/halinit_up.c
2005-08-03 17:05:36 UTC (rev 17009)
+++ branches/ros-branch-0_2_7/reactos/hal/halx86/up/halinit_up.c
2005-08-03 17:07:01 UTC (rev 17010)
@@ -18,7 +18,7 @@
/* FUNCTIONS
***************************************************************/
VOID
-HalpInitPhase0(VOID)
+HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock)
{
HalpInitPICs();
_____
Modified:
branches/ros-branch-0_2_7/reactos/hal/halx86/xbox/halinit_xbox.c
--- branches/ros-branch-0_2_7/reactos/hal/halx86/xbox/halinit_xbox.c
2005-08-03 17:05:36 UTC (rev 17009)
+++ branches/ros-branch-0_2_7/reactos/hal/halx86/xbox/halinit_xbox.c
2005-08-03 17:07:01 UTC (rev 17010)
@@ -22,7 +22,7 @@
/* FUNCTIONS
***************************************************************/
VOID
-HalpInitPhase0(VOID)
+HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock)
{
HalpHooks.InitPciBus = HalpXboxInitPciBus;
Show replies by date