ReactOS 0.4.15-dev-5672-gf73ac17
ar_busno.c File Reference
#include <pci.h>
#include <debug.h>
Include dependency graph for ar_busno.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

NTSTATUS NTAPI arbusno_Initializer (IN PVOID Instance)
 
NTSTATUS NTAPI arbusno_Constructor (IN PVOID DeviceExtension, IN PVOID PciInterface, IN PVOID InterfaceData, IN USHORT Version, IN USHORT Size, IN PINTERFACE Interface)
 

Variables

PCI_INTERFACE ArbiterInterfaceBusNumber
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file ar_busno.c.

Function Documentation

◆ arbusno_Constructor()

NTSTATUS NTAPI arbusno_Constructor ( IN PVOID  DeviceExtension,
IN PVOID  PciInterface,
IN PVOID  InterfaceData,
IN USHORT  Version,
IN USHORT  Size,
IN PINTERFACE  Interface 
)

Definition at line 73 of file ar_busno.c.

79{
82 PAGED_CODE();
83
84 UNREFERENCED_PARAMETER(PciInterface);
88
89 /* Make sure it's the expected interface */
90 if ((ULONG_PTR)InterfaceData != CmResourceTypeBusNumber)
91 {
92 /* Arbiter support must have been initialized first */
93 if (FdoExtension->ArbitersInitialized)
94 {
95 /* Not yet implemented */
97 while (TRUE);
98 }
99 else
100 {
101 /* No arbiters for this FDO */
103 }
104 }
105 else
106 {
107 /* Not the right interface */
109 }
110
111 /* Return the status */
112 return Status;
113}
#define PAGED_CODE()
LONG NTSTATUS
Definition: precomp.h:26
#define UNIMPLEMENTED
Definition: debug.h:115
#define TRUE
Definition: types.h:120
struct _PCI_FDO_EXTENSION * PPCI_FDO_EXTENSION
@ FdoExtension
Definition: precomp.h:48
Status
Definition: gdiplustypes.h:25
#define CmResourceTypeBusNumber
Definition: hwresource.cpp:128
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
#define STATUS_INVALID_PARAMETER_5
Definition: ntstatus.h:479
uint32_t ULONG_PTR
Definition: typedefs.h:65
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdffdo.h:469

◆ arbusno_Initializer()

NTSTATUS NTAPI arbusno_Initializer ( IN PVOID  Instance)

Definition at line 35 of file ar_busno.c.

36{
40
41 PAGED_CODE();
42
43 RtlZeroMemory(&Arbiter->CommonInstance, sizeof(Arbiter->CommonInstance));
44
46
47 /* Not yet implemented */
49
50#if 0
51 Arbiter->CommonInstance.UnpackRequirement = arbusno_UnpackRequirement;
52 Arbiter->CommonInstance.PackResource = arbusno_PackResource;
53 Arbiter->CommonInstance.UnpackResource = arbusno_UnpackResource;
54 Arbiter->CommonInstance.ScoreRequirement = arbusno_ScoreRequirement;
55#endif
56
58 FdoExtension->FunctionalDeviceObject,
60 Arbiter->InstanceName,
61 L"Pci",
62 NULL);
63 if (!NT_SUCCESS(Status))
64 {
65 DPRINT1("arbusno_Initializer: init arbiter return %X", Status);
66 }
67
68 return Status;
69}
NTSTATUS NTAPI ArbInitializeArbiterInstance(_Inout_ PARBITER_INSTANCE Arbiter, _In_ PDEVICE_OBJECT BusDeviceObject, _In_ CM_RESOURCE_TYPE ResourceType, _In_ PCWSTR ArbiterName, _In_ PCWSTR OrderName, _In_ PARB_TRANSLATE_ORDERING TranslateOrderingFunction)
Definition: arbiter.c:282
#define DPRINT1
Definition: precomp.h:8
#define NULL
Definition: types.h:112
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define L(x)
Definition: ntvdm.h:50
PPCI_FDO_EXTENSION BusFdoExtension
Definition: pci.h:405
WCHAR InstanceName[24]
Definition: pci.h:406
ARBITER_INSTANCE CommonInstance
Definition: pci.h:407
PARB_UNPACK_RESOURCE UnpackResource
Definition: arbiter.h:196
PARB_SCORE_REQUIREMENT ScoreRequirement
Definition: arbiter.h:197
PARB_UNPACK_REQUIREMENT UnpackRequirement
Definition: arbiter.h:194
PARB_PACK_RESOURCE PackResource
Definition: arbiter.h:195
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_WMI_INSTANCE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_opt_ WDFWMIINSTANCE * Instance
Definition: wdfwmi.h:481

Variable Documentation

◆ ArbiterInterfaceBusNumber

PCI_INTERFACE ArbiterInterfaceBusNumber
Initial value:
=
{
&GUID_ARBITER_INTERFACE_STANDARD,
0,
0,
0,
}
NTSTATUS NTAPI arbusno_Constructor(IN PVOID DeviceExtension, IN PVOID PciInterface, IN PVOID InterfaceData, IN USHORT Version, IN USHORT Size, IN PINTERFACE Interface)
Definition: ar_busno.c:73
NTSTATUS NTAPI arbusno_Initializer(IN PVOID Instance)
Definition: ar_busno.c:35
#define PCI_INTERFACE_FDO
Definition: pci.h:58
@ PciArb_BusNumber
Definition: pci.h:99
struct _ARBITER_INTERFACE ARBITER_INTERFACE

Definition at line 18 of file ar_busno.c.