ReactOS  0.4.15-dev-1018-g0695ecb
ntagp.h
Go to the documentation of this file.
1 /*
2  * ntagp.h
3  *
4  * NT AGP bus driver interface
5  *
6  * This file is part of the w32api package.
7  *
8  * Contributors:
9  * Created by Gregor Anich <blight@blight.eu.org>
10  *
11  * THIS SOFTWARE IS NOT COPYRIGHTED
12  *
13  * This source code is offered for use in the public domain. You may
14  * use, modify or distribute it freely.
15  *
16  * This code is distributed in the hope that it will be useful but
17  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18  * DISCLAIMED. This includes but is not limited to warranties of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20  *
21  */
22 
23 #pragma once
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 DEFINE_GUID(GUID_AGP_BUS_INTERFACE_STANDARD, 0x2ef74803, 0xd8d3, 0x11d1, 0x9c, 0xaa, 0x00, 0xc0, 0xf0, 0x16, 0x56, 0x36);
30 
31 #define AGP_BUS_INTERFACE_V1 1
32 #define AGP_BUS_INTERFACE_V2 2
33 #define AGP_BUS_INTERFACE_V3 3
34 #define AGP_BUS_INTERFACE_V4 4
35 #define AGP_BUS_INTERFACE_V5 5
36 
37 /* Indicates wether the GART supports mapping of physical memory for the CPU */
38 #define AGP_CAPABILITIES_MAP_PHYSICAL 0x00000001
39 #define AGP_CAPABILITIES_CACHE_COHERENT 0x00000002
40 #define AGP_CAPABILITIES_REQUIRES_GPU_FLUSH 0x00000004
41 
42 #define AGP_SET_RATE_DISABLE_SBA 0x00010000
43 #define AGP_SET_RATE_DISABLE_FW 0x00020000
44 
45 #define AGP_GUARD_PAGE_CHECK_FIRST_ULONG 0x00000001
46 #define AGP_GUARD_PAGE_CHECK_USE_SAME_OFFSET 0x00000002
47 #define AGP_GUARD_PAGE_CHECK_DO_NOT_BUGCHECK 0x00000004
48 
49 #define AGP_BUS_INTERFACE_V1_SIZE (FIELD_OFFSET(AGP_BUS_INTERFACE_STANDARD,SetRate))
50 #define AGP_BUS_INTERFACE_V2_SIZE (FIELD_OFFSET(AGP_BUS_INTERFACE_STANDARD, AgpSize))
51 #define AGP_BUS_INTERFACE_V3_SIZE (FIELD_OFFSET(AGP_BUS_INTERFACE_STANDARD, FlushChipsetCaches))
52 #define AGP_BUS_INTERFACE_V4_SIZE (FIELD_OFFSET(AGP_BUS_INTERFACE_STANDARD, MapMemoryEx))
53 
54 typedef NTSTATUS
56  IN PVOID AgpContext,
57  IN ULONG AgpRate);
58 
59 typedef NTSTATUS
61  IN PVOID AgpContext,
62  IN ULONG NumberOfPages,
63  IN MEMORY_CACHING_TYPE MemoryType,
64  OUT PVOID *MapHandle,
66 
67 typedef NTSTATUS
69  IN PVOID AgpContext,
70  IN PVOID MapHandle);
71 
72 typedef NTSTATUS
74  IN PVOID AgpContext,
75  IN PVOID MapHandle,
76  IN ULONG NumberOfPages,
77  IN ULONG OffsetInPages,
78  IN OUT PMDL Mdl OPTIONAL,
80 
81 typedef NTSTATUS
83  IN PVOID AgpContext,
84  IN PVOID MapHandle,
85  IN ULONG NumberOfPages,
86  IN ULONG OffsetInPages);
87 
88 typedef NTSTATUS
90  IN PVOID AgpContext,
91  IN PVOID MapHandle,
92  IN ULONG NumberOfPages,
93  IN ULONG OffsetInPages,
94  OUT PMDL Mdl);
95 
96 typedef NTSTATUS
98  IN PVOID AgpContext,
99  IN PVOID MapHandle,
100  IN ULONG NumberOfPages,
101  IN ULONG OffsetInPages,
102  IN PMDL Mdl,
104 
105 typedef NTSTATUS
107  IN PVOID AgpContext,
108  IN PVOID MapHandle,
109  IN ULONG NumberOfPages,
110  IN ULONG OffsetInPages,
111  IN PMDL Mdl);
112 
113 typedef NTSTATUS
115  IN PVOID AgpContext);
116 
117 typedef NTSTATUS
119  IN PVOID AgpContext);
120 
121 typedef NTSTATUS
123  IN PVOID AgpContext,
124  IN PVOID MapHandle,
125  IN ULONG NumberOfPages,
126  IN ULONG OffsetInPages,
127  IN PMDL Mdl,
128  IN MEMORY_CACHING_TYPE *CacheTypeOverride OPTIONAL,
130 
131 typedef NTSTATUS
133  IN PVOID AgpContext,
134  IN PVOID MapHandle,
135  IN ULONG NumberOfPages,
136  IN ULONG OffsetInPages,
137  IN PMDL Mdl);
138 
139 typedef NTSTATUS
141  IN PVOID AgpContext);
142 
143 typedef NTSTATUS
145  IN PVOID AgpContext,
146  IN ULONG Flags,
147  IN ULONG ULongsToCheck);
148 
149 typedef struct _AGP_INFO_COMMON {
160 
161 typedef struct _AGP_INFO_DRIVER {
168 
169 typedef struct _AGP_INFO {
172 } AGP_INFO, *PAGP_INFO;
173 
174 typedef VOID
176  IN PVOID AgpContext,
177  OUT PAGP_INFO AgpInfo);
178 
205 
206 #ifdef __cplusplus
207 }
208 #endif
PAGP_MAP_MEMORY MapMemory
Definition: ntagp.h:195
DEFINE_GUID(GUID_AGP_BUS_INTERFACE_STANDARD, 0x2ef74803, 0xd8d3, 0x11d1, 0x9c, 0xaa, 0x00, 0xc0, 0xf0, 0x16, 0x56, 0x36)
NTSTATUS(NTAPI * PAGP_UNMAP_MEMORY)(IN PVOID AgpContext, IN PVOID MapHandle, IN ULONG NumberOfPages, IN ULONG OffsetInPages, IN PMDL Mdl)
Definition: ntagp.h:106
#define IN
Definition: typedefs.h:39
VOID(NTAPI * PAGP_GET_INFO)(IN PVOID AgpContext, OUT PAGP_INFO AgpInfo)
Definition: ntagp.h:175
NTSTATUS(NTAPI * PAGP_FLUSH_CHIPSET_CACHES)(IN PVOID AgpContext)
Definition: ntagp.h:114
PAGP_CHECK_INTEGRITY CheckIntegrity
Definition: ntagp.h:198
PCI_AGP_CAPABILITY TargetCap
Definition: ntagp.h:151
ULONG ApertureLength
Definition: ntagp.h:166
PINTERFACE_DEREFERENCE InterfaceDereference
Definition: ntagp.h:184
AGP_INFO_COMMON CommonInfo
Definition: ntagp.h:170
VOID(WINAPI * PINTERFACE_DEREFERENCE)(PVOID Context)
Definition: precomp.h:16
PAGP_CHECK_GUARD_PAGE CheckGuardPage
Definition: ntagp.h:202
NTSTATUS(NTAPI * PAGP_CHECK_INTEGRITY)(IN PVOID AgpContext)
Definition: ntagp.h:118
PHYSICAL_ADDRESS MaxPhysicalAddress
Definition: ntagp.h:194
NTSTATUS(NTAPI * PAGP_BUS_FREE_MEMORY)(IN PVOID AgpContext, IN PVOID MapHandle, IN ULONG NumberOfPages, IN ULONG OffsetInPages)
Definition: ntagp.h:82
NTSTATUS(NTAPI * PAGP_BUS_SET_RATE)(IN PVOID AgpContext, IN ULONG AgpRate)
Definition: ntagp.h:55
struct _AGP_INFO AGP_INFO
AGP_INFO_DRIVER DriverInfo
Definition: ntagp.h:171
NTSTATUS(NTAPI * PAGP_BUS_COMMIT_MEMORY)(IN PVOID AgpContext, IN PVOID MapHandle, IN ULONG NumberOfPages, IN ULONG OffsetInPages, IN OUT PMDL Mdl OPTIONAL, OUT PHYSICAL_ADDRESS *MemoryBase)
Definition: ntagp.h:73
struct _AGP_BUS_INTERFACE_STANDARD * PAGP_BUS_INTERFACE_STANDARD
NTSTATUS(NTAPI * PAGP_GET_MAPPED_PAGES)(IN PVOID AgpContext, IN PVOID MapHandle, IN ULONG NumberOfPages, IN ULONG OffsetInPages, OUT PMDL Mdl)
Definition: ntagp.h:89
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
PHYSICAL_ADDRESS AgpBase
Definition: ntagp.h:193
NTSTATUS(NTAPI * PAGP_MAP_MEMORY_EX)(IN PVOID AgpContext, IN PVOID MapHandle, IN ULONG NumberOfPages, IN ULONG OffsetInPages, IN PMDL Mdl, IN MEMORY_CACHING_TYPE *CacheTypeOverride OPTIONAL, OUT PHYSICAL_ADDRESS *MemoryBase)
Definition: ntagp.h:122
ULONG AGPReg1
Definition: ntagp.h:162
unsigned char BOOLEAN
NTSTATUS(NTAPI * PAGP_CHECK_GUARD_PAGE)(IN PVOID AgpContext, IN ULONG Flags, IN ULONG ULongsToCheck)
Definition: ntagp.h:144
NTSTATUS(NTAPI * PAGP_UNMAP_MEMORY_EX)(IN PVOID AgpContext, IN PVOID MapHandle, IN ULONG NumberOfPages, IN ULONG OffsetInPages, IN PMDL Mdl)
Definition: ntagp.h:132
PINTERFACE_REFERENCE InterfaceReference
Definition: ntagp.h:183
PAGP_GET_MAPPED_PAGES GetMappedPages
Definition: ntagp.h:190
PAGP_FLUSH_CHIPSET_CACHES FlushChipsetCaches
Definition: ntagp.h:197
BOOLEAN GuardPageCorruption
Definition: ntagp.h:158
NTSTATUS(NTAPI * PAGP_BUS_RESERVE_MEMORY)(IN PVOID AgpContext, IN ULONG NumberOfPages, IN MEMORY_CACHING_TYPE MemoryType, OUT PVOID *MapHandle, OUT PHYSICAL_ADDRESS *PhysicalAddress OPTIONAL)
Definition: ntagp.h:60
static CONST DWORD MemoryBase[]
Definition: svga.c:31
NTSTATUS(NTAPI * PAGP_FLUSH_GART_TLB)(IN PVOID AgpContext)
Definition: ntagp.h:140
ULONG VerifierFlags
Definition: ntagp.h:157
PAGP_MAP_MEMORY_EX MapMemoryEx
Definition: ntagp.h:199
struct _AGP_INFO_COMMON AGP_INFO_COMMON
PHYSICAL_ADDRESS GartTranslationTable
Definition: ntagp.h:165
USHORT VendorId
Definition: ntagp.h:153
ULONG AGPReg2
Definition: ntagp.h:163
UCHAR HwRevisionId
Definition: ntagp.h:156
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1065
unsigned char UCHAR
Definition: xmlstorage.h:181
PAGP_BUS_SET_RATE SetRate
Definition: ntagp.h:191
struct _AGP_INFO * PAGP_INFO
#define NTSTATUS
Definition: precomp.h:20
#define VOID
Definition: acefi.h:82
PCI_AGP_CAPABILITY MasterCap
Definition: ntagp.h:150
struct _AGP_INFO_COMMON * PAGP_INFO_COMMON
PAGP_GET_INFO GetAgpInfo
Definition: ntagp.h:203
ULONG_PTR SIZE_T
Definition: typedefs.h:80
unsigned short USHORT
Definition: pedump.c:61
USHORT SubVendorId
Definition: ntagp.h:154
USHORT SubSystemId
Definition: ntagp.h:155
#define OPTIONAL
Definition: typedefs.h:41
NTSTATUS(NTAPI * PAGP_BUS_RELEASE_MEMORY)(IN PVOID AgpContext, IN PVOID MapHandle)
Definition: ntagp.h:68
struct _AGP_INFO_DRIVER AGP_INFO_DRIVER
PHYSICAL_ADDRESS ApertureStart
Definition: ntagp.h:164
#define OUT
Definition: typedefs.h:40
unsigned int ULONG
Definition: retypes.h:1
PAGP_BUS_COMMIT_MEMORY CommitMemory
Definition: ntagp.h:188
struct _AGP_INFO_DRIVER * PAGP_INFO_DRIVER
NTSTATUS(NTAPI * PAGP_MAP_MEMORY)(IN PVOID AgpContext, IN PVOID MapHandle, IN ULONG NumberOfPages, IN ULONG OffsetInPages, IN PMDL Mdl, OUT PHYSICAL_ADDRESS *MemoryBase)
Definition: ntagp.h:97
struct _AGP_BUS_INTERFACE_STANDARD AGP_BUS_INTERFACE_STANDARD
PAGP_BUS_RELEASE_MEMORY ReleaseMemory
Definition: ntagp.h:187
USHORT DeviceId
Definition: ntagp.h:152
VOID(WINAPI * PINTERFACE_REFERENCE)(PVOID Context)
Definition: precomp.h:13
enum _MEMORY_CACHING_TYPE MEMORY_CACHING_TYPE
PAGP_UNMAP_MEMORY_EX UnMapMemoryEx
Definition: ntagp.h:200
PAGP_FLUSH_GART_TLB FlushGartTLB
Definition: ntagp.h:201
PAGP_UNMAP_MEMORY UnMapMemory
Definition: ntagp.h:196
PAGP_BUS_RESERVE_MEMORY ReserveMemory
Definition: ntagp.h:186
PAGP_BUS_FREE_MEMORY FreeMemory
Definition: ntagp.h:189