ReactOS 0.4.15-dev-5666-gc548b97
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
26extern "C" {
27#endif
28
29DEFINE_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
54typedef NTSTATUS
56 IN PVOID AgpContext,
57 IN ULONG AgpRate);
58
59typedef NTSTATUS
61 IN PVOID AgpContext,
62 IN ULONG NumberOfPages,
63 IN MEMORY_CACHING_TYPE MemoryType,
64 OUT PVOID *MapHandle,
66
67typedef NTSTATUS
69 IN PVOID AgpContext,
70 IN PVOID MapHandle);
71
72typedef NTSTATUS
74 IN PVOID AgpContext,
75 IN PVOID MapHandle,
76 IN ULONG NumberOfPages,
77 IN ULONG OffsetInPages,
80
81typedef NTSTATUS
83 IN PVOID AgpContext,
84 IN PVOID MapHandle,
85 IN ULONG NumberOfPages,
86 IN ULONG OffsetInPages);
87
88typedef NTSTATUS
90 IN PVOID AgpContext,
91 IN PVOID MapHandle,
92 IN ULONG NumberOfPages,
93 IN ULONG OffsetInPages,
94 OUT PMDL Mdl);
95
96typedef NTSTATUS
98 IN PVOID AgpContext,
99 IN PVOID MapHandle,
100 IN ULONG NumberOfPages,
101 IN ULONG OffsetInPages,
102 IN PMDL Mdl,
104
105typedef NTSTATUS
107 IN PVOID AgpContext,
108 IN PVOID MapHandle,
109 IN ULONG NumberOfPages,
110 IN ULONG OffsetInPages,
111 IN PMDL Mdl);
112
113typedef NTSTATUS
115 IN PVOID AgpContext);
116
117typedef NTSTATUS
119 IN PVOID AgpContext);
120
121typedef 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
131typedef NTSTATUS
133 IN PVOID AgpContext,
134 IN PVOID MapHandle,
135 IN ULONG NumberOfPages,
136 IN ULONG OffsetInPages,
137 IN PMDL Mdl);
138
139typedef NTSTATUS
141 IN PVOID AgpContext);
142
143typedef NTSTATUS
145 IN PVOID AgpContext,
146 IN ULONG Flags,
147 IN ULONG ULongsToCheck);
148
149typedef struct _AGP_INFO_COMMON {
160
161typedef struct _AGP_INFO_DRIVER {
168
169typedef struct _AGP_INFO {
173
174typedef VOID
176 IN PVOID AgpContext,
177 OUT PAGP_INFO AgpInfo);
178
205
206#ifdef __cplusplus
207}
208#endif
unsigned char BOOLEAN
#define VOID
Definition: acefi.h:82
#define NTSTATUS
Definition: precomp.h:20
VOID(WINAPI * PINTERFACE_DEREFERENCE)(PVOID Context)
Definition: precomp.h:16
VOID(WINAPI * PINTERFACE_REFERENCE)(PVOID Context)
Definition: precomp.h:13
unsigned int ULONG
Definition: retypes.h:1
NTSTATUS(NTAPI * PAGP_BUS_RELEASE_MEMORY)(IN PVOID AgpContext, IN PVOID MapHandle)
Definition: ntagp.h:68
VOID(NTAPI * PAGP_GET_INFO)(IN PVOID AgpContext, OUT PAGP_INFO AgpInfo)
Definition: ntagp.h:175
struct _AGP_INFO_COMMON AGP_INFO_COMMON
NTSTATUS(NTAPI * PAGP_FLUSH_GART_TLB)(IN PVOID AgpContext)
Definition: ntagp.h:140
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
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
struct _AGP_BUS_INTERFACE_STANDARD AGP_BUS_INTERFACE_STANDARD
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
NTSTATUS(NTAPI * PAGP_BUS_FREE_MEMORY)(IN PVOID AgpContext, IN PVOID MapHandle, IN ULONG NumberOfPages, IN ULONG OffsetInPages)
Definition: ntagp.h:82
struct _AGP_INFO * PAGP_INFO
NTSTATUS(NTAPI * PAGP_FLUSH_CHIPSET_CACHES)(IN PVOID AgpContext)
Definition: ntagp.h:114
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
struct _AGP_INFO AGP_INFO
struct _AGP_INFO_DRIVER AGP_INFO_DRIVER
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
struct _AGP_INFO_DRIVER * PAGP_INFO_DRIVER
NTSTATUS(NTAPI * PAGP_CHECK_INTEGRITY)(IN PVOID AgpContext)
Definition: ntagp.h:118
NTSTATUS(NTAPI * PAGP_UNMAP_MEMORY)(IN PVOID AgpContext, IN PVOID MapHandle, IN ULONG NumberOfPages, IN ULONG OffsetInPages, IN PMDL Mdl)
Definition: ntagp.h:106
NTSTATUS(NTAPI * PAGP_CHECK_GUARD_PAGE)(IN PVOID AgpContext, IN ULONG Flags, IN ULONG ULongsToCheck)
Definition: ntagp.h:144
struct _AGP_BUS_INTERFACE_STANDARD * PAGP_BUS_INTERFACE_STANDARD
struct _AGP_INFO_COMMON * PAGP_INFO_COMMON
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
NTSTATUS(NTAPI * PAGP_BUS_SET_RATE)(IN PVOID AgpContext, IN ULONG AgpRate)
Definition: ntagp.h:55
unsigned short USHORT
Definition: pedump.c:61
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
PAGP_GET_INFO GetAgpInfo
Definition: ntagp.h:203
PAGP_MAP_MEMORY_EX MapMemoryEx
Definition: ntagp.h:199
PAGP_UNMAP_MEMORY UnMapMemory
Definition: ntagp.h:196
PHYSICAL_ADDRESS MaxPhysicalAddress
Definition: ntagp.h:194
PINTERFACE_REFERENCE InterfaceReference
Definition: ntagp.h:183
PAGP_BUS_FREE_MEMORY FreeMemory
Definition: ntagp.h:189
PAGP_BUS_RELEASE_MEMORY ReleaseMemory
Definition: ntagp.h:187
PAGP_MAP_MEMORY MapMemory
Definition: ntagp.h:195
PHYSICAL_ADDRESS AgpBase
Definition: ntagp.h:193
PAGP_CHECK_INTEGRITY CheckIntegrity
Definition: ntagp.h:198
PAGP_FLUSH_GART_TLB FlushGartTLB
Definition: ntagp.h:201
PINTERFACE_DEREFERENCE InterfaceDereference
Definition: ntagp.h:184
PAGP_BUS_COMMIT_MEMORY CommitMemory
Definition: ntagp.h:188
PAGP_GET_MAPPED_PAGES GetMappedPages
Definition: ntagp.h:190
PAGP_FLUSH_CHIPSET_CACHES FlushChipsetCaches
Definition: ntagp.h:197
PAGP_CHECK_GUARD_PAGE CheckGuardPage
Definition: ntagp.h:202
PAGP_BUS_RESERVE_MEMORY ReserveMemory
Definition: ntagp.h:186
PAGP_UNMAP_MEMORY_EX UnMapMemoryEx
Definition: ntagp.h:200
PAGP_BUS_SET_RATE SetRate
Definition: ntagp.h:191
UCHAR HwRevisionId
Definition: ntagp.h:156
PCI_AGP_CAPABILITY MasterCap
Definition: ntagp.h:150
USHORT VendorId
Definition: ntagp.h:153
USHORT DeviceId
Definition: ntagp.h:152
BOOLEAN GuardPageCorruption
Definition: ntagp.h:158
USHORT SubVendorId
Definition: ntagp.h:154
ULONG VerifierFlags
Definition: ntagp.h:157
PCI_AGP_CAPABILITY TargetCap
Definition: ntagp.h:151
USHORT SubSystemId
Definition: ntagp.h:155
PHYSICAL_ADDRESS GartTranslationTable
Definition: ntagp.h:165
ULONG ApertureLength
Definition: ntagp.h:166
ULONG AGPReg1
Definition: ntagp.h:162
ULONG AGPReg2
Definition: ntagp.h:163
PHYSICAL_ADDRESS ApertureStart
Definition: ntagp.h:164
AGP_INFO_DRIVER DriverInfo
Definition: ntagp.h:171
AGP_INFO_COMMON CommonInfo
Definition: ntagp.h:170
static CONST DWORD MemoryBase[]
Definition: svga.c:31
#define OPTIONAL
Definition: typedefs.h:41
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1098
enum _MEMORY_CACHING_TYPE MEMORY_CACHING_TYPE
unsigned char UCHAR
Definition: xmlstorage.h:181