VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/xf86_OSproc.h@ 97956

最後變更 在這個檔案從97956是 69098,由 vboxsync 提交於 7 年 前

Clean up XFree86 driver header files.
bugref:3810: X11 Guest Additions maintenance
Over the years we have cleaned up the layout in the tree of the X.Org
header files we use to build drivers. The XFree86 ones were still in their
original, rather sub-optimal layout. This change fixes that.

  • 屬性 svn:eol-style 設為 native
檔案大小: 10.3 KB
 
1/*
2 * Copyright 1990, 1991 by Thomas Roell, Dinkelscherben, Germany
3 * Copyright 1992 by David Dawes <[email protected]>
4 * Copyright 1992 by Jim Tsillas <[email protected]>
5 * Copyright 1992 by Rich Murphey <[email protected]>
6 * Copyright 1992 by Robert Baron <[email protected]>
7 * Copyright 1992 by Orest Zborowski <[email protected]>
8 * Copyright 1993 by Vrije Universiteit, The Netherlands
9 * Copyright 1993 by David Wexelblat <[email protected]>
10 * Copyright 1994, 1996 by Holger Veit <[email protected]>
11 * Copyright 1994-1999 by The XFree86 Project, Inc
12 *
13 * Permission to use, copy, modify, distribute, and sell this software and its
14 * documentation for any purpose is hereby granted without fee, provided that
15 * the above copyright notice appear in all copies and that both that
16 * copyright notice and this permission notice appear in supporting
17 * documentation, and that the names of the above listed copyright holders
18 * not be used in advertising or publicity pertaining to distribution of
19 * the software without specific, written prior permission. The above listed
20 * copyright holders make no representations about the suitability of this
21 * software for any purpose. It is provided "as is" without express or
22 * implied warranty.
23 *
24 * THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD
25 * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
26 * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS BE
27 * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
28 * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
29 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
30 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
31 *
32 */
33
34/*
35 * The ARM32 code here carries the following copyright:
36 *
37 * Copyright 1997
38 * Digital Equipment Corporation. All rights reserved.
39 * This software is furnished under license and may be used and copied only in
40 * accordance with the following terms and conditions. Subject to these
41 * conditions, you may download, copy, install, use, modify and distribute
42 * this software in source and/or binary form. No title or ownership is
43 * transferred hereby.
44 *
45 * 1) Any source code used, modified or distributed must reproduce and retain
46 * this copyright notice and list of conditions as they appear in the
47 * source file.
48 *
49 * 2) No right is granted to use any trade name, trademark, or logo of Digital
50 * Equipment Corporation. Neither the "Digital Equipment Corporation"
51 * name nor any trademark or logo of Digital Equipment Corporation may be
52 * used to endorse or promote products derived from this software without
53 * the prior written permission of Digital Equipment Corporation.
54 *
55 * 3) This software is provided "AS-IS" and any express or implied warranties,
56 * including but not limited to, any implied warranties of merchantability,
57 * fitness for a particular purpose, or non-infringement are disclaimed.
58 * In no event shall DIGITAL be liable for any damages whatsoever, and in
59 * particular, DIGITAL shall not be liable for special, indirect,
60 * consequential, or incidental damages or damages for lost profits, loss
61 * of revenue or loss of use, whether such damages arise in contract,
62 * negligence, tort, under statute, in equity, at law or otherwise, even
63 * if advised of the possibility of such damage.
64 *
65 */
66
67/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h,v 3.55 2002/01/25 21:56:17 tsi Exp $ */
68
69#ifndef _XF86_OSPROC_H
70#define _XF86_OSPROC_H
71
72#ifdef XF86_OS_PRIVS
73#include "xf86Pci.h"
74#endif
75
76/*
77 * The actual prototypes have been pulled into this seperate file so
78 * that they can can be used without pulling in all of the OS specific
79 * stuff like sys/stat.h, etc. This casues problem for loadable modules.
80 */
81
82/*
83 * Flags for xf86MapVidMem(). Multiple flags can be or'd together. The
84 * flags may be used as hints. For example it would be permissible to
85 * enable write combining for memory marked only for framebuffer use.
86 */
87
88#define VIDMEM_FRAMEBUFFER 0x01 /* memory for framebuffer use */
89#define VIDMEM_MMIO 0x02 /* memory for I/O use */
90#define VIDMEM_MMIO_32BIT 0x04 /* memory accesses >= 32bit */
91#define VIDMEM_READSIDEEFFECT 0x08 /* reads can have side-effects */
92#define VIDMEM_SPARSE 0x10 /* sparse mapping required
93 * assumed when VIDMEM_MMIO is
94 * set. May be used with
95 * VIDMEM_FRAMEBUFFER) */
96#define VIDMEM_READONLY 0x20 /* read-only mapping
97 * used when reading BIOS images
98 * through xf86MapVidMem() */
99
100/*
101 * OS-independent modem state flags for xf86SetSerialModemState() and
102 * xf86GetSerialModemState().
103 */
104#define XF86_M_LE 0x001 /* line enable */
105#define XF86_M_DTR 0x002 /* data terminal ready */
106#define XF86_M_RTS 0x004 /* request to send */
107#define XF86_M_ST 0x008 /* secondary transmit */
108#define XF86_M_SR 0x010 /* secondary receive */
109#define XF86_M_CTS 0x020 /* clear to send */
110#define XF86_M_CAR 0x040 /* carrier detect */
111#define XF86_M_RNG 0x080 /* ring */
112#define XF86_M_DSR 0x100 /* data set ready */
113
114#ifdef XF86_OS_PRIVS
115extern void xf86WrapperInit(void);
116#endif
117
118#ifndef NO_OSLIB_PROTOTYPES
119/*
120 * This is to prevent re-entrancy to FatalError() when aborting.
121 * Anything that can be called as a result of AbortDDX() should use this
122 * instead of FatalError().
123 */
124
125#define xf86FatalError(a, b) \
126 if (dispatchException & DE_TERMINATE) { \
127 ErrorF(a, b); \
128 return; \
129 } else FatalError(a, b)
130
131/***************************************************************************/
132/* Prototypes */
133/***************************************************************************/
134
135#include <X11/Xfuncproto.h>
136#include "opaque.h"
137
138_XFUNCPROTOBEGIN
139
140/* public functions */
141extern Bool xf86LinearVidMem(void);
142extern Bool xf86CheckMTRR(int);
143extern pointer xf86MapVidMem(int, int, unsigned long, unsigned long);
144extern void xf86UnMapVidMem(int, pointer, unsigned long);
145extern void xf86MapReadSideEffects(int, int, pointer, unsigned long);
146extern int xf86ReadBIOS(unsigned long, unsigned long, unsigned char *, int);
147extern void xf86EnableIO(void);
148extern void xf86DisableIO(void);
149extern Bool xf86DisableInterrupts(void);
150extern void xf86EnableInterrupts(void);
151extern void xf86SetTVOut(int);
152extern void xf86SetRGBOut(void);
153extern void xf86SoundKbdBell(int, int, int);
154#if defined(QNX4)
155#pragma aux xf86BusToMem modify [eax ebx ecx edx esi edi];
156#pragma aux xf86MemToBus modify [eax ebx ecx edx esi edi];
157#endif
158extern void xf86BusToMem(unsigned char *, unsigned char *, int);
159extern void xf86MemToBus(unsigned char *, unsigned char *, int);
160extern void xf86IODelay(void);
161extern void xf86UDelay(long usec);
162extern void xf86SlowBcopy(unsigned char *, unsigned char *, int);
163extern int xf86OpenSerial(pointer options);
164extern int xf86SetSerial(int fd, pointer options);
165extern int xf86SetSerialSpeed(int fd, int speed);
166extern int xf86ReadSerial(int fd, void *buf, int count);
167extern int xf86WriteSerial(int fd, const void *buf, int count);
168extern int xf86CloseSerial(int fd);
169extern int xf86FlushInput(int fd);
170extern int xf86WaitForInput(int fd, int timeout);
171extern int xf86SerialSendBreak(int fd, int duration);
172extern int xf86SetSerialModemState(int fd, int state);
173extern int xf86GetSerialModemState(int fd);
174extern int xf86SerialModemSetBits(int fd, int bits);
175extern int xf86SerialModemClearBits(int fd, int bits);
176extern int xf86LoadKernelModule(const char *pathname);
177
178/* AGP GART interface */
179
180typedef struct _AgpInfo {
181 CARD32 bridgeId;
182 CARD32 agpMode;
183 unsigned long base;
184 unsigned long size;
185 unsigned long totalPages;
186 unsigned long systemPages;
187 unsigned long usedPages;
188} AgpInfo, *AgpInfoPtr;
189
190extern Bool xf86AgpGARTSupported(void);
191extern AgpInfoPtr xf86GetAGPInfo(int screenNum);
192extern Bool xf86AcquireGART(int screenNum);
193extern Bool xf86ReleaseGART(int screenNum);
194extern int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type,
195 unsigned long *physical);
196extern Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset);
197extern Bool xf86UnbindGARTMemory(int screenNum, int key);
198extern Bool xf86EnableAGP(int screenNum, CARD32 mode);
199extern Bool xf86GARTCloseScreen(int screenNum);
200
201/* These routines are in shared/sigio.c and are not loaded as part of the
202 module. These routines are small, and the code if very POSIX-signal (or
203 OS-signal) specific, so it seemed better to provide more complex
204 wrappers than to wrap each individual function called. */
205extern int xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *);
206extern int xf86RemoveSIGIOHandler(int fd);
207extern int xf86BlockSIGIO (void);
208extern void xf86UnblockSIGIO (int);
209#ifdef XFree86Server
210extern void xf86AssertBlockedSIGIO (char *);
211#endif
212extern Bool xf86SIGIOSupported (void);
213
214#ifdef XF86_OS_PRIVS
215typedef void (*PMClose)(void);
216extern void xf86OpenConsole(void);
217extern void xf86CloseConsole(void);
218extern Bool xf86VTSwitchPending(void);
219extern Bool xf86VTSwitchAway(void);
220extern Bool xf86VTSwitchTo(void);
221extern void xf86VTRequest(int sig);
222extern int xf86ProcessArgument(int, char **, int);
223extern void xf86UseMsg(void);
224extern void xf86SetKbdLeds(int);
225extern int xf86GetKbdLeds(void);
226extern void xf86SetKbdRepeat(char);
227extern void xf86KbdInit(void);
228extern int xf86KbdOn(void);
229extern int xf86KbdOff(void);
230extern void xf86KbdEvents(void);
231#ifdef XQUEUE
232extern int xf86XqueKbdProc(DeviceIntPtr, int);
233extern void xf86XqueEvents(void);
234#endif
235#ifdef WSCONS_SUPPORT
236extern void xf86WSKbdEvents(void);
237#endif
238extern PMClose xf86OSPMOpen(void);
239
240#ifdef NEED_OS_RAC_PROTOS
241/* RAC-related privs */
242/* internal to os-support layer */
243resPtr xf86StdBusAccWindowsFromOS(void);
244resPtr xf86StdPciAccWindowsFromOS(void);
245resPtr xf86StdIsaAccWindowsFromOS(void);
246resPtr xf86StdAccResFromOS(resPtr ret);
247
248/* available to the common layer */
249resPtr xf86BusAccWindowsFromOS(void);
250resPtr xf86PciBusAccWindowsFromOS(void);
251#ifdef INCLUDE_UNUSED
252resPtr xf86IsaBusAccWindowsFromOS(void);
253#endif
254resPtr xf86AccResFromOS(resPtr ret);
255#endif /* NEED_OS_RAC_PROTOS */
256
257extern Bool xf86GetPciSizeFromOS(PCITAG tag, int indx, int* bits);
258
259extern void xf86MakeNewMapping(int, int, unsigned long, unsigned long, pointer);
260extern void xf86InitVidMem(void);
261
262#endif /* XF86_OS_PRIVS */
263
264
265_XFUNCPROTOEND
266#endif /* NO_OSLIB_PROTOTYPES */
267
268#endif /* _XF86_OSPROC_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette