VirtualBox

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

Last change on this file since 78293 was 69098, checked in by vboxsync, 7 years ago

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.

  • Property svn:eol-style set to native
File size: 4.0 KB
Line 
1/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.h,v 1.21 2002/11/25 14:04:56 eich Exp $ */
2/*
3 * Copyright (c) 1997 by The XFree86 Project, Inc.
4 */
5
6/*
7 * This file contains definitions of the bus-related data structures/types.
8 * Everything contained here is private to xf86Bus.c. In particular the
9 * video drivers must not include this file.
10 */
11
12#ifndef _XF86_BUS_H
13#define _XF86_BUS_H
14
15#include "xf86pciBus.h"
16#ifdef __sparc__
17#include "xf86sbusBus.h"
18#endif
19
20typedef struct racInfo {
21 xf86AccessPtr mem_new;
22 xf86AccessPtr io_new;
23 xf86AccessPtr io_mem_new;
24 xf86SetAccessFuncPtr old;
25} AccessFuncRec, *AccessFuncPtr;
26
27
28typedef struct {
29 DriverPtr driver;
30 int chipset;
31 int entityProp;
32 EntityProc entityInit;
33 EntityProc entityEnter;
34 EntityProc entityLeave;
35 pointer private;
36 resPtr resources;
37 Bool active;
38 Bool inUse;
39 BusRec bus;
40 EntityAccessPtr access;
41 AccessFuncPtr rac;
42 pointer busAcc;
43 int lastScrnFlag;
44 DevUnion * entityPrivates;
45 int numInstances;
46 GDevPtr * devices;
47 IOADDRESS domainIO;
48} EntityRec, *EntityPtr;
49
50/* asynchronous event handling */
51#ifdef async
52typedef struct _AsyncQRec {
53 void (*func)(pointer);
54 pointer arg;
55 struct _AsyncQRec *next;
56} AsyncQRec, *AsyncQPtr;
57#endif
58
59#define NO_SEPARATE_IO_FROM_MEM 0x0001
60#define NO_SEPARATE_MEM_FROM_IO 0x0002
61#define NEED_VGA_ROUTED 0x0004
62#define NEED_VGA_ROUTED_SETUP 0x0008
63#define NEED_MEM 0x0010
64#define NEED_IO 0x0020
65#define NEED_MEM_SHARED 0x0040
66#define NEED_IO_SHARED 0x0080
67#define ACCEL_IS_SHARABLE 0x0100
68#define IS_SHARED_ACCEL 0x0200
69#define SA_PRIM_INIT_DONE 0x0400
70#define NEED_VGA_MEM 0x1000
71#define NEED_VGA_IO 0x2000
72
73#define NEED_SHARED (NEED_MEM_SHARED | NEED_IO_SHARED)
74
75#define busType bus.type
76#define pciBusId bus.id.pci
77#define isaBusId bus.id.isa
78#define sbusBusId bus.id.sbus
79
80struct x_BusAccRec;
81typedef void (*BusAccProcPtr)(struct x_BusAccRec *ptr);
82
83typedef struct x_BusAccRec {
84 BusAccProcPtr set_f;
85 BusAccProcPtr enable_f;
86 BusAccProcPtr disable_f;
87 BusAccProcPtr save_f;
88 BusAccProcPtr restore_f;
89 struct x_BusAccRec *current; /* pointer to bridge open on this bus */
90 struct x_BusAccRec *primary; /* pointer to the bus connecting to this */
91 struct x_BusAccRec *next; /* this links the different buses together */
92 BusType type;
93 BusType busdep_type;
94 /* Bus-specific fields */
95 union {
96 struct {
97 int bus;
98 int primary_bus;
99 PCITAG acc;
100 pciBridgesSave save;
101 void (*func)(PCITAG,int,CARD32,CARD32);
102 } pci;
103 } busdep;
104} BusAccRec, *BusAccPtr;
105
106/* state change notification callback */
107typedef struct _stateChange {
108 xf86StateChangeNotificationCallbackFunc func;
109 pointer arg;
110 struct _stateChange *next;
111} StateChangeNotificationRec, *StateChangeNotificationPtr;
112
113
114extern EntityPtr *xf86Entities;
115extern int xf86NumEntities;
116extern xf86AccessRec AccessNULL;
117extern BusRec primaryBus;
118extern resPtr Acc;
119extern resPtr osRes;
120extern resPtr ResRange;
121extern BusAccPtr xf86BusAccInfo;
122
123int xf86AllocateEntity(void);
124BusType StringToBusType(const char* busID, const char **retID);
125memType ChkConflict(resRange *rgp, resPtr res, xf86State state);
126Bool xf86IsSubsetOf(resRange range, resPtr list);
127Bool xf86IsListSubsetOf(resPtr list, resPtr BaseList);
128resPtr xf86ExtractTypeFromList(resPtr list, unsigned long type);
129resPtr findIntersect(resRange Range, resPtr list);
130resPtr xf86FindIntersect(resRange Range, resPtr list);
131void RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment,
132 Bool useEstimated);
133void xf86ConvertListToHost(int entityIndex, resPtr list);
134
135#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