ReactOS  0.4.15-dev-439-g292f67a
tr_irq.c File Reference
#include <pci.h>
#include <debug.h>
Include dependency graph for tr_irq.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

NTSTATUS NTAPI tranirq_Initializer (IN PVOID Instance)
 
NTSTATUS NTAPI tranirq_Constructor (IN PVOID DeviceExtension, IN PVOID Instance, IN PVOID InterfaceData, IN USHORT Version, IN USHORT Size, IN PINTERFACE Interface)
 

Variables

PCI_INTERFACE TranslatorInterfaceInterrupt
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file tr_irq.c.

Function Documentation

◆ tranirq_Constructor()

NTSTATUS NTAPI tranirq_Constructor ( IN PVOID  DeviceExtension,
IN PVOID  Instance,
IN PVOID  InterfaceData,
IN USHORT  Version,
IN USHORT  Size,
IN PINTERFACE  Interface 
)

Definition at line 45 of file tr_irq.c.

51 {
53  ULONG BaseBus, ParentBus;
54  INTERFACE_TYPE ParentInterface;
56 
60 
61  /* Make sure it's the right resource type */
63  {
64  /* Fail this invalid request */
65  DPRINT1("PCI - IRQ trans constructor doesn't like %p in InterfaceSpecificData\n",
68  }
69 
70  /* Get the bus, and use this as the interface-specific data */
71  BaseBus = FdoExtension->BaseBus;
72  InterfaceData = UlongToPtr(BaseBus);
73 
74  /* Check if this is the root bus */
76  {
77  /* It is, so there is no parent, and it's connected on the system bus */
78  ParentBus = 0;
79  ParentInterface = Internal;
80  DPRINT1(" Is root FDO\n");
81  }
82  else
83  {
84  /* It's not, so we have to get the root bus' bus number instead */
85  #if 0 // when have PDO commit
86  ParentBus = FdoExtension->PhysicalDeviceObject->DeviceExtension->ParentFdoExtension->BaseBus;
87  ParentInterface = PCIBus;
88  DPRINT1(" Is bridge FDO, parent bus %x, secondary bus %x\n",
89  ParentBus, BaseBus);
90  #endif
91  }
92 
93  /* Now call the legacy HAL interface to get the correct translator */
94  return HalGetInterruptTranslator(ParentInterface,
95  ParentBus,
96  PCIBus,
97  sizeof(TRANSLATOR_INTERFACE),
98  0,
101 }
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:361
enum _INTERFACE_TYPE INTERFACE_TYPE
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define HalGetInterruptTranslator
Definition: haltypes.h:292
uint32_t ULONG_PTR
Definition: typedefs.h:64
#define ASSERT_FDO(x)
Definition: pci.h:37
struct _PCI_FDO_EXTENSION * PPCI_FDO_EXTENSION
#define STATUS_INVALID_PARAMETER_3
Definition: ntstatus.h:463
#define UlongToPtr(u)
Definition: config.h:106
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
#define PCI_IS_ROOT_FDO(x)
Definition: pci.h:32
unsigned int * PULONG
Definition: retypes.h:1
IN PVOID Instance
Definition: pci.h:361
#define CmResourceTypeInterrupt
Definition: hwresource.cpp:124
#define DPRINT1
Definition: precomp.h:8
unsigned int ULONG
Definition: retypes.h:1
IN PVOID IN PVOID InterfaceData
Definition: pci.h:361

◆ tranirq_Initializer()

NTSTATUS NTAPI tranirq_Initializer ( IN PVOID  Instance)

Definition at line 35 of file tr_irq.c.

36 {
38  /* PnP Interfaces don't get Initialized */
39  ASSERTMSG("PCI tranirq_Initializer, unexpected call.\n", FALSE);
40  return STATUS_UNSUCCESSFUL;
41 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define ASSERTMSG(msg, exp)
Definition: nt_native.h:431
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
IN PVOID Instance
Definition: pci.h:361

Variable Documentation

◆ TranslatorInterfaceInterrupt

PCI_INTERFACE TranslatorInterfaceInterrupt
Initial value:
=
{
&GUID_TRANSLATOR_INTERFACE_STANDARD,
0,
0,
0,
}
NTSTATUS NTAPI tranirq_Constructor(IN PVOID DeviceExtension, IN PVOID Instance, IN PVOID InterfaceData, IN USHORT Version, IN USHORT Size, IN PINTERFACE Interface)
Definition: tr_irq.c:45
#define PCI_INTERFACE_FDO
Definition: pci.h:58
NTSTATUS NTAPI tranirq_Initializer(IN PVOID Instance)
Definition: tr_irq.c:35
struct _TRANSLATOR_INTERFACE TRANSLATOR_INTERFACE

Definition at line 18 of file tr_irq.c.