1 | /* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86pciBus.h,v 3.8 2002/09/16 16:55:33 tsi Exp $ */
|
---|
2 |
|
---|
3 | #ifndef _XF86_PCI_BUS_H
|
---|
4 | #define _XF86_PCI_BUS_H
|
---|
5 |
|
---|
6 | #define PCITAG_SPECIAL pciTag(0xFF,0xFF,0xFF)
|
---|
7 |
|
---|
8 | typedef struct {
|
---|
9 | CARD32 command;
|
---|
10 | CARD32 base[6];
|
---|
11 | CARD32 biosBase;
|
---|
12 | } pciSave, *pciSavePtr;
|
---|
13 |
|
---|
14 | typedef void (*SetBitsProcPtr)(PCITAG, int, CARD32, CARD32);
|
---|
15 | typedef void (*WriteProcPtr)(PCITAG, int, CARD32);
|
---|
16 |
|
---|
17 | typedef struct {
|
---|
18 | PCITAG tag;
|
---|
19 | WriteProcPtr func;
|
---|
20 | CARD32 ctrl;
|
---|
21 | } pciArg;
|
---|
22 |
|
---|
23 | typedef struct {
|
---|
24 | int busnum;
|
---|
25 | int devnum;
|
---|
26 | int funcnum;
|
---|
27 | pciArg arg;
|
---|
28 | xf86AccessRec ioAccess;
|
---|
29 | xf86AccessRec io_memAccess;
|
---|
30 | xf86AccessRec memAccess;
|
---|
31 | pciSave save;
|
---|
32 | pciSave restore;
|
---|
33 | Bool ctrl;
|
---|
34 | } pciAccRec, *pciAccPtr;
|
---|
35 |
|
---|
36 | typedef union {
|
---|
37 | CARD16 control;
|
---|
38 | } pciBridgesSave, *pciBridgesSavePtr;
|
---|
39 |
|
---|
40 | typedef struct pciBusRec {
|
---|
41 | int brbus, brdev, brfunc; /* ID of the bridge to this bus */
|
---|
42 | int primary, secondary, subordinate;
|
---|
43 | int subclass; /* bridge type */
|
---|
44 | int interface;
|
---|
45 | resPtr preferred_io; /* I/O range */
|
---|
46 | resPtr preferred_mem; /* non-prefetchable memory range */
|
---|
47 | resPtr preferred_pmem; /* prefetchable memory range */
|
---|
48 | resPtr io; /* for subtractive PCI-PCI bridges */
|
---|
49 | resPtr mem;
|
---|
50 | resPtr pmem;
|
---|
51 | int brcontrol; /* bridge_control byte */
|
---|
52 | struct pciBusRec *next;
|
---|
53 | } PciBusRec, *PciBusPtr;
|
---|
54 |
|
---|
55 | void xf86PciProbe(void);
|
---|
56 | void ValidatePci(void);
|
---|
57 | resList GetImplicitPciResources(int entityIndex);
|
---|
58 | void initPciState(void);
|
---|
59 | void initPciBusState(void);
|
---|
60 | void DisablePciAccess(void);
|
---|
61 | void DisablePciBusAccess(void);
|
---|
62 | void PciStateEnter(void);
|
---|
63 | void PciBusStateEnter(void);
|
---|
64 | void PciStateLeave(void);
|
---|
65 | void PciBusStateLeave(void);
|
---|
66 | resPtr ResourceBrokerInitPci(resPtr *osRes);
|
---|
67 | void pciConvertRange2Host(int entityIndex, resRange *pRange);
|
---|
68 | void isaConvertRange2Host(resRange *pRange);
|
---|
69 |
|
---|
70 | extern pciAccPtr * xf86PciAccInfo;
|
---|
71 |
|
---|
72 | #endif /* _XF86_PCI_BUS_H */
|
---|