VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.1.0/xf86Bus.h@ 78293

Last change on this file since 78293 was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • Property svn:eol-style set to native
File size: 5.3 KB
Line 
1/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.h,v 1.23 2003/08/24 17:36:50 dawes Exp $ */
2
3/*
4 * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is 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 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * Except as contained in this notice, the name of the copyright holder(s)
25 * and author(s) shall not be used in advertising or otherwise to promote
26 * the sale, use or other dealings in this Software without prior written
27 * authorization from the copyright holder(s) and author(s).
28 */
29
30/*
31 * This file contains definitions of the bus-related data structures/types.
32 * Everything contained here is private to xf86Bus.c. In particular the
33 * video drivers must not include this file.
34 */
35
36#ifdef HAVE_XORG_CONFIG_H
37#include <xorg-config.h>
38#endif
39
40#ifndef _XF86_BUS_H
41#define _XF86_BUS_H
42
43#include "xf86pciBus.h"
44#ifdef __sparc__
45#include "xf86sbusBus.h"
46#endif
47
48typedef struct racInfo {
49 xf86AccessPtr mem_new;
50 xf86AccessPtr io_new;
51 xf86AccessPtr io_mem_new;
52 xf86SetAccessFuncPtr old;
53} AccessFuncRec, *AccessFuncPtr;
54
55
56typedef struct {
57 DriverPtr driver;
58 int chipset;
59 int entityProp;
60 EntityProc entityInit;
61 EntityProc entityEnter;
62 EntityProc entityLeave;
63 pointer private;
64 resPtr resources;
65 Bool active;
66 Bool inUse;
67 BusRec bus;
68 EntityAccessPtr access;
69 AccessFuncPtr rac;
70 pointer busAcc;
71 int lastScrnFlag;
72 DevUnion * entityPrivates;
73 int numInstances;
74 GDevPtr * devices;
75 IOADDRESS domainIO;
76} EntityRec, *EntityPtr;
77
78/* asynchronous event handling */
79#ifdef async
80typedef struct _AsyncQRec {
81 void (*func)(pointer);
82 pointer arg;
83 struct _AsyncQRec *next;
84} AsyncQRec, *AsyncQPtr;
85#endif
86
87#define NO_SEPARATE_IO_FROM_MEM 0x0001
88#define NO_SEPARATE_MEM_FROM_IO 0x0002
89#define NEED_VGA_ROUTED 0x0004
90#define NEED_VGA_ROUTED_SETUP 0x0008
91#define NEED_MEM 0x0010
92#define NEED_IO 0x0020
93#define NEED_MEM_SHARED 0x0040
94#define NEED_IO_SHARED 0x0080
95#define ACCEL_IS_SHARABLE 0x0100
96#define IS_SHARED_ACCEL 0x0200
97#define SA_PRIM_INIT_DONE 0x0400
98#define NEED_VGA_MEM 0x1000
99#define NEED_VGA_IO 0x2000
100
101#define NEED_SHARED (NEED_MEM_SHARED | NEED_IO_SHARED)
102
103#define busType bus.type
104#define pciBusId bus.id.pci
105#define isaBusId bus.id.isa
106#define sbusBusId bus.id.sbus
107
108struct x_BusAccRec;
109typedef void (*BusAccProcPtr)(struct x_BusAccRec *ptr);
110
111typedef struct x_BusAccRec {
112 BusAccProcPtr set_f;
113 BusAccProcPtr enable_f;
114 BusAccProcPtr disable_f;
115 BusAccProcPtr save_f;
116 BusAccProcPtr restore_f;
117 struct x_BusAccRec *current; /* pointer to bridge open on this bus */
118 struct x_BusAccRec *primary; /* pointer to the bus connecting to this */
119 struct x_BusAccRec *next; /* this links the different buses together */
120 BusType type;
121 BusType busdep_type;
122 /* Bus-specific fields */
123 union {
124 struct {
125 int bus;
126 int primary_bus;
127 PCITAG acc;
128 pciBridgesSave save;
129 } pci;
130 } busdep;
131} BusAccRec, *BusAccPtr;
132
133/* state change notification callback */
134typedef struct _stateChange {
135 xf86StateChangeNotificationCallbackFunc func;
136 pointer arg;
137 struct _stateChange *next;
138} StateChangeNotificationRec, *StateChangeNotificationPtr;
139
140
141extern EntityPtr *xf86Entities;
142extern int xf86NumEntities;
143extern xf86AccessRec AccessNULL;
144extern BusRec primaryBus;
145extern resPtr Acc;
146extern resPtr osRes;
147extern resPtr ResRange;
148extern BusAccPtr xf86BusAccInfo;
149
150int xf86AllocateEntity(void);
151BusType StringToBusType(const char* busID, const char **retID);
152memType ChkConflict(resRange *rgp, resPtr res, xf86State state);
153Bool xf86IsSubsetOf(resRange range, resPtr list);
154Bool xf86IsListSubsetOf(resPtr list, resPtr BaseList);
155resPtr xf86ExtractTypeFromList(resPtr list, unsigned long type);
156resPtr findIntersect(resRange Range, resPtr list);
157resPtr xf86FindIntersect(resRange Range, resPtr list);
158void RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment,
159 Bool useEstimated);
160void xf86ConvertListToHost(int entityIndex, resPtr list);
161
162#endif /* _XF86_BUS_H */
Note: See TracBrowser for help on using the repository browser.

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