~ubuntu-branches/ubuntu/intrepid/xserver-xgl/intrepid

« back to all changes in this revision

Viewing changes to hw/xfree86/common/xf86pciBus.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Garrett
  • Date: 2006-02-13 14:21:43 UTC
  • Revision ID: james.westby@ubuntu.com-20060213142143-mad6z9xzem7hzxz9
Tags: upstream-7.0.0
ImportĀ upstreamĀ versionĀ 7.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86pciBus.h,v 3.10 2003/08/24 17:36:56 dawes Exp $ */
 
2
 
 
3
/*
 
4
 * Copyright (c) 1999-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
#ifdef HAVE_XORG_CONFIG_H
 
31
#include <xorg-config.h>
 
32
#endif
 
33
 
 
34
#ifndef _XF86_PCI_BUS_H
 
35
#define _XF86_PCI_BUS_H
 
36
 
 
37
#define PCITAG_SPECIAL pciTag(0xFF,0xFF,0xFF)
 
38
 
 
39
typedef struct {
 
40
    CARD32 command;
 
41
    CARD32 base[6];
 
42
    CARD32 biosBase;
 
43
} pciSave, *pciSavePtr;
 
44
 
 
45
typedef struct {
 
46
    PCITAG tag;
 
47
    CARD32 ctrl;
 
48
} pciArg;
 
49
 
 
50
typedef struct {
 
51
    int busnum;
 
52
    int devnum;
 
53
    int funcnum;
 
54
    pciArg arg;
 
55
    xf86AccessRec ioAccess;
 
56
    xf86AccessRec io_memAccess;
 
57
    xf86AccessRec memAccess;
 
58
    pciSave save;
 
59
    pciSave restore;
 
60
    Bool ctrl;
 
61
} pciAccRec, *pciAccPtr;
 
62
 
 
63
typedef union {
 
64
    CARD16 control;
 
65
} pciBridgesSave, *pciBridgesSavePtr;
 
66
 
 
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 */
 
71
    int interface;
 
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 */
 
76
    resPtr mem;
 
77
    resPtr pmem;
 
78
    int brcontrol;              /* bridge_control byte */
 
79
    struct pciBusRec *next;
 
80
} PciBusRec, *PciBusPtr;
 
81
 
 
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);
 
96
 
 
97
extern pciAccPtr * xf86PciAccInfo;
 
98
 
 
99
#endif /* _XF86_PCI_BUS_H */