OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [drivers/] [char/] [agp/] [agp.h] - Blame information for rev 1275

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 * AGPGART module version 0.99
3
 * Copyright (C) 1999 Jeff Hartmann
4
 * Copyright (C) 1999 Precision Insight, Inc.
5
 * Copyright (C) 1999 Xi Graphics, Inc.
6
 *
7
 * Permission is hereby granted, free of charge, to any person obtaining a
8
 * copy of this software and associated documentation files (the "Software"),
9
 * to deal in the Software without restriction, including without limitation
10
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11
 * and/or sell copies of the Software, and to permit persons to whom the
12
 * Software is furnished to do so, subject to the following conditions:
13
 *
14
 * The above copyright notice and this permission notice shall be included
15
 * in all copies or substantial portions of the Software.
16
 *
17
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
20
 * JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
21
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
22
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
23
 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
 *
25
 */
26
 
27
#ifndef _AGP_BACKEND_PRIV_H
28
#define _AGP_BACKEND_PRIV_H 1
29
 
30
enum aper_size_type {
31
        U8_APER_SIZE,
32
        U16_APER_SIZE,
33
        U32_APER_SIZE,
34
        LVL2_APER_SIZE,
35
        FIXED_APER_SIZE
36
};
37
 
38
typedef struct _gatt_mask {
39
        unsigned long mask;
40
        u32 type;
41
        /* totally device specific, for integrated chipsets that
42
         * might have different types of memory masks.  For other
43
         * devices this will probably be ignored */
44
} gatt_mask;
45
 
46
typedef struct _aper_size_info_8 {
47
        int size;
48
        int num_entries;
49
        int page_order;
50
        u8 size_value;
51
} aper_size_info_8;
52
 
53
typedef struct _aper_size_info_16 {
54
        int size;
55
        int num_entries;
56
        int page_order;
57
        u16 size_value;
58
} aper_size_info_16;
59
 
60
typedef struct _aper_size_info_32 {
61
        int size;
62
        int num_entries;
63
        int page_order;
64
        u32 size_value;
65
} aper_size_info_32;
66
 
67
typedef struct _aper_size_info_lvl2 {
68
        int size;
69
        int num_entries;
70
        u32 size_value;
71
} aper_size_info_lvl2;
72
 
73
typedef struct _aper_size_info_fixed {
74
        int size;
75
        int num_entries;
76
        int page_order;
77
} aper_size_info_fixed;
78
 
79
struct agp_bridge_data {
80
        agp_version *version;
81
        void *aperture_sizes;
82
        void *previous_size;
83
        void *current_size;
84
        void *dev_private_data;
85
        struct pci_dev *dev;
86
        gatt_mask *masks;
87
        u32 *gatt_table;
88
        u32 *gatt_table_real;
89
        unsigned long scratch_page;
90
        unsigned long scratch_page_real;
91
        unsigned long gart_bus_addr;
92
        unsigned long gatt_bus_addr;
93
        u32 mode;
94
        enum chipset_type type;
95
        enum aper_size_type size_type;
96
        unsigned long *key_list;
97
        atomic_t current_memory_agp;
98
        atomic_t agp_in_use;
99
        int max_memory_agp;     /* in number of pages */
100
        int needs_scratch_page;
101
        int aperture_size_idx;
102
        int num_aperture_sizes;
103
        int capndx;
104
        int cant_use_aperture;
105
 
106
        /* Links to driver specific functions */
107
 
108
        int (*fetch_size) (void);
109
        int (*configure) (void);
110
        void (*agp_enable) (u32);
111
        void (*cleanup) (void);
112
        void (*tlb_flush) (agp_memory *);
113
        unsigned long (*mask_memory) (unsigned long, int);
114
        void (*cache_flush) (void);
115
        int (*create_gatt_table) (void);
116
        int (*free_gatt_table) (void);
117
        int (*insert_memory) (agp_memory *, off_t, int);
118
        int (*remove_memory) (agp_memory *, off_t, int);
119
        agp_memory *(*alloc_by_type) (size_t, int);
120
        void (*free_by_type) (agp_memory *);
121
        unsigned long (*agp_alloc_page) (void);
122
        void (*agp_destroy_page) (unsigned long);
123
        int (*suspend)(void);
124
        void (*resume)(void);
125
 
126
};
127
 
128
#define OUTREG64(mmap, addr, val)   __raw_writeq((val), (mmap)+(addr))
129
#define OUTREG32(mmap, addr, val)   __raw_writel((val), (mmap)+(addr))
130
#define OUTREG16(mmap, addr, val)   __raw_writew((val), (mmap)+(addr))
131
#define OUTREG8(mmap, addr, val)   __raw_writeb((val), (mmap)+(addr))
132
 
133
#define INREG64(mmap, addr)         __raw_readq((mmap)+(addr))
134
#define INREG32(mmap, addr)         __raw_readl((mmap)+(addr))
135
#define INREG16(mmap, addr)         __raw_readw((mmap)+(addr))
136
#define INREG8(mmap, addr)         __raw_readb((mmap)+(addr))
137
 
138
#define KB(x) ((x) * 1024)
139
#define MB(x) (KB (KB (x)))
140
#define GB(x) (MB (KB (x)))
141
 
142
#define CACHE_FLUSH     agp_bridge.cache_flush
143
#define A_SIZE_8(x)     ((aper_size_info_8 *) x)
144
#define A_SIZE_16(x)    ((aper_size_info_16 *) x)
145
#define A_SIZE_32(x)    ((aper_size_info_32 *) x)
146
#define A_SIZE_LVL2(x)  ((aper_size_info_lvl2 *) x)
147
#define A_SIZE_FIX(x)   ((aper_size_info_fixed *) x)
148
#define A_IDX8()        (A_SIZE_8(agp_bridge.aperture_sizes) + i)
149
#define A_IDX16()       (A_SIZE_16(agp_bridge.aperture_sizes) + i)
150
#define A_IDX32()       (A_SIZE_32(agp_bridge.aperture_sizes) + i)
151
#define A_IDXLVL2()     (A_SIZE_LVL2(agp_bridge.aperture_sizes) + i)
152
#define A_IDXFIX()      (A_SIZE_FIX(agp_bridge.aperture_sizes) + i)
153
#define MAXKEY          (4096 * 32)
154
 
155
#define AGPGART_MODULE_NAME     "agpgart"
156
#define PFX                     AGPGART_MODULE_NAME ": "
157
 
158
#define PGE_EMPTY(p) (!(p) || (p) == (unsigned long) agp_bridge.scratch_page)
159
 
160
#ifndef PCI_DEVICE_ID_VIA_82C691_0
161
#define PCI_DEVICE_ID_VIA_82C691_0      0x0691
162
#endif
163
#ifndef PCI_DEVICE_ID_VIA_8371_0
164
#define PCI_DEVICE_ID_VIA_8371_0      0x0391
165
#endif
166
#ifndef PCI_DEVICE_ID_VIA_8363_0
167
#define PCI_DEVICE_ID_VIA_8363_0      0x0305
168
#endif
169
#ifndef PCI_DEVICE_ID_VIA_8601_0
170
#define PCI_DEVICE_ID_VIA_8601_0      0x0601
171
#endif
172
#ifndef PCI_DEVICE_ID_VIA_82C694X_0
173
#define PCI_DEVICE_ID_VIA_82C694X_0      0x0605
174
#endif
175
#ifndef PCI_DEVICE_ID_VIA_8380_0
176
#define PCI_DEVICE_ID_VIA_8380_0        0x0204
177
#endif
178
#ifndef PCI_DEVICE_ID_VIA_8385_0
179
#define PCI_DEVICE_ID_VIA_8385_0        0x3188
180
#endif 
181
#ifndef PCI_DEVICE_ID_INTEL_810_0
182
#define PCI_DEVICE_ID_INTEL_810_0       0x7120
183
#endif
184
#ifndef PCI_DEVICE_ID_INTEL_845_G_0
185
#define PCI_DEVICE_ID_INTEL_845_G_0     0x2560
186
#endif
187
#ifndef PCI_DEVICE_ID_INTEL_845_G_1
188
#define PCI_DEVICE_ID_INTEL_845_G_1     0x2562
189
#endif
190
#ifndef PCI_DEVICE_ID_INTEL_830_M_0
191
#define PCI_DEVICE_ID_INTEL_830_M_0     0x3575
192
#endif
193
#ifndef PCI_DEVICE_ID_INTEL_830_M_1
194
#define PCI_DEVICE_ID_INTEL_830_M_1     0x3577
195
#endif
196
#ifndef PCI_DEVICE_ID_INTEL_855_GM_0
197
#define PCI_DEVICE_ID_INTEL_855_GM_0    0x3580
198
#endif
199
#ifndef PCI_DEVICE_ID_INTEL_855_GM_1
200
#define PCI_DEVICE_ID_INTEL_855_GM_1    0x3582
201
#endif
202
#ifndef PCI_DEVICE_ID_INTEL_855_PM_0
203
#define PCI_DEVICE_ID_INTEL_855_PM_0    0x3340
204
#endif
205
#ifndef PCI_DEVICE_ID_INTEL_855_PM_1
206
#define PCI_DEVICE_ID_INTEL_855_PM_1    0x3342
207
#endif
208
#ifndef PCI_DEVICE_ID_INTEL_865_G_0
209
#define PCI_DEVICE_ID_INTEL_865_G_0     0x2570
210
#endif
211
#ifndef PCI_DEVICE_ID_INTEL_865_G_1
212
#define PCI_DEVICE_ID_INTEL_865_G_1     0x2572
213
#endif
214
#ifndef PCI_DEVICE_ID_INTEL_820_0
215
#define PCI_DEVICE_ID_INTEL_820_0       0x2500
216
#endif
217
#ifndef PCI_DEVICE_ID_INTEL_820_UP_0
218
#define PCI_DEVICE_ID_INTEL_820_UP_0    0x2501
219
#endif
220
#ifndef PCI_DEVICE_ID_INTEL_840_0
221
#define PCI_DEVICE_ID_INTEL_840_0               0x1a21
222
#endif
223
#ifndef PCI_DEVICE_ID_INTEL_845_0
224
#define PCI_DEVICE_ID_INTEL_845_0     0x1a30
225
#endif
226
#ifndef PCI_DEVICE_ID_INTEL_850_0
227
#define PCI_DEVICE_ID_INTEL_850_0     0x2530
228
#endif
229
#ifndef PCI_DEVICE_ID_INTEL_860_0
230
#define PCI_DEVICE_ID_INTEL_860_0     0x2531
231
#endif
232
#ifndef PCI_DEVICE_ID_INTEL_7205_0
233
#define PCI_DEVICE_ID_INTEL_7205_0     0x255d
234
#endif
235
#ifndef PCI_DEVICE_ID_INTEL_7505_0
236
#define PCI_DEVICE_ID_INTEL_7505_0     0x2550
237
#endif
238
#ifndef PCI_DEVICE_ID_INTEL_810_DC100_0
239
#define PCI_DEVICE_ID_INTEL_810_DC100_0 0x7122
240
#endif
241
#ifndef PCI_DEVICE_ID_INTEL_810_E_0
242
#define PCI_DEVICE_ID_INTEL_810_E_0     0x7124
243
#endif
244
#ifndef PCI_DEVICE_ID_INTEL_82443GX_0
245
#define PCI_DEVICE_ID_INTEL_82443GX_0   0x71a0
246
#endif
247
#ifndef PCI_DEVICE_ID_INTEL_810_1
248
#define PCI_DEVICE_ID_INTEL_810_1       0x7121
249
#endif
250
#ifndef PCI_DEVICE_ID_INTEL_810_DC100_1
251
#define PCI_DEVICE_ID_INTEL_810_DC100_1 0x7123
252
#endif
253
#ifndef PCI_DEVICE_ID_INTEL_810_E_1
254
#define PCI_DEVICE_ID_INTEL_810_E_1     0x7125
255
#endif
256
#ifndef PCI_DEVICE_ID_INTEL_815_0
257
#define PCI_DEVICE_ID_INTEL_815_0       0x1130
258
#endif
259
#ifndef PCI_DEVICE_ID_INTEL_815_1
260
#define PCI_DEVICE_ID_INTEL_815_1       0x1132
261
#endif
262
#ifndef PCI_DEVICE_ID_INTEL_82443GX_1
263
#define PCI_DEVICE_ID_INTEL_82443GX_1   0x71a1
264
#endif
265
#ifndef PCI_DEVICE_ID_INTEL_460GX
266
#define PCI_DEVICE_ID_INTEL_460GX       0x84ea
267
#endif
268
#ifndef PCI_DEVICE_ID_AMD_IRONGATE_0
269
#define PCI_DEVICE_ID_AMD_IRONGATE_0    0x7006
270
#endif
271
#ifndef PCI_DEVICE_ID_AMD_761_0
272
#define PCI_DEVICE_ID_AMD_761_0         0x700e
273
#endif
274
#ifndef PCI_DEVICE_ID_AMD_762_0
275
#define PCI_DEVICE_ID_AMD_762_0         0x700C
276
#endif
277
#ifndef PCI_DEVICE_ID_AMD_8151_0
278
#define PCI_DEVICE_ID_AMD_8151_0        0x7454
279
#endif
280
#ifndef PCI_VENDOR_ID_AL
281
#define PCI_VENDOR_ID_AL                0x10b9
282
#endif
283
#ifndef PCI_DEVICE_ID_AL_M1541_0
284
#define PCI_DEVICE_ID_AL_M1541_0        0x1541
285
#endif
286
#ifndef PCI_DEVICE_ID_AL_M1621_0
287
#define PCI_DEVICE_ID_AL_M1621_0        0x1621
288
#endif
289
#ifndef PCI_DEVICE_ID_AL_M1631_0
290
#define PCI_DEVICE_ID_AL_M1631_0        0x1631
291
#endif
292
#ifndef PCI_DEVICE_ID_AL_M1632_0
293
#define PCI_DEVICE_ID_AL_M1632_0        0x1632
294
#endif
295
#ifndef PCI_DEVICE_ID_AL_M1641_0
296
#define PCI_DEVICE_ID_AL_M1641_0        0x1641
297
#endif
298
#ifndef PCI_DEVICE_ID_AL_M1644_0
299
#define PCI_DEVICE_ID_AL_M1644_0        0x1644
300
#endif
301
#ifndef PCI_DEVICE_ID_AL_M1647_0
302
#define PCI_DEVICE_ID_AL_M1647_0        0x1647
303
#endif
304
#ifndef PCI_DEVICE_ID_AL_M1651_0
305
#define PCI_DEVICE_ID_AL_M1651_0        0x1651
306
#endif
307
#ifndef PCI_DEVICE_ID_AL_M1671_0
308
#define PCI_DEVICE_ID_AL_M1671_0        0x1671
309
#endif
310
#ifndef PCI_VENDOR_ID_ATI
311
#define PCI_VENDOR_ID_ATI               0x1002
312
#endif
313
#ifndef PCI_DEVICE_ID_ATI_RS100
314
#define PCI_DEVICE_ID_ATI_RS100         0xcab0
315
#endif
316
#ifndef PCI_DEVICE_ID_ATI_RS200
317
#define PCI_DEVICE_ID_ATI_RS200         0xcab2
318
#endif
319
#ifndef PCI_DEVICE_ID_ATI_RS250
320
#define PCI_DEVICE_ID_ATI_RS250         0xcab3
321
#endif
322
#ifndef PCI_DEVICE_ID_ATI_RS200_B
323
#define PCI_DEVICE_ID_ATI_RS200_B       0xcbb3
324
#endif
325
#ifndef PCI_DEVICE_ID_ATI_RS300_100
326
#define PCI_DEVICE_ID_ATI_RS300_100     0x5830
327
#endif
328
#ifndef PCI_DEVICE_ID_ATI_RS300_133
329
#define PCI_DEVICE_ID_ATI_RS300_133     0x5831
330
#endif
331
#ifndef PCI_DEVICE_ID_ATI_RS300_166
332
#define PCI_DEVICE_ID_ATI_RS300_166     0x5832
333
#endif
334
#ifndef PCI_DEVICE_ID_ATI_RS300_200
335
#define PCI_DEVICE_ID_ATI_RS300_200     0x5833
336
#endif
337
 
338
/* intel register */
339
#define INTEL_APBASE    0x10
340
#define INTEL_APSIZE    0xb4
341
#define INTEL_ATTBASE   0xb8
342
#define INTEL_AGPCTRL   0xb0
343
#define INTEL_NBXCFG    0x50
344
#define INTEL_ERRSTS    0x91
345
 
346
/* Intel 460GX Registers */
347
#define INTEL_I460_APBASE               0x10
348
#define INTEL_I460_BAPBASE              0x98
349
#define INTEL_I460_GXBCTL               0xa0
350
#define INTEL_I460_AGPSIZ               0xa2
351
#define INTEL_I460_ATTBASE              0xfe200000
352
#define INTEL_I460_GATT_VALID           (1UL << 24)
353
#define INTEL_I460_GATT_COHERENT        (1UL << 25)
354
/* Intel 855GM/852GM registers */
355
#define I855_GMCH_CTRL             0x52
356
#define I855_GMCH_ENABLED          0x4
357
#define I855_GMCH_GMS_MASK         (0x7 << 4)
358
#define I855_GMCH_GMS_STOLEN_0M    0x0
359
#define I855_GMCH_GMS_STOLEN_1M    (0x1 << 4)
360
#define I855_GMCH_GMS_STOLEN_4M    (0x2 << 4)
361
#define I855_GMCH_GMS_STOLEN_8M    (0x3 << 4)
362
#define I855_GMCH_GMS_STOLEN_16M   (0x4 << 4)
363
#define I855_GMCH_GMS_STOLEN_32M   (0x5 << 4)
364
#define I85X_CAPID                 0x44
365
#define I85X_VARIANT_MASK          0x7
366
#define I85X_VARIANT_SHIFT         5
367
#define I855_GME                   0x0
368
#define I855_GM                    0x4
369
#define I852_GME                   0x2
370
#define I852_GM                    0x5
371
#define I855_PME                   0x0
372
#define I855_PM                    0x4
373
#define I852_PME                   0x2
374
#define I852_PM                    0x5
375
 
376
/* intel i830 registers */
377
#define I830_GMCH_CTRL             0x52
378
#define I830_GMCH_ENABLED          0x4
379
#define I830_GMCH_MEM_MASK         0x1
380
#define I830_GMCH_MEM_64M          0x1
381
#define I830_GMCH_MEM_128M         0
382
#define I830_GMCH_GMS_MASK         0x70
383
#define I830_GMCH_GMS_DISABLED     0x00
384
#define I830_GMCH_GMS_LOCAL        0x10
385
#define I830_GMCH_GMS_STOLEN_512   0x20
386
#define I830_GMCH_GMS_STOLEN_1024  0x30
387
#define I830_GMCH_GMS_STOLEN_8192  0x40
388
#define I830_RDRAM_CHANNEL_TYPE    0x03010
389
#define I830_RDRAM_ND(x)           (((x) & 0x20) >> 5)
390
#define I830_RDRAM_DDT(x)          (((x) & 0x18) >> 3)
391
 
392
/* This one is for I830MP w. an external graphic card */
393
#define INTEL_I830_ERRSTS          0x92
394
 
395
/* intel 815 register */
396
#define INTEL_815_APCONT        0x51
397
#define INTEL_815_ATTBASE_MASK  ~0x1FFFFFFF
398
 
399
/* intel i820 registers */
400
#define INTEL_I820_RDCR     0x51
401
#define INTEL_I820_ERRSTS   0xc8
402
 
403
/* intel i840 registers */
404
#define INTEL_I840_MCHCFG   0x50
405
#define INTEL_I840_ERRSTS   0xc8
406
 
407
/* intel i845 registers */
408
#define INTEL_I845_AGPM     0x51
409
#define INTEL_I845_ERRSTS   0xc8
410
 
411
/* intel i850 registers */
412
#define INTEL_I850_MCHCFG   0x50
413
#define INTEL_I850_ERRSTS   0xc8
414
 
415
/* intel i860 registers */
416
#define INTEL_I860_MCHCFG       0x50
417
#define INTEL_I860_ERRSTS       0xc8
418
 
419
/* intel i7505 registers */
420
#define INTEL_I7505_MCHCFG      0x50
421
#define INTEL_I7505_ERRSTS      0x42
422
 
423
/* intel i810 registers */
424
#define I810_GMADDR 0x10
425
#define I810_MMADDR 0x14
426
#define I810_PTE_BASE          0x10000
427
#define I810_PTE_MAIN_UNCACHED 0x00000000
428
#define I810_PTE_LOCAL         0x00000002
429
#define I810_PTE_VALID         0x00000001
430
#define I810_SMRAM_MISCC       0x70
431
#define I810_GFX_MEM_WIN_SIZE  0x00010000
432
#define I810_GFX_MEM_WIN_32M   0x00010000
433
#define I810_GMS               0x000000c0
434
#define I810_GMS_DISABLE       0x00000000
435
#define I810_PGETBL_CTL        0x2020
436
#define I810_PGETBL_ENABLED    0x00000001
437
#define I810_DRAM_CTL          0x3000
438
#define I810_DRAM_ROW_0        0x00000001
439
#define I810_DRAM_ROW_0_SDRAM  0x00000001
440
 
441
 
442
 
443
/* VIA register */
444
#define VIA_APBASE      0x10
445
#define VIA_GARTCTRL    0x80
446
#define VIA_APSIZE      0x84
447
#define VIA_ATTBASE     0x88
448
 
449
/* SiS registers */
450
#define SIS_APBASE      0x10
451
#define SIS_ATTBASE     0x90
452
#define SIS_APSIZE      0x94
453
#define SIS_TLBCNTRL    0x97
454
#define SIS_TLBFLUSH    0x98
455
 
456
/* AMD registers */
457
#define AMD_APBASE      0x10
458
#define AMD_MMBASE      0x14
459
#define AMD_APSIZE      0xac
460
#define AMD_MODECNTL    0xb0
461
#define AMD_MODECNTL2   0xb2
462
#define AMD_GARTENABLE  0x02    /* In mmio region (16-bit register) */
463
#define AMD_ATTBASE     0x04    /* In mmio region (32-bit register) */
464
#define AMD_TLBFLUSH    0x0c    /* In mmio region (32-bit register) */
465
#define AMD_CACHEENTRY  0x10    /* In mmio region (32-bit register) */
466
 
467
#define AMD_8151_APSIZE 0xb4
468
#define AMD_8151_GARTBLOCK      0xb8
469
 
470
#define AMD_X86_64_GARTAPERTURECTL      0x90
471
#define AMD_X86_64_GARTAPERTUREBASE     0x94
472
#define AMD_X86_64_GARTTABLEBASE        0x98
473
#define AMD_X86_64_GARTCACHECTL         0x9c
474
#define AMD_X86_64_GARTEN       1<<0
475
 
476
#define AMD_8151_VMAPERTURE             0x10
477
#define AMD_8151_AGP_CTL                0xb0
478
#define AMD_8151_APERTURESIZE   0xb4
479
#define AMD_8151_GARTPTR                0xb8
480
#define AMD_8151_GTLBEN 1<<7
481
#define AMD_8151_APEREN 1<<8
482
 
483
/* ALi registers */
484
#define ALI_APBASE      0x10
485
#define ALI_AGPCTRL     0xb8
486
#define ALI_ATTBASE     0xbc
487
#define ALI_TLBCTRL     0xc0
488
#define ALI_TAGCTRL     0xc4
489
#define ALI_CACHE_FLUSH_CTRL    0xD0
490
#define ALI_CACHE_FLUSH_ADDR_MASK       0xFFFFF000
491
#define ALI_CACHE_FLUSH_EN      0x100
492
 
493
/* Serverworks Registers */
494
#define SVWRKS_APSIZE 0x10
495
#define SVWRKS_SIZE_MASK 0xfe000000
496
 
497
#define SVWRKS_MMBASE 0x14
498
#define SVWRKS_CACHING 0x4b
499
#define SVWRKS_FEATURE 0x68
500
 
501
/* func 1 registers */
502
#define SVWRKS_AGP_ENABLE 0x60
503
#define SVWRKS_COMMAND 0x04
504
 
505
/* Memory mapped registers */
506
#define SVWRKS_GART_CACHE 0x02
507
#define SVWRKS_GATTBASE   0x04
508
#define SVWRKS_TLBFLUSH   0x10
509
#define SVWRKS_POSTFLUSH  0x14
510
#define SVWRKS_DIRFLUSH   0x0c
511
 
512
/* NVIDIA registers */
513
#define NVIDIA_0_APBASE     0x10
514
#define NVIDIA_0_APSIZE     0x80
515
#define NVIDIA_1_WBC        0xf0
516
#define NVIDIA_2_GARTCTRL   0xd0
517
#define NVIDIA_2_APBASE     0xd8
518
#define NVIDIA_2_APLIMIT    0xdc
519
#define NVIDIA_2_ATTBASE(i) (0xe0 + (i) * 4)
520
#define NVIDIA_3_APBASE     0x50
521
#define NVIDIA_3_APLIMIT    0x54
522
 
523
/* NVIDIA x86-64 registers */
524
#define NVIDIA_X86_64_0_APBASE          0x10
525
#define NVIDIA_X86_64_1_APBASE1         0x50
526
#define NVIDIA_X86_64_1_APLIMIT1        0x54
527
#define NVIDIA_X86_64_1_APSIZE          0xa8
528
#define NVIDIA_X86_64_1_APBASE2         0xd8
529
#define NVIDIA_X86_64_1_APLIMIT2        0xdc
530
 
531
/* HP ZX1 IOC registers */
532
#define HP_ZX1_IBASE            0x300
533
#define HP_ZX1_IMASK            0x308
534
#define HP_ZX1_PCOM             0x310
535
#define HP_ZX1_TCNFG            0x318
536
#define HP_ZX1_PDIR_BASE        0x320
537
 
538
/* HP ZX1 LBA registers */
539
#define HP_ZX1_AGP_STATUS       0x64
540
#define HP_ZX1_AGP_COMMAND      0x68
541
 
542
/* ATI register */
543
#define ATI_APBASE                  0x10
544
#define ATI_GART_MMBASE_ADDR        0x14
545
#define ATI_RS100_APSIZE            0xac
546
#define ATI_RS300_APSIZE            0xf8
547
#define ATI_RS100_IG_AGPMODE        0xb0
548
#define ATI_RS300_IG_AGPMODE        0xfc
549
 
550
#define ATI_GART_FEATURE_ID         0x00
551
#define ATI_GART_BASE               0x04
552
#define ATI_GART_CACHE_SZBASE       0x08
553
#define ATI_GART_CACHE_CNTRL        0x0c
554
#define ATI_GART_CACHE_ENTRY_CNTRL  0x10
555
 
556
#endif                          /* _AGP_BACKEND_PRIV_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.