VirtualBox

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

最後變更 在這個檔案是 25078,由 vboxsync 提交於 15 年 前

Additions/x11/x11include: exported and set eol-style on new headers

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

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