Subversion Repositories Kolibri OS

Rev

Rev 948 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 948 Rev 951
Line -... Line 1...
-
 
1
/* Chipset independant registers (from AGP Spec) */
-
 
2
#define AGP_APBASE	0x10
-
 
3
 
-
 
4
#define AGPSTAT		0x4
-
 
5
#define AGPCMD		0x8
-
 
6
#define AGPNISTAT	0xc
-
 
7
#define AGPCTRL		0x10
-
 
8
#define AGPAPSIZE	0x14
-
 
9
#define AGPNEPG		0x16
-
 
10
#define AGPGARTLO	0x18
-
 
11
#define AGPGARTHI	0x1c
-
 
12
#define AGPNICMD	0x20
-
 
13
 
-
 
14
 
-
 
15
#define AGP_MAJOR_VERSION_SHIFT (20)
-
 
16
#define AGP_MINOR_VERSION_SHIFT	(16)
-
 
17
 
-
 
18
#define AGPSTAT_RQ_DEPTH    (0xff000000)
-
 
19
#define AGPSTAT_RQ_DEPTH_SHIFT	24
-
 
20
 
-
 
21
#define AGPSTAT_CAL_MASK	(1<<12|1<<11|1<<10)
-
 
22
#define AGPSTAT_ARQSZ		(1<<15|1<<14|1<<13)
-
 
23
#define AGPSTAT_ARQSZ_SHIFT	13
-
 
24
 
-
 
25
#define AGPSTAT_SBA         (1<<9)
-
 
26
#define AGPSTAT_AGP_ENABLE	(1<<8)
-
 
27
#define AGPSTAT_FW          (1<<4)
-
 
28
#define AGPSTAT_MODE_3_0	(1<<3)
-
 
29
 
-
 
30
#define AGPSTAT2_1X         (1<<0)
-
 
31
#define AGPSTAT2_2X         (1<<1)
-
 
32
#define AGPSTAT2_4X         (1<<2)
-
 
33
 
-
 
34
#define AGPSTAT3_RSVD		(1<<2)
-
 
35
#define AGPSTAT3_8X         (1<<1)
-
 
36
#define AGPSTAT3_4X         (1)
-
 
37
 
-
 
38
#define AGPCTRL_APERENB		(1<<8)
-
 
39
#define AGPCTRL_GTLBEN		(1<<7)
-
 
40
 
-
 
41
#define AGP2_RESERVED_MASK 0x00fffcc8
-
 
42
#define AGP3_RESERVED_MASK 0x00ff00c4
-
 
43
 
-
 
44
#define AGP_ERRATA_FASTWRITES 1<<0
-
 
45
#define AGP_ERRATA_SBA	 1<<1
-
 
46
#define AGP_ERRATA_1X 1<<2
-
 
47
 
-
 
48
 
-
 
49
 
1
/* Intel registers */
50
/* Intel registers */
2
#define INTEL_APSIZE	0xb4
51
#define INTEL_APSIZE        0xb4
3
#define INTEL_ATTBASE	0xb8
52
#define INTEL_ATTBASE       0xb8
4
#define INTEL_AGPCTRL	0xb0
53
#define INTEL_AGPCTRL       0xb0
5
#define INTEL_NBXCFG	0x50
54
#define INTEL_NBXCFG        0x50
Line 23... Line 72...
23
typedef struct
72
typedef struct
24
{
73
{
25
    PCITAG    PciTag;
74
    PCITAG    PciTag;
Line 26... Line 75...
26
 
75
 
27
    aper_size_t    *previous_size;
76
    aper_size_t    *aperture_sizes;
-
 
77
    aper_size_t    *current_size;
28
    aper_size_t    *current_size;
78
    aper_size_t    *previous_size;
Line 29... Line 79...
29
    int             aperture_size_idx;
79
    int             aperture_size_idx;
30
 
80
 
Line 31... Line 81...
31
    u32_t volatile *gatt_table;
81
    u32_t volatile *gatt_table;
32
    addr_t          gatt_dma;
82
    addr_t          gatt_dma;
Line -... Line 83...
-
 
83
 
-
 
84
    addr_t          apbase_config;
-
 
85
    addr_t          gart_addr;
-
 
86
 
-
 
87
    u32_t           flags;
-
 
88
    u32_t           mode;
33
 
89
 
-
 
90
    int             capndx;
34
    addr_t          apbase_config;
91
 
35
    addr_t          gart_addr;
92
    char            major_version;
36
 
93
    char            minor_version;
37
//    void   *aperture_sizes;
94
 
38
//    int     num_aperture_sizes;
95
//    int     num_aperture_sizes;
39
//   enum    aper_size_type size_type;
96
//   enum    aper_size_type size_type;
40
//    int     cant_use_aperture;
97
//    int     cant_use_aperture;
41
//    int     needs_scratch_page;
98
//    int     needs_scratch_page;
42
//    struct gatt_mask *masks;
99
//    struct gatt_mask *masks;
43
    int     (*fetch_size)(void *);
100
    int     (*fetch_size)();
44
    int     (*configure)(void *);
101
    int     (*configure)();
45
//    void    (*agp_enable)(struct agp_bridge_data *, u32);
102
//    void    (*agp_enable)(struct agp_bridge_data *, u32);
46
//    void    (*cleanup)(void);
103
//    void    (*cleanup)(void);
47
    void    (*tlb_flush)(void *);
104
    void    (*tlb_flush)();
48
//    u32_t   (*mask_memory)(struct agp_bridge_data *,u32_t, int);
105
//    u32_t   (*mask_memory)(struct agp_bridge_data *,u32_t, int);
49
//    void    (*cache_flush)(void);
106
//    void    (*cache_flush)(void);
50
//    int     (*create_gatt_table)(struct agp_bridge_data *);
107
    int     (*create_gatt_table)();
51
//    int     (*free_gatt_table)(struct agp_bridge_data *);
108
//    int     (*free_gatt_table)(struct agp_bridge_data *);