ReactOS 0.4.15-dev-5667-ged97270
ar_busno.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS PCI Bus Driver
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: drivers/bus/pci/arb/ar_busno.c
5 * PURPOSE: Bus Number Arbitration
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9/* INCLUDES *******************************************************************/
10
11#include <pci.h>
12
13#define NDEBUG
14#include <debug.h>
15
16/* GLOBALS ********************************************************************/
17
19{
20 &GUID_ARBITER_INTERFACE_STANDARD,
21 sizeof(ARBITER_INTERFACE),
22 0,
23 0,
25 0,
29};
30
31/* FUNCTIONS ******************************************************************/
32
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}
70
74 IN PVOID PciInterface,
75 IN PVOID InterfaceData,
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}
114
115/* EOF */
#define PAGED_CODE()
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
PCI_INTERFACE ArbiterInterfaceBusNumber
Definition: ar_busno.c:18
NTSTATUS NTAPI arbusno_Initializer(IN PVOID Instance)
Definition: ar_busno.c:35
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
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define UNIMPLEMENTED
Definition: debug.h:115
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define PCI_INTERFACE_FDO
Definition: pci.h:58
struct _PCI_FDO_EXTENSION * PPCI_FDO_EXTENSION
@ PciArb_BusNumber
Definition: pci.h:99
@ 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
#define L(x)
Definition: ntvdm.h:50
unsigned short USHORT
Definition: pedump.c:61
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 NTAPI
Definition: typedefs.h:36
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
_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
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_WMI_INSTANCE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_opt_ WDFWMIINSTANCE * Instance
Definition: wdfwmi.h:481
struct _ARBITER_INTERFACE ARBITER_INTERFACE