59 if (prev_match ==
NULL)
62 prev_match = prev_match->
next;
64 for (dev = prev_match; dev; dev = dev->
next) {
90 if (!path1 || !path2) {
100 switch (path1->
type) {
195 size_t nested_path_length)
199 if (!parent || !nested_path || !nested_path_length)
205 if (nested_path_length == 1 || !child)
292 printk(
BIOS_ERR,
"BUG: %s requests hidden 00:%02x.%u\n", func, devfn >> 3, devfn & 7);
297 die(
"DEVTREE: dev or chip_info is NULL\n");
361 if (prev_child ==
NULL)
#define assert(statement)
#define printk(level,...)
void __noreturn die(const char *fmt,...)
DEVTREE_CONST struct bus * pci_root_bus(void)
void __noreturn devtree_die(void)
DEVTREE_CONST struct device * dev_find_slot_on_smbus(unsigned int bus, unsigned int addr)
Given an SMBus bus and a device number, find the device structure.
DEVTREE_CONST struct device * pcidev_path_on_root_debug(pci_devfn_t devfn, const char *func)
DEVTREE_CONST struct device * find_dev_nested_path(const struct bus *parent, const struct device_path nested_path[], size_t nested_path_length)
Find the device structure given an array of nested device paths,.
static int path_eq(const struct device_path *path1, const struct device_path *path2)
DEVTREE_CONST struct device * pcidev_path_behind(const struct bus *parent, pci_devfn_t devfn)
bool is_devfn_enabled(unsigned int devfn)
DEVTREE_CONST struct device * dev_find_path(DEVTREE_CONST struct device *prev_match, enum device_path_type path_type)
Given a Device Path Type, find the device structure.
void devtree_bug(const char *func, pci_devfn_t devfn)
DEVTREE_CONST struct device * dev_find_slot_pnp(u16 port, u16 device)
Given a PnP port and a device number, find the device structure.
DEVTREE_CONST struct device * pcidev_path_behind_pci2pci_bridge(const struct device *bridge, pci_devfn_t devfn)
DEVTREE_CONST struct device * find_dev_path(const struct bus *parent, const struct device_path *path)
See if a device structure exists for path.
DEVTREE_CONST struct device *DEVTREE_CONST all_devices
Linked list of ALL devices.
DEVTREE_CONST struct device * dev_find_next_pci_device(DEVTREE_CONST struct device *previous_dev)
Given a device pointer, find the next PCI device.
bool is_dev_enabled(const struct device *dev)
static DEVTREE_CONST struct device * dev_find_slot(unsigned int bus, unsigned int devfn)
Given a PCI bus and a devfn number, find the device structure.
DEVTREE_CONST struct device * pcidev_path_on_root(pci_devfn_t devfn)
DEVTREE_CONST struct device * pcidev_on_root(uint8_t dev, uint8_t fn)
DEVTREE_CONST struct device * pcidev_path_on_bus(unsigned int bus, pci_devfn_t devfn)
DEVTREE_CONST struct device * dev_bus_each_child(const struct bus *parent, DEVTREE_CONST struct device *prev_child)
Given a device and previous match iterate through all the children.
DEVTREE_CONST struct device dev_root
This is the root of the device tree.
bool fw_config_probe_dev(const struct device *dev, const struct fw_config **matching_probe)
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
@ DEVICE_PATH_CPU_CLUSTER
static const PCI_SUBCLASS bridge[]
#define PCI_DEVFN(slot, func)
DEVTREE_CONST struct device * children
struct domain_path domain
struct cpu_cluster_path cpu_cluster
struct cpu_bus_path cpu_bus
struct generic_path generic
enum device_path_type type
DEVTREE_CONST struct device * sibling
DEVTREE_CONST struct bus * bus
DEVTREE_CONST struct bus * link_list
DEVTREE_CONST struct device * next