coreboot/src/include/device/path.h
<<
>>
Prefs
   1#ifndef DEVICE_PATH_H
   2#define DEVICE_PATH_H
   3
   4enum device_path_type {
   5        DEVICE_PATH_NONE = 0,
   6        DEVICE_PATH_ROOT,
   7        DEVICE_PATH_PCI,
   8        DEVICE_PATH_PNP,
   9        DEVICE_PATH_I2C,
  10        DEVICE_PATH_APIC,
  11        DEVICE_PATH_PCI_DOMAIN,
  12        DEVICE_PATH_APIC_CLUSTER,
  13        DEVICE_PATH_CPU,
  14        DEVICE_PATH_CPU_BUS,
  15};
  16
  17struct pci_domain_path
  18{
  19        unsigned domain;
  20};
  21
  22struct pci_path
  23{
  24        unsigned devfn;
  25};
  26
  27struct pnp_path
  28{
  29        unsigned port;
  30        unsigned device;
  31};
  32
  33struct i2c_path
  34{
  35        unsigned device;
  36};
  37
  38struct apic_path
  39{
  40        unsigned apic_id;
  41        unsigned node_id;
  42        unsigned core_id;
  43};
  44
  45struct apic_cluster_path
  46{
  47        unsigned cluster;
  48};
  49
  50struct cpu_path
  51{
  52        unsigned id;
  53};
  54
  55struct cpu_bus_path
  56{
  57        unsigned id;
  58};
  59
  60
  61struct device_path {
  62        enum device_path_type type;
  63        union {
  64                struct pci_path          pci;
  65                struct pnp_path          pnp;
  66                struct i2c_path          i2c;
  67                struct apic_path         apic;
  68                struct pci_domain_path   pci_domain;
  69                struct apic_cluster_path apic_cluster;
  70                struct cpu_path          cpu;
  71                struct cpu_bus_path      cpu_bus;
  72        };
  73};
  74
  75
  76#define DEVICE_PATH_MAX 30
  77#define BUS_PATH_MAX (DEVICE_PATH_MAX+10)
  78
  79extern int path_eq(struct device_path *path1, struct device_path *path2);
  80
  81#endif /* DEVICE_PATH_H */
  82
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.