Author: hbelusca
Date: Wed Feb  3 16:30:39 2016
New Revision: 70684

URL: http://svn.reactos.org/svn/reactos?rev=70684&view=rev
Log:
[FREELDR]: Move the (private) HAL Pci bus initialization calls to where they 
are needed: for SCSI initialization (see r46017).

Removed:
    trunk/reactos/boot/freeldr/freeldr/include/hal.h
Modified:
    trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c
    trunk/reactos/boot/freeldr/freeldr/freeldr.c
    trunk/reactos/boot/freeldr/freeldr/include/freeldr.h

Modified: trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c?rev=70684&r1=70683&r2=70684&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c  [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c  [iso-8859-1] Wed Feb  3 
16:30:39 2016
@@ -48,6 +48,11 @@
 
 DBG_DEFAULT_CHANNEL(SCSIPORT);
 
+#ifdef _M_IX86
+VOID NTAPI HalpInitializePciStubs(VOID);
+VOID NTAPI HalpInitBusHandler(VOID);
+#endif
+
 typedef struct
 {
     PVOID NonCachedExtension;
@@ -93,6 +98,7 @@
     return Dest.AsULong;
 }
 
+static
 BOOLEAN
 SpiSendSynchronousSrb(
     IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
@@ -366,6 +372,7 @@
     DiskSeek,
 };
 
+static
 NTSTATUS
 SpiCreatePortConfig(
     IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
@@ -608,6 +615,7 @@
     return NULL;
 }
 
+static
 NTSTATUS
 SpiAllocateCommonBuffer(
     IN OUT PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
@@ -767,6 +775,7 @@
     return NULL;
 }
 
+static
 VOID
 SpiScanDevice(
     IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
@@ -807,6 +816,7 @@
     }
 }
 
+static
 VOID
 SpiScanAdapter(
     IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
@@ -881,6 +891,7 @@
     }
 }
 
+static
 VOID
 SpiResourceToConfig(
     IN PHW_INITIALIZATION_DATA HwInitializationData,
@@ -961,9 +972,10 @@
     }
 }
 
+static
 BOOLEAN
 SpiGetPciConfigData(
-    IN struct _HW_INITIALIZATION_DATA *HwInitializationData,
+    IN PHW_INITIALIZATION_DATA HwInitializationData,
     IN OUT PPORT_CONFIGURATION_INFORMATION PortConfig,
     IN ULONG BusNumber,
     IN OUT PPCI_SLOT_NUMBER NextSlotNumber)
@@ -1065,7 +1077,7 @@
 ScsiPortInitialize(
     IN PVOID Argument1,
     IN PVOID Argument2,
-    IN struct _HW_INITIALIZATION_DATA *HwInitializationData,
+    IN PHW_INITIALIZATION_DATA HwInitializationData,
     IN PVOID HwContext OPTIONAL)
 {
     PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
@@ -1575,6 +1587,12 @@
     PVOID ImageBase = NULL;
     ULONG (NTAPI *EntryPoint)(IN PVOID DriverObject, IN PVOID RegistryPath);
     BOOLEAN Success;
+
+    // FIXME: Must be done *INSIDE* the HAL!
+#ifdef _M_IX86
+    HalpInitializePciStubs();
+    HalpInitBusHandler();
+#endif
 
     /* Initialize the loaded module list */
     InitializeListHead(&ModuleListHead);

Modified: trunk/reactos/boot/freeldr/freeldr/freeldr.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freeldr.c?rev=70684&r1=70683&r2=70684&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/freeldr.c        [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr.c        [iso-8859-1] Wed Feb  3 
16:30:39 2016
@@ -53,11 +53,6 @@
         goto Quit;
     }
 
-#ifdef _M_IX86
-    HalpInitializePciStubs();
-    HalpInitBusHandler();
-#endif
-
     RunLoader();
 
 Quit:

Modified: trunk/reactos/boot/freeldr/freeldr/include/freeldr.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/include/freeldr.h?rev=70684&r1=70683&r2=70684&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/freeldr.h        [iso-8859-1] 
(original)
+++ trunk/reactos/boot/freeldr/freeldr/include/freeldr.h        [iso-8859-1] 
Wed Feb  3 16:30:39 2016
@@ -63,7 +63,6 @@
 #include <comm.h>
 #include <disk.h>
 #include <fs.h>
-#include <hal.h>
 #include <inffile.h>
 #include <inifile.h>
 #include <keycodes.h>

Removed: trunk/reactos/boot/freeldr/freeldr/include/hal.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/include/hal.h?rev=70683
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/hal.h    [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/hal.h    (removed)
@@ -1,9 +0,0 @@
-
-#pragma once
-
-#ifdef _M_IX86
-
-VOID NTAPI HalpInitializePciStubs(VOID);
-VOID NTAPI HalpInitBusHandler(VOID);
-
-#endif


Reply via email to