1
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86pciBus.h,v 3.10 2003/08/24 17:36:56 dawes Exp $ */
4
* Copyright (c) 1999-2003 by The XFree86 Project, Inc.
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:
13
* The above copyright notice and this permission notice shall be included in
14
* all copies or substantial portions of the Software.
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.
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).
30
#ifdef HAVE_XORG_CONFIG_H
31
#include <xorg-config.h>
34
#ifndef _XF86_PCI_BUS_H
35
#define _XF86_PCI_BUS_H
37
#define PCITAG_SPECIAL pciTag(0xFF,0xFF,0xFF)
43
} pciSave, *pciSavePtr;
55
xf86AccessRec ioAccess;
56
xf86AccessRec io_memAccess;
57
xf86AccessRec memAccess;
61
} pciAccRec, *pciAccPtr;
65
} pciBridgesSave, *pciBridgesSavePtr;
67
typedef struct pciBusRec {
68
int brbus, brdev, brfunc; /* ID of the bridge to this bus */
69
int primary, secondary, subordinate;
70
int subclass; /* bridge type */
72
resPtr preferred_io; /* I/O range */
73
resPtr preferred_mem; /* non-prefetchable memory range */
74
resPtr preferred_pmem; /* prefetchable memory range */
75
resPtr io; /* for subtractive PCI-PCI bridges */
78
int brcontrol; /* bridge_control byte */
79
struct pciBusRec *next;
80
} PciBusRec, *PciBusPtr;
82
void xf86PciProbe(void);
83
void ValidatePci(void);
84
resList GetImplicitPciResources(int entityIndex);
85
void initPciState(void);
86
void initPciBusState(void);
87
void DisablePciAccess(void);
88
void DisablePciBusAccess(void);
89
void PciStateEnter(void);
90
void PciBusStateEnter(void);
91
void PciStateLeave(void);
92
void PciBusStateLeave(void);
93
resPtr ResourceBrokerInitPci(resPtr *osRes);
94
void pciConvertRange2Host(int entityIndex, resRange *pRange);
95
void isaConvertRange2Host(resRange *pRange);
97
extern pciAccPtr * xf86PciAccInfo;
99
#endif /* _XF86_PCI_BUS_H */