Sync with trunk (r48008)
[reactos.git] / drivers / bus / pcix / hookhal.c
1 /*
2 * PROJECT: ReactOS PCI Bus Driver
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: drivers/bus/pci/hookhal.c
5 * PURPOSE: HAL Bus Handler Dispatch Routine Support
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9 /* INCLUDES *******************************************************************/
10
11 #include <pci.h>
12 #define NDEBUG
13 #include <debug.h>
14
15 /* GLOBALS ********************************************************************/
16
17 pHalTranslateBusAddress PcipSavedTranslateBusAddress;
18 pHalAssignSlotResources PcipSavedAssignSlotResources;
19
20 /* FUNCTIONS ******************************************************************/
21
22 BOOLEAN
23 NTAPI
24 PciTranslateBusAddress(IN INTERFACE_TYPE InterfaceType,
25 IN ULONG BusNumber,
26 IN PHYSICAL_ADDRESS BusAddress,
27 OUT PULONG AddressSpace,
28 OUT PPHYSICAL_ADDRESS TranslatedAddress)
29 {
30 /* This function is not yet implemented */
31 UNIMPLEMENTED;
32 while (TRUE);
33 return FALSE;
34 }
35
36 NTSTATUS
37 NTAPI
38 PciAssignSlotResources(IN PUNICODE_STRING RegistryPath,
39 IN PUNICODE_STRING DriverClassName OPTIONAL,
40 IN PDRIVER_OBJECT DriverObject,
41 IN PDEVICE_OBJECT DeviceObject,
42 IN INTERFACE_TYPE BusType,
43 IN ULONG BusNumber,
44 IN ULONG SlotNumber,
45 IN OUT PCM_RESOURCE_LIST *AllocatedResources)
46 {
47 /* This function is not yet implemented */
48 UNIMPLEMENTED;
49 while (TRUE);
50 return STATUS_NOT_SUPPORTED;
51 }
52
53 VOID
54 NTAPI
55 PciHookHal(VOID)
56 {
57 /* Save the old HAL routines */
58 ASSERT(PcipSavedAssignSlotResources == NULL);
59 ASSERT(PcipSavedTranslateBusAddress == NULL);
60 PcipSavedAssignSlotResources = HalPciAssignSlotResources;
61 PcipSavedTranslateBusAddress = HalPciTranslateBusAddress;
62
63 /* Take over the HAL's Bus Handler functions */
64 HalPciAssignSlotResources = PciAssignSlotResources;
65 HalPciTranslateBusAddress = PciTranslateBusAddress;
66 }
67
68 /* EOF */