xref: /reactos/drivers/bus/pcix/intrface/agpintrf.c (revision 45fd48bd)
1 /*
2  * PROJECT:         ReactOS PCI Bus Driver
3  * LICENSE:         BSD - See COPYING.ARM in the top level directory
4  * FILE:            drivers/bus/pci/intrface/agpintrf.c
5  * PURPOSE:         AGP Interface
6  * PROGRAMMERS:     ReactOS Portable Systems Group
7  */
8 
9 /* INCLUDES *******************************************************************/
10 
11 #include <pci.h>
12 
13 #include <ntagp.h>
14 
15 #define NDEBUG
16 #include <debug.h>
17 
18 /* GLOBALS ********************************************************************/
19 
20 PCI_INTERFACE AgpTargetInterface =
21 {
22     &GUID_AGP_TARGET_BUS_INTERFACE_STANDARD,
23     sizeof(AGP_BUS_INTERFACE_STANDARD),
24     AGP_BUS_INTERFACE_V1,
25     AGP_BUS_INTERFACE_V1,
26     PCI_INTERFACE_PDO,
27     0,
28     PciInterface_AgpTarget,
29     agpintrf_Constructor,
30     agpintrf_Initializer
31 };
32 
33 /* FUNCTIONS ******************************************************************/
34 
35 NTSTATUS
36 NTAPI
37 agpintrf_Initializer(IN PVOID Instance)
38 {
39     UNREFERENCED_PARAMETER(Instance);
40     /* PnP Interfaces don't get Initialized */
41     ASSERTMSG("PCI agpintrf_Initializer, unexpected call.\n", FALSE);
42     return STATUS_UNSUCCESSFUL;
43 }
44 
45 NTSTATUS
46 NTAPI
47 agpintrf_Constructor(IN PVOID DeviceExtension,
48                      IN PVOID Instance,
49                      IN PVOID InterfaceData,
50                      IN USHORT Version,
51                      IN USHORT Size,
52                      IN PINTERFACE Interface)
53 {
54     PPCI_PDO_EXTENSION PdoExtension = (PPCI_PDO_EXTENSION)DeviceExtension;
55 
56     UNREFERENCED_PARAMETER(Instance);
57     UNREFERENCED_PARAMETER(InterfaceData);
58     UNREFERENCED_PARAMETER(Version);
59     UNREFERENCED_PARAMETER(Size);
60     UNREFERENCED_PARAMETER(Interface);
61 
62     /* Only AGP bridges are supported (which are PCI-to-PCI Bridge Devices) */
63     if ((PdoExtension->BaseClass != PCI_CLASS_BRIDGE_DEV) ||
64         (PdoExtension->SubClass != PCI_SUBCLASS_BR_PCI_TO_PCI))
65     {
66         /* Fail any other PDO */
67         return STATUS_NOT_SUPPORTED;
68     }
69 
70     /* Not yet implemented */
71     UNIMPLEMENTED_DBGBREAK();
72     return STATUS_NOT_IMPLEMENTED;
73 }
74 
75 /* EOF */
76