diff --git a/reactos/hal/halx86/generic/halinit.c b/reactos/hal/halx86/generic/halinit.c index e4e1d978eed..40c3fe29b3b 100644 --- a/reactos/hal/halx86/generic/halinit.c +++ b/reactos/hal/halx86/generic/halinit.c @@ -14,7 +14,6 @@ /* GLOBALS *******************************************************************/ -PVOID HalpZeroPageMapping = NULL; HALP_HOOKS HalpHooks; BOOLEAN HalpPciLockSettings; @@ -50,7 +49,6 @@ NTAPI HalInitSystem(IN ULONG BootPhase, IN PLOADER_PARAMETER_BLOCK LoaderBlock) { - PHYSICAL_ADDRESS Null = {{0}}; PKPRCB Prcb = KeGetCurrentPrcb(); /* Check the boot phase */ @@ -118,10 +116,6 @@ HalInitSystem(IN ULONG BootPhase, /* Initialize DMA. NT does this in Phase 0 */ HalpInitDma(); } - else if (BootPhase == 2) - { - HalpZeroPageMapping = MmMapIoSpace(Null, PAGE_SIZE, MmNonCached); - } /* All done, return */ return TRUE; diff --git a/reactos/hal/halx86/generic/reboot.c b/reactos/hal/halx86/generic/reboot.c index dbfef6873e4..69e90151ed5 100644 --- a/reactos/hal/halx86/generic/reboot.c +++ b/reactos/hal/halx86/generic/reboot.c @@ -28,10 +28,12 @@ NTAPI HalpReboot(VOID) { UCHAR Data; - extern PVOID HalpZeroPageMapping; + PVOID HalpZeroPageMapping; + PHYSICAL_ADDRESS Null = {{0}}; /* Enable warm reboot */ - ((PUSHORT)HalpZeroPageMapping)[0x472] = 0x1234; + HalpZeroPageMapping = MmMapIoSpace(Null, PAGE_SIZE, MmNonCached); + ((PUSHORT)HalpZeroPageMapping)[0x239] = 0x1234; /* FIXME: Lock CMOS Access */ diff --git a/reactos/ntoskrnl/ex/init.c b/reactos/ntoskrnl/ex/init.c index b3fb23d0c96..df31d1c5d95 100644 --- a/reactos/ntoskrnl/ex/init.c +++ b/reactos/ntoskrnl/ex/init.c @@ -840,7 +840,6 @@ ExPhase2Init(PVOID Context) if (!NoGuiBoot) InbvDisplayBootLogo(); /* Clear the screen to blue and display the boot notice and debug status */ - HalInitSystem(2, KeLoaderBlock); if (NoGuiBoot) ExpDisplayNotice(); KdInitSystem(2, KeLoaderBlock);