Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
808 serge 1
 
2
 
3
{
4
     u16_t device;
5
     u16_t ChipSet;
877 serge 6
}PciChipset_t;
7
#pragma pack(pop)
808 serge 8
9
#define VENDOR_ATI 0x1002
10
 
11
12
 
13
 
14
#define PCI_MAP_ROM_REG               0x30
15
16
#define PCI_MAP_MEMORY                0x00000000
17
 
18
19
#define PCI_MAP_MEMORY_TYPE           0x00000007
20
 
21
22
#define PCI_MAP_MEMORY_TYPE_32BIT     0x00000000
23
 
24
#define PCI_MAP_MEMORY_TYPE_64BIT     0x00000004
25
#define PCI_MAP_MEMORY_TYPE_MASK      0x00000006
26
#define PCI_MAP_MEMORY_CACHABLE       0x00000008
27
#define PCI_MAP_MEMORY_ATTR_MASK      0x0000000e
28
#define PCI_MAP_MEMORY_ADDRESS_MASK   0xfffffff0
29
30
#define PCI_MAP_IO_ATTR_MASK          0x00000003
31
 
32
#define PCI_MAP_IS_IO(b)  ((b) & PCI_MAP_IO)
33
 
34
35
#define PCI_MAP_IS64BITMEM(b)	\
36
 
37
38
#define PCIGETMEMORY(b)   ((b) & PCI_MAP_MEMORY_ADDRESS_MASK)
39
 
40
#define PCIGETMEMORY64(b)	\
41
	(PCIGETMEMORY(b) | ((CARD64)PCIGETMEMORY64HIGH(b) << 32))
42
43
#define PCI_MAP_IO_ADDRESS_MASK       0xfffffffc
44
 
45
#define PCIGETIO(b)		((b) & PCI_MAP_IO_ADDRESS_MASK)
46
 
47
#define PCI_MAP_ROM_DECODE_ENABLE     0x00000001
48
 
49
50
#define PCIGETROM(b)		((b) & PCI_MAP_ROM_ADDRESS_MASK)
51
 
52
53
 
54
 
55
#endif
56
#define PCI_DOMBUS_MASK (((PCI_DOM_MASK) << 8) | 0x0ffu)
57
58
#define PCI_MAKE_TAG(b,d,f)  ((((b) & (PCI_DOMBUS_MASK)) << 16) | \
59
 
60
			      (((f) & 0x000007u) << 8))
61
62
#define PCI_BUS_FROM_TAG(tag)  (((tag) >> 16) & (PCI_DOMBUS_MASK))
63
 
64
#define PCI_FUNC_FROM_TAG(tag) (((tag) & 0x00000700u) >> 8)
65
#define PCI_DFN_FROM_TAG(tag)  (((tag) & 0x0000ff00u) >> 8)
66
67
68
 
69
 
70
extern inline PCITAG
71
 
72
{
73
	return(PCI_MAKE_TAG(busnum,devnum,funcnum));
74
}
75
76
const PciChipset_t *PciDevMatch(u16_t dev,const PciChipset_t *list);
77
 
877 serge 78