2 * PROJECT: ReactOS PCI Bus Driver
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: drivers/bus/pci/arb/ar_memiono.c
5 * PURPOSE: Memory and I/O Port Resource Arbitration
6 * PROGRAMMERS: ReactOS Portable Systems Group
9 /* INCLUDES *******************************************************************/
16 /* GLOBALS ********************************************************************/
18 PCI_INTERFACE ArbiterInterfaceMemory
=
20 &GUID_ARBITER_INTERFACE_STANDARD
,
21 sizeof(ARBITER_INTERFACE
),
31 PCI_INTERFACE ArbiterInterfaceIo
=
33 &GUID_ARBITER_INTERFACE_STANDARD
,
34 sizeof(ARBITER_INTERFACE
),
44 /* FUNCTIONS ******************************************************************/
48 ario_Initializer(IN PVOID Instance
)
50 UNREFERENCED_PARAMETER(Instance
);
52 /* Not yet implemented */
55 return STATUS_SUCCESS
;
60 ario_Constructor(IN PVOID DeviceExtension
,
61 IN PVOID PciInterface
,
62 IN PVOID InterfaceData
,
65 IN PINTERFACE Interface
)
67 PPCI_FDO_EXTENSION FdoExtension
= (PPCI_FDO_EXTENSION
)DeviceExtension
;
71 UNREFERENCED_PARAMETER(PciInterface
);
72 UNREFERENCED_PARAMETER(Version
);
73 UNREFERENCED_PARAMETER(Size
);
74 UNREFERENCED_PARAMETER(Interface
);
76 /* Make sure it's the expected interface */
77 if ((ULONG_PTR
)InterfaceData
!= CmResourceTypePort
)
79 /* Arbiter support must have been initialized first */
80 if (FdoExtension
->ArbitersInitialized
)
82 /* Not yet implemented */
88 /* No arbiters for this FDO */
89 Status
= STATUS_NOT_SUPPORTED
;
94 /* Not the right interface */
95 Status
= STATUS_INVALID_PARAMETER_5
;
98 /* Return the status */
104 ario_ApplyBrokenVideoHack(IN PPCI_FDO_EXTENSION FdoExtension
)
106 PPCI_ARBITER_INSTANCE PciArbiter
;
107 //PARBITER_INSTANCE CommonInstance;
110 /* Only valid for root FDOs who are being applied the hack for the first time */
111 ASSERT(!FdoExtension
->BrokenVideoHackApplied
);
112 ASSERT(PCI_IS_ROOT_FDO(FdoExtension
));
114 /* Find the I/O arbiter */
115 PciArbiter
= (PVOID
)PciFindNextSecondaryExtension(FdoExtension
->
116 SecondaryExtension
.Next
,
119 #if 0 // when arb exist
120 /* Get the Arb instance */
121 CommonInstance
= &PciArbiter
->CommonInstance
;
123 /* Free the two lists, enabling full VGA access */
124 ArbFreeOrderingList(&CommonInstance
->OrderingList
);
125 ArbFreeOrderingList(&CommonInstance
->ReservedList
);
127 /* Build the ordering for broken video PCI access */
128 Status
= ArbBuildAssignmentOrdering(CommonInstance
,
132 ASSERT(NT_SUCCESS(Status
));
134 //Status = STATUS_SUCCESS;
138 /* Now the hack has been applied */
139 FdoExtension
->BrokenVideoHackApplied
= TRUE
;
144 armem_Initializer(IN PVOID Instance
)
146 UNREFERENCED_PARAMETER(Instance
);
148 /* Not yet implemented */
151 return STATUS_SUCCESS
;
156 armem_Constructor(IN PVOID DeviceExtension
,
157 IN PVOID PciInterface
,
158 IN PVOID InterfaceData
,
161 IN PINTERFACE Interface
)
163 PPCI_FDO_EXTENSION FdoExtension
= (PPCI_FDO_EXTENSION
)DeviceExtension
;
167 UNREFERENCED_PARAMETER(PciInterface
);
168 UNREFERENCED_PARAMETER(Version
);
169 UNREFERENCED_PARAMETER(Size
);
170 UNREFERENCED_PARAMETER(Interface
);
172 /* Make sure it's the expected interface */
173 if ((ULONG_PTR
)InterfaceData
!= CmResourceTypeMemory
)
175 /* Arbiter support must have been initialized first */
176 if (FdoExtension
->ArbitersInitialized
)
178 /* Not yet implemented */
184 /* No arbiters for this FDO */
185 Status
= STATUS_NOT_SUPPORTED
;
190 /* Not the right interface */
191 Status
= STATUS_INVALID_PARAMETER_5
;
194 /* Return the status */