reactos/reactos/drivers/bus/pcix/intrface/agpintrf.c
evb add164dcfa Fix for code to handle IRP dispatching when unrecognized IRP (Thanks you sir_richard)
Add FDO IRP_MN_QUERY_INTERFACE support (it calls PciQueryInterface)
Add all PCI interface descriptor: PciLocationInterface (GUID_PNP_LOCATION_INTERFACE), PciPmeInterface (GUID_PCI_PME_INTERFACE), PciCardbusPrivateInterface (GUID_PCI_CARDBUS_INTERFACE_PRIVATE), PciLegacyDeviceDetectionInterface (GUID_LEGACY_DEVICE_DETECTION_STANDARD), AgpTargetInterface (GUID_AGP_TARGET_BUS_INTERFACE_STANDARD), PciRoutingInterface (GUID_INT_ROUTE_INTERFACE_STANDARD), BusHandlerInterface (GUID_BUS_INTERFACE_STANDARD) and stub initializer and constructor.
Add missing devhere.c interface file
Add all PCI arbiter descritptor: ArbiterInterfaceBusNumber, ArbiterInterfaceMemory, ArbiterInterfaceIo. Write constructor stub but not handled ArbitersInitialized == TRUE
Also add last-resort PCI interface: TranslatorInterfaceInterrupt (GUID_TRANSLATOR_INTERFACE_STANDARD) and part implement tranirq_Constructor
Add PciQueryInterface to find correct FDO/PDO/ROOT interface for a request and call interface constructor
Fix interface signatures, fix interface constructor type and PCI_INTERFACE, add interface flags (Thanks sir_richard)
Fix Aribtriter code (Thanks sir_richard)
Now another 1200 codes added, soon time for enumeration code!

svn path=/trunk/; revision=48074
2010-07-16 00:39:54 +00:00

68 lines
1.8 KiB
C

/*
* PROJECT: ReactOS PCI Bus Driver
* LICENSE: BSD - See COPYING.ARM in the top level directory
* FILE: drivers/bus/pci/intrface/agpintrf.c
* PURPOSE: AGP Interface
* PROGRAMMERS: ReactOS Portable Systems Group
*/
/* INCLUDES *******************************************************************/
#include <pci.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS ********************************************************************/
PCI_INTERFACE AgpTargetInterface =
{
&GUID_AGP_TARGET_BUS_INTERFACE_STANDARD,
sizeof(AGP_BUS_INTERFACE_STANDARD),
AGP_BUS_INTERFACE_V1,
AGP_BUS_INTERFACE_V1,
PCI_INTERFACE_PDO,
0,
PciInterface_AgpTarget,
agpintrf_Constructor,
agpintrf_Initializer
};
/* FUNCTIONS ******************************************************************/
NTSTATUS
NTAPI
agpintrf_Initializer(IN PVOID Instance)
{
/* PnP Interfaces don't get Initialized */
ASSERTMSG(FALSE, "PCI agpintrf_Initializer, unexpected call.");
return STATUS_UNSUCCESSFUL;
}
NTSTATUS
NTAPI
agpintrf_Constructor(IN PVOID DeviceExtension,
IN PVOID Instance,
IN PVOID InterfaceData,
IN USHORT Version,
IN USHORT Size,
IN PINTERFACE Interface)
{
#if 0 // when have PDO commit
PPCI_PDO_EXTENSION PdoExtension = (PPCI_PDO_EXTENSION)DeviceExtension;
/* Only AGP bridges are supported (which are PCI-to-PCI Bridge Devices) */
if ((PdoExtension->BaseClass != PCI_CLASS_BRIDGE_DEV) ||
(PdoExtension->SubClass != PCI_SUBCLASS_BR_PCI_TO_PCI))
{
/* Fail any other PDO */
return STATUS_NOT_SUPPORTED;
}
#endif
/* Not yet implemented */
UNIMPLEMENTED;
while (TRUE);
}
/* EOF */