1
#ifndef PIRQ_H_INCLUDED
2
#define PIRQ_H_INCLUDED
5
* PCI IRQ Routing Table dumper
6
* Copyright (c) 2006 Dell, Inc.
7
* by Matt Domsch <Matt_Domsch@dell.com>
9
* Based on the description of said table found at
10
* http://www.microsoft.com/hwdev/busbios/pciirq.htm
11
* Licensed under the GNU General Public license, version 2.
17
typedef unsigned char __u8;
18
typedef unsigned short int __u16;
19
typedef unsigned int __u32;
35
} __attribute__((packed));
37
struct routing_table {
44
__u32 compatable_router;
48
struct slot_entry slot[1];
49
} __attribute__((packed));
52
#define PCI_DEVICE(devfn) (((devfn) >> 3) & 0x1f)
53
#define PCI_FUNC(devfn) ((devfn) & 0x07)
54
extern struct routing_table * pirq_alloc_read_table(void);
55
extern void pirq_free_table(struct routing_table *table);
56
extern int pirq_pci_dev_to_slot(struct routing_table *table, int domain, int bus, int dev);
58
#endif /* PIRQ_H_INCLUDED */