ReactOS  0.4.13-dev-464-g6b95727
bus.c File Reference
#include <hal.h>
#include <debug.h>
Include dependency graph for bus.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

VOID NTAPI HalpRegisterKdSupportFunctions (VOID)
 
NTSTATUS NTAPI HalpAssignSlotResources (IN PUNICODE_STRING RegistryPath, IN PUNICODE_STRING DriverClassName, IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT DeviceObject, IN INTERFACE_TYPE BusType, IN ULONG BusNumber, IN ULONG SlotNumber, IN OUT PCM_RESOURCE_LIST *AllocatedResources)
 
BOOLEAN NTAPI HalpTranslateBusAddress (IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
 
ULONG NTAPI HalpGetSystemInterruptVector (IN ULONG BusNumber, IN ULONG BusInterruptLevel, IN ULONG BusInterruptVector, OUT PKIRQL Irql, OUT PKAFFINITY Affinity)
 
BOOLEAN NTAPI HalpFindBusAddressTranslation (IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress, IN OUT PULONG_PTR Context, IN BOOLEAN NextBus)
 
VOID NTAPI HalpInitNonBusHandler (VOID)
 
NTSTATUS NTAPI HalAdjustResourceList (IN PCM_RESOURCE_LIST Resources)
 
NTSTATUS NTAPI HalAssignSlotResources (IN PUNICODE_STRING RegistryPath, IN PUNICODE_STRING DriverClassName, IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT DeviceObject, IN INTERFACE_TYPE BusType, IN ULONG BusNumber, IN ULONG SlotNumber, IN OUT PCM_RESOURCE_LIST *AllocatedResources)
 
ULONG NTAPI HalGetBusData (IN BUS_DATA_TYPE BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Length)
 
ULONG NTAPI HalGetBusDataByOffset (IN BUS_DATA_TYPE BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
 
ULONG NTAPI HalGetInterruptVector (IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN ULONG BusInterruptLevel, IN ULONG BusInterruptVector, OUT PKIRQL Irql, OUT PKAFFINITY Affinity)
 
ULONG NTAPI HalSetBusData (IN BUS_DATA_TYPE BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Length)
 
ULONG NTAPI HalSetBusDataByOffset (IN BUS_DATA_TYPE BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
 
BOOLEAN NTAPI HalTranslateBusAddress (IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
 

Variables

ULONG HalpBusType
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file bus.c.

Function Documentation

◆ HalAdjustResourceList()

NTSTATUS NTAPI HalAdjustResourceList ( IN PCM_RESOURCE_LIST  Resources)

Definition at line 135 of file bus.c.

136 {
137  /* Deprecated, return success */
138  return STATUS_SUCCESS;
139 }
return STATUS_SUCCESS
Definition: btrfs.c:2777

◆ HalAssignSlotResources()

NTSTATUS NTAPI HalAssignSlotResources ( IN PUNICODE_STRING  RegistryPath,
IN PUNICODE_STRING  DriverClassName,
IN PDRIVER_OBJECT  DriverObject,
IN PDEVICE_OBJECT  DeviceObject,
IN INTERFACE_TYPE  BusType,
IN ULONG  BusNumber,
IN ULONG  SlotNumber,
IN OUT PCM_RESOURCE_LIST AllocatedResources 
)

Definition at line 146 of file bus.c.

154 {
155  /* Check the bus type */
156  if (BusType != PCIBus)
157  {
158  /* Call our internal handler */
161  DriverObject,
162  DeviceObject,
163  BusType,
164  BusNumber,
165  SlotNumber,
167  }
168  else
169  {
170  /* Call the PCI registered function */
173  DriverObject,
174  DeviceObject,
175  PCIBus,
176  BusNumber,
177  SlotNumber,
179  }
180 }
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PCM_RESOURCE_LIST * AllocatedResources
Definition: ndis.h:4640
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE BusType
Definition: halfuncs.h:156
NTSTATUS NTAPI HalpAssignSlotResources(IN PUNICODE_STRING RegistryPath, IN PUNICODE_STRING DriverClassName, IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT DeviceObject, IN INTERFACE_TYPE BusType, IN ULONG BusNumber, IN ULONG SlotNumber, IN OUT PCM_RESOURCE_LIST *AllocatedResources)
Definition: bus.c:39
_In_opt_ PUNICODE_STRING DriverClassName
Definition: halfuncs.h:156
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: halfuncs.h:156
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG SlotNumber
Definition: halfuncs.h:156
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
#define HalPciAssignSlotResources
Definition: halfuncs.h:42
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27

◆ HalGetBusData()

ULONG NTAPI HalGetBusData ( IN BUS_DATA_TYPE  BusDataType,
IN ULONG  BusNumber,
IN ULONG  SlotNumber,
IN PVOID  Buffer,
IN ULONG  Length 
)

Definition at line 187 of file bus.c.

192 {
193  /* Call the extended function */
194  return HalGetBusDataByOffset(BusDataType,
195  BusNumber,
196  SlotNumber,
197  Buffer,
198  0,
199  Length);
200 }
Definition: bufpool.h:45
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: halfuncs.h:156
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG SlotNumber
Definition: halfuncs.h:156
ULONG NTAPI HalGetBusDataByOffset(IN BUS_DATA_TYPE BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: bus.c:73

◆ HalGetBusDataByOffset()

ULONG NTAPI HalGetBusDataByOffset ( IN BUS_DATA_TYPE  BusDataType,
IN ULONG  BusNumber,
IN ULONG  SlotNumber,
IN PVOID  Buffer,
IN ULONG  Offset,
IN ULONG  Length 
)

Definition at line 207 of file bus.c.

213 {
214  BUS_HANDLER BusHandler;
215 
216  /* Look as the bus type */
217  if (BusDataType == Cmos)
218  {
219  /* Call CMOS Function */
221  }
222  else if (BusDataType == EisaConfiguration)
223  {
224  /* FIXME: TODO */
225  ASSERT(FALSE);
226  }
227  else if ((BusDataType == PCIConfiguration) &&
230  {
231  /* Setup fake PCI Bus handler */
232  RtlCopyMemory(&BusHandler, &HalpFakePciBusHandler, sizeof(BUS_HANDLER));
233  BusHandler.BusNumber = BusNumber;
234 
235  /* Call PCI function */
236  return HalpGetPCIData(&BusHandler,
237  &BusHandler,
239  Buffer,
240  Offset,
241  Length);
242  }
243 
244  /* Invalid bus */
245  return 0;
246 }
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
BOOLEAN HalpPCIConfigInitialized
Definition: pci.c:17
ULONG HalpMinPciBus
Definition: pci.c:18
ULONG NTAPI HalpGetCmosData(IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Length)
Definition: cmos.c:47
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
Definition: bufpool.h:45
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: halfuncs.h:156
ULONG BusNumber
Definition: haltypes.h:226
Definition: miniport.h:89
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG SlotNumber
Definition: halfuncs.h:156
ULONG HalpMaxPciBus
Definition: pci.c:18
ULONG NTAPI HalpGetPCIData(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN PCI_SLOT_NUMBER Slot, IN PUCHAR Buffer, IN ULONG Offset, IN ULONG Length)
Definition: pci.c:338
BUS_HANDLER HalpFakePciBusHandler
Definition: pci.c:91

◆ HalGetInterruptVector()

ULONG NTAPI HalGetInterruptVector ( IN INTERFACE_TYPE  InterfaceType,
IN ULONG  BusNumber,
IN ULONG  BusInterruptLevel,
IN ULONG  BusInterruptVector,
OUT PKIRQL  Irql,
OUT PKAFFINITY  Affinity 
)

Definition at line 253 of file bus.c.

259 {
260  /* Call the system bus translator */
264  Irql,
265  Affinity);
266 }
_In_ ULONG _In_ ULONG BusInterruptLevel
Definition: halfuncs.h:170
_In_ ULONG _In_ ULONG _In_ ULONG BusInterruptVector
Definition: halfuncs.h:170
_Out_ PKIRQL Irql
Definition: csq.h:179
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: halfuncs.h:156
_In_ ULONG _In_ ULONG _In_ ULONG _Out_ PKIRQL _Out_ PKAFFINITY Affinity
Definition: halfuncs.h:170
ULONG NTAPI HalpGetSystemInterruptVector(IN ULONG BusNumber, IN ULONG BusInterruptLevel, IN ULONG BusInterruptVector, OUT PKIRQL Irql, OUT PKAFFINITY Affinity)
Definition: bus.c:84

◆ HalpAssignSlotResources()

NTSTATUS NTAPI HalpAssignSlotResources ( IN PUNICODE_STRING  RegistryPath,
IN PUNICODE_STRING  DriverClassName,
IN PDRIVER_OBJECT  DriverObject,
IN PDEVICE_OBJECT  DeviceObject,
IN INTERFACE_TYPE  BusType,
IN ULONG  BusNumber,
IN ULONG  SlotNumber,
IN OUT PCM_RESOURCE_LIST AllocatedResources 
)

Definition at line 39 of file bus.c.

47 {
48  BUS_HANDLER BusHandler;
49  PAGED_CODE();
50 
51  /* Only PCI is supported */
52  if (BusType != PCIBus) return STATUS_NOT_IMPLEMENTED;
53 
54  /* Setup fake PCI Bus handler */
55  RtlCopyMemory(&BusHandler, &HalpFakePciBusHandler, sizeof(BUS_HANDLER));
56  BusHandler.BusNumber = BusNumber;
57 
58  /* Call the PCI function */
59  return HalpAssignPCISlotResources(&BusHandler,
60  &BusHandler,
65  SlotNumber,
67 }
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PCM_RESOURCE_LIST * AllocatedResources
Definition: ndis.h:4640
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE BusType
Definition: halfuncs.h:156
#define PAGED_CODE()
Definition: video.h:57
_In_opt_ PUNICODE_STRING DriverClassName
Definition: halfuncs.h:156
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: halfuncs.h:156
ULONG BusNumber
Definition: haltypes.h:226
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG SlotNumber
Definition: halfuncs.h:156
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
NTSTATUS NTAPI HalpAssignPCISlotResources(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN PUNICODE_STRING RegistryPath, IN PUNICODE_STRING DriverClassName OPTIONAL, IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT DeviceObject OPTIONAL, IN ULONG Slot, IN OUT PCM_RESOURCE_LIST *pAllocatedResources)
Definition: pci.c:490
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
BUS_HANDLER HalpFakePciBusHandler
Definition: pci.c:91

Referenced by HalAssignSlotResources(), HalpInitBusHandler(), and HalpInitNonBusHandler().

◆ HalpFindBusAddressTranslation()

BOOLEAN NTAPI HalpFindBusAddressTranslation ( IN PHYSICAL_ADDRESS  BusAddress,
IN OUT PULONG  AddressSpace,
OUT PPHYSICAL_ADDRESS  TranslatedAddress,
IN OUT PULONG_PTR  Context,
IN BOOLEAN  NextBus 
)

Definition at line 98 of file bus.c.

103 {
104  /* Make sure we have a context */
105  if (!Context) return FALSE;
106 
107  /* If we have data in the context, then this shouldn't be a new lookup */
108  if ((*Context != 0) && (NextBus != FALSE)) return FALSE;
109 
110  /* Return bus data */
112 
113  /* Set context value and return success */
114  *Context = 1;
115  return TRUE;
116 }
#define TRUE
Definition: types.h:120
_In_ ULONG _In_ PHYSICAL_ADDRESS BusAddress
Definition: iofuncs.h:2268
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
Definition: iofuncs.h:2268
LONGLONG QuadPart
Definition: typedefs.h:112

Referenced by HalpInitNonBusHandler().

◆ HalpGetSystemInterruptVector()

ULONG NTAPI HalpGetSystemInterruptVector ( IN ULONG  BusNumber,
IN ULONG  BusInterruptLevel,
IN ULONG  BusInterruptVector,
OUT PKIRQL  Irql,
OUT PKAFFINITY  Affinity 
)

Definition at line 84 of file bus.c.

89 {
92  *Affinity = 0xFFFFFFFF;
93  return Vector;
94 }
_In_ ULONG _In_ ULONG BusInterruptLevel
Definition: halfuncs.h:170
_Out_ PKIRQL Irql
Definition: csq.h:179
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define VECTOR2IRQL(vector)
Definition: halirq.h:26
_In_ ULONG _In_ ULONG _In_ ULONG _Out_ PKIRQL _Out_ PKAFFINITY Affinity
Definition: halfuncs.h:170
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG Vector
Definition: iofuncs.h:798
unsigned int ULONG
Definition: retypes.h:1
#define IRQ2VECTOR(irq)
Definition: halirq.h:27

Referenced by HalGetInterruptVector(), and HalpRegisterInternalBusHandlers().

◆ HalpInitNonBusHandler()

VOID NTAPI HalpInitNonBusHandler ( VOID  )

Definition at line 120 of file bus.c.

121 {
122  /* These should be written by the PCI driver later, but we give defaults */
126 }
#define HalPciTranslateBusAddress
Definition: halfuncs.h:41
BOOLEAN NTAPI HalpFindBusAddressTranslation(IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress, IN OUT PULONG_PTR Context, IN BOOLEAN NextBus)
Definition: bus.c:98
NTSTATUS NTAPI HalpAssignSlotResources(IN PUNICODE_STRING RegistryPath, IN PUNICODE_STRING DriverClassName, IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT DeviceObject, IN INTERFACE_TYPE BusType, IN ULONG BusNumber, IN ULONG SlotNumber, IN OUT PCM_RESOURCE_LIST *AllocatedResources)
Definition: bus.c:39
BOOLEAN NTAPI HalpTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
Definition: bus.c:71
#define HalFindBusAddressTranslation
Definition: halfuncs.h:44
#define HalPciAssignSlotResources
Definition: halfuncs.h:42

Referenced by HalInitSystem().

◆ HalpRegisterKdSupportFunctions()

VOID NTAPI HalpRegisterKdSupportFunctions ( VOID  )

Definition at line 23 of file bus.c.

24 {
25  /* Register PCI Device Functions */
28 
29  /* Register memory functions */
32 
33  /* Register ACPI stub */
35 }
VOID NTAPI HalpCheckPowerButton(VOID)
Definition: misc.c:20
#define KdUnmapVirtualAddress
Definition: halfuncs.h:53
NTSTATUS NTAPI HalpSetupPciDeviceForDebugging(IN PVOID LoaderBlock, IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
Definition: pci.c:473
PVOID NTAPI HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress, IN ULONG NumberPage)
Definition: misc.c:28
#define KdMapPhysicalMemory64
Definition: halfuncs.h:52
VOID NTAPI HalpUnmapVirtualAddress(IN PVOID VirtualAddress, IN ULONG NumberPages)
Definition: misc.c:39
#define KdSetupPciDeviceForDebugging
Definition: halfuncs.h:47
NTSTATUS NTAPI HalpReleasePciDeviceForDebugging(IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
Definition: pci.c:482
#define KdCheckPowerButton
Definition: halfuncs.h:50
#define KdReleasePciDeviceforDebugging
Definition: halfuncs.h:48

Referenced by HalInitializeProcessor().

◆ HalpTranslateBusAddress()

BOOLEAN NTAPI HalpTranslateBusAddress ( IN INTERFACE_TYPE  InterfaceType,
IN ULONG  BusNumber,
IN PHYSICAL_ADDRESS  BusAddress,
IN OUT PULONG  AddressSpace,
OUT PPHYSICAL_ADDRESS  TranslatedAddress 
)

Definition at line 71 of file bus.c.

76 {
77  /* Translation is easy */
79  return TRUE;
80 }
#define TRUE
Definition: types.h:120
_In_ ULONG _In_ PHYSICAL_ADDRESS BusAddress
Definition: iofuncs.h:2268
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
Definition: iofuncs.h:2268
LONGLONG QuadPart
Definition: typedefs.h:112

Referenced by HalpInitNonBusHandler().

◆ HalSetBusData()

ULONG NTAPI HalSetBusData ( IN BUS_DATA_TYPE  BusDataType,
IN ULONG  BusNumber,
IN ULONG  SlotNumber,
IN PVOID  Buffer,
IN ULONG  Length 
)

Definition at line 273 of file bus.c.

278 {
279  /* Call the extended function */
280  return HalSetBusDataByOffset(BusDataType,
281  BusNumber,
282  SlotNumber,
283  Buffer,
284  0,
285  Length);
286 }
Definition: bufpool.h:45
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: halfuncs.h:156
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG SlotNumber
Definition: halfuncs.h:156
ULONG NTAPI HalSetBusDataByOffset(IN BUS_DATA_TYPE BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: bus.c:123

◆ HalSetBusDataByOffset()

ULONG NTAPI HalSetBusDataByOffset ( IN BUS_DATA_TYPE  BusDataType,
IN ULONG  BusNumber,
IN ULONG  SlotNumber,
IN PVOID  Buffer,
IN ULONG  Offset,
IN ULONG  Length 
)

Definition at line 293 of file bus.c.

299 {
300  BUS_HANDLER BusHandler;
301 
302  /* Look as the bus type */
303  if (BusDataType == Cmos)
304  {
305  /* Call CMOS Function */
307  }
308  else if ((BusDataType == PCIConfiguration) && (HalpPCIConfigInitialized))
309  {
310  /* Setup fake PCI Bus handler */
311  RtlCopyMemory(&BusHandler, &HalpFakePciBusHandler, sizeof(BUS_HANDLER));
312  BusHandler.BusNumber = BusNumber;
313 
314  /* Call PCI function */
315  return HalpSetPCIData(&BusHandler,
316  &BusHandler,
318  Buffer,
319  Offset,
320  Length);
321  }
322 
323  /* Invalid bus */
324  return 0;
325 }
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
BOOLEAN HalpPCIConfigInitialized
Definition: pci.c:17
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
Definition: bufpool.h:45
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: halfuncs.h:156
ULONG BusNumber
Definition: haltypes.h:226
Definition: miniport.h:89
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG SlotNumber
Definition: halfuncs.h:156
ULONG NTAPI HalpSetPCIData(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN PCI_SLOT_NUMBER Slot, IN PUCHAR Buffer, IN ULONG Offset, IN ULONG Length)
Definition: pci.c:409
BUS_HANDLER HalpFakePciBusHandler
Definition: pci.c:91
ULONG NTAPI HalpSetCmosData(IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Length)
Definition: cmos.c:99

◆ HalTranslateBusAddress()

BOOLEAN NTAPI HalTranslateBusAddress ( IN INTERFACE_TYPE  InterfaceType,
IN ULONG  BusNumber,
IN PHYSICAL_ADDRESS  BusAddress,
IN OUT PULONG  AddressSpace,
OUT PPHYSICAL_ADDRESS  TranslatedAddress 
)

Definition at line 332 of file bus.c.

337 {
338  /* Look as the bus type */
339  if (InterfaceType == PCIBus)
340  {
341  /* Call the PCI registered function */
343  BusNumber,
344  BusAddress,
345  AddressSpace,
347  }
348  else
349  {
350  /* Translation is easy */
352  return TRUE;
353  }
354 }
#define HalPciTranslateBusAddress
Definition: halfuncs.h:41
#define TRUE
Definition: types.h:120
_In_ ULONG _In_ PHYSICAL_ADDRESS BusAddress
Definition: iofuncs.h:2268
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG AddressSpace
Definition: iofuncs.h:2268
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
Definition: iofuncs.h:2268
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: halfuncs.h:156
LONGLONG QuadPart
Definition: typedefs.h:112

Variable Documentation

◆ HalpBusType