ReactOS  0.4.15-dev-3303-g1ade494
bus.h
Go to the documentation of this file.
1 #pragma once
2 
3 #define PCI_ADDRESS_MEMORY_SPACE 0x00000000
4 
5 //
6 // Helper Macros
7 //
8 #define PASTE2(x,y) x ## y
9 #define POINTER_TO_(x) PASTE2(P,x)
10 #define READ_FROM(x) PASTE2(READ_PORT_, x)
11 #define WRITE_TO(x) PASTE2(WRITE_PORT_, x)
12 
13 //
14 // Declares a PCI Register Read/Write Routine
15 //
16 #define TYPE_DEFINE(x, y) \
17  ULONG \
18  NTAPI \
19  x( \
20  IN PPCIPBUSDATA BusData, \
21  IN y PciCfg, \
22  IN PUCHAR Buffer, \
23  IN ULONG Offset \
24  )
25 #define TYPE1_DEFINE(x) TYPE_DEFINE(x, PPCI_TYPE1_CFG_BITS);
26 #define TYPE2_DEFINE(x) TYPE_DEFINE(x, PPCI_TYPE2_ADDRESS_BITS);
27 
28 //
29 // Defines a PCI Register Read/Write Type 1 Routine Prologue and Epilogue
30 //
31 #define TYPE1_START(x, y) \
32  TYPE_DEFINE(x, PPCI_TYPE1_CFG_BITS) \
33 { \
34  ULONG i = Offset % sizeof(ULONG); \
35  PciCfg->u.bits.RegisterNumber = Offset / sizeof(ULONG); \
36  WRITE_PORT_ULONG(BusData->Config.Type1.Address, PciCfg->u.AsULONG);
37 #define TYPE1_END(y) \
38  return sizeof(y); }
39 #define TYPE2_END TYPE1_END
40 
41 //
42 // PCI Register Read Type 1 Routine
43 //
44 #define TYPE1_READ(x, y) \
45  TYPE1_START(x, y) \
46  *((POINTER_TO_(y))Buffer) = \
47  READ_FROM(y)((POINTER_TO_(y))(ULONG_PTR)(BusData->Config.Type1.Data + i)); \
48  TYPE1_END(y)
49 
50 //
51 // PCI Register Write Type 1 Routine
52 //
53 #define TYPE1_WRITE(x, y) \
54  TYPE1_START(x, y) \
55  WRITE_TO(y)((POINTER_TO_(y))(ULONG_PTR)(BusData->Config.Type1.Data + i), \
56  *((POINTER_TO_(y))Buffer)); \
57  TYPE1_END(y)
58 
59 //
60 // Defines a PCI Register Read/Write Type 2 Routine Prologue and Epilogue
61 //
62 #define TYPE2_START(x, y) \
63  TYPE_DEFINE(x, PPCI_TYPE2_ADDRESS_BITS) \
64 { \
65  PciCfg->u.bits.RegisterNumber = (USHORT)Offset;
66 
67 //
68 // PCI Register Read Type 2 Routine
69 //
70 #define TYPE2_READ(x, y) \
71  TYPE2_START(x, y) \
72  *((POINTER_TO_(y))Buffer) = \
73  READ_FROM(y)((POINTER_TO_(y))(ULONG_PTR)PciCfg->u.AsUSHORT); \
74  TYPE2_END(y)
75 
76 //
77 // PCI Register Write Type 2 Routine
78 //
79 #define TYPE2_WRITE(x, y) \
80  TYPE2_START(x, y) \
81  WRITE_TO(y)((POINTER_TO_(y))(ULONG_PTR)PciCfg->u.AsUSHORT, \
82  *((POINTER_TO_(y))Buffer)); \
83  TYPE2_END(y)
84 
85 typedef NTSTATUS
87  IN PBUS_HANDLER BusHandler,
88  IN PBUS_HANDLER RootHandler,
89  IN PCI_SLOT_NUMBER PciSlot,
91 );
92 
93 typedef struct _PCIPBUSDATA
94 {
96  union
97  {
98  struct
99  {
102  } Type1;
103  struct
104  {
108  } Type2;
109  } Config;
120 
121 typedef ULONG
123  IN PPCIPBUSDATA BusData,
124  IN PVOID State,
125  IN PUCHAR Buffer,
126  IN ULONG Offset
127 );
128 
129 typedef VOID
131  IN PBUS_HANDLER BusHandler,
132  IN PCI_SLOT_NUMBER Slot,
133  IN PKIRQL Irql,
134  IN PVOID State
135 );
136 
137 typedef VOID
139  IN PBUS_HANDLER BusHandler,
140  IN KIRQL Irql
141 );
142 
143 typedef struct _PCI_CONFIG_HANDLER
144 {
150 
152 {
155  UCHAR NoBuses; // Number Of Buses
160 
161 //
162 // PCI Type 1 Ports
163 //
164 #define PCI_TYPE1_ADDRESS_PORT (PULONG)0xCF8
165 #define PCI_TYPE1_DATA_PORT 0xCFC
166 
167 //
168 // PCI Type 2 Ports
169 //
170 #define PCI_TYPE2_CSE_PORT (PUCHAR)0xCF8
171 #define PCI_TYPE2_FORWARD_PORT (PUCHAR)0xCFA
172 #define PCI_TYPE2_ADDRESS_BASE 0xC
173 
174 //
175 // PCI Type 1 Configuration Register
176 //
177 typedef struct _PCI_TYPE1_CFG_BITS
178 {
179  union
180  {
181  struct
182  {
187  ULONG BusNumber:8;
189  ULONG Enable:1;
190  } bits;
191 
192  ULONG AsULONG;
193  } u;
195 
196 //
197 // PCI Type 2 CSE Register
198 //
199 typedef struct _PCI_TYPE2_CSE_BITS
200 {
201  union
202  {
203  struct
204  {
208  } bits;
209 
211  } u;
213 
214 //
215 // PCI Type 2 Address Register
216 //
218 {
219  union
220  {
221  struct
222  {
226  } bits;
227 
229  } u;
231 
233 {
234  union
235  {
236  struct
237  {
242  } bits;
244  } u;
246 
248 {
249  union
250  {
251  struct
252  {
259  } bits;
261  } u;
263 
264 typedef struct _ARRAY
265 {
268 } ARRAY, *PARRAY;
269 
270 typedef struct _HAL_BUS_HANDLER
271 {
276 
277 /* FUNCTIONS *****************************************************************/
278 
279 /* SHARED (Fake PCI-BUS HANDLER) */
280 
284 
285 CODE_SEG("INIT")
287 NTAPI
289  VOID
290 );
291 
292 VOID
293 NTAPI
295  IN PBUS_HANDLER BusHandler,
296  IN PCI_SLOT_NUMBER Slot,
297  IN PKIRQL Irql,
298  IN PPCI_TYPE1_CFG_BITS PciCfg
299 );
300 
301 VOID
302 NTAPI
304  IN PBUS_HANDLER BusHandler,
305  IN KIRQL Irql
306 );
307 
308 VOID
309 NTAPI
311  IN PBUS_HANDLER BusHandler,
312  IN PCI_SLOT_NUMBER Slot,
313  IN PKIRQL Irql,
315 );
316 
317 VOID
318 NTAPI
320  IN PBUS_HANDLER BusHandler,
321  IN KIRQL Irql
322 );
323 
324 TYPE1_DEFINE(HalpPCIReadUcharType1);
325 TYPE1_DEFINE(HalpPCIReadUshortType1);
326 TYPE1_DEFINE(HalpPCIReadUlongType1);
327 TYPE2_DEFINE(HalpPCIReadUcharType2);
328 TYPE2_DEFINE(HalpPCIReadUshortType2);
329 TYPE2_DEFINE(HalpPCIReadUlongType2);
330 TYPE1_DEFINE(HalpPCIWriteUcharType1);
331 TYPE1_DEFINE(HalpPCIWriteUshortType1);
332 TYPE1_DEFINE(HalpPCIWriteUlongType1);
333 TYPE2_DEFINE(HalpPCIWriteUcharType2);
334 TYPE2_DEFINE(HalpPCIWriteUshortType2);
335 TYPE2_DEFINE(HalpPCIWriteUlongType2);
336 
337 BOOLEAN
338 NTAPI
340  IN PBUS_HANDLER BusHandler,
341  IN PCI_SLOT_NUMBER Slot
342 );
343 
344 VOID
345 NTAPI
347  IN PBUS_HANDLER BusHandler,
348  IN PCI_SLOT_NUMBER Slot,
349  IN PVOID Buffer,
350  IN ULONG Offset,
351  IN ULONG Length
352 );
353 
354 VOID
355 NTAPI
357  IN PBUS_HANDLER BusHandler,
358  IN PCI_SLOT_NUMBER Slot,
359  IN PVOID Buffer,
360  IN ULONG Offset,
361  IN ULONG Length
362 );
363 
364 ULONG
365 NTAPI
367  IN PBUS_HANDLER BusHandler,
368  IN PBUS_HANDLER RootBusHandler,
370  IN PVOID Buffer,
371  IN ULONG Offset,
372  IN ULONG Length
373 );
374 
375 ULONG
376 NTAPI
378  IN PBUS_HANDLER BusHandler,
379  IN PBUS_HANDLER RootBusHandler,
381  IN PVOID Buffer,
382  IN ULONG Offset,
383  IN ULONG Length
384 );
385 
386 NTSTATUS
387 NTAPI
389  IN PBUS_HANDLER BusHandler,
390  IN PBUS_HANDLER RootHandler,
395  IN ULONG Slot,
396  IN OUT PCM_RESOURCE_LIST *pAllocatedResources
397 );
398 
399 /* NON-LEGACY */
400 
401 ULONG
402 NTAPI
406  _Out_ PKIRQL Irql,
408 
409 ULONG
410 NTAPI
416 );
417 
418 ULONG
419 NTAPI
423  IN PVOID Buffer,
424  IN ULONG Length
425 );
426 
427 CODE_SEG("INIT")
428 VOID
429 NTAPI
431  VOID
432 );
433 
434 CODE_SEG("INIT")
435 VOID
436 NTAPI
438  VOID
439 );
440 
441 BOOLEAN
442 NTAPI
449 );
450 
451 NTSTATUS
452 NTAPI
462 );
463 
464 BOOLEAN
465 NTAPI
471  IN BOOLEAN NextBus
472 );
473 
474 CODE_SEG("INIT")
475 VOID
476 NTAPI
478  VOID
479 );
480 
481 /* LEGACY */
482 
483 BOOLEAN
484 NTAPI
491 );
492 
493 BOOLEAN
494 NTAPI
500  IN BOOLEAN NextBus
501 );
502 
503 NTSTATUS
504 NTAPI
506  IN PBUS_HANDLER RootHandler,
507  IN OUT PIO_RESOURCE_REQUIREMENTS_LIST *pResourceList);
508 
509 ULONG
510 NTAPI
512  IN PBUS_HANDLER RootHandler,
515  OUT PKIRQL Irql,
517 VOID
518 NTAPI
520  IN PBUS_HANDLER RootHandler,
522  IN PPCI_COMMON_CONFIG PciData);
523 
524 VOID
525 NTAPI
527  IN PBUS_HANDLER RootHandler,
529  IN PPCI_COMMON_CONFIG PciNewData,
530  IN PPCI_COMMON_CONFIG PciOldData);
531 
532 NTSTATUS
533 NTAPI
535  IN PBUS_HANDLER RootHandler,
536  IN PCI_SLOT_NUMBER PciSlot,
538 
539 VOID
540 NTAPI
542  VOID
543 );
544 
546 NTAPI
548  IN ULONG_PTR ContextValue
549 );
550 
552 FASTCALL
554  IN BUS_DATA_TYPE ConfigType,
556 );
557 
558 ULONG
559 NTAPI
561  IN PBUS_HANDLER BusHandler,
562  IN PBUS_HANDLER RootHandler,
564  IN PVOID Buffer,
565  IN ULONG Offset,
566  IN ULONG Length
567 );
568 
569 ULONG
570 NTAPI
572  IN PBUS_HANDLER BusHandler,
573  IN PBUS_HANDLER RootHandler,
575  IN PVOID Buffer,
576  IN ULONG Offset,
577  IN ULONG Length
578 );
579 
580 ULONG
581 NTAPI
583  IN PBUS_HANDLER BusHandler,
584  IN PBUS_HANDLER RootHandler,
586  IN PVOID Buffer,
587  IN ULONG Offset,
588  IN ULONG Length
589 );
590 
591 BOOLEAN
592 NTAPI
594  IN PBUS_HANDLER BusHandler,
595  IN PBUS_HANDLER RootHandler,
599 );
600 
601 BOOLEAN
602 NTAPI
604  IN PBUS_HANDLER BusHandler,
605  IN PBUS_HANDLER RootHandler,
609 );
610 
611 ULONG
612 NTAPI
614  IN PBUS_HANDLER BusHandler,
615  IN PBUS_HANDLER RootHandler,
618  OUT PKIRQL Irql,
620 );
621 
622 extern ULONG HalpBusType;
627 
628 /* EOF */
#define TYPE2_DEFINE(x)
Definition: bus.h:26
_In_ WDFIORESREQLIST _In_ ULONG SlotNumber
Definition: wdfresource.h:65
struct _PCI_TYPE1_CFG_CYCLE_BITS::@1438::@1439 bits
ULONG FunctionNumber
Definition: hardware.h:44
_In_ ULONG _In_ ULONG BusInterruptLevel
Definition: halfuncs.h:170
ULONG Reserved1
Definition: bus.h:183
#define IN
Definition: typedefs.h:39
ULONG Data
Definition: bus.h:101
BOOLEAN BridgeConfigRead
Definition: bus.h:112
_In_ ULONG _In_ PHYSICAL_ADDRESS BusAddress
Definition: iofuncs.h:2272
struct _PCIPBUSDATA PCIPBUSDATA
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
NTSTATUS(NTAPI * PciIrqRange)(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN PCI_SLOT_NUMBER PciSlot, OUT PSUPPORTED_RANGE *Interrupt)
Definition: bus.h:86
enum _INTERFACE_TYPE INTERFACE_TYPE
PBUS_HANDLER NTAPI HalpContextToBusHandler(IN ULONG_PTR ContextValue)
Definition: bushndlr.c:206
ULONG MaxDevice
Definition: bus.h:110
UCHAR reserved[1]
Definition: bus.h:115
ULONG Base
Definition: bus.h:107
ULONG HalpMinPciBus
Definition: pcibus.c:23
#define _Out_
Definition: ms_sal.h:345
#define ANYSIZE_ARRAY
Definition: typedefs.h:46
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
struct _HAL_BUS_HANDLER HAL_BUS_HANDLER
_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
ULONG NTAPI HalpNoBusData(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: bushndlr.c:108
struct _PCI_CONFIG_HANDLER PCI_CONFIG_HANDLER
enum _BUS_DATA_TYPE BUS_DATA_TYPE
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG AddressSpace
Definition: iofuncs.h:2272
union _PCIPBUSDATA::@1427 Config
LIST_ENTRY HalpAllBusHandlers
Definition: bushndlr.c:19
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFINTERRUPT * Interrupt
Definition: wdfinterrupt.h:372
unsigned char * PUCHAR
Definition: retypes.h:3
UCHAR Enable
Definition: bus.h:205
LONG NTSTATUS
Definition: precomp.h:26
struct _PCI_TYPE2_CSE_BITS PCI_TYPE2_CSE_BITS
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:213
UCHAR ParentBus
Definition: bus.h:113
struct _PCIPBUSDATA::@1427::@1428 Type1
_In_ ULONG _In_ ULONG State
Definition: potypes.h:516
struct _PCI_TYPE1_CFG_CYCLE_BITS * PPCI_TYPE1_CFG_CYCLE_BITS
PUCHAR Forward
Definition: bus.h:106
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: busemul.c:45
PUCHAR CSE
Definition: bus.h:105
ULONG NTAPI HalpSetCmosData(IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Length)
Definition: cmos.c:104
_In_ ULONG _In_ ULONG _In_ ULONG BusInterruptVector
Definition: halfuncs.h:170
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
Definition: iofuncs.h:2272
#define FASTCALL
Definition: nt_native.h:50
_Out_ PKIRQL Irql
Definition: csq.h:179
PCIBUSDATA CommonData
Definition: bus.h:95
ULONG NTAPI HalpGetCmosData(_In_ ULONG BusNumber, _In_ ULONG SlotNumber, _Out_writes_bytes_(Length) PVOID Buffer, _In_ ULONG Length)
Definition: cmos.c:49
_In_opt_ PUNICODE_STRING DriverClassName
Definition: halfuncs.h:156
FncReleaseSync ReleaseSynchronzation
Definition: bus.h:146
uint32_t ULONG_PTR
Definition: typedefs.h:65
PULONG Address
Definition: bus.h:100
struct _PCI_TYPE2_ADDRESS_BITS PCI_TYPE2_ADDRESS_BITS
UCHAR KIRQL
Definition: env_spec_w32.h:591
union _PCI_TYPE2_CSE_BITS::@1432 u
BOOLEAN NTAPI HaliFindBusAddressTranslation(IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress, IN OUT PULONG_PTR Context, IN BOOLEAN NextBus)
Definition: bussupp.c:1307
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
PPCI_REGISTRY_INFO_INTERNAL NTAPI HalpQueryPciRegistryInfo(VOID)
Definition: pcibus.c:869
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
ULONG HalpBusType
Definition: pcibus.c:18
UCHAR SwizzleIn[4]
Definition: bus.h:116
VOID NTAPI HalpPCIPin2ISALine(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN PCI_SLOT_NUMBER SlotNumber, IN PPCI_COMMON_CONFIG PciData)
Definition: pcibus.c:545
BOOLEAN NTAPI HaliTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
Definition: bussupp.c:1381
BOOLEAN NTAPI HalpTranslateSystemBusAddress(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
Definition: sysbus.c:21
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: pcibus.c:710
ULONG(NTAPI * FncConfigIO)(IN PPCIPBUSDATA BusData, IN PVOID State, IN PUCHAR Buffer, IN ULONG Offset)
Definition: bus.h:122
KAFFINITY * PKAFFINITY
Definition: basetsd.h:197
unsigned char BOOLEAN
VOID(NTAPI * FncReleaseSync)(IN PBUS_HANDLER BusHandler, IN KIRQL Irql)
Definition: bus.h:138
#define _In_
Definition: ms_sal.h:308
PCI_CONFIG_HANDLER PCIConfigHandler
Definition: pcibus.c:25
BUS_HANDLER HalpFakePciBusHandler
Definition: pcibus.c:96
Definition: bufpool.h:45
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: halfuncs.h:156
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
VOID NTAPI HalpPCISynchronizeType2(IN PBUS_HANDLER BusHandler, IN PCI_SLOT_NUMBER Slot, IN PKIRQL Irql, IN PPCI_TYPE2_ADDRESS_BITS PciCfg)
struct _PCI_TYPE2_CSE_BITS::@1432::@1433 bits
struct _PCIPBUSDATA * PPCIPBUSDATA
struct _PCI_TYPE1_CFG_BITS PCI_TYPE1_CFG_BITS
union _PCI_TYPE1_CFG_CYCLE_BITS::@1438 u
struct _PCI_TYPE0_CFG_CYCLE_BITS::@1436::@1437 bits
struct _ARRAY * PARRAY
ULONG NTAPI HalpcGetCmosData(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: cmosbus.c:21
VOID NTAPI HalpInitBusHandler(VOID)
Definition: bushndlr.c:420
BOOLEAN HalpPCIConfigInitialized
Definition: pcibus.c:22
ULONG NTAPI HalpGetRootInterruptVector(_In_ ULONG BusInterruptLevel, _In_ ULONG BusInterruptVector, _Out_ PKIRQL Irql, _Out_ PKAFFINITY Affinity)
Definition: apic.c:365
#define PCI_MAX_DEVICES
Definition: iotypes.h:3598
VOID(NTAPI * FncSync)(IN PBUS_HANDLER BusHandler, IN PCI_SLOT_NUMBER Slot, IN PKIRQL Irql, IN PVOID State)
Definition: bus.h:130
_In_ ULONG _In_ ULONG _In_ ULONG _Out_ PKIRQL _Out_ PKAFFINITY Affinity
Definition: halfuncs.h:170
struct _HAL_BUS_HANDLER * PHAL_BUS_HANDLER
VOID NTAPI HalpPCIReleaseSynchronizationType2(IN PBUS_HANDLER BusHandler, IN KIRQL Irql)
Definition: pcibus.c:195
struct _PCI_TYPE2_CSE_BITS PPCI_TYPE2_CSE_BITS
#define TYPE1_DEFINE(x)
Definition: bus.h:25
struct _PCI_REGISTRY_INFO_INTERNAL PCI_REGISTRY_INFO_INTERNAL
ULONG NTAPI HalpGetPCIIntOnISABus(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN ULONG BusInterruptLevel, IN ULONG BusInterruptVector, OUT PKIRQL Irql, OUT PKAFFINITY Affinity)
Definition: pcibus.c:523
struct _PCI_TYPE0_CFG_CYCLE_BITS * PPCI_TYPE0_CFG_CYCLE_BITS
ULONG NTAPI HalpGetPCIData(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootBusHandler, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: pcibus.c:369
unsigned char UCHAR
Definition: xmlstorage.h:181
VOID NTAPI HalpWritePCIConfig(IN PBUS_HANDLER BusHandler, IN PCI_SLOT_NUMBER Slot, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: pcibus.c:285
USHORT RegisterNumber
Definition: bus.h:223
#define NTSTATUS
Definition: precomp.h:20
#define VOID
Definition: acefi.h:82
KIRQL * PKIRQL
Definition: env_spec_w32.h:592
Definition: typedefs.h:119
VOID NTAPI HalpPCIISALine2Pin(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN PCI_SLOT_NUMBER SlotNumber, IN PPCI_COMMON_CONFIG PciNewData, IN PPCI_COMMON_CONFIG PciOldData)
Definition: pcibus.c:555
Definition: range.c:39
union _PCI_TYPE2_ADDRESS_BITS::@1434 u
struct _PCI_TYPE0_CFG_CYCLE_BITS PCI_TYPE0_CFG_CYCLE_BITS
struct _PCIPBUSDATA::@1427::@1429 Type2
struct _PCI_TYPE2_ADDRESS_BITS * PPCI_TYPE2_ADDRESS_BITS
#define PCI_MAX_FUNCTION
Definition: iotypes.h:3599
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
struct _PCI_TYPE1_CFG_BITS::@152::@153 bits
struct _PCI_TYPE2_ADDRESS_BITS::@1434::@1435 bits
struct _PCI_REGISTRY_INFO_INTERNAL * PPCI_REGISTRY_INFO_INTERNAL
FncSync Synchronize
Definition: bus.h:145
FncConfigIO ConfigRead[3]
Definition: bus.h:147
ULONG ArraySize
Definition: bus.h:266
VOID NTAPI HalpInitializePciBus(VOID)
Definition: halacpi.c:913
BUS_HANDLER Handler
Definition: bus.h:274
struct _PCI_TYPE1_CFG_BITS * PPCI_TYPE1_CFG_BITS
struct _ARRAY ARRAY
unsigned short USHORT
Definition: pedump.c:61
PVOID Element[ANYSIZE_ARRAY]
Definition: bus.h:267
VOID NTAPI HalpPCIReleaseSynchronzationType1(IN PBUS_HANDLER BusHandler, IN KIRQL Irql)
Definition: pcibus.c:139
ULONG NTAPI HalpGetSystemInterruptVector(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN ULONG BusInterruptLevel, IN ULONG BusInterruptVector, OUT PKIRQL Irql, OUT PKAFFINITY Affinity)
Definition: sysbus.c:115
FncConfigIO ConfigWrite[3]
Definition: bus.h:148
unsigned int * PULONG
Definition: retypes.h:1
PCI_CONFIG_HANDLER PCIConfigHandlerType2
Definition: pcibus.c:59
PCI_CARD_DESCRIPTOR CardList[ANYSIZE_ARRAY]
Definition: bus.h:158
ULONG NTAPI HalpSetPCIData(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootBusHandler, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: pcibus.c:453
BOOLEAN NTAPI HalpFindBusAddressTranslation(IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress, IN OUT PULONG_PTR Context, IN BOOLEAN NextBus)
Definition: busemul.c:90
UCHAR Subtractive
Definition: bus.h:114
union _PCI_TYPE1_CFG_BITS::@152 u
BOOLEAN NTAPI HalpTranslateIsaBusAddress(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
Definition: isabus.c:21
Definition: shimeng.h:15
union _PCI_TYPE0_CFG_CYCLE_BITS::@1436 u
#define OUT
Definition: typedefs.h:40
BOOLEAN NTAPI HalpValidPCISlot(IN PBUS_HANDLER BusHandler, IN PCI_SLOT_NUMBER Slot)
Definition: pcibus.c:329
UCHAR AsUCHAR
Definition: bus.h:210
VOID NTAPI HalpPCISynchronizeType1(IN PBUS_HANDLER BusHandler, IN PCI_SLOT_NUMBER Slot, IN PKIRQL Irql, IN PPCI_TYPE1_CFG_BITS PciCfg)
unsigned int ULONG
Definition: retypes.h:1
uint32_t * PULONG_PTR
Definition: typedefs.h:65
NTSTATUS NTAPI HalpAdjustPCIResourceList(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN OUT PIO_RESOURCE_REQUIREMENTS_LIST *pResourceList)
Definition: pcibus.c:669
ULONG Reserved2
Definition: bus.h:188
struct _PCI_TYPE1_CFG_CYCLE_BITS PCI_TYPE1_CFG_CYCLE_BITS
RTL_BITMAP DeviceConfigured
Definition: bus.h:117
LIST_ENTRY AllHandlers
Definition: bus.h:272
VOID NTAPI HalpInitializePciStubs(VOID)
Definition: pcibus.c:1102
struct _PCI_CONFIG_HANDLER * PPCI_CONFIG_HANDLER
ULONG HalpMaxPciBus
Definition: pcibus.c:23
UCHAR FunctionNumber
Definition: bus.h:206
PBUS_HANDLER FASTCALL HaliReferenceHandlerForConfigSpace(IN BUS_DATA_TYPE ConfigType, IN ULONG BusNumber)
Definition: bushndlr.c:197
PciIrqRange GetIrqRange
Definition: bus.h:111
#define _Out_writes_bytes_(size)
Definition: ms_sal.h:350
static CODE_SEG("PAGE")
Definition: isapnp.c:1482
ULONG RegisterNumber
Definition: hardware.h:43
ULONG ReferenceCount
Definition: bus.h:273
VOID NTAPI HalpRegisterPciDebuggingDeviceInfo(VOID)
Definition: pcibus.c:633
ULONG NTAPI HalpcSetCmosData(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: cmosbus.c:34
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
Definition: wdffdo.h:461
NTSTATUS NTAPI HalpGetISAFixedPCIIrq(IN PBUS_HANDLER BusHandler, IN PBUS_HANDLER RootHandler, IN PCI_SLOT_NUMBER PciSlot, OUT PSUPPORTED_RANGE *Range)
Definition: pcibus.c:567
USHORT AddressBase
Definition: bus.h:225
ULONG ConfiguredBits[PCI_MAX_DEVICES *PCI_MAX_FUNCTION/32]
Definition: bus.h:118
VOID NTAPI HalpReadPCIConfig(IN PBUS_HANDLER BusHandler, IN PCI_SLOT_NUMBER Slot, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: pcibus.c:259
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
BOOLEAN NTAPI HalpTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
Definition: busemul.c:77
PCI_CONFIG_HANDLER PCIConfigHandlerType1
Definition: pcibus.c:37