ReactOS  0.4.14-dev-342-gdc047f9
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 }
#define TRUE
Definition: types.h:120
smooth NULL
Definition: ftsmooth.c:416
void * PVOID
Definition: retypes.h:9
PPCI_SECONDARY_EXTENSION NTAPI PciFindNextSecondaryExtension(IN PSINGLE_LIST_ENTRY ListHead, IN PCI_SIGNATURE ExtensionType)
Definition: utils.c:584
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
static const WCHAR L[]
Definition: oid.c:1250
Status
Definition: gdiplustypes.h:24
#define PCI_IS_ROOT_FDO(x)
Definition: pci.h:30
#define UNIMPLEMENTED
Definition: debug.h:114
Definition: pci.h:94

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 */
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 TRUE
Definition: types.h:120
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:359
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
LONG NTSTATUS
Definition: precomp.h:26
#define CmResourceTypePort
Definition: hwresource.cpp:123
#define PAGED_CODE()
Definition: video.h:57
uint32_t ULONG_PTR
Definition: typedefs.h:63
struct _PCI_FDO_EXTENSION * PPCI_FDO_EXTENSION
#define STATUS_INVALID_PARAMETER_5
Definition: ntstatus.h:465
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:359
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
Status
Definition: gdiplustypes.h:24
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:409
#define UNIMPLEMENTED
Definition: debug.h:114
IN PVOID IN PVOID InterfaceData
Definition: pci.h:359

◆ 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 UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
IN PVOID Instance
Definition: pci.h:359
#define UNIMPLEMENTED
Definition: debug.h:114
return STATUS_SUCCESS
Definition: btrfs.c:2938

◆ 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 */
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 TRUE
Definition: types.h:120
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:359
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
LONG NTSTATUS
Definition: precomp.h:26
#define PAGED_CODE()
Definition: video.h:57
uint32_t ULONG_PTR
Definition: typedefs.h:63
struct _PCI_FDO_EXTENSION * PPCI_FDO_EXTENSION
#define STATUS_INVALID_PARAMETER_5
Definition: ntstatus.h:465
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:359
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
Status
Definition: gdiplustypes.h:24
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:409
#define UNIMPLEMENTED
Definition: debug.h:114
IN PVOID IN PVOID InterfaceData
Definition: pci.h:359
#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 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
IN PVOID Instance
Definition: pci.h:359
#define UNIMPLEMENTED
Definition: debug.h:114
return STATUS_SUCCESS
Definition: btrfs.c:2938

Variable Documentation

◆ ArbiterInterfaceIo

PCI_INTERFACE ArbiterInterfaceIo
Initial value:
=
{
&GUID_ARBITER_INTERFACE_STANDARD,
0,
0,
0,
}
#define PCI_INTERFACE_FDO
Definition: pci.h:56
struct _ARBITER_INTERFACE ARBITER_INTERFACE
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
NTSTATUS NTAPI ario_Initializer(IN PVOID Instance)
Definition: ar_memio.c:48
Definition: pci.h:94

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
#define PCI_INTERFACE_FDO
Definition: pci.h:56
NTSTATUS NTAPI armem_Initializer(IN PVOID Instance)
Definition: ar_memio.c:144
struct _ARBITER_INTERFACE ARBITER_INTERFACE

Definition at line 18 of file ar_memio.c.