~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/programs/Xserver/hw/xfree86/drivers/sunleo/leo_regs.h

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Acceleration for the Leo(ZX) framebuffer - register layout.
 
3
 *
 
4
 * Copyright (C) 1999, 2000 Jakub Jelinek (jakub@redhat.com)
 
5
 *
 
6
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 
7
 * of this software and associated documentation files (the "Software"), to deal
 
8
 * in the Software without restriction, including without limitation the rights
 
9
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 
10
 * copies of the Software, and to permit persons to whom the Software is
 
11
 * furnished to do so, subject to the following conditions:
 
12
 *
 
13
 * The above copyright notice and this permission notice shall be included in
 
14
 * all copies or substantial portions of the Software.
 
15
 *
 
16
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
17
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
18
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 
19
 * JAKUB JELINEK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 
20
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 
21
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
22
 */
 
23
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sunleo/leo_regs.h,v 1.1 2000/05/18 23:21:40 dawes Exp $ */
 
24
 
 
25
#ifndef LEOREGS_H
 
26
#define LEOREGS_H
 
27
 
 
28
/* rop register */
 
29
#define LEO_ATTR_PICK_DISABLE   0x00000000
 
30
#define LEO_ATTR_PICK_2D        0x80000000
 
31
#define LEO_ATTR_PICK_3D        0xa0000000
 
32
#define LEO_ATTR_PICK_2D_REND   0xc0000000
 
33
#define LEO_ATTR_PICK_3D_REND   0xe0000000
 
34
 
 
35
#define LEO_ATTR_DCE_DISABLE    0x00000000
 
36
#define LEO_ATTR_DCE_ENABLE     0x10000000
 
37
 
 
38
#define LEO_ATTR_APE_DISABLE    0x00000000
 
39
#define LEO_ATTR_APE_ENABLE     0x08000000
 
40
 
 
41
#define LEO_ATTR_COLOR_VAR      0x00000000
 
42
#define LEO_ATTR_COLOR_CONST    0x04000000
 
43
 
 
44
#define LEO_ATTR_AA_DISABLE     0x02000000
 
45
#define LEO_ATTR_AA_ENABLE      0x01000000
 
46
 
 
47
#define LEO_ATTR_ABE_BG         0x00000000      /* dst + alpha * (src - bg) */
 
48
#define LEO_ATTR_ABE_FB         0x00800000      /* dst + alpha * (src - dst) */
 
49
 
 
50
#define LEO_ATTR_ABE_DISABLE    0x00000000
 
51
#define LEO_ATTR_ABE_ENABLE     0x00400000
 
52
 
 
53
#define LEO_ATTR_BLTSRC_A       0x00000000
 
54
#define LEO_ATTR_BLTSRC_B       0x00200000
 
55
 
 
56
#define LEO_ROP_ZERO            (0x0 << 18)
 
57
#define LEO_ROP_NEW_AND_OLD     (0x8 << 18)
 
58
#define LEO_ROP_NEW_AND_NOLD    (0x4 << 18)
 
59
#define LEO_ROP_NEW             (0xc << 18)
 
60
#define LEO_ROP_NNEW_AND_OLD    (0x2 << 18)
 
61
#define LEO_ROP_OLD             (0xa << 18)
 
62
#define LEO_ROP_NEW_XOR_OLD     (0x6 << 18)
 
63
#define LEO_ROP_NEW_OR_OLD      (0xe << 18)
 
64
#define LEO_ROP_NNEW_AND_NOLD   (0x1 << 18)
 
65
#define LEO_ROP_NNEW_XOR_NOLD   (0x9 << 18)
 
66
#define LEO_ROP_NOLD            (0x5 << 18)
 
67
#define LEO_ROP_NEW_OR_NOLD     (0xd << 18)
 
68
#define LEO_ROP_NNEW            (0x3 << 18)
 
69
#define LEO_ROP_NNEW_OR_OLD     (0xb << 18)
 
70
#define LEO_ROP_NNEW_OR_NOLD    (0x7 << 18)
 
71
#define LEO_ROP_ONES            (0xf << 18)
 
72
 
 
73
#define LEO_ATTR_HSR_DISABLE    0x00000000
 
74
#define LEO_ATTR_HSR_ENABLE     0x00020000
 
75
 
 
76
#define LEO_ATTR_WRITEZ_DISABLE 0x00000000
 
77
#define LEO_ATTR_WRITEZ_ENABLE  0x00010000
 
78
 
 
79
#define LEO_ATTR_Z_VAR          0x00000000
 
80
#define LEO_ATTR_Z_CONST        0x00008000
 
81
 
 
82
#define LEO_ATTR_WCLIP_DISABLE  0x00000000
 
83
#define LEO_ATTR_WCLIP_ENABLE   0x00004000
 
84
 
 
85
#define LEO_ATTR_MONO           0x00000000
 
86
#define LEO_ATTR_STEREO_LEFT    0x00001000
 
87
#define LEO_ATTR_STEREO_RIGHT   0x00003000
 
88
 
 
89
#define LEO_ATTR_WE_DISABLE     0x00000000
 
90
#define LEO_ATTR_WE_ENABLE      0x00000800
 
91
 
 
92
#define LEO_ATTR_FCE_DISABLE    0x00000000
 
93
#define LEO_ATTR_FCE_ENABLE     0x00000400
 
94
 
 
95
#define LEO_ATTR_RE_DISABLE     0x00000000
 
96
#define LEO_ATTR_RE_ENABLE      0x00000200
 
97
 
 
98
#define LEO_ATTR_GE_DISABLE     0x00000000
 
99
#define LEO_ATTR_GE_ENABLE      0x00000100
 
100
 
 
101
#define LEO_ATTR_BE_DISABLE     0x00000000
 
102
#define LEO_ATTR_BE_ENABLE      0x00000080
 
103
 
 
104
#define LEO_ATTR_RGBE_DISABLE   0x00000000
 
105
#define LEO_ATTR_RGBE_ENABLE    0x00000380
 
106
 
 
107
#define LEO_ATTR_OE_DISABLE     0x00000000
 
108
#define LEO_ATTR_OE_ENABLE      0x00000040
 
109
 
 
110
#define LEO_ATTR_ZE_DISABLE     0x00000000
 
111
#define LEO_ATTR_ZE_ENABLE      0x00000020
 
112
 
 
113
#define LEO_ATTR_FORCE_WID      0x00000010
 
114
 
 
115
#define LEO_ATTR_FC_PLANE_MASK  0x0000000e
 
116
 
 
117
#define LEO_ATTR_BUFFER_A       0x00000000
 
118
#define LEO_ATTR_BUFFER_B       0x00000001
 
119
 
 
120
/* csr */
 
121
#define LEO_CSR_BLT_BUSY        0x20000000
 
122
 
 
123
typedef struct LeoDraw {
 
124
        unsigned char           xxx0[0xe00];
 
125
        volatile unsigned int   csr;
 
126
        volatile unsigned int   wid;
 
127
        volatile unsigned int   wmask;
 
128
        volatile unsigned int   widclip;
 
129
        volatile unsigned int   vclipmin;
 
130
        volatile unsigned int   vclipmax;
 
131
        volatile unsigned int   pickmin;        /* SS1 only */
 
132
        volatile unsigned int   pickmax;        /* SS1 only */
 
133
        volatile unsigned int   fg;
 
134
        volatile unsigned int   bg;
 
135
        volatile unsigned int   src;            /* Copy/Scroll (SS0 only) */
 
136
        volatile unsigned int   dst;            /* Copy/Scroll/Fill (SS0 only) */
 
137
        volatile unsigned int   extent;         /* Copy/Scroll/Fill size (SS0 only) */
 
138
        unsigned int            xxx1[3];
 
139
        volatile unsigned int   setsem;         /* SS1 only */
 
140
        volatile unsigned int   clrsem;         /* SS1 only */
 
141
        volatile unsigned int   clrpick;        /* SS1 only */
 
142
        volatile unsigned int   clrdat;         /* SS1 only */
 
143
        volatile unsigned int   alpha;          /* SS1 only */
 
144
        unsigned char           xxx2[0x2c];
 
145
        volatile unsigned int   winbg;
 
146
        volatile unsigned int   planemask;
 
147
        volatile unsigned int   rop;
 
148
        volatile unsigned int   z;
 
149
        volatile unsigned int   dczf;           /* SS1 only */
 
150
        volatile unsigned int   dczb;           /* SS1 only */
 
151
        volatile unsigned int   dcs;            /* SS1 only */
 
152
        volatile unsigned int   dczs;           /* SS1 only */
 
153
        volatile unsigned int   pickfb;         /* SS1 only */
 
154
        volatile unsigned int   pickbb;         /* SS1 only */
 
155
        volatile unsigned int   dcfc;           /* SS1 only */
 
156
        volatile unsigned int   forcecol;       /* SS1 only */
 
157
        volatile unsigned int   door[8];        /* SS1 only */
 
158
        volatile unsigned int   pick[5];        /* SS1 only */
 
159
} LeoDraw;
 
160
 
 
161
#define LEO_ADDRSPC_OBGR        0x00
 
162
#define LEO_ADDRSPC_Z           0x01
 
163
#define LEO_ADDRSPC_W           0x02
 
164
#define LEO_ADDRSPC_FONT_OBGR   0x04
 
165
#define LEO_ADDRSPC_FONT_Z      0x05
 
166
#define LEO_ADDRSPC_FONT_W      0x06
 
167
#define LEO_ADDRSPC_O           0x08
 
168
#define LEO_ADDRSPC_B           0x09
 
169
#define LEO_ADDRSPC_G           0x0a
 
170
#define LEO_ADDRSPC_R           0x0b
 
171
 
 
172
typedef struct LeoCommand0 {
 
173
        volatile unsigned int   csr;
 
174
        volatile unsigned int   addrspace;
 
175
        volatile unsigned int   fontmsk;
 
176
        volatile unsigned int   fontt;
 
177
        volatile unsigned int   extent;
 
178
        volatile unsigned int   src;
 
179
        unsigned int            dst;
 
180
        volatile unsigned int   copy;
 
181
        volatile unsigned int   fill;
 
182
} LeoCommand0;
 
183
 
 
184
typedef struct LeoCross {
 
185
        volatile unsigned int   type;
 
186
        volatile unsigned int   csr;
 
187
        volatile unsigned int   value;
 
188
} LeoCross;
 
189
 
 
190
typedef struct LeoCursor {
 
191
        unsigned char           xxx0[16];
 
192
        volatile unsigned int   cur_type;
 
193
        volatile unsigned int   cur_misc;
 
194
        volatile unsigned int   cur_cursxy;
 
195
        volatile unsigned int   cur_data;
 
196
} LeoCursor;
 
197
 
 
198
#endif /* LEOREGS_H */