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

« back to all changes in this revision

Viewing changes to unix/xc/programs/Xserver/hw/xfree86/common/scoasm.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
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/scoasm.h,v 3.0 1996/10/03 08:34:06 dawes Exp $ */
 
2
 
 
3
/*
 
4
 * scoasm.h - used to define inline versions of certain functions which
 
5
 * do NOT appear in sys/inline.h.
 
6
 */
 
7
#ifdef SCO325
 
8
#ifndef _SCOASM_HDR_INC
 
9
#define _SCOASM_HDR_INC
 
10
 
 
11
asm     void outl(port,val)
 
12
{
 
13
%reg    port,val;
 
14
        movl    port, %edx
 
15
        movl    val, %eax
 
16
        outl    (%dx)
 
17
%reg    port; mem       val;
 
18
        movl    port, %edx
 
19
        movl    val, %eax
 
20
        outl    (%dx)
 
21
%mem    port; reg       val;
 
22
        movw    port, %dx
 
23
        movl    val, %eax
 
24
        outl    (%dx)
 
25
%mem    port,val;
 
26
        movw    port, %dx
 
27
        movl    val, %eax
 
28
        outl    (%dx)
 
29
}
 
30
 
 
31
asm     void outw(port,val)
 
32
{
 
33
%reg    port,val;
 
34
        movl    port, %edx
 
35
        movl    val, %eax
 
36
        data16
 
37
        outl    (%dx)
 
38
%reg    port; mem       val;
 
39
        movl    port, %edx
 
40
        movw    val, %ax
 
41
        data16
 
42
        outl    (%dx)
 
43
%mem    port; reg       val;
 
44
        movw    port, %dx
 
45
        movl    val, %eax
 
46
        data16
 
47
        outl    (%dx)
 
48
%mem    port,val;
 
49
        movw    port, %dx
 
50
        movw    val, %ax
 
51
        data16
 
52
        outl    (%dx)
 
53
}
 
54
 
 
55
asm     void outb(port,val)
 
56
{
 
57
%reg    port,val;
 
58
        movl    port, %edx
 
59
        movl    val, %eax
 
60
        outb    (%dx)
 
61
%reg    port; mem       val;
 
62
        movl    port, %edx
 
63
        movb    val, %al
 
64
        outb    (%dx)
 
65
%mem    port; reg       val;
 
66
        movw    port, %dx
 
67
        movl    val, %eax
 
68
        outb    (%dx)
 
69
%mem    port,val;
 
70
        movw    port, %dx
 
71
        movb    val, %al
 
72
        outb    (%dx)
 
73
}
 
74
 
 
75
asm     int inl(port)
 
76
{
 
77
%reg    port;
 
78
        movl    port, %edx
 
79
        inl     (%dx)
 
80
%mem    port;
 
81
        movw    port, %dx
 
82
        inl     (%dx)
 
83
}
 
84
 
 
85
asm     int inw(port)
 
86
{
 
87
%reg    port;
 
88
        subl    %eax, %eax
 
89
        movl    port, %edx
 
90
        data16
 
91
        inl     (%dx)
 
92
%mem    port;
 
93
        subl    %eax, %eax
 
94
        movw    port, %dx
 
95
        data16
 
96
        inl     (%dx)
 
97
}
 
98
 
 
99
asm     int inb(port)
 
100
{
 
101
%reg    port;
 
102
        subl    %eax, %eax
 
103
        movl    port, %edx
 
104
        inb     (%dx)
 
105
%mem    port;
 
106
        subl    %eax, %eax
 
107
        movw    port, %dx
 
108
        inb     (%dx)
 
109
}
 
110
 
 
111
#endif /* _SCOASM_HDR_INC */
 
112
#endif /* SCO325 */