ReactOS 0.4.15-dev-8422-g6219a1a
ar_memio.c File Reference
#include <pci.h>
#include <debug.h>
Include dependency graph for ar_memio.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

NTSTATUS NTAPI ario_Initializer (IN PVOID Instance)
 
NTSTATUS NTAPI ario_Constructor (IN PVOID DeviceExtension, IN PVOID PciInterface, IN PVOID InterfaceData, IN USHORT Version, IN USHORT Size, IN PINTERFACE Interface)
 
VOID NTAPI ario_ApplyBrokenVideoHack (IN PPCI_FDO_EXTENSION FdoExtension)
 
NTSTATUS NTAPI armem_Initializer (IN PVOID Instance)
 
NTSTATUS NTAPI armem_Constructor (IN PVOID DeviceExtension, IN PVOID PciInterface, IN PVOID InterfaceData, IN USHORT Version, IN USHORT Size, IN PINTERFACE Interface)
 

Variables

PCI_INTERFACE ArbiterInterfaceMemory
 
PCI_INTERFACE ArbiterInterfaceIo
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file ar_memio.c.

Function Documentation

◆ ario_ApplyBrokenVideoHack()

VOID NTAPI ario_ApplyBrokenVideoHack ( IN PPCI_FDO_EXTENSION  FdoExtension)

Definition at line 104 of file ar_memio.c.

105{
106 PPCI_ARBITER_INSTANCE PciArbiter;
107 //PARBITER_INSTANCE CommonInstance;
108 //NTSTATUS Status;
109
110 /* Only valid for root FDOs who are being applied the hack for the first time */
111 ASSERT(!FdoExtension->BrokenVideoHackApplied);
113
114 /* Find the I/O arbiter */
116 SecondaryExtension.Next,
117 PciArb_Io);
118 ASSERT(PciArbiter);
119#if 0 // when arb exist
120 /* Get the Arb instance */
121 CommonInstance = &PciArbiter->CommonInstance;
122
123 /* Free the two lists, enabling full VGA access */
124 ArbFreeOrderingList(&CommonInstance->OrderingList);
125 ArbFreeOrderingList(&CommonInstance->ReservedList);
126
127 /* Build the ordering for broken video PCI access */
128 Status = ArbBuildAssignmentOrdering(CommonInstance,
129 L"Pci",
130 L"BrokenVideo",
131 NULL);
133#else
134 //Status = STATUS_SUCCESS;
136 while (TRUE);
137#endif
138 /* Now the hack has been applied */
139 FdoExtension->BrokenVideoHackApplied = TRUE;
140}
NTSTATUS NTAPI ArbBuildAssignmentOrdering(_Inout_ PARBITER_INSTANCE ArbInstance, _In_ PCWSTR OrderName, _In_ PCWSTR ReservedOrderName, _In_ PARB_TRANSLATE_ORDERING TranslateOrderingFunction)
Definition: arbiter.c:267
VOID NTAPI ArbFreeOrderingList(_Out_ PARBITER_ORDERING_LIST OrderList)
Definition: arbiter.c:256
#define UNIMPLEMENTED
Definition: debug.h:118
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
PPCI_SECONDARY_EXTENSION NTAPI PciFindNextSecondaryExtension(IN PSINGLE_LIST_ENTRY ListHead, IN PCI_SIGNATURE ExtensionType)
Definition: utils.c:584
#define PCI_IS_ROOT_FDO(x)
Definition: pci.h:32
@ PciArb_Io
Definition: pci.h:96
@ FdoExtension
Definition: precomp.h:48
Status
Definition: gdiplustypes.h:25
#define ASSERT(a)
Definition: mode.c:44
#define L(x)
Definition: ntvdm.h:50
ARBITER_INSTANCE CommonInstance
Definition: pci.h:407
void * PVOID
Definition: typedefs.h:50

Referenced by PciApplyHacks().

◆ ario_Constructor()

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

Definition at line 60 of file ar_memio.c.

66{
69 PAGED_CODE();
70
71 UNREFERENCED_PARAMETER(PciInterface);
75
76 /* Make sure it's the expected interface */
77 if ((ULONG_PTR)InterfaceData != CmResourceTypePort)
78 {
79 /* Arbiter support must have been initialized first */
80 if (FdoExtension->ArbitersInitialized)
81 {
82 /* Not yet implemented */
84 while (TRUE);
85 }
86 else
87 {
88 /* No arbiters for this FDO */
90 }
91 }
92 else
93 {
94 /* Not the right interface */
96 }
97
98 /* Return the status */
99 return Status;
100}
#define PAGED_CODE()
LONG NTSTATUS
Definition: precomp.h:26
struct _PCI_FDO_EXTENSION * PPCI_FDO_EXTENSION
#define CmResourceTypePort
Definition: hwresource.cpp:123
#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

◆ ario_Initializer()

NTSTATUS NTAPI ario_Initializer ( IN PVOID  Instance)

Definition at line 48 of file ar_memio.c.

49{
51
52 /* Not yet implemented */
54 //while (TRUE);
55 return STATUS_SUCCESS;
56}
#define STATUS_SUCCESS
Definition: shellext.h:65
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_WMI_INSTANCE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_opt_ WDFWMIINSTANCE * Instance
Definition: wdfwmi.h:481

◆ armem_Constructor()

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

Definition at line 156 of file ar_memio.c.

162{
165 PAGED_CODE();
166
167 UNREFERENCED_PARAMETER(PciInterface);
171
172 /* Make sure it's the expected interface */
173 if ((ULONG_PTR)InterfaceData != CmResourceTypeMemory)
174 {
175 /* Arbiter support must have been initialized first */
176 if (FdoExtension->ArbitersInitialized)
177 {
178 /* Not yet implemented */
180 while (TRUE);
181 }
182 else
183 {
184 /* No arbiters for this FDO */
186 }
187 }
188 else
189 {
190 /* Not the right interface */
192 }
193
194 /* Return the status */
195 return Status;
196}
#define CmResourceTypeMemory
Definition: hwresource.cpp:125

◆ armem_Initializer()

NTSTATUS NTAPI armem_Initializer ( IN PVOID  Instance)

Definition at line 144 of file ar_memio.c.

145{
147
148 /* Not yet implemented */
150 //while (TRUE);
151 return STATUS_SUCCESS;
152}

Variable Documentation

◆ ArbiterInterfaceIo

PCI_INTERFACE ArbiterInterfaceIo
Initial value:
=
{
&GUID_ARBITER_INTERFACE_STANDARD,
0,
0,
0,
}
NTSTATUS NTAPI ario_Initializer(IN PVOID Instance)
Definition: ar_memio.c:48
NTSTATUS NTAPI ario_Constructor(IN PVOID DeviceExtension, IN PVOID PciInterface, IN PVOID InterfaceData, IN USHORT Version, IN USHORT Size, IN PINTERFACE Interface)
Definition: ar_memio.c:60
#define PCI_INTERFACE_FDO
Definition: pci.h:58
struct _ARBITER_INTERFACE ARBITER_INTERFACE

Definition at line 31 of file ar_memio.c.

◆ ArbiterInterfaceMemory

PCI_INTERFACE ArbiterInterfaceMemory
Initial value:
=
{
&GUID_ARBITER_INTERFACE_STANDARD,
0,
0,
0,
}
NTSTATUS NTAPI armem_Constructor(IN PVOID DeviceExtension, IN PVOID PciInterface, IN PVOID InterfaceData, IN USHORT Version, IN USHORT Size, IN PINTERFACE Interface)
Definition: ar_memio.c:156
NTSTATUS NTAPI armem_Initializer(IN PVOID Instance)
Definition: ar_memio.c:144
@ PciArb_Memory
Definition: pci.h:97

Definition at line 18 of file ar_memio.c.