~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to include/grub/pci.h

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-09-13 18:02:04 UTC
  • mfrom: (1.17.15 upstream)
  • mto: (17.6.27 experimental)
  • mto: This revision was merged to the branch mainline in revision 145.
  • Revision ID: package-import@ubuntu.com-20120913180204-mojnmocbimlom4im
Tags: upstream-2.00
ImportĀ upstreamĀ versionĀ 2.00

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
#define  GRUB_PCI_CLASS_SUBCLASS_VGA  0x0300
84
84
 
85
85
#ifndef ASM_FILE
 
86
 
 
87
enum
 
88
  {
 
89
    GRUB_PCI_CLASS_NETWORK = 0x02
 
90
  };
 
91
enum
 
92
  {
 
93
    GRUB_PCI_CAP_POWER_MANAGEMENT = 0x01
 
94
  };
 
95
 
 
96
enum
 
97
  {
 
98
    GRUB_PCI_VENDOR_BROADCOM = 0x14e4
 
99
  };
 
100
 
 
101
 
86
102
typedef grub_uint32_t grub_pci_id_t;
87
103
 
88
104
#ifdef GRUB_MACHINE_EMU
132
148
volatile void *EXPORT_FUNC(grub_dma_get_virt) (struct grub_pci_dma_chunk *ch);
133
149
grub_uint32_t EXPORT_FUNC(grub_dma_get_phys) (struct grub_pci_dma_chunk *ch);
134
150
 
 
151
static inline void *
 
152
grub_dma_phys2virt (grub_uint32_t phys, struct grub_pci_dma_chunk *chunk)
 
153
{
 
154
  return ((grub_uint8_t *) grub_dma_get_virt (chunk)
 
155
          + (phys - grub_dma_get_phys (chunk)));
 
156
}
 
157
 
 
158
static inline grub_uint32_t
 
159
grub_dma_virt2phys (volatile void *virt, struct grub_pci_dma_chunk *chunk)
 
160
{
 
161
  return (((grub_uint8_t *) virt - (grub_uint8_t *) grub_dma_get_virt (chunk))
 
162
          + grub_dma_get_phys (chunk));
 
163
}
 
164
 
 
165
grub_uint8_t
 
166
EXPORT_FUNC (grub_pci_find_capability) (grub_pci_device_t dev, grub_uint8_t cap);
 
167
 
135
168
#endif
136
169
 
137
170
#endif /* GRUB_PCI_H */