1 #ifndef __X86_PCI_H__
2 #define __X86_PCI_H__
3 
4 #define CF8_BDF(cf8)     (  ((cf8) & 0x00ffff00) >> 8)
5 #define CF8_ADDR_LO(cf8) (   (cf8) & 0x000000fc)
6 #define CF8_ADDR_HI(cf8) (  ((cf8) & 0x0f000000) >> 16)
7 #define CF8_ENABLED(cf8) (!!((cf8) & 0x80000000))
8 
9 #define IS_SNB_GFX(id) (id == 0x01068086 || id == 0x01168086 \
10                         || id == 0x01268086 || id == 0x01028086 \
11                         || id == 0x01128086 || id == 0x01228086 \
12                         || id == 0x010A8086 )
13 
14 struct arch_pci_dev {
15     vmask_t used_vectors;
16 };
17 
18 int pci_conf_write_intercept(unsigned int seg, unsigned int bdf,
19                              unsigned int reg, unsigned int size,
20                              uint32_t *data);
21 int pci_msi_conf_write_intercept(struct pci_dev *, unsigned int reg,
22                                  unsigned int size, uint32_t *data);
23 bool_t pci_mmcfg_decode(unsigned long mfn, unsigned int *seg,
24                         unsigned int *bdf);
25 
26 bool_t pci_ro_mmcfg_decode(unsigned long mfn, unsigned int *seg,
27                            unsigned int *bdf);
28 
29 #endif /* __X86_PCI_H__ */
30