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

« back to all changes in this revision

Viewing changes to unix/xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_macros.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
Copyright 1998, 1999 by Precision Insight, Inc., Cedar Park, Texas.
 
3
 
 
4
                        All Rights Reserved
 
5
 
 
6
Permission to use, copy, modify, distribute, and sell this software and
 
7
its documentation for any purpose is hereby granted without fee,
 
8
provided that the above copyright notice appear in all copies and that
 
9
both that copyright notice and this permission notice appear in
 
10
supporting documentation, and that the name of Precision Insight not be
 
11
used in advertising or publicity pertaining to distribution of the
 
12
software without specific, written prior permission.  Precision Insight
 
13
and its suppliers make no representations about the suitability of this
 
14
software for any purpose.  It is provided "as is" without express or 
 
15
implied warranty.
 
16
 
 
17
PRECISION INSIGHT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 
18
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
 
19
EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY
 
20
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
 
21
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 
22
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 
23
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
24
**********************************************************************/
 
25
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/neomagic/neo_macros.h,v 1.2 2002/10/30 12:52:22 alanh Exp $ */
 
26
 
 
27
/*
 
28
 * The original Precision Insight driver for
 
29
 * XFree86 v.3.3 has been sponsored by Red Hat.
 
30
 *
 
31
 * Authors:
 
32
 *   Jens Owen (jens@tungstengraphics.com)
 
33
 *   Kevin E. Martin (kevin@precisioninsight.com)
 
34
 *
 
35
 * Port to Xfree86 v.4.0
 
36
 *   1998, 1999 by Egbert Eich (Egbert.Eich@Physik.TU-Darmstadt.DE)
 
37
 */
 
38
 
 
39
#define WAIT_FB_FIFO_EMPTY() {                                              \
 
40
            while( INREG(NEOREG_BLTSTAT) & NEO_BS0_FIFO_PEND);              \
 
41
        }
 
42
 
 
43
#define WAIT_BLT_DONE() {                                                   \
 
44
            while( INREG(NEOREG_BLTSTAT) & NEO_BS0_BLT_BUSY);               \
 
45
        }
 
46
 
 
47
#define WAIT_ENGINE_IDLE() {                                                \
 
48
            WAIT_BLT_DONE();                                                \
 
49
        }
 
50
 
 
51
#ifdef NOT_DONE
 
52
#define WAIT_FIFO(n) {                                                      \
 
53
            while( NeoFifoCount < (n)) {                                    \
 
54
                NeoFifoCount = (INREG(NEOREG_BLTSTAT) >> 8);                \
 
55
            }                                                               \
 
56
            NeoFifoCount -= (n);                                            \
 
57
        }
 
58
#else
 
59
#define WAIT_FIFO(n) {                                                      \
 
60
            WAIT_ENGINE_IDLE();                                             \
 
61
        }
 
62
#endif
 
63